CodeArtifact

2024/03/21 - CodeArtifact - 10 new api methods

Changes  This release adds Package groups to CodeArtifact so you can more conveniently configure package origin controls for multiple packages.

DescribePackageGroup (new) Link ¶

Returns a PackageGroupDescription object that contains information about the requested package group.

See also: AWS API Documentation

Request Syntax

client.describe_package_group(
    domain='string',
    domainOwner='string',
    packageGroup='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package group.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the requested package group.

rtype

dict

returns

Response Syntax

{
    'packageGroup': {
        'arn': 'string',
        'pattern': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'createdTime': datetime(2015, 1, 1),
        'contactInfo': 'string',
        'description': 'string',
        'originConfiguration': {
            'restrictions': {
                'string': {
                    'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'inheritedFrom': {
                        'arn': 'string',
                        'pattern': 'string'
                    },
                    'repositoriesCount': 123
                }
            }
        },
        'parent': {
            'arn': 'string',
            'pattern': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • packageGroup (dict) --

      A PackageGroupDescription object that contains information about the requested package group.

      • arn (string) --

        The ARN of the package group.

      • pattern (string) --

        The pattern of the package group. The pattern determines which packages are associated with the package group.

      • domainName (string) --

        The name of the domain that contains the package group.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

      • createdTime (datetime) --

        A timestamp that represents the date and time the package group was created.

      • contactInfo (string) --

        The contact information of the package group.

      • description (string) --

        The description of the package group.

      • originConfiguration (dict) --

        The package group origin configuration that determines how package versions can enter repositories.

        • restrictions (dict) --

          The origin configuration settings that determine how package versions can enter repositories.

          • (string) --

            • (dict) --

              Contains information about the configured restrictions of the origin controls of a package group.

              • mode (string) --

                The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • effectiveMode (string) --

                The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • inheritedFrom (dict) --

                The parent package group that the package group origin restrictions are inherited from.

                • arn (string) --

                  The ARN of the package group.

                • pattern (string) --

                  The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

              • repositoriesCount (integer) --

                The number of repositories in the allowed repository list.

      • parent (dict) --

        The direct parent package group of the package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

UpdatePackageGroup (new) Link ¶

Updates a package group. This API cannot be used to update a package group's origin configuration or pattern. To update a package group's origin configuration, use UpdatePackageGroupOriginConfiguration .

See also: AWS API Documentation

Request Syntax

client.update_package_group(
    domain='string',
    domainOwner='string',
    packageGroup='string',
    contactInfo='string',
    description='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain which contains the package group to be updated.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group to be updated.

type contactInfo

string

param contactInfo

Contact information which you want to update the requested package group with.

type description

string

param description

The description you want to update the requested package group with.

rtype

dict

returns

Response Syntax

{
    'packageGroup': {
        'arn': 'string',
        'pattern': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'createdTime': datetime(2015, 1, 1),
        'contactInfo': 'string',
        'description': 'string',
        'originConfiguration': {
            'restrictions': {
                'string': {
                    'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'inheritedFrom': {
                        'arn': 'string',
                        'pattern': 'string'
                    },
                    'repositoriesCount': 123
                }
            }
        },
        'parent': {
            'arn': 'string',
            'pattern': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • packageGroup (dict) --

      The package group and information about it after the request has been processed.

      • arn (string) --

        The ARN of the package group.

      • pattern (string) --

        The pattern of the package group. The pattern determines which packages are associated with the package group.

      • domainName (string) --

        The name of the domain that contains the package group.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

      • createdTime (datetime) --

        A timestamp that represents the date and time the package group was created.

      • contactInfo (string) --

        The contact information of the package group.

      • description (string) --

        The description of the package group.

      • originConfiguration (dict) --

        The package group origin configuration that determines how package versions can enter repositories.

        • restrictions (dict) --

          The origin configuration settings that determine how package versions can enter repositories.

          • (string) --

            • (dict) --

              Contains information about the configured restrictions of the origin controls of a package group.

              • mode (string) --

                The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • effectiveMode (string) --

                The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • inheritedFrom (dict) --

                The parent package group that the package group origin restrictions are inherited from.

                • arn (string) --

                  The ARN of the package group.

                • pattern (string) --

                  The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

              • repositoriesCount (integer) --

                The number of repositories in the allowed repository list.

      • parent (dict) --

        The direct parent package group of the package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

CreatePackageGroup (new) Link ¶

Creates a package group. For more information about creating package groups, including example CLI commands, see Create a package group in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.create_package_group(
    domain='string',
    domainOwner='string',
    packageGroup='string',
    contactInfo='string',
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type domain

string

param domain

[REQUIRED]

The name of the domain in which you want to create a package group.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group to create. The pattern is also the identifier of the package group.

type contactInfo

string

param contactInfo

The contact information for the created package group.

type description

string

param description

A description of the package group.

type tags

list

param tags

One or more tag key-value pairs for the package group.

  • (dict) --

    A tag is a key-value pair that can be used to manage, search for, or filter resources in CodeArtifact.

    • key (string) -- [REQUIRED]

      The tag key.

    • value (string) -- [REQUIRED]

      The tag value.

rtype

dict

returns

Response Syntax

{
    'packageGroup': {
        'arn': 'string',
        'pattern': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'createdTime': datetime(2015, 1, 1),
        'contactInfo': 'string',
        'description': 'string',
        'originConfiguration': {
            'restrictions': {
                'string': {
                    'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'inheritedFrom': {
                        'arn': 'string',
                        'pattern': 'string'
                    },
                    'repositoriesCount': 123
                }
            }
        },
        'parent': {
            'arn': 'string',
            'pattern': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • packageGroup (dict) --

      Information about the created package group after processing the request.

      • arn (string) --

        The ARN of the package group.

      • pattern (string) --

        The pattern of the package group. The pattern determines which packages are associated with the package group.

      • domainName (string) --

        The name of the domain that contains the package group.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

      • createdTime (datetime) --

        A timestamp that represents the date and time the package group was created.

      • contactInfo (string) --

        The contact information of the package group.

      • description (string) --

        The description of the package group.

      • originConfiguration (dict) --

        The package group origin configuration that determines how package versions can enter repositories.

        • restrictions (dict) --

          The origin configuration settings that determine how package versions can enter repositories.

          • (string) --

            • (dict) --

              Contains information about the configured restrictions of the origin controls of a package group.

              • mode (string) --

                The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • effectiveMode (string) --

                The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • inheritedFrom (dict) --

                The parent package group that the package group origin restrictions are inherited from.

                • arn (string) --

                  The ARN of the package group.

                • pattern (string) --

                  The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

              • repositoriesCount (integer) --

                The number of repositories in the allowed repository list.

      • parent (dict) --

        The direct parent package group of the package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

ListSubPackageGroups (new) Link ¶

Returns a list of direct children of the specified package group.

For information package group hierarchy, see Package group definition syntax and matching behavior in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.list_sub_package_groups(
    domain='string',
    domainOwner='string',
    packageGroup='string',
    maxResults=123,
    nextToken='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain which contains the package group from which to list sub package groups.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group from which to list sub package groups.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'packageGroups': [
        {
            'arn': 'string',
            'pattern': 'string',
            'domainName': 'string',
            'domainOwner': 'string',
            'createdTime': datetime(2015, 1, 1),
            'contactInfo': 'string',
            'description': 'string',
            'originConfiguration': {
                'restrictions': {
                    'string': {
                        'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                        'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                        'inheritedFrom': {
                            'arn': 'string',
                            'pattern': 'string'
                        },
                        'repositoriesCount': 123
                    }
                }
            },
            'parent': {
                'arn': 'string',
                'pattern': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • packageGroups (list) --

      A list of sub package groups for the requested package group.

      • (dict) --

        Details about a package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName (string) --

          The domain that contains the package group.

        • domainOwner (string) --

          The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

        • createdTime (datetime) --

          A timestamp that represents the date and time the repository was created.

        • contactInfo (string) --

          The contact information of the package group.

        • description (string) --

          The description of the package group.

        • originConfiguration (dict) --

          Details about the package origin configuration of a package group.

          • restrictions (dict) --

            The origin configuration settings that determine how package versions can enter repositories.

            • (string) --

              • (dict) --

                Contains information about the configured restrictions of the origin controls of a package group.

                • mode (string) --

                  The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

                • effectiveMode (string) --

                  The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

                • inheritedFrom (dict) --

                  The parent package group that the package group origin restrictions are inherited from.

                  • arn (string) --

                    The ARN of the package group.

                  • pattern (string) --

                    The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

                • repositoriesCount (integer) --

                  The number of repositories in the allowed repository list.

        • parent (dict) --

          The direct parent package group of the package group.

          • arn (string) --

            The ARN of the package group.

          • pattern (string) --

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

DeletePackageGroup (new) Link ¶

Deletes a package group. Deleting a package group does not delete packages or package versions associated with the package group. When a package group is deleted, the direct child package groups will become children of the package group's direct parent package group. Therefore, if any of the child groups are inheriting any settings from the parent, those settings could change.

See also: AWS API Documentation

Request Syntax

client.delete_package_group(
    domain='string',
    domainOwner='string',
    packageGroup='string'
)
type domain

string

param domain

[REQUIRED]

The domain that contains the package group to be deleted.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group to be deleted.

rtype

dict

returns

Response Syntax

{
    'packageGroup': {
        'arn': 'string',
        'pattern': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'createdTime': datetime(2015, 1, 1),
        'contactInfo': 'string',
        'description': 'string',
        'originConfiguration': {
            'restrictions': {
                'string': {
                    'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'inheritedFrom': {
                        'arn': 'string',
                        'pattern': 'string'
                    },
                    'repositoriesCount': 123
                }
            }
        },
        'parent': {
            'arn': 'string',
            'pattern': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • packageGroup (dict) --

      Information about the deleted package group after processing the request.

      • arn (string) --

        The ARN of the package group.

      • pattern (string) --

        The pattern of the package group. The pattern determines which packages are associated with the package group.

      • domainName (string) --

        The name of the domain that contains the package group.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

      • createdTime (datetime) --

        A timestamp that represents the date and time the package group was created.

      • contactInfo (string) --

        The contact information of the package group.

      • description (string) --

        The description of the package group.

      • originConfiguration (dict) --

        The package group origin configuration that determines how package versions can enter repositories.

        • restrictions (dict) --

          The origin configuration settings that determine how package versions can enter repositories.

          • (string) --

            • (dict) --

              Contains information about the configured restrictions of the origin controls of a package group.

              • mode (string) --

                The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • effectiveMode (string) --

                The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • inheritedFrom (dict) --

                The parent package group that the package group origin restrictions are inherited from.

                • arn (string) --

                  The ARN of the package group.

                • pattern (string) --

                  The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

              • repositoriesCount (integer) --

                The number of repositories in the allowed repository list.

      • parent (dict) --

        The direct parent package group of the package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

GetAssociatedPackageGroup (new) Link ¶

Returns the most closely associated package group to the specified package. This API does not require that the package exist in any repository in the domain. As such, GetAssociatedPackageGroup can be used to see which package group's origin configuration applies to a package before that package is in a repository. This can be helpful to check if public packages are blocked without ingesting them.

For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.get_associated_package_group(
    domain='string',
    domainOwner='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'swift',
    namespace='string',
    package='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package from which to get the associated package group.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type format

string

param format

[REQUIRED]

The format of the package from which to get the associated package group.

type namespace

string

param namespace

The namespace of the package from which to get the associated package group. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when getting associated package groups from packages of the following formats:

  • Maven

  • Swift

  • generic

  • 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 and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The package from which to get the associated package group.

rtype

dict

returns

Response Syntax

{
    'packageGroup': {
        'arn': 'string',
        'pattern': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'createdTime': datetime(2015, 1, 1),
        'contactInfo': 'string',
        'description': 'string',
        'originConfiguration': {
            'restrictions': {
                'string': {
                    'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'inheritedFrom': {
                        'arn': 'string',
                        'pattern': 'string'
                    },
                    'repositoriesCount': 123
                }
            }
        },
        'parent': {
            'arn': 'string',
            'pattern': 'string'
        }
    },
    'associationType': 'STRONG'|'WEAK'
}

Response Structure

  • (dict) --

    • packageGroup (dict) --

      The package group that is associated with the requested package.

      • arn (string) --

        The ARN of the package group.

      • pattern (string) --

        The pattern of the package group. The pattern determines which packages are associated with the package group.

      • domainName (string) --

        The name of the domain that contains the package group.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

      • createdTime (datetime) --

        A timestamp that represents the date and time the package group was created.

      • contactInfo (string) --

        The contact information of the package group.

      • description (string) --

        The description of the package group.

      • originConfiguration (dict) --

        The package group origin configuration that determines how package versions can enter repositories.

        • restrictions (dict) --

          The origin configuration settings that determine how package versions can enter repositories.

          • (string) --

            • (dict) --

              Contains information about the configured restrictions of the origin controls of a package group.

              • mode (string) --

                The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • effectiveMode (string) --

                The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • inheritedFrom (dict) --

                The parent package group that the package group origin restrictions are inherited from.

                • arn (string) --

                  The ARN of the package group.

                • pattern (string) --

                  The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

              • repositoriesCount (integer) --

                The number of repositories in the allowed repository list.

      • parent (dict) --

        The direct parent package group of the package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

    • associationType (string) --

      Describes the strength of the association between the package and package group. A strong match is also known as an exact match, and a weak match is known as a relative match.

ListAssociatedPackages (new) Link ¶

Returns a list of packages associated with the requested package group. For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.list_associated_packages(
    domain='string',
    domainOwner='string',
    packageGroup='string',
    maxResults=123,
    nextToken='string',
    preview=True|False
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package group from which to list associated packages.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group from which to list associated packages.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type preview

boolean

param preview

When this flag is included, ListAssociatedPackages will return a list of packages that would be associated with a package group, even if it does not exist.

rtype

dict

returns

Response Syntax

{
    'packages': [
        {
            'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'swift',
            'namespace': 'string',
            'package': 'string',
            'associationType': 'STRONG'|'WEAK'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • packages (list) --

      The list of packages associated with the requested package group.

      • (dict) --

        A package associated with a package group.

        • format (string) --

          A format that specifies the type of the associated package.

        • namespace (string) --

          The namespace of the associated package. 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 and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package (string) --

          The name of the associated package.

        • associationType (string) --

          Describes the strength of the association between the package and package group. A strong match can be thought of as an exact match, and a weak match can be thought of as a variation match, for example, the package name matches a variation of the package group pattern. For more information about package group pattern matching, including strong and weak matches, see Package group definition syntax and matching behavior in the CodeArtifact User Guide .

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

ListAllowedRepositoriesForGroup (new) Link ¶

Lists the repositories in the added repositories list of the specified restriction type for a package group. For more information about restriction types and added repository lists, see Package group origin controls in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.list_allowed_repositories_for_group(
    domain='string',
    domainOwner='string',
    packageGroup='string',
    originRestrictionType='EXTERNAL_UPSTREAM'|'INTERNAL_UPSTREAM'|'PUBLISH',
    maxResults=123,
    nextToken='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package group from which to list allowed repositories.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group from which to list allowed repositories.

type originRestrictionType

string

param originRestrictionType

[REQUIRED]

The origin configuration restriction type of which to list allowed repositories.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'allowedRepositories': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • allowedRepositories (list) --

      The list of allowed repositories for the package group and origin configuration restriction type.

      • (string) --

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

ListPackageGroups (new) Link ¶

Returns a list of package groups in the requested domain.

See also: AWS API Documentation

Request Syntax

client.list_package_groups(
    domain='string',
    domainOwner='string',
    maxResults=123,
    nextToken='string',
    prefix='string'
)
type domain

string

param domain

[REQUIRED]

The domain for which you want to list package groups.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type prefix

string

param prefix

A prefix for which to search package groups. When included, ListPackageGroups will return only package groups with patterns that match the prefix.

rtype

dict

returns

Response Syntax

{
    'packageGroups': [
        {
            'arn': 'string',
            'pattern': 'string',
            'domainName': 'string',
            'domainOwner': 'string',
            'createdTime': datetime(2015, 1, 1),
            'contactInfo': 'string',
            'description': 'string',
            'originConfiguration': {
                'restrictions': {
                    'string': {
                        'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                        'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                        'inheritedFrom': {
                            'arn': 'string',
                            'pattern': 'string'
                        },
                        'repositoriesCount': 123
                    }
                }
            },
            'parent': {
                'arn': 'string',
                'pattern': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • packageGroups (list) --

      The list of package groups in the requested domain.

      • (dict) --

        Details about a package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName (string) --

          The domain that contains the package group.

        • domainOwner (string) --

          The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

        • createdTime (datetime) --

          A timestamp that represents the date and time the repository was created.

        • contactInfo (string) --

          The contact information of the package group.

        • description (string) --

          The description of the package group.

        • originConfiguration (dict) --

          Details about the package origin configuration of a package group.

          • restrictions (dict) --

            The origin configuration settings that determine how package versions can enter repositories.

            • (string) --

              • (dict) --

                Contains information about the configured restrictions of the origin controls of a package group.

                • mode (string) --

                  The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

                • effectiveMode (string) --

                  The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

                • inheritedFrom (dict) --

                  The parent package group that the package group origin restrictions are inherited from.

                  • arn (string) --

                    The ARN of the package group.

                  • pattern (string) --

                    The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

                • repositoriesCount (integer) --

                  The number of repositories in the allowed repository list.

        • parent (dict) --

          The direct parent package group of the package group.

          • arn (string) --

            The ARN of the package group.

          • pattern (string) --

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

UpdatePackageGroupOriginConfiguration (new) Link ¶

Updates the package origin configuration for a package group.

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 group origin controls and configuration, see Package group origin controls in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.update_package_group_origin_configuration(
    domain='string',
    domainOwner='string',
    packageGroup='string',
    restrictions={
        'string': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT'
    },
    addAllowedRepositories=[
        {
            'repositoryName': 'string',
            'originRestrictionType': 'EXTERNAL_UPSTREAM'|'INTERNAL_UPSTREAM'|'PUBLISH'
        },
    ],
    removeAllowedRepositories=[
        {
            'repositoryName': 'string',
            'originRestrictionType': 'EXTERNAL_UPSTREAM'|'INTERNAL_UPSTREAM'|'PUBLISH'
        },
    ]
)
type domain

string

param domain

[REQUIRED]

The name of the domain which contains the package group for which to update the origin configuration.

type domainOwner

string

param domainOwner

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group for which to update the origin configuration.

type restrictions

dict

param restrictions

The origin configuration settings that determine how package versions can enter repositories.

  • (string) --

    • (string) --

type addAllowedRepositories

list

param addAllowedRepositories

The repository name and restrictions to add to the allowed repository list of the specified package group.

  • (dict) --

    Details about an allowed repository for a package group, including its name and origin configuration.

    • repositoryName (string) --

      The name of the allowed repository.

    • originRestrictionType (string) --

      The origin configuration restriction type of the allowed repository.

type removeAllowedRepositories

list

param removeAllowedRepositories

The repository name and restrictions to remove from the allowed repository list of the specified package group.

  • (dict) --

    Details about an allowed repository for a package group, including its name and origin configuration.

    • repositoryName (string) --

      The name of the allowed repository.

    • originRestrictionType (string) --

      The origin configuration restriction type of the allowed repository.

rtype

dict

returns

Response Syntax

{
    'packageGroup': {
        'arn': 'string',
        'pattern': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'createdTime': datetime(2015, 1, 1),
        'contactInfo': 'string',
        'description': 'string',
        'originConfiguration': {
            'restrictions': {
                'string': {
                    'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'inheritedFrom': {
                        'arn': 'string',
                        'pattern': 'string'
                    },
                    'repositoriesCount': 123
                }
            }
        },
        'parent': {
            'arn': 'string',
            'pattern': 'string'
        }
    },
    'allowedRepositoryUpdates': {
        'string': {
            'string': [
                'string',
            ]
        }
    }
}

Response Structure

  • (dict) --

    • packageGroup (dict) --

      The package group and information about it after processing the request.

      • arn (string) --

        The ARN of the package group.

      • pattern (string) --

        The pattern of the package group. The pattern determines which packages are associated with the package group.

      • domainName (string) --

        The name of the domain that contains the package group.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

      • createdTime (datetime) --

        A timestamp that represents the date and time the package group was created.

      • contactInfo (string) --

        The contact information of the package group.

      • description (string) --

        The description of the package group.

      • originConfiguration (dict) --

        The package group origin configuration that determines how package versions can enter repositories.

        • restrictions (dict) --

          The origin configuration settings that determine how package versions can enter repositories.

          • (string) --

            • (dict) --

              Contains information about the configured restrictions of the origin controls of a package group.

              • mode (string) --

                The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • effectiveMode (string) --

                The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • inheritedFrom (dict) --

                The parent package group that the package group origin restrictions are inherited from.

                • arn (string) --

                  The ARN of the package group.

                • pattern (string) --

                  The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

              • repositoriesCount (integer) --

                The number of repositories in the allowed repository list.

      • parent (dict) --

        The direct parent package group of the package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

    • allowedRepositoryUpdates (dict) --

      Information about the updated allowed repositories after processing the request.

      • (string) --

        • (dict) --

          • (string) --

            • (list) --

              • (string) --