Class CfnRepository

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:26.941Z") @Stability(Stable) public class CfnRepository extends CfnResource implements IInspectable, ITaggable
The AWS::CodeArtifact::Repository resource creates an AWS CodeArtifact repository.

CodeArtifact repositories contain a set of package versions. For more information about repositories, see the Repository concepts information in the CodeArtifact User Guide . For more information about the CreateRepository API, see CreateRepository in the CodeArtifact API Reference .

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.*;
 Object permissionsPolicyDocument;
 CfnRepository cfnRepository = CfnRepository.Builder.create(this, "MyCfnRepository")
         .domainName("domainName")
         .repositoryName("repositoryName")
         // the properties below are optional
         .description("description")
         .domainOwner("domainOwner")
         .externalConnections(List.of("externalConnections"))
         .permissionsPolicyDocument(permissionsPolicyDocument)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .upstreams(List.of("upstreams"))
         .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

    • CfnRepository

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

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

      @Stability(Stable) public CfnRepository(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRepositoryProps props)
      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

    • 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()
      When you pass the logical ID of this resource, the function returns the Amazon Resource Name (ARN) of the repository.
    • getAttrDomainName

      @Stability(Stable) @NotNull public String getAttrDomainName()
      When you pass the logical ID of this resource, the function returns the domain name that contains the repository.
    • getAttrDomainOwner

      @Stability(Stable) @NotNull public String getAttrDomainOwner()
      When you pass the logical ID of this resource, the function returns the 12-digit account number of the AWS account that owns the domain that contains the repository.
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      When you pass the logical ID of this resource, the function returns the name of the repository.
    • getCfnProperties

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

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

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

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

      @Stability(Stable) @NotNull public String getRepositoryName()
      The name of an upstream repository.
    • setRepositoryName

      @Stability(Stable) public void setRepositoryName(@NotNull String value)
      The name of an upstream repository.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A text description of the repository.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A text description of the repository.
    • getDomainOwner

      @Stability(Stable) @Nullable public String getDomainOwner()
      The 12-digit account ID of the AWS account that owns the domain.
    • setDomainOwner

      @Stability(Stable) public void setDomainOwner(@Nullable String value)
      The 12-digit account ID of the AWS account that owns the domain.
    • getExternalConnections

      @Stability(Stable) @Nullable public List<String> getExternalConnections()
      An array of external connections associated with the repository.
    • setExternalConnections

      @Stability(Stable) public void setExternalConnections(@Nullable List<String> value)
      An array of external connections associated with the repository.
    • getPermissionsPolicyDocument

      @Stability(Stable) @Nullable public Object getPermissionsPolicyDocument()
      The document that defines the resource policy that is set on a repository.
    • setPermissionsPolicyDocument

      @Stability(Stable) public void setPermissionsPolicyDocument(@Nullable Object value)
      The document that defines the resource policy that is set on a repository.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A list of tags to be applied to the repository.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A list of tags to be applied to the repository.
    • getUpstreams

      @Stability(Stable) @Nullable public List<String> getUpstreams()
      A list of upstream repositories to associate with the repository.
    • setUpstreams

      @Stability(Stable) public void setUpstreams(@Nullable List<String> value)
      A list of upstream repositories to associate with the repository.