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)
...
# cancel_job method usage example with argument unpacking
kwargs: CancelJobRequestRequestTypeDef = { # (1)
"jobArn": ...,
}
parent.cancel_job(**kwargs)
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)
...
# cancel_quantum_task method usage example with argument unpacking
kwargs: CancelQuantumTaskRequestRequestTypeDef = { # (1)
"clientToken": ...,
"quantumTaskArn": ...,
}
parent.cancel_quantum_task(**kwargs)
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)
...
- See AlgorithmSpecificationTypeDef
- See DeviceConfigTypeDef
- See InstanceConfigTypeDef
- See JobOutputDataConfigTypeDef
- See AssociationTypeDef
- See JobCheckpointConfigTypeDef
- See InputFileConfigTypeDef
- See JobStoppingConditionTypeDef
- See CreateJobResponseTypeDef
# create_job method usage example with argument unpacking
kwargs: CreateJobRequestRequestTypeDef = { # (1)
"algorithmSpecification": ...,
"clientToken": ...,
"deviceConfig": ...,
"instanceConfig": ...,
"jobName": ...,
"outputDataConfig": ...,
"roleArn": ...,
}
parent.create_job(**kwargs)
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)
...
# create_quantum_task method usage example with argument unpacking
kwargs: CreateQuantumTaskRequestRequestTypeDef = { # (1)
"action": ...,
"clientToken": ...,
"deviceArn": ...,
"outputS3Bucket": ...,
"outputS3KeyPrefix": ...,
"shots": ...,
}
parent.create_quantum_task(**kwargs)
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,
*,
de