Skip to content

BraketClient#

Index > Braket > BraketClient

Auto-generated documentation for Braket type annotations stubs module mypy-boto3-braket.

BraketClient#

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

# BraketClient usage example

from boto3.session import Session
from mypy_boto3_braket.client import BraketClient

def get_braket_client() -> BraketClient:
    return Session().client("braket")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("braket")

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

from mypy_boto3_braket.client import Exceptions

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

Methods#

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

cancel_job#

Cancels an Amazon Braket job.

Type annotations and code completion for boto3.client("braket").cancel_job method. boto3 documentation

# cancel_job method definition

def cancel_job(
    self,
    *,
    jobArn: str,
) -> CancelJobResponseTypeDef:  # (1)
    ...
  1. See CancelJobResponseTypeDef
# cancel_job method usage example with argument unpacking

kwargs: CancelJobRequestRequestTypeDef = {  # (1)
    "jobArn": ...,
}

parent.cancel_job(**kwargs)
  1. See CancelJobRequestRequestTypeDef

cancel_quantum_task#

Cancels the specified task.

Type annotations and code completion for boto3.client("braket").cancel_quantum_task method. boto3 documentation

# cancel_quantum_task method definition

def cancel_quantum_task(
    self,
    *,
    clientToken: str,
    quantumTaskArn: str,
) -> CancelQuantumTaskResponseTypeDef:  # (1)
    ...
  1. See CancelQuantumTaskResponseTypeDef
# cancel_quantum_task method usage example with argument unpacking

kwargs: CancelQuantumTaskRequestRequestTypeDef = {  # (1)
    "clientToken": ...,
    "quantumTaskArn": ...,
}

parent.cancel_quantum_task(**kwargs)
  1. See CancelQuantumTaskRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_job#

Creates an Amazon Braket job.

Type annotations and code completion for boto3.client("braket").create_job method. boto3 documentation

# create_job method definition

def create_job(
    self,
    *,
    algorithmSpecification: AlgorithmSpecificationTypeDef,  # (1)
    clientToken: str,
    deviceConfig: DeviceConfigTypeDef,  # (2)
    instanceConfig: InstanceConfigTypeDef,  # (3)
    jobName: str,
    outputDataConfig: JobOutputDataConfigTypeDef,  # (4)
    roleArn: str,
    associations: Sequence[AssociationTypeDef] = ...,  # (5)
    checkpointConfig: JobCheckpointConfigTypeDef = ...,  # (6)
    hyperParameters: Mapping[str, str] = ...,
    inputDataConfig: Sequence[InputFileConfigTypeDef] = ...,  # (7)
    stoppingCondition: JobStoppingConditionTypeDef = ...,  # (8)
    tags: Mapping[str, str] = ...,
) -> CreateJobResponseTypeDef:  # (9)
    ...
  1. See AlgorithmSpecificationTypeDef
  2. See DeviceConfigTypeDef
  3. See InstanceConfigTypeDef
  4. See JobOutputDataConfigTypeDef
  5. See AssociationTypeDef
  6. See JobCheckpointConfigTypeDef
  7. See InputFileConfigTypeDef
  8. See JobStoppingConditionTypeDef
  9. See CreateJobResponseTypeDef
# create_job method usage example with argument unpacking

kwargs: CreateJobRequestRequestTypeDef = {  # (1)
    "algorithmSpecification": ...,
    "clientToken": ...,
    "deviceConfig": ...,
    "instanceConfig": ...,
    "jobName": ...,
    "outputDataConfig": ...,
    "roleArn": ...,
}

parent.create_job(**kwargs)
  1. See CreateJobRequestRequestTypeDef

create_quantum_task#

Creates a quantum task.

Type annotations and code completion for boto3.client("braket").create_quantum_task method. boto3 documentation

# create_quantum_task method definition

