Skip to content

CodeArtifactClient#

Index > CodeArtifact > CodeArtifactClient

Auto-generated documentation for CodeArtifact type annotations stubs module mypy-boto3-codeartifact.

CodeArtifactClient#

Type annotations and code completion for boto3.client("codeartifact"). boto3 documentation

# CodeArtifactClient usage example

from boto3.session import Session
from mypy_boto3_codeartifact.client import CodeArtifactClient

def get_codeartifact_client() -> CodeArtifactClient:
    return Session().client("codeartifact")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("codeartifact").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("codeartifact")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_codeartifact.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

associate_external_connection#

Adds an existing external connection to a repository.

Type annotations and code completion for boto3.client("codeartifact").associate_external_connection method. boto3 documentation

# associate_external_connection method definition

def associate_external_connection(
    self,
    *,
    domain: str,
    repository: str,
    externalConnection: str,
    domainOwner: str = ...,
) -> AssociateExternalConnectionResultTypeDef:  # (1)
    ...
  1. See AssociateExternalConnectionResultTypeDef
# associate_external_connection method usage example with argument unpacking

kwargs: AssociateExternalConnectionRequestRequestTypeDef = {  # (1)
    "domain": ...,
    "repository": ...,
    "externalConnection": ...,
}

parent.associate_external_connection(**kwargs)
  1. See AssociateExternalConnectionRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("codeartifact").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("codeartifact").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

copy_package_versions#

Copies package versions from one repository to another repository in the same domain.

Type annotations and code completion for boto3.client("codeartifact").copy_package_versions method. boto3 documentation

# copy_package_versions method definition

def copy_package_versions(
    self,
    *,
    domain: str,
    sourceRepository: str,
    destinationRepository: str,
    format: PackageFormatType,  # (1)
    package: str,
    domainOwner: str = ...,
    namespace: str = ...,
    versions: Sequence[str] = ...,
    versionRevisions: Mapping[str, str] = ...,
    allowOverwrite: bool = ...,
    includeFromUpstream: bool = ...,
) -> CopyPackageVersionsResultTypeDef:  # (2)
    ...
  1. See PackageFormatType
  2. See CopyPackageVersionsResultTypeDef
# copy_package_versions method usage example with argument unpacking

kwargs: CopyPackageVersionsRequestRequestTypeDef = {  # (1)
    "domain": ...,
    "sourceRepository": ...,
    "destinationRepository": ...,
    "format": ...,
    "package": ...,
}

parent.copy_package_versions(**kwargs)
  1. See CopyPackageVersionsRequestRequestTypeDef

create_domain#

Creates a domain.

Type annotations and code completion for boto3.client("codeartifact").create_domain method. boto3 documentation

# create_domain method definition

def create_domain(
    self,
    *,
    domain: str,
    encryptionKey: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateDomainResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateDomainResultTypeDef
# create_domain method usage example with argument unpacking

kwargs: CreateDomainRequestRequestTypeDef = {  # (1)
    "domain": ...,
}

parent.create_domain(**kwargs)
  1. See CreateDomainRequestRequestTypeDef

create_package_group#

Creates a package group.

Type annotations and code completion for boto3.client("codeartifact").create_package_group method. boto3 documentation

# create_package_group method definition

def create_package_group(
    self,
    *,
    domain: str,
    packageGroup: str,
    domainOwner: str = ...,
    contactInfo: str = ...,
    description: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreatePackageGroupResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreatePackageGroupResultTypeDef
# create_package_group method usage example with argument unpacking

kwargs: CreatePackageGroupRequestRequestTypeDef = {  # (1)
    "domain": ...,
    "packageGroup": ...,
}

parent.create_package_group(**kwargs)
  1. See CreatePackageGroupRequestRequestTypeDef

create_repository#

Creates a repository.

Type annotations and code completion for boto3.client("codeartifact").create_repository method. boto3 documentation

# create_repository method definition

def create_repository(
    self,
    *,
    domain: str,
    repository: str,
    domainOwner: str = ...,
    description: str = ...,
    upstreams: Sequence[UpstreamRepositoryTypeDef] = ...,  # (1)
    tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateRepositoryResultTypeDef:  # (3)
    ...
  1. See UpstreamRepositoryTypeDef
  2. See TagTypeDef
  3. See CreateRepositoryResultTypeDef
# create_repository method usage example with argument unpacking

kwargs: CreateRepositoryRequestRequestTypeDef = {  # (1)
    "domain": ...,
    "repository": ...,
}

parent.create_repository(**kwargs)
  1. See CreateRepositoryRequestRequestTypeDef

delete_domain#

Deletes a domain.

Type annotations and code completion for boto3.client("codeartifact").delete_domain method. boto3 documentation

# delete_domain method definition

def delete_domain(
    self,
    *,
    domain: str,
    domainOwner: str = ...,
) -> DeleteDomainResultTypeDef:  # (1)
    ...
  1. See DeleteDomainResultTypeDef
# delete_domain method usage example with argument unpacking

kwargs: DeleteDomainRequestRequestTypeDef = {  # (1)
    "domain": ...,
}

parent.delete_domain(**kwargs)
  1. See DeleteDomainRequestRequestTypeDef

delete_domain_permissions_policy#

Deletes the resource policy set on a domain.

Type annotations and code completion for boto3.client("codeartifact").delete_domain_permissions_policy method. boto3 documentation

# delete_domain_permissions_policy method definition

def delete_domain_permissions_policy(
    self,
    *,
    domain: str,
    domainOwner: str = ...,
    policyRevision: str = ...,
) -> DeleteDomainPermissionsPolicyResultTypeDef:  # (1)
    ...
  1. See DeleteDomainPermissionsPolicyResultTypeDef
# delete_domain_permissions_policy method usage example with argument unpacking

kwargs: DeleteDomainPermissionsPolicyRequestRequestTypeDef = {  # (1)
    "domain": ...,
}

parent.delete_domain_permissions_policy(**kwargs)
  1. See DeleteDomainPermissionsPolicyRequestRequestTypeDef

delete_package#

Deletes a package and all associated package versions.

Type annotations and code completion for boto3.client("codeartifact").delete_package method.