Documentation

Overview

    Package braket provides the API client, operations, and parameter types for Braket.

    The Amazon Braket API Reference provides information about the operations and structures supported in Amazon Braket.

    Index

    Constants

    View Source
    const ServiceAPIVersion = "2019-09-01"
    View Source
    const ServiceID = "Braket"

    Variables

    This section is empty.

    Functions

    func NewDefaultEndpointResolver

    func NewDefaultEndpointResolver() *internalendpoints.Resolver

      NewDefaultEndpointResolver constructs a new service endpoint resolver

      func WithAPIOptions

      func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

        WithAPIOptions returns a functional option for setting the Client's APIOptions option.

        func WithEndpointResolver

        func WithEndpointResolver(v EndpointResolver) func(*Options)

          WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.

          Types

          type CancelQuantumTaskInput

          type CancelQuantumTaskInput struct {
          
          	// The client token associated with the request.
          	//
          	// This member is required.
          	ClientToken *string
          
          	// The ARN of the task to cancel.
          	//
          	// This member is required.
          	QuantumTaskArn *string
          }

          type CancelQuantumTaskOutput

          type CancelQuantumTaskOutput struct {
          
          	// The status of the cancellation request.
          	//
          	// This member is required.
          	CancellationStatus types.CancellationStatus
          
          	// The ARN of the task.
          	//
          	// This member is required.
          	QuantumTaskArn *string
          
          	// Metadata pertaining to the operation's result.
          	ResultMetadata middleware.Metadata
          }

          type Client

          type Client struct {
          	// contains filtered or unexported fields
          }

            Client provides the API client to make operations call for Braket.

            func New

            func New(options Options, optFns ...func(*Options)) *Client

              New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

              func NewFromConfig

              func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

                NewFromConfig returns a new client from the provided config.

                func (*Client) CancelQuantumTask

                func (c *Client) CancelQuantumTask(ctx context.Context, params *CancelQuantumTaskInput, optFns ...func(*Options)) (*CancelQuantumTaskOutput, error)

                  Cancels the specified task.

                  func (*Client) CreateQuantumTask

                  func (c *Client) CreateQuantumTask(ctx context.Context, params *CreateQuantumTaskInput, optFns ...func(*Options)) (*CreateQuantumTaskOutput, error)

                    Creates a quantum task.

                    func (*Client) GetDevice

                    func (c *Client) GetDevice(ctx context.Context, params *GetDeviceInput, optFns ...func(*Options)) (*GetDeviceOutput, error)

                      Retrieves the devices available in Amazon Braket.

                      func (*Client) GetQuantumTask

                      func (c *Client) GetQuantumTask(ctx context.Context, params *GetQuantumTaskInput, optFns ...func(*Options)) (*GetQuantumTaskOutput, error)

                        Retrieves the specified quantum task.

                        func (*Client) SearchDevices

                        func (c *Client) SearchDevices(ctx context.Context, params *SearchDevicesInput, optFns ...func(*Options)) (*SearchDevicesOutput, error)

                          Searches for devices using the specified filters.

                          func (*Client) SearchQuantumTasks

                          func (c *Client) SearchQuantumTasks(ctx context.Context, params *SearchQuantumTasksInput, optFns ...func(*Options)) (*SearchQuantumTasksOutput, error)

                            Searches for tasks that match the specified filter values.

                            type CreateQuantumTaskInput

                            type CreateQuantumTaskInput struct {
                            
                            	// The action associated with the task.
                            	//
                            	// This value conforms to the media type: application/json
                            	//
                            	// This member is required.
                            	Action *string
                            
                            	// The client token associated with the request.
                            	//
                            	// This member is required.
                            	ClientToken *string
                            
                            	// The ARN of the device to run the task on.
                            	//
                            	// This member is required.
                            	DeviceArn *string
                            
                            	// The S3 bucket to store task result files in.
                            	//
                            	// This member is required.
                            	OutputS3Bucket *string
                            
                            	// The key prefix for the location in the S3 bucket to store task results in.
                            	//
                            	// This member is required.
                            	OutputS3KeyPrefix *string
                            
                            	// The number of shots to use for the task.
                            	//
                            	// This member is required.
                            	Shots *int64
                            
                            	// The parameters for the device to run the task on.
                            	//
                            	// This value conforms to the media type: application/json
                            	DeviceParameters *string
                            }

                            type CreateQuantumTaskOutput

                            type CreateQuantumTaskOutput struct {
                            
                            	// The ARN of the task created by the request.
                            	//
                            	// This member is required.
                            	QuantumTaskArn *string
                            
                            	// Metadata pertaining to the operation's result.
                            	ResultMetadata middleware.Metadata
                            }

                            type EndpointResolver

                            type EndpointResolver interface {
                            	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
                            }

                              EndpointResolver interface for resolving service endpoints.

                              func EndpointResolverFromURL

                              func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

                                EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

                                type EndpointResolverFunc

                                type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

                                  EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

                                  func (EndpointResolverFunc) ResolveEndpoint

                                  func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

                                  type EndpointResolverOptions

                                  type EndpointResolverOptions = internalendpoints.Options

                                    EndpointResolverOptions is the service endpoint resolver options

                                    type GetDeviceInput

                                    type GetDeviceInput struct {
                                    
                                    	// The ARN of the device to retrieve.
                                    	//
                                    	// This member is required.
                                    	DeviceArn *string
                                    }

                                    type GetDeviceOutput

                                    type GetDeviceOutput struct {
                                    
                                    	// The ARN of the device.
                                    	//
                                    	// This member is required.
                                    	DeviceArn *string
                                    
                                    	// Details about the capabilities of the device.
                                    	//
                                    	// This value conforms to the media type: application/json
                                    	//
                                    	// This member is required.
                                    	DeviceCapabilities *string
                                    
                                    	// The name of the device.
                                    	//
                                    	// This member is required.
                                    	DeviceName *string
                                    
                                    	// The status of the device.
                                    	//
                                    	// This member is required.
                                    	DeviceStatus types.DeviceStatus
                                    
                                    	// The type of the device.
                                    	//
                                    	// This member is required.
                                    	DeviceType types.DeviceType
                                    
                                    	// The name of the partner company for the device.
                                    	//
                                    	// This member is required.
                                    	ProviderName *string
                                    
                                    	// Metadata pertaining to the operation's result.
                                    	ResultMetadata middleware.Metadata
                                    }

                                    type GetQuantumTaskInput

                                    type GetQuantumTaskInput struct {
                                    
                                    	// the ARN of the task to retrieve.
                                    	//
                                    	// This member is required.
                                    	QuantumTaskArn *string
                                    }

                                    type GetQuantumTaskOutput

                                    type GetQuantumTaskOutput struct {
                                    
                                    	// The time at which the task was created.
                                    	//
                                    	// This member is required.
                                    	CreatedAt *time.Time
                                    
                                    	// The ARN of the device the task was run on.
                                    	//
                                    	// This member is required.
                                    	DeviceArn *string
                                    
                                    	// The parameters for the device on which the task ran.
                                    	//
                                    	// This value conforms to the media type: application/json
                                    	//
                                    	// This member is required.
                                    	DeviceParameters *string
                                    
                                    	// The S3 bucket where task results are stored.
                                    	//
                                    	// This member is required.
                                    	OutputS3Bucket *string
                                    
                                    	// The folder in the S3 bucket where task results are stored.
                                    	//
                                    	// This member is required.
                                    	OutputS3Directory *string
                                    
                                    	// The ARN of the task.
                                    	//
                                    	// This member is required.
                                    	QuantumTaskArn *string
                                    
                                    	// The number of shots used in the task.
                                    	//
                                    	// This member is required.
                                    	Shots *int64
                                    
                                    	// The status of the task.
                                    	//
                                    	// This member is required.
                                    	Status types.QuantumTaskStatus
                                    
                                    	// The time at which the task ended.
                                    	EndedAt *time.Time
                                    
                                    	// The reason that a task failed.
                                    	FailureReason *string
                                    
                                    	// Metadata pertaining to the operation's result.
                                    	ResultMetadata middleware.Metadata
                                    }

                                    type HTTPClient

                                    type HTTPClient interface {
                                    	Do(*http.Request) (*http.Response, error)
                                    }

                                    type HTTPSignerV4

                                    type HTTPSignerV4 interface {
                                    	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
                                    }

                                    type Options

                                    type Options struct {
                                    	// Set of options to modify how an operation is invoked. These apply to all
                                    	// operations invoked for this client. Use functional options on operation call to
                                    	// modify this list for per operation behavior.
                                    	APIOptions []func(*middleware.Stack) error
                                    
                                    	// Configures the events that will be sent to the configured logger.
                                    	ClientLogMode aws.ClientLogMode
                                    
                                    	// The credentials object to use when signing requests.
                                    	Credentials aws.CredentialsProvider
                                    
                                    	// The endpoint options to be used when attempting to resolve an endpoint.
                                    	EndpointOptions EndpointResolverOptions
                                    
                                    	// The service endpoint resolver.
                                    	EndpointResolver EndpointResolver
                                    
                                    	// Signature Version 4 (SigV4) Signer
                                    	HTTPSignerV4 HTTPSignerV4
                                    
                                    	// The logger writer interface to write logging messages to.
                                    	Logger logging.Logger
                                    
                                    	// The region to send requests to. (Required)
                                    	Region string
                                    
                                    	// Retryer guides how HTTP requests should be retried in case of recoverable
                                    	// failures. When nil the API client will use a default retryer.
                                    	Retryer aws.Retryer
                                    
                                    	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
                                    	// implementation if nil.
                                    	HTTPClient HTTPClient
                                    }

                                    func (Options) Copy

                                    func (o Options) Copy() Options

                                      Copy creates a clone where the APIOptions list is deep copied.

                                      type ResolveEndpoint

                                      type ResolveEndpoint struct {
                                      	Resolver EndpointResolver
                                      	Options  EndpointResolverOptions
                                      }

                                      func (*ResolveEndpoint) HandleSerialize

                                      func (*ResolveEndpoint) ID

                                      func (*ResolveEndpoint) ID() string

                                      type SearchDevicesAPIClient

                                      type SearchDevicesAPIClient interface {
                                      	SearchDevices(context.Context, *SearchDevicesInput, ...func(*Options)) (*SearchDevicesOutput, error)
                                      }

                                        SearchDevicesAPIClient is a client that implements the SearchDevices operation.

                                        type SearchDevicesInput

                                        type SearchDevicesInput struct {
                                        
                                        	// The filter values to use to search for a device.
                                        	//
                                        	// This member is required.
                                        	Filters []types.SearchDevicesFilter
                                        
                                        	// The maximum number of results to return in the response.
                                        	MaxResults *int32
                                        
                                        	// A token used for pagination of results returned in the response. Use the token
                                        	// returned from the previous request continue results where the previous request
                                        	// ended.
                                        	NextToken *string
                                        }

                                        type SearchDevicesOutput

                                        type SearchDevicesOutput struct {
                                        
                                        	// An array of DeviceSummary objects for devices that match the specified filter
                                        	// values.
                                        	//
                                        	// This member is required.
                                        	Devices []types.DeviceSummary
                                        
                                        	// A token used for pagination of results, or null if there are no additional
                                        	// results. Use the token value in a subsequent request to continue results where
                                        	// the previous request ended.
                                        	NextToken *string
                                        
                                        	// Metadata pertaining to the operation's result.
                                        	ResultMetadata middleware.Metadata
                                        }

                                        type SearchDevicesPaginator

                                        type SearchDevicesPaginator struct {
                                        	// contains filtered or unexported fields
                                        }

                                          SearchDevicesPaginator is a paginator for SearchDevices

                                          func NewSearchDevicesPaginator

                                          func NewSearchDevicesPaginator(client SearchDevicesAPIClient, params *SearchDevicesInput, optFns ...func(*SearchDevicesPaginatorOptions)) *SearchDevicesPaginator

                                            NewSearchDevicesPaginator returns a new SearchDevicesPaginator

                                            func (*SearchDevicesPaginator) HasMorePages

                                            func (p *SearchDevicesPaginator) HasMorePages() bool

                                              HasMorePages returns a boolean indicating whether more pages are available

                                              func (*SearchDevicesPaginator) NextPage

                                              func (p *SearchDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchDevicesOutput, error)

                                                NextPage retrieves the next SearchDevices page.

                                                type SearchDevicesPaginatorOptions

                                                type SearchDevicesPaginatorOptions struct {
                                                	// The maximum number of results to return in the response.
                                                	Limit int32
                                                
                                                	// Set to true if pagination should stop if the service returns a pagination token
                                                	// that matches the most recent token provided to the service.
                                                	StopOnDuplicateToken bool
                                                }

                                                  SearchDevicesPaginatorOptions is the paginator options for SearchDevices

                                                  type SearchQuantumTasksAPIClient

                                                  type SearchQuantumTasksAPIClient interface {
                                                  	SearchQuantumTasks(context.Context, *SearchQuantumTasksInput, ...func(*Options)) (*SearchQuantumTasksOutput, error)
                                                  }

                                                    SearchQuantumTasksAPIClient is a client that implements the SearchQuantumTasks operation.

                                                    type SearchQuantumTasksInput

                                                    type SearchQuantumTasksInput struct {
                                                    
                                                    	// Array of SearchQuantumTasksFilter objects.
                                                    	//
                                                    	// This member is required.
                                                    	Filters []types.SearchQuantumTasksFilter
                                                    
                                                    	// Maximum number of results to return in the response.
                                                    	MaxResults *int32
                                                    
                                                    	// A token used for pagination of results returned in the response. Use the token
                                                    	// returned from the previous request continue results where the previous request
                                                    	// ended.
                                                    	NextToken *string
                                                    }

                                                    type SearchQuantumTasksOutput

                                                    type SearchQuantumTasksOutput struct {
                                                    
                                                    	// An array of QuantumTaskSummary objects for tasks that match the specified
                                                    	// filters.
                                                    	//
                                                    	// This member is required.
                                                    	QuantumTasks []types.QuantumTaskSummary
                                                    
                                                    	// A token used for pagination of results, or null if there are no additional
                                                    	// results. Use the token value in a subsequent request to continue results where
                                                    	// the previous request ended.
                                                    	NextToken *string
                                                    
                                                    	// Metadata pertaining to the operation's result.
                                                    	ResultMetadata middleware.Metadata
                                                    }

                                                    type SearchQuantumTasksPaginator

                                                    type SearchQuantumTasksPaginator struct {
                                                    	// contains filtered or unexported fields
                                                    }

                                                      SearchQuantumTasksPaginator is a paginator for SearchQuantumTasks

                                                      func NewSearchQuantumTasksPaginator

                                                      func NewSearchQuantumTasksPaginator(client SearchQuantumTasksAPIClient, params *SearchQuantumTasksInput, optFns ...func(*SearchQuantumTasksPaginatorOptions)) *SearchQuantumTasksPaginator

                                                        NewSearchQuantumTasksPaginator returns a new SearchQuantumTasksPaginator

                                                        func (*SearchQuantumTasksPaginator) HasMorePages

                                                        func (p *SearchQuantumTasksPaginator) HasMorePages() bool

                                                          HasMorePages returns a boolean indicating whether more pages are available

                                                          func (*SearchQuantumTasksPaginator) NextPage

                                                          func (p *SearchQuantumTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchQuantumTasksOutput, error)

                                                            NextPage retrieves the next SearchQuantumTasks page.

                                                            type SearchQuantumTasksPaginatorOptions

                                                            type SearchQuantumTasksPaginatorOptions struct {
                                                            	// Maximum number of results to return in the response.
                                                            	Limit int32
                                                            
                                                            	// Set to true if pagination should stop if the service returns a pagination token
                                                            	// that matches the most recent token provided to the service.
                                                            	StopOnDuplicateToken bool
                                                            }

                                                              SearchQuantumTasksPaginatorOptions is the paginator options for SearchQuantumTasks

                                                              Directories

                                                              Path Synopsis
                                                              internal