ServiceArgs

data class ServiceArgs(val description: Output<String>? = null, val dnsConfig: Output<ServiceDnsConfigArgs>? = null, val forceDestroy: Output<Boolean>? = null, val healthCheckConfig: Output<ServiceHealthCheckConfigArgs>? = null, val healthCheckCustomConfig: Output<ServiceHealthCheckCustomConfigArgs>? = null, val name: Output<String>? = null, val namespaceId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val type: Output<String>? = null) : ConvertibleToJava<ServiceArgs>

Provides a Service Discovery Service resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.servicediscovery.PrivateDnsNamespace;
import com.pulumi.aws.servicediscovery.PrivateDnsNamespaceArgs;
import com.pulumi.aws.servicediscovery.Service;
import com.pulumi.aws.servicediscovery.ServiceArgs;
import com.pulumi.aws.servicediscovery.inputs.ServiceDnsConfigArgs;
import com.pulumi.aws.servicediscovery.inputs.ServiceHealthCheckCustomConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.enableDnsSupport(true)
.enableDnsHostnames(true)
.build());
var examplePrivateDnsNamespace = new PrivateDnsNamespace("examplePrivateDnsNamespace", PrivateDnsNamespaceArgs.builder()
.description("example")
.vpc(exampleVpc.id())
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.dnsConfig(ServiceDnsConfigArgs.builder()
.namespaceId(examplePrivateDnsNamespace.id())
.dnsRecords(ServiceDnsConfigDnsRecordArgs.builder()
.ttl(10)
.type("A")
.build())
.routingPolicy("MULTIVALUE")
.build())
.healthCheckCustomConfig(ServiceHealthCheckCustomConfigArgs.builder()
.failureThreshold(1)
.build())
.build());
}
}

Import

Service Discovery Service can be imported using the service ID, e.g.,

$ pulumi import aws:servicediscovery/service:Service example 0123456789

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, dnsConfig: Output<ServiceDnsConfigArgs>? = null, forceDestroy: Output<Boolean>? = null, healthCheckConfig: Output<ServiceHealthCheckConfigArgs>? = null, healthCheckCustomConfig: Output<ServiceHealthCheckCustomConfigArgs>? = null, name: Output<String>? = null, namespaceId: Output<String>? = null, tags: Output<Map<String, String>>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

The description of the service.

Link copied to clipboard
val dnsConfig: Output<ServiceDnsConfigArgs>? = null

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

Link copied to clipboard
val forceDestroy: Output<Boolean>? = null

A boolean that indicates all instances should be deleted from the service so that the service can be destroyed without error. These instances are not recoverable.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val name: Output<String>? = null

The name of the service.

Link copied to clipboard
val namespaceId: Output<String>? = null

The ID of the namespace that you want to use to create the service.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the service. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val type: Output<String>? = null

If present, specifies that the service instances are only discoverable using the DiscoverInstances API operation. No DNS records is registered for the service instances. The only valid value is HTTP.

Functions

Link copied to clipboard
open override fun toJava(): ServiceArgs