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,
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.ServiceDiscovery
Assembly: Pulumi.Aws.dll
Syntax
public class Service : CustomResource
Constructors
View SourceService(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 SourceArn
The ARN of the service.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the service.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
HealthCheckCustomConfig
A complex type that contains settings for ECS managed health checks.
Declaration
public Output<ServiceHealthCheckCustomConfig> HealthCheckCustomConfig { get; }
Property Value
| Type | Description |
|---|---|
| Output<ServiceHealthCheckCustomConfig> |
Name
The name of the service.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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 SourceGet(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 |