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

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:50:59.451Z") @Stability(Stable) public class CfnPackage extends CfnResource implements IInspectable, IPackageRef
Resource Type definition for AWS::CodeArtifact::Package.

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.codeartifact.*;
 CfnPackage cfnPackage = CfnPackage.Builder.create(this, "MyCfnPackage")
         .domainName("domainName")
         .format("format")
         .name("name")
         .repository("repository")
         // the properties below are optional
         .namespace("namespace")
         .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

    • CfnPackage

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

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

      @Stability(Stable) public CfnPackage(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPackageProps props)
      Create a new AWS::CodeArtifact::Package.

      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

    • arnForPackage

      @Stability(Stable) @NotNull public static String arnForPackage(@NotNull IPackageRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnPackage

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

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

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the package.
    • getAttrOriginConfiguration

      @Stability(Stable) @NotNull public IResolvable getAttrOriginConfiguration()
      The package origin configuration for the package.
    • 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
    • getPackageRef

      @Stability(Stable) @NotNull public PackageReference getPackageRef()
      A reference to a Package resource.
      Specified by:
      getPackageRef in interface IPackageRef
    • getDomainName

      @Stability(Stable) @NotNull public String getDomainName()
      The name of the domain that contains the repository that contains the package.
    • setDomainName

      @Stability(Stable) public void setDomainName(@NotNull String value)
      The name of the domain that contains the repository that contains the package.
    • getFormat

      @Stability(Stable) @NotNull public String getFormat()
      The format of the package.
    • setFormat

      @Stability(Stable) public void setFormat(@NotNull String value)
      The format of the package.
    • getName

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

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

      @Stability(Stable) @NotNull public String getRepository()
      The name of the repository that contains the package.
    • setRepository

      @Stability(Stable) public void setRepository(@NotNull String value)
      The name of the repository that contains the package.
    • getNamespace

      @Stability(Stable) @Nullable public String getNamespace()
      The namespace of the package.
    • setNamespace

      @Stability(Stable) public void setNamespace(@Nullable String value)
      The namespace of the package.