Class CfnService
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::ServiceDiscovery::Service
.
A complex type that contains information about a service, which defines the configuration of the following entities:
- For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53:
- A
- AAAA
- A and AAAA
- SRV
- CNAME
- Optionally, a health check
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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnService
.static interface
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
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
Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check.static interface
A complex type that contains information about an optional custom health check.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnService
(Construct scope, String id) Create a newAWS::ServiceDiscovery::Service
.CfnService
(Construct scope, String id, CfnServiceProps props) Create a newAWS::ServiceDiscovery::Service
.protected
CfnService
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnService
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the service.The ID of the service.The name that you assigned to the service.The description of the service.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.Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check.A complex type that contains information about an optional custom health check.getName()
The name of the service.The ID of the namespace that was used to create the service.getTags()
The tags for the service.getType()
If present, specifies that the service instances are only discoverable using theDiscoverInstances
API operation.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDescription
(String value) The description of the service.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
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
(IResolvable value) Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check.void
Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check.void
A complex type that contains information about an optional custom health check.void
A complex type that contains information about an optional custom health check.void
The name of the service.void
setNamespaceId
(String value) The ID of the namespace that was used to create the service.void
If present, specifies that the service instances are only discoverable using theDiscoverInstances
API operation.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnService
protected CfnService(software.amazon.jsii.JsiiObjectRef objRef) -
CfnService
protected CfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnService
@Stability(Stable) public CfnService(@NotNull Construct scope, @NotNull String id, @Nullable CfnServiceProps props) Create a newAWS::ServiceDiscovery::Service
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
CfnService
Create a newAWS::ServiceDiscovery::Service
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the service. -
getAttrId
The ID of the service. -
getAttrName
The name that you assigned to the service. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
The tags for the service.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.
-
getDescription
The description of the service. -
setDescription
The description of the service. -
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.The record types of a service can only be changed by deleting the service and recreating it with a new
Dnsconfig
. -
setDnsConfig
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.The record types of a service can only be changed by deleting the service and recreating it with a new
Dnsconfig
. -
setDnsConfig
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.The record types of a service can only be changed by deleting the service and recreating it with a new
Dnsconfig
. -
getHealthCheckConfig
Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify inDnsConfig
.For information about the charges for health checks, see Amazon Route 53 Pricing .
-
setHealthCheckConfig
Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify inDnsConfig
.For information about the charges for health checks, see Amazon Route 53 Pricing .
-
setHealthCheckConfig
@Stability(Stable) public void setHealthCheckConfig(@Nullable CfnService.HealthCheckConfigProperty value) Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify inDnsConfig
.For information about the charges for health checks, see Amazon Route 53 Pricing .
-
getHealthCheckCustomConfig
A complex type that contains information about an optional custom health check.If you specify a health check configuration, you can specify either
HealthCheckCustomConfig
orHealthCheckConfig
but not both. -
setHealthCheckCustomConfig
A complex type that contains information about an optional custom health check.If you specify a health check configuration, you can specify either
HealthCheckCustomConfig
orHealthCheckConfig
but not both. -
setHealthCheckCustomConfig
@Stability(Stable) public void setHealthCheckCustomConfig(@Nullable CfnService.HealthCheckCustomConfigProperty value) A complex type that contains information about an optional custom health check.If you specify a health check configuration, you can specify either
HealthCheckCustomConfig
orHealthCheckConfig
but not both. -
getName
The name of the service. -
setName
The name of the service. -
getNamespaceId
The ID of the namespace that was used to create the service.You must specify a value for
NamespaceId
either for the service properties or for DnsConfig . Don't specify a value in both places. -
setNamespaceId
The ID of the namespace that was used to create the service.You must specify a value for
NamespaceId
either for the service properties or for DnsConfig . Don't specify a value in both places. -
getType
If present, specifies that the service instances are only discoverable using theDiscoverInstances
API operation.No DNS records is registered for the service instances. The only valid value is
HTTP
. -
setType
If present, specifies that the service instances are only discoverable using theDiscoverInstances
API operation.No DNS records is registered for the service instances. The only valid value is
HTTP
.
-