Class CfnService
- All Implemented Interfaces:
 IInspectable,ITaggable,IServiceRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
AWS Migration Hub will no longer be open to new customers starting November 7, 2025.
To continue using the service, sign up prior to November 7, 2025. For capabilities similar to AWS Migration Hub , explore AWS Migration Hub .
Creates an AWS Migration Hub Refactor Spaces service. The account owner of the service is always the environment owner, regardless of which account in the environment creates the service. Services have either a URL endpoint in a virtual private cloud (VPC), or a Lambda function endpoint.
If an AWS resource is launched in a service VPC, and you want it to be accessible to all of an environment’s services with VPCs and routes, apply the
RefactorSpacesSecurityGroupto the resource. Alternatively, to add more cross-account constraints, apply your own security group.
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.refactorspaces.*;
 CfnService cfnService = CfnService.Builder.create(this, "MyCfnService")
         .applicationIdentifier("applicationIdentifier")
         .endpointType("endpointType")
         .environmentIdentifier("environmentIdentifier")
         .name("name")
         // the properties below are optional
         .description("description")
         .lambdaEndpoint(LambdaEndpointInputProperty.builder()
                 .arn("arn")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .urlEndpoint(UrlEndpointInputProperty.builder()
                 .url("url")
                 // the properties below are optional
                 .healthUrl("healthUrl")
                 .build())
         .vpcId("vpcId")
         .build();
 
 - See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnService.static interfaceThe input for the AWS Lambda endpoint type.static interfaceThe configuration for the URL endpoint type.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.services.refactorspaces.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, CfnServiceProps props)  - 
Method Summary
Modifier and TypeMethodDescriptionThe unique identifier of the application.The Amazon Resource Name (ARN) of the service.The unique identifier of the service.A description of the service.The endpoint type of the service.The unique identifier of the environment.A summary of the configuration for the AWS Lambda endpoint type.getName()The name of the service.A reference to a Service resource.getTags()Tag Manager which manages the tags for this resource.The tags assigned to the service.The summary of the configuration for the URL endpoint type.getVpcId()The ID of the virtual private cloud (VPC).voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetApplicationIdentifier(String value) The unique identifier of the application.voidsetDescription(String value) A description of the service.voidsetEndpointType(String value) The endpoint type of the service.voidsetEnvironmentIdentifier(String value) The unique identifier of the environment.voidsetLambdaEndpoint(IResolvable value) A summary of the configuration for the AWS Lambda endpoint type.voidA summary of the configuration for the AWS Lambda endpoint type.voidThe name of the service.voidsetTagsRaw(List<CfnTag> value) The tags assigned to the service.voidsetUrlEndpoint(IResolvable value) The summary of the configuration for the URL endpoint type.voidThe summary of the configuration for the URL endpoint type.voidThe ID of the virtual private cloud (VPC).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, 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.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, @NotNull 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. This parameter is required.
 
 - 
 - 
Method Details
- 
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. - 
getAttrServiceIdentifier
The unique identifier of 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. - 
getApplicationIdentifier
The unique identifier of the application. - 
setApplicationIdentifier
The unique identifier of the application. - 
getEndpointType
The endpoint type of the service. - 
setEndpointType
The endpoint type of the service. - 
getEnvironmentIdentifier
The unique identifier of the environment. - 
setEnvironmentIdentifier
The unique identifier of the environment. - 
getName
The name of the service. - 
setName
The name of the service. - 
getDescription
A description of the service. - 
setDescription
A description of the service. - 
getLambdaEndpoint
A summary of the configuration for the AWS Lambda endpoint type.Returns union: either
IResolvableorCfnService.LambdaEndpointInputProperty - 
setLambdaEndpoint
A summary of the configuration for the AWS Lambda endpoint type. - 
setLambdaEndpoint
@Stability(Stable) public void setLambdaEndpoint(@Nullable CfnService.LambdaEndpointInputProperty value) A summary of the configuration for the AWS Lambda endpoint type. - 
getTagsRaw
The tags assigned to the service. - 
setTagsRaw
The tags assigned to the service. - 
getUrlEndpoint
The summary of the configuration for the URL endpoint type.Returns union: either
IResolvableorCfnService.UrlEndpointInputProperty - 
setUrlEndpoint
The summary of the configuration for the URL endpoint type. - 
setUrlEndpoint
The summary of the configuration for the URL endpoint type. - 
getVpcId
The ID of the virtual private cloud (VPC). - 
setVpcId
The ID of the virtual private cloud (VPC). 
 -