This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::CodeArtifact::Package
Sets the package origin configuration for a package.
The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package origin controls and configuration, see Editing package origin controls in the AWS CodeArtifact User Guide.
PutPackageOriginConfiguration can be called on a package that doesn't yet exist in the repository. When called
on a package that does not exist, a package is created in the repository with no versions and the requested restrictions are set on the package.
This can be used to preemptively block ingesting or retaining any versions from external connections or upstream repositories, or to block
publishing any versions of the package into the repository before connecting any package managers or publishers to the repository.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CodeArtifact::Package", "Properties" : { "DomainName" :String, "Format" :String, "Name" :String, "Namespace" :String, "Repository" :String} }
YAML
Type: AWS::CodeArtifact::Package Properties: DomainName:StringFormat:StringName:StringNamespace:StringRepository:String
Properties
DomainName-
The name of the domain that contains the package group.
Required: Yes
Type: String
Pattern:
^[a-z][a-z0-9\-]{0,48}[a-z0-9]$Minimum:
2Maximum:
50Update requires: Replacement
Format-
The format of the package version.
Required: Yes
Type: String
Allowed values:
npm | pypi | maven | nuget | generic | ruby | swift | cargoUpdate requires: Replacement
Name-
The name of the package.
Required: Yes
Type: String
Pattern:
^[^#/\s]+$Minimum:
1Maximum:
255Update requires: Replacement
Namespace-
The namespace of the package version. The package component that specifies its namespace depends on its type. For example:
-
The namespace of a Maven package version is its
groupId. -
The namespace of an npm or Swift package version is its
scope. -
The namespace of a generic package is its
namespace. -
Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
Required: No
Type: String
Pattern:
^[^#/\s]+$Minimum:
1Maximum:
255Update requires: Replacement
-
RepositoryProperty description not available.
Required: Yes
Type: String
Pattern:
^[A-Za-z0-9][A-Za-z0-9._\-]{1,99}$Minimum:
2Maximum:
100Update requires: Replacement
Return values
Ref
Fn::GetAtt
Arn-
The ARN of the package group.