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