Show / Hide Table of Contents

Class Service

Provides a Service Discovery Service resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var exampleVpc = new Aws.Ec2.Vpc("exampleVpc", new Aws.Ec2.VpcArgs
    {
        CidrBlock = "10.0.0.0/16",
        EnableDnsHostnames = true,
        EnableDnsSupport = true,
    });
    var examplePrivateDnsNamespace = new Aws.ServiceDiscovery.PrivateDnsNamespace("examplePrivateDnsNamespace", new Aws.ServiceDiscovery.PrivateDnsNamespaceArgs
    {
        Description = "example",
        Vpc = exampleVpc.Id,
    });
    var exampleService = new Aws.ServiceDiscovery.Service("exampleService", new Aws.ServiceDiscovery.ServiceArgs
    {
        DnsConfig = new Aws.ServiceDiscovery.Inputs.ServiceDnsConfigArgs
        {
            DnsRecords = 
            {
                new Aws.ServiceDiscovery.Inputs.ServiceDnsConfigDnsRecordArgs
                {
                    Ttl = 10,
                    Type = "A",
                },
            },
            NamespaceId = examplePrivateDnsNamespace.Id,
            RoutingPolicy = "MULTIVALUE",
        },
        HealthCheckCustomConfig = new Aws.ServiceDiscovery.Inputs.ServiceHealthCheckCustomConfigArgs
        {
            FailureThreshold = 1,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Service
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ServiceDiscovery
Assembly: Pulumi.Aws.dll
Syntax
public class Service : CustomResource

Constructors

View Source

Service(String, ServiceArgs, CustomResourceOptions)

Create a Service resource with the given unique name, arguments, and options.

Declaration
public Service(string name, ServiceArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ServiceArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The ARN of the service.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of the service.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DnsConfig

A complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance.

Declaration
public Output<ServiceDnsConfig> DnsConfig { get; }
Property Value
Type Description
Output<ServiceDnsConfig>
View Source

HealthCheckConfig

A complex type that contains settings for an optional health check. Only for Public DNS namespaces.

Declaration
public Output<ServiceHealthCheckConfig> HealthCheckConfig { get; }
Property Value
Type Description
Output<ServiceHealthCheckConfig>
View Source

HealthCheckCustomConfig

A complex type that contains settings for ECS managed health checks.

Declaration
public Output<ServiceHealthCheckCustomConfig> HealthCheckCustomConfig { get; }
Property Value
Type Description
Output<ServiceHealthCheckCustomConfig>
View Source

Name

The name of the service.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NamespaceId

The ID of the namespace to use for DNS configuration.

Declaration
public Output<string> NamespaceId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ServiceState, CustomResourceOptions)

Get an existing Service resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Service Get(string name, Input<string> id, ServiceState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ServiceState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Service
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.