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

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:19.068Z") @Stability(Stable) public class CfnArtifact extends CfnResource implements IInspectable, IArtifactRef
Uploads an artifact to an agent space.

Artifacts provide additional context for security testing, such as architecture diagrams, API specifications, or configuration files.

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.securityagent.*;
 CfnArtifact cfnArtifact = CfnArtifact.Builder.create(this, "MyCfnArtifact")
         .agentSpaceId("agentSpaceId")
         .artifactType("artifactType")
         .fileName("fileName")
         // the properties below are optional
         .artifactContent("artifactContent")
         .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

    • CfnArtifact

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

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

      @Stability(Stable) public CfnArtifact(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnArtifactProps props)
      Create a new AWS::SecurityAgent::Artifact.

      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

    • arnForArtifact

      @Stability(Stable) @NotNull public static String arnForArtifact(@NotNull IArtifactRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnArtifact

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

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

      @Stability(Stable) @NotNull public ArtifactReference getArtifactRef()
      A reference to a Artifact resource.
      Specified by:
      getArtifactRef in interface IArtifactRef
    • getAttrArn

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

      @Stability(Stable) @NotNull public String getAttrArtifactId()
      The unique identifier assigned to the uploaded artifact.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The date and time the artifact was last updated, in ISO 8601 format.
    • 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 agent space to add the artifact to.
    • setAgentSpaceId

      @Stability(Stable) public void setAgentSpaceId(@NotNull String value)
      The unique identifier of the agent space to add the artifact to.
    • getArtifactType

      @Stability(Stable) @NotNull public String getArtifactType()
      The file type of the artifact.
    • setArtifactType

      @Stability(Stable) public void setArtifactType(@NotNull String value)
      The file type of the artifact.
    • getFileName

      @Stability(Stable) @NotNull public String getFileName()
      The file name of the artifact.
    • setFileName

      @Stability(Stable) public void setFileName(@NotNull String value)
      The file name of the artifact.
    • getArtifactContent

      @Stability(Stable) @Nullable public String getArtifactContent()
      The binary content of the artifact to upload, encoded as a Base64 string.
    • setArtifactContent

      @Stability(Stable) public void setArtifactContent(@Nullable String value)
      The binary content of the artifact to upload, encoded as a Base64 string.