Class CfnService
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.servicediscovery.CfnService
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-27T17:02:10.223Z")
@Stability(Stable)
public class CfnService
extends CfnResource
implements IInspectable, ITaggable
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.*; Object serviceAttributes; 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") .serviceAttributes(serviceAttributes) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .type("type") .build();
- See Also:
-
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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnService
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnService
(software.amazon.jsii.JsiiObjectRef objRef) CfnService
(software.constructs.Construct scope, String id) CfnService
(software.constructs.Construct scope, String id, CfnServiceProps props) -
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()
Tag Manager which manages the tags for this resource.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
setServiceAttributes
(Object value) void
setTagsRaw
(List<CfnTag> value) The tags for the service.void
If present, specifies that the service instances are only discoverable using theDiscoverInstances
API operation.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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 software.constructs.Construct scope, @NotNull String id, @Nullable CfnServiceProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties.
-
CfnService
@Stability(Stable) public CfnService(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
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
Tag Manager which manages the tags for this resource. -
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. -
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. -
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. -
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
. -
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
. -
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
. -
getHealthCheckCustomConfig
A complex type that contains information about an optional custom health check. -
setHealthCheckCustomConfig
A complex type that contains information about an optional custom health check. -
setHealthCheckCustomConfig
@Stability(Stable) public void setHealthCheckCustomConfig(@Nullable CfnService.HealthCheckCustomConfigProperty value) A complex type that contains information about an optional custom health check. -
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. -
setNamespaceId
The ID of the namespace that was used to create the service. -
getServiceAttributes
-
setServiceAttributes
-
getTagsRaw
The tags for the service. -
setTagsRaw
The tags for the service. -
getType
If present, specifies that the service instances are only discoverable using theDiscoverInstances
API operation. -
setType
If present, specifies that the service instances are only discoverable using theDiscoverInstances
API operation.
-