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,IEnvironmentAware,IServiceRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:30.353Z")
@Stability(Stable)
public class CfnService
extends CfnResource
implements IInspectable, IServiceRef, ITaggable
A complex type that contains information about the specified service.
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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnService.static interfaceA 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 interfaceA 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 interfacePublic DNS and HTTP namespaces only. A complex type that contains settings for an optional health check.static interfaceA 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.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.servicediscovery.IServiceRef
IServiceRef.Jsii$Default, IServiceRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnService(software.amazon.jsii.JsiiObjectRef objRef) CfnService(software.constructs.Construct scope, String id) Create a newAWS::ServiceDiscovery::Service.CfnService(software.constructs.Construct scope, String id, CfnServiceProps props) Create a newAWS::ServiceDiscovery::Service. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForService(IServiceRef resource) static IServiceReffromServiceArn(software.constructs.Construct scope, String id, String arn) Creates a new IServiceRef from an ARN.static IServiceReffromServiceId(software.constructs.Construct scope, String id, String serviceId) Creates a new IServiceRef from a serviceId.The 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 or Amazon Resource Name (ARN) of the namespace that you want to use to create the service.A complex type that contains information about attributes associated with a specific service.A reference to a Service resource.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 theDiscoverInstancesAPI operation.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) The description of the service.voidsetDnsConfig(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.voidA complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.voidsetHealthCheckConfig(IResolvable value) Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check.voidPublic DNS and HTTP namespaces only. A complex type that contains settings for an optional health check.voidA complex type that contains information about an optional custom health check.voidA complex type that contains information about an optional custom health check.voidThe name of the service.voidsetNamespaceId(String value) The ID or Amazon Resource Name (ARN) of the namespace that you want to use to create the service.voidsetServiceAttributes(Object value) A complex type that contains information about attributes associated with a specific service.voidsetTagsRaw(List<CfnTag> value) The tags for the service.voidIf present, specifies that the service instances are only discoverable using theDiscoverInstancesAPI operation.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods 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) Create a newAWS::ServiceDiscovery::Service.- 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) Create a newAWS::ServiceDiscovery::Service.- 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
-
arnForService
- Parameters:
resource- This parameter is required.
-
fromServiceArn
@Stability(Stable) @NotNull public static IServiceRef fromServiceArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IServiceRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromServiceId
@Stability(Stable) @NotNull public static IServiceRef fromServiceId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String serviceId) Creates a new IServiceRef from a serviceId.- Parameters:
scope- This parameter is required.id- This parameter is required.serviceId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin 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:
renderPropertiesin 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:
getCfnPropertiesin classCfnResource
-
getServiceRef
A reference to a Service resource.- Specified by:
getServiceRefin interfaceIServiceRef
-
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.Returns union: either
IResolvableorCfnService.DnsConfigProperty -
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.Returns union: either
IResolvableorCfnService.HealthCheckConfigProperty -
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.Returns union: either
IResolvableorCfnService.HealthCheckCustomConfigProperty -
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 or Amazon Resource Name (ARN) of the namespace that you want to use to create the service. -
setNamespaceId
The ID or Amazon Resource Name (ARN) of the namespace that you want to use to create the service. -
getServiceAttributes
A complex type that contains information about attributes associated with a specific service. -
setServiceAttributes
A complex type that contains information about attributes associated with a specific service. -
getTagsRaw
The tags for the service. -
setTagsRaw
The tags for the service. -
getType
If present, specifies that the service instances are only discoverable using theDiscoverInstancesAPI operation. -
setType
If present, specifies that the service instances are only discoverable using theDiscoverInstancesAPI operation.
-