braket.aws.aws_session module¶
-
class
braket.aws.aws_session.
AwsSession
(boto_session=None, braket_client=None)[source]¶ Bases:
object
Manage interactions with AWS services.
- Parameters
boto_session – A boto3 session object
braket_client – A boto3 Braket client
- Raises
ValueError – If Braket is not available in the Region used for the boto3 session.
-
class
S3DestinationFolder
(bucket, key)¶ Bases:
tuple
Create new instance of S3DestinationFolder(bucket, key)
-
property
bucket
¶ Alias for field number 0
-
property
key
¶ Alias for field number 1
-
property
-
BRAKET_ENDPOINTS
= {'us-east-1': 'https://kqjovr0n70.execute-api.us-east-1.amazonaws.com/V3', 'us-west-1': 'https://fdoco1n1x7.execute-api.us-west-1.amazonaws.com/V3', 'us-west-2': 'https://xe15dbdvw6.execute-api.us-west-2.amazonaws.com/V3'}¶
-
cancel_quantum_task
(arn: str) → None[source]¶ Cancel the quantum task.
- Parameters
arn (str) – The ARN of the quantum task to cancel.
-
create_quantum_task
(**boto3_kwargs) → str[source]¶ Create a quantum task.
- Parameters
**boto3_kwargs – Keyword arguments for the Amazon Braket
CreateQuantumTask
operation.- Returns
str – The ARN of the quantum task.
-
get_quantum_task
(arn: str) → Dict[str, Any][source]¶ Gets the quantum task.
- Parameters
arn (str) – The ARN of the quantum task to cancel.
- Returns
Dict[str, Any] – The response from the Amazon Braket
GetQuantumTask
operation.
-
retrieve_s3_object_body
(s3_bucket: str, s3_object_key: str) → str[source]¶ Retrieve the S3 object body
- Parameters
s3_bucket (str) – The S3 bucket name
s3_object_key (str) – The S3 object key within the
s3_bucket
- Returns
str – The body of the S3 object