java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, IServiceRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.133.0 (build 0f43e37)", date="2026-06-16T16:14:31.926Z") @Stability(Stable) public class CfnService extends CfnResource implements IInspectable, IServiceRef, ITaggableV2
Creates a resilience-managed service with associated systems, input sources, assertions, and service functions.

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.resiliencehubv2.*;
 CfnService cfnService = CfnService.Builder.create(this, "MyCfnService")
         .name("name")
         .regions(List.of("regions"))
         // the properties below are optional
         .assertions(List.of(AssertionDefinitionProperty.builder()
                 .text("text")
                 .build()))
         .associatedSystems(List.of(AssociatedSystemProperty.builder()
                 .systemArn("systemArn")
                 // the properties below are optional
                 .userJourneyIds(List.of("userJourneyIds"))
                 .build()))
         .dependencyDiscovery("dependencyDiscovery")
         .description("description")
         .inputSources(List.of(InputSourceDefinitionProperty.builder()
                 .resourceConfiguration(ResourceConfigurationProperty.builder()
                         .cfnStackArn("cfnStackArn")
                         .designFileS3Url("designFileS3Url")
                         .eks(EksSourceProperty.builder()
                                 .clusterArn("clusterArn")
                                 .namespaces(List.of("namespaces"))
                                 .build())
                         .resourceTags(List.of(ResourceTagProperty.builder()
                                 .key("key")
                                 .values(List.of("values"))
                                 .build()))
                         .tfStateFileUrl("tfStateFileUrl")
                         .build())
                 .build()))
         .kmsKeyId("kmsKeyId")
         .permissionModel(PermissionModelProperty.builder()
                 .invokerRoleName("invokerRoleName")
                 // the properties below are optional
                 .crossAccountRoleArns(List.of(CrossAccountRoleConfigurationProperty.builder()
                         .crossAccountRoleArn("crossAccountRoleArn")
                         // the properties below are optional
                         .externalId("externalId")
                         .build()))
                 .build())
         .policyArn("policyArn")
         .reportConfiguration(ServiceReportConfigurationProperty.builder()
                 .reportOutput(List.of(ReportOutputConfigurationProperty.builder()
                         .s3(S3ReportOutputConfigurationProperty.builder()
                                 .bucketOwner("bucketOwner")
                                 .bucketPath("bucketPath")
                                 .build())
                         .build()))
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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)
      Create a new AWS::ResilienceHubV2::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. This parameter is required.
  • Method Details

    • arnForService

      @Stability(Stable) @NotNull public static String arnForService(@NotNull IServiceRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnService

      @Stability(Stable) @NotNull public static Boolean isCfnService(@NotNull Object x)
      Checks whether the given object is a CfnService.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp when the service was created.
    • getAttrEffectivePolicyValues

      @Stability(Stable) @NotNull public IResolvable getAttrEffectivePolicyValues()
      Effective policy values computed from the associated policy.
    • getAttrServiceArn

      @Stability(Stable) @NotNull public String getAttrServiceArn()
      The ARN of the service.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The timestamp when the service was last updated.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getServiceRef

      @Stability(Stable) @NotNull public ServiceReference getServiceRef()
      A reference to a Service resource.
      Specified by:
      getServiceRef in interface IServiceRef
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the service.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the service.
    • getRegions

      @Stability(Stable) @NotNull public List<String> getRegions()
      AWS regions for the service.
    • setRegions

      @Stability(Stable) public void setRegions(@NotNull List<String> value)
      AWS regions for the service.
    • getAssertions

      @Stability(Stable) @Nullable public Object getAssertions()
      Assertions associated with this service.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnService.AssertionDefinitionProperty>

    • setAssertions

      @Stability(Stable) public void setAssertions(@Nullable IResolvable value)
      Assertions associated with this service.
    • setAssertions

      @Stability(Stable) public void setAssertions(@Nullable List<Object> value)
      Assertions associated with this service.
    • getAssociatedSystems

      @Stability(Stable) @Nullable public Object getAssociatedSystems()
      Systems associated with this service.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnService.AssociatedSystemProperty>

    • setAssociatedSystems

      @Stability(Stable) public void setAssociatedSystems(@Nullable IResolvable value)
      Systems associated with this service.
    • setAssociatedSystems

      @Stability(Stable) public void setAssociatedSystems(@Nullable List<Object> value)
      Systems associated with this service.
    • getDependencyDiscovery

      @Stability(Stable) @Nullable public String getDependencyDiscovery()
      Dependency discovery state.
    • setDependencyDiscovery

      @Stability(Stable) public void setDependencyDiscovery(@Nullable String value)
      Dependency discovery state.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the service.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the service.
    • getInputSources

      @Stability(Stable) @Nullable public Object getInputSources()
      Input sources for this service.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnService.InputSourceDefinitionProperty>

    • setInputSources

      @Stability(Stable) public void setInputSources(@Nullable IResolvable value)
      Input sources for this service.
    • setInputSources

      @Stability(Stable) public void setInputSources(@Nullable List<Object> value)
      Input sources for this service.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      The KMS key ID for encrypting service data.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      The KMS key ID for encrypting service data.
    • getPermissionModel

      @Stability(Stable) @Nullable public Object getPermissionModel()
    • setPermissionModel

      @Stability(Stable) public void setPermissionModel(@Nullable IResolvable value)
    • setPermissionModel

      @Stability(Stable) public void setPermissionModel(@Nullable CfnService.PermissionModelProperty value)
    • getPolicyArn

      @Stability(Stable) @Nullable public String getPolicyArn()
      The ARN of the resilience policy to associate.
    • setPolicyArn

      @Stability(Stable) public void setPolicyArn(@Nullable String value)
      The ARN of the resilience policy to associate.
    • getReportConfiguration

      @Stability(Stable) @Nullable public Object getReportConfiguration()
      Configuration for automatic report generation on a Service.

      Returns union: either IResolvable or CfnService.ServiceReportConfigurationProperty

    • setReportConfiguration

      @Stability(Stable) public void setReportConfiguration(@Nullable IResolvable value)
      Configuration for automatic report generation on a Service.
    • setReportConfiguration

      @Stability(Stable) public void setReportConfiguration(@Nullable CfnService.ServiceReportConfigurationProperty value)
      Configuration for automatic report generation on a Service.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Tags assigned to the service.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Tags assigned to the service.