CodeArtifact / Client / update_package_group_origin_configuration

update_package_group_origin_configuration#

CodeArtifact.Client.update_package_group_origin_configuration(**kwargs)#

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

response = 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'
        },
    ]
)
Parameters:
  • domain (string) –

    [REQUIRED]

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

  • domainOwner (string) – The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

  • packageGroup (string) –

    [REQUIRED]

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

  • restrictions (dict) –

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

    • (string) –

      • (string) –

  • addAllowedRepositories (list) –

    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.

  • removeAllowedRepositories (list) –

    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.

Return type:

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) –

Exceptions

  • CodeArtifact.Client.exceptions.AccessDeniedException

  • CodeArtifact.Client.exceptions.InternalServerException

  • CodeArtifact.Client.exceptions.ServiceQuotaExceededException

  • CodeArtifact.Client.exceptions.ThrottlingException

  • CodeArtifact.Client.exceptions.ValidationException

  • CodeArtifact.Client.exceptions.ResourceNotFoundException