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

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:21.075Z") @Stability(Stable) public class CfnWorkload extends CfnResource implements IInspectable, IWorkloadRef, ITaggableV2
Definition of AWS::WellArchitected::Workload Resource Type.

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.wellarchitected.*;
 CfnWorkload cfnWorkload = CfnWorkload.Builder.create(this, "MyCfnWorkload")
         .description("description")
         .environment("environment")
         .lenses(List.of("lenses"))
         .workloadName("workloadName")
         // the properties below are optional
         .accountIds(List.of("accountIds"))
         .architecturalDesign("architecturalDesign")
         .awsRegions(List.of("awsRegions"))
         .discoveryConfig(DiscoveryConfigProperty.builder()
                 .trustedAdvisorIntegrationStatus("trustedAdvisorIntegrationStatus")
                 .workloadResourceDefinition(List.of("workloadResourceDefinition"))
                 .build())
         .industry("industry")
         .industryType("industryType")
         .nonAwsRegions(List.of("nonAwsRegions"))
         .notes("notes")
         .reviewOwner("reviewOwner")
         .tags(List.of(TagsItemsProperty.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

    • CfnWorkload

      protected CfnWorkload(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnWorkload

      protected CfnWorkload(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnWorkload

      @Stability(Stable) public CfnWorkload(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnWorkloadProps props)
      Create a new AWS::WellArchitected::Workload.

      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

    • arnForWorkload

      @Stability(Stable) @NotNull public static String arnForWorkload(@NotNull IWorkloadRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnWorkload

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

      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.
    • getAttrImprovementStatus

      @Stability(Stable) @NotNull public String getAttrImprovementStatus()
      The improvement status for a workload.
    • getAttrWorkloadArn

      @Stability(Stable) @NotNull public String getAttrWorkloadArn()
      The ARN for the workload.
    • getAttrWorkloadId

      @Stability(Stable) @NotNull public String getAttrWorkloadId()
      The ID assigned to the workload.
    • 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
    • getWorkloadRef

      @Stability(Stable) @NotNull public WorkloadReference getWorkloadRef()
      A reference to a Workload resource.
      Specified by:
      getWorkloadRef in interface IWorkloadRef
    • getDescription

      @Stability(Stable) @NotNull public String getDescription()
      The description for the workload.
    • setDescription

      @Stability(Stable) public void setDescription(@NotNull String value)
      The description for the workload.
    • getEnvironment

      @Stability(Stable) @NotNull public String getEnvironment()
      The environment for the workload.
    • setEnvironment

      @Stability(Stable) public void setEnvironment(@NotNull String value)
      The environment for the workload.
    • getLenses

      @Stability(Stable) @NotNull public List<String> getLenses()
      The list of lenses associated with the workload.
    • setLenses

      @Stability(Stable) public void setLenses(@NotNull List<String> value)
      The list of lenses associated with the workload.
    • getWorkloadName

      @Stability(Stable) @NotNull public String getWorkloadName()
      The name of the workload.
    • setWorkloadName

      @Stability(Stable) public void setWorkloadName(@NotNull String value)
      The name of the workload.
    • getAccountIds

      @Stability(Stable) @Nullable public List<String> getAccountIds()
      The list of Amazon Web Services account IDs associated with the workload.
    • setAccountIds

      @Stability(Stable) public void setAccountIds(@Nullable List<String> value)
      The list of Amazon Web Services account IDs associated with the workload.
    • getArchitecturalDesign

      @Stability(Stable) @Nullable public String getArchitecturalDesign()
      The URL of the architectural design for the workload.
    • setArchitecturalDesign

      @Stability(Stable) public void setArchitecturalDesign(@Nullable String value)
      The URL of the architectural design for the workload.
    • getAwsRegions

      @Stability(Stable) @Nullable public List<String> getAwsRegions()
      The list of Amazon Web Services Regions associated with the workload.
    • setAwsRegions

      @Stability(Stable) public void setAwsRegions(@Nullable List<String> value)
      The list of Amazon Web Services Regions associated with the workload.
    • getDiscoveryConfig

      @Stability(Stable) @Nullable public Object getDiscoveryConfig()
      Discovery configuration associated to the workload.

      Returns union: either IResolvable or CfnWorkload.DiscoveryConfigProperty

    • setDiscoveryConfig

      @Stability(Stable) public void setDiscoveryConfig(@Nullable IResolvable value)
      Discovery configuration associated to the workload.
    • setDiscoveryConfig

      @Stability(Stable) public void setDiscoveryConfig(@Nullable CfnWorkload.DiscoveryConfigProperty value)
      Discovery configuration associated to the workload.
    • getIndustry

      @Stability(Stable) @Nullable public String getIndustry()
      The industry for the workload.
    • setIndustry

      @Stability(Stable) public void setIndustry(@Nullable String value)
      The industry for the workload.
    • getIndustryType

      @Stability(Stable) @Nullable public String getIndustryType()
      The industry type for the workload.
    • setIndustryType

      @Stability(Stable) public void setIndustryType(@Nullable String value)
      The industry type for the workload.
    • getNonAwsRegions

      @Stability(Stable) @Nullable public List<String> getNonAwsRegions()
      The list of non-Amazon Web Services Regions associated with the workload.
    • setNonAwsRegions

      @Stability(Stable) public void setNonAwsRegions(@Nullable List<String> value)
      The list of non-Amazon Web Services Regions associated with the workload.
    • getNotes

      @Stability(Stable) @Nullable public String getNotes()
      The notes associated with the workload.
    • setNotes

      @Stability(Stable) public void setNotes(@Nullable String value)
      The notes associated with the workload.
    • getReviewOwner

      @Stability(Stable) @Nullable public String getReviewOwner()
      The review owner of the workload.
    • setReviewOwner

      @Stability(Stable) public void setReviewOwner(@Nullable String value)
      The review owner of the workload.
    • getTags

      @Stability(Stable) @Nullable public List<CfnWorkload.TagsItemsProperty> getTags()
      The tags associated with the workload.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnWorkload.TagsItemsProperty> value)
      The tags associated with the workload.