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

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:07.549Z") @Stability(Stable) public class CfnAsset extends CfnResource implements IInspectable, IAssetRef
Resource Type definition for AWS::DevOpsAgent::Asset.

An asset attached to an existing AWS DevOps Agent Space. Customer-creatable types include skill, agents_md, and attachment; call ListAssetTypes for the current authoritative set.

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.devopsagent.*;
 Object metadata;
 CfnAsset cfnAsset = CfnAsset.Builder.create(this, "MyCfnAsset")
         .agentSpaceId("agentSpaceId")
         .assetType("assetType")
         // the properties below are optional
         .files(List.of(AssetFileProperty.builder()
                 .path("path")
                 // the properties below are optional
                 .contentBytes("contentBytes")
                 .contentText("contentText")
                 .metadata(metadata)
                 .build()))
         .metadata(metadata)
         .zip("zip")
         .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

    • CfnAsset

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

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

      @Stability(Stable) public CfnAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAssetProps props)
      Create a new AWS::DevOpsAgent::Asset.

      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

    • arnForAsset

      @Stability(Stable) @NotNull public static String arnForAsset(@NotNull IAssetRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnAsset

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

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

      @Stability(Stable) @NotNull public AssetReference getAssetRef()
      A reference to a Asset resource.
      Specified by:
      getAssetRef in interface IAssetRef
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the asset.

      Nested under the parent Agent Space: arn::aidevops::invalid input: '<'account-id>:agentspace/invalid input: '<'agentspace-id>/asset/invalid input: '<'asset-id>.

    • getAttrAssetId

      @Stability(Stable) @NotNull public String getAttrAssetId()
      The unique identifier of the asset (assigned by the service on Create).
    • getAttrCreatedAt

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

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

      @Stability(Stable) @NotNull public Number getAttrVersion()
      The current asset version.

      Server-managed; bumps on every successful Update (including no-op updates). This is the drift signal for change detection.

    • 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
    • getAgentSpaceId

      @Stability(Stable) @NotNull public String getAgentSpaceId()
      The unique identifier of the parent Agent Space.
    • setAgentSpaceId

      @Stability(Stable) public void setAgentSpaceId(@NotNull String value)
      The unique identifier of the parent Agent Space.
    • getAssetType

      @Stability(Stable) @NotNull public String getAssetType()
      The type of asset.
    • setAssetType

      @Stability(Stable) public void setAssetType(@NotNull String value)
      The type of asset.
    • getMetadata

      @Stability(Stable) @NotNull public Object getMetadata()
      Asset metadata document.
    • setMetadata

      @Stability(Stable) public void setMetadata(@NotNull Object value)
      Asset metadata document.
    • getFiles

      @Stability(Stable) @Nullable public Object getFiles()
      Inline file list.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnAsset.AssetFileProperty>

    • setFiles

      @Stability(Stable) public void setFiles(@Nullable IResolvable value)
      Inline file list.
    • setFiles

      @Stability(Stable) public void setFiles(@Nullable List<Object> value)
      Inline file list.
    • getZip

      @Stability(Stable) @Nullable public String getZip()
      Base64-encoded zip bundle containing all files for the asset.
    • setZip

      @Stability(Stable) public void setZip(@Nullable String value)
      Base64-encoded zip bundle containing all files for the asset.