def create_quantum_task(
    self,
    *,
    action: str,
    clientToken: str,
    deviceArn: str,
    outputS3Bucket: str,
    outputS3KeyPrefix: str,
    shots: int,
    associations: Sequence[AssociationTypeDef] = ...,  # (1)
    deviceParameters: str = ...,
    jobToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateQuantumTaskResponseTypeDef:  # (2)
    ...
  1. See AssociationTypeDef
  2. See CreateQuantumTaskResponseTypeDef
# create_quantum_task method usage example with argument unpacking

kwargs: CreateQuantumTaskRequestRequestTypeDef = {  # (1)
    "action": ...,
    "clientToken": ...,
    "deviceArn": ...,
    "outputS3Bucket": ...,
    "outputS3KeyPrefix": ...,
    "shots": ...,
}

parent.create_quantum_task(**kwargs)
  1. See CreateQuantumTaskRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("braket").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_device#

Retrieves the devices available in Amazon Braket.

Type annotations and code completion for boto3.client("braket").get_device method. boto3 documentation

# get_device method definition

def get_device(
    self,
    *,
    deviceArn: str,
) -> GetDeviceResponseTypeDef:  # (1)
    ...
  1. See GetDeviceResponseTypeDef
# get_device method usage example with argument unpacking

kwargs: GetDeviceRequestRequestTypeDef = {  # (1)
    "deviceArn": ...,
}

parent.get_device(**kwargs)
  1. See GetDeviceRequestRequestTypeDef

get_job#

Retrieves the specified Amazon Braket job.

Type annotations and code completion for boto3.client("braket").get_job method. boto3 documentation

# get_job method definition

def get_job(
    self,
    *,
    jobArn: str,
    additionalAttributeNames: Sequence[HybridJobAdditionalAttributeNameType] = ...,  # (1)
) -> GetJobResponseTypeDef:  # (2)
    ...
  1. See HybridJobAdditionalAttributeNameType
  2. See GetJobResponseTypeDef
# get_job method usage example with argument unpacking

kwargs: GetJobRequestRequestTypeDef = {  # (1)
    "jobArn": ...,
}

parent.get_job(**kwargs)
  1. See GetJobRequestRequestTypeDef

get_quantum_task#

Retrieves the specified quantum task.

Type annotations and code completion for boto3.client("braket").get_quantum_task method. boto3 documentation

# get_quantum_task method definition

def get_quantum_task(
    self,
    *,
    quantumTaskArn: str,
    additionalAttributeNames: Sequence[QuantumTaskAdditionalAttributeNameType] = ...,  # (1)
) -> GetQuantumTaskResponseTypeDef:  # (2)
    ...
  1. See QuantumTaskAdditionalAttributeNameType
  2. See GetQuantumTaskResponseTypeDef
# get_quantum_task method usage example with argument unpacking

kwargs: GetQuantumTaskRequestRequestTypeDef = {  # (1)
    "quantumTaskArn": ...,
}

parent.get_quantum_task(**kwargs)
  1. See GetQuantumTaskRequestRequestTypeDef

list_tags_for_resource#

Shows the tags associated with this resource.

Type annotations and code completion for boto3.client("braket").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

search_devices#

Searches for devices using the specified filters.

Type annotations and code completion for boto3.client("braket").search_devices method. boto3 documentation

# search_devices method definition

def search_devices(
    self,
    *,
    filters: Sequence[SearchDevicesFilterTypeDef],  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> SearchDevicesResponseTypeDef:  # (2)
    ...
  1. See SearchDevicesFilterTypeDef
  2. See SearchDevicesResponseTypeDef
# search_devices method usage example with argument unpacking

kwargs: SearchDevicesRequestRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.search_devices(**kwargs)
  1. See SearchDevicesRequestRequestTypeDef

search_jobs#

Searches for Amazon Braket jobs that match the specified filter values.

Type annotations and code completion for boto3.client("braket").search_jobs method. boto3 documentation

# search_jobs method definition

def search_jobs(
    self,
    *,
    filters: Sequence[SearchJobsFilterTypeDef],  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> SearchJobsResponseTypeDef:  # (2)
    ...
  1. See SearchJobsFilterTypeDef
  2. See SearchJobsResponseTypeDef
# search_jobs method usage example with argument unpacking

kwargs: SearchJobsRequestRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.search_jobs(**kwargs)
  1. See SearchJobsRequestRequestTypeDef

search_quantum_tasks#

Searches for tasks that match the specified filter values.

Type annotations and code completion for boto3.client("braket").search_quantum_tasks method. boto3 documentation

# search_quantum_tasks method definition

def search_quantum_tasks(
    self,
    *,
    filters: Sequence[SearchQuantumTasksFilterTypeDef],  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> SearchQuantumTasksResponseTypeDef:  # (2)
    ...
  1. See SearchQuantumTasksFilterTypeDef
  2. See SearchQuantumTasksResponseTypeDef
# search_quantum_tasks method usage example with argument unpacking

kwargs: SearchQuantumTasksRequestRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.search_quantum_tasks(**kwargs)
  1. See SearchQuantumTasksRequestRequestTypeDef

tag_resource#

Add a tag to the specified resource.

Type annotations and code completion for boto3.client("braket").tag_resource method. boto3 documentation

# tag_resource method definition

def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Remove tags from a resource.

Type annotations and code completion for boto3.client("braket").untag_resource method. boto3 documentation

# untag_resource method definition

def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("braket").get_paginator method with overloads.

  • client.get_paginator("search_devices")