@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:48.203Z") public class CfnService extends CfnResource implements IInspectable
A complex type that contains information about a service, which defines the configuration of the following entities:
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.servicediscovery.*; CfnService cfnService = CfnService.Builder.create(this, "MyCfnService") .description("description") .dnsConfig(DnsConfigProperty.builder() .dnsRecords(List.of(DnsRecordProperty.builder() .ttl(123) .type("type") .build())) // the properties below are optional .namespaceId("namespaceId") .routingPolicy("routingPolicy") .build()) .healthCheckConfig(HealthCheckConfigProperty.builder() .type("type") // the properties below are optional .failureThreshold(123) .resourcePath("resourcePath") .build()) .healthCheckCustomConfig(HealthCheckCustomConfigProperty.builder() .failureThreshold(123) .build()) .name("name") .namespaceId("namespaceId") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .type("type") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnService.Builder
A fluent builder for
CfnService . |
static interface |
CfnService.DnsConfigProperty
A complex type that contains information about the Amazon Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
|
static interface |
CfnService.DnsRecordProperty
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
|
static interface |
CfnService.HealthCheckConfigProperty
*Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check.
|
static interface |
CfnService.HealthCheckCustomConfigProperty
A complex type that contains information about an optional custom health check.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnService(Construct scope,
java.lang.String id)
Create a new `AWS::ServiceDiscovery::Service`.
|
|
CfnService(Construct scope,
java.lang.String id,
CfnServiceProps props)
Create a new `AWS::ServiceDiscovery::Service`.
|
protected |
CfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnService(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the service.
|
java.lang.String |
getAttrId()
The ID of the service.
|
java.lang.String |
getAttrName()
The name that you assigned to the service.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
The description of the service.
|
java.lang.Object |
getDnsConfig()
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
|
java.lang.Object |
getHealthCheckConfig()
*Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check.
|
java.lang.Object |
getHealthCheckCustomConfig()
A complex type that contains information about an optional custom health check.
|
java.lang.String |
getName()
The name of the service.
|
java.lang.String |
getNamespaceId()
The ID of the namespace that was used to create the service.
|
TagManager |
getTags()
The tags for the service.
|
java.lang.String |
getType()
If present, specifies that the service instances are only discoverable using the `DiscoverInstances` API operation.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDescription(java.lang.String value)
The description of the service.
|
void |
setDnsConfig(CfnService.DnsConfigProperty value)
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
|
void |
setDnsConfig(IResolvable value)
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
|
void |
setHealthCheckConfig(CfnService.HealthCheckConfigProperty value)
*Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check.
|
void |
setHealthCheckConfig(IResolvable value)
*Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check.
|
void |
setHealthCheckCustomConfig(CfnService.HealthCheckCustomConfigProperty value)
A complex type that contains information about an optional custom health check.
|
void |
setHealthCheckCustomConfig(IResolvable value)
A complex type that contains information about an optional custom health check.
|
void |
setName(java.lang.String value)
The name of the service.
|
void |
setNamespaceId(java.lang.String value)
The ID of the namespace that was used to create the service.
|
void |
setType(java.lang.String value)
If present, specifies that the service instances are only discoverable using the `DiscoverInstances` API operation.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnService(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnService(Construct scope, java.lang.String id, CfnServiceProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties.public CfnService(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrId()
public java.lang.String getAttrName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.Object getDnsConfig()
The record types of a service can only be changed by deleting the service and recreating it with a new
Dnsconfig
.
public void setDnsConfig(IResolvable value)
The record types of a service can only be changed by deleting the service and recreating it with a new
Dnsconfig
.
public void setDnsConfig(CfnService.DnsConfigProperty value)
The record types of a service can only be changed by deleting the service and recreating it with a new
Dnsconfig
.
public java.lang.Object getHealthCheckConfig()
For information about the charges for health checks, see Amazon Route 53 Pricing .
public void setHealthCheckConfig(IResolvable value)
For information about the charges for health checks, see Amazon Route 53 Pricing .
public void setHealthCheckConfig(CfnService.HealthCheckConfigProperty value)
For information about the charges for health checks, see Amazon Route 53 Pricing .
public java.lang.Object getHealthCheckCustomConfig()
If you specify a health check configuration, you can specify either
HealthCheckCustomConfig
orHealthCheckConfig
but not both.
public void setHealthCheckCustomConfig(IResolvable value)
If you specify a health check configuration, you can specify either
HealthCheckCustomConfig
orHealthCheckConfig
but not both.
public void setHealthCheckCustomConfig(CfnService.HealthCheckCustomConfigProperty value)
If you specify a health check configuration, you can specify either
HealthCheckCustomConfig
orHealthCheckConfig
but not both.
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getNamespaceId()
You must specify a value for
NamespaceId
either for the service properties or for DnsConfig . Don't specify a value in both places.
public void setNamespaceId(java.lang.String value)
You must specify a value for
NamespaceId
either for the service properties or for DnsConfig . Don't specify a value in both places.
public java.lang.String getType()
No DNS records is registered for the service instances. The only valid value is HTTP
.
public void setType(java.lang.String value)
No DNS records is registered for the service instances. The only valid value is HTTP
.