package iotjobsdataplane
import "github.com/aws/aws-sdk-go-v2/service/iotjobsdataplane"
Package iotjobsdataplane provides the API client, operations, and parameter types for AWS IoT Jobs Data Plane.
AWS IoT Jobs is a service that allows you to define a set of jobs — remote operations that are sent to and executed on one or more devices connected to AWS IoT. For example, you can define a job that instructs a set of devices to download and install application or firmware updates, reboot, rotate certificates, or perform remote troubleshooting operations. To create a job, you make a job document which is a description of the remote operations to be performed, and you specify a list of targets that should perform the operations. The targets can be individual things, thing groups or both. AWS IoT Jobs sends a message to inform the targets that a job is available. The target starts the execution of the job by downloading the job document, performing the operations it specifies, and reporting its progress to AWS IoT. The Jobs service provides commands to track the progress of a job on a specific target and for all the targets of the job
Index ¶
- Constants
- func NewDefaultEndpointResolver() *internalendpoints.Resolver
- func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
- func WithEndpointResolver(v EndpointResolver) func(*Options)
- type Client
- func New(options Options, optFns ...func(*Options)) *Client
- func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client
- func (c *Client) DescribeJobExecution(ctx context.Context, params *DescribeJobExecutionInput, optFns ...func(*Options)) (*DescribeJobExecutionOutput, error)
- func (c *Client) GetPendingJobExecutions(ctx context.Context, params *GetPendingJobExecutionsInput, optFns ...func(*Options)) (*GetPendingJobExecutionsOutput, error)
- func (c *Client) StartNextPendingJobExecution(ctx context.Context, params *StartNextPendingJobExecutionInput, optFns ...func(*Options)) (*StartNextPendingJobExecutionOutput, error)
- func (c *Client) UpdateJobExecution(ctx context.Context, params *UpdateJobExecutionInput, optFns ...func(*Options)) (*UpdateJobExecutionOutput, error)
- type DescribeJobExecutionInput
- type DescribeJobExecutionOutput
- type EndpointResolver
- type EndpointResolverFunc
- type EndpointResolverOptions
- type GetPendingJobExecutionsInput
- type GetPendingJobExecutionsOutput
- type HTTPClient
- type HTTPSignerV4
- type Options
- type ResolveEndpoint
- func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
- func (*ResolveEndpoint) ID() string
- type StartNextPendingJobExecutionInput
- type StartNextPendingJobExecutionOutput
- type UpdateJobExecutionInput
- type UpdateJobExecutionOutput
Constants ¶
const ServiceAPIVersion = "2017-09-29"
const ServiceID = "IoT Jobs Data Plane"
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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the API client to make operations call for AWS IoT Jobs Data Plane.
func New ¶
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 ¶
NewFromConfig returns a new client from the provided config.
func (*Client) DescribeJobExecution ¶
func (c *Client) DescribeJobExecution(ctx context.Context, params *DescribeJobExecutionInput, optFns ...func(*Options)) (*DescribeJobExecutionOutput, error)
Gets details of a job execution.
func (*Client) GetPendingJobExecutions ¶
func (c *Client) GetPendingJobExecutions(ctx context.Context, params *GetPendingJobExecutionsInput, optFns ...func(*Options)) (*GetPendingJobExecutionsOutput, error)
Gets the list of all jobs for a thing that are not in a terminal status.
func (*Client) StartNextPendingJobExecution ¶
func (c *Client) StartNextPendingJobExecution(ctx context.Context, params *StartNextPendingJobExecutionInput, optFns ...func(*Options)) (*StartNextPendingJobExecutionOutput, error)
Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.
func (*Client) UpdateJobExecution ¶
func (c *Client) UpdateJobExecution(ctx context.Context, params *UpdateJobExecutionInput, optFns ...func(*Options)) (*UpdateJobExecutionOutput, error)
Updates the status of a job execution.
type DescribeJobExecutionInput ¶
type DescribeJobExecutionInput struct { // The unique identifier assigned to this job when it was created. // // This member is required. JobId *string // The thing name associated with the device the job execution is running on. // // This member is required. ThingName *string // Optional. A number that identifies a particular job execution on a particular // device. If not specified, the latest job execution is returned. ExecutionNumber *int64 // Optional. When set to true, the response contains the job document. The default // is false. IncludeJobDocument *bool // contains filtered or unexported fields }
type DescribeJobExecutionOutput ¶
type DescribeJobExecutionOutput struct { // Contains data about a job execution. Execution *types.JobExecution // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
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 GetPendingJobExecutionsInput ¶
type GetPendingJobExecutionsInput struct { // The name of the thing that is executing the job. // // This member is required. ThingName *string // contains filtered or unexported fields }
type GetPendingJobExecutionsOutput ¶
type GetPendingJobExecutionsOutput struct { // A list of JobExecutionSummary objects with status IN_PROGRESS. InProgressJobs []types.JobExecutionSummary // A list of JobExecutionSummary objects with status QUEUED. QueuedJobs []types.JobExecutionSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type HTTPClient ¶
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 ¶
Copy creates a clone where the APIOptions list is deep copied.
type ResolveEndpoint ¶
type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions }
func (*ResolveEndpoint) HandleSerialize ¶
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
func (*ResolveEndpoint) ID ¶
func (*ResolveEndpoint) ID() string
type StartNextPendingJobExecutionInput ¶
type StartNextPendingJobExecutionInput struct { // The name of the thing associated with the device. // // This member is required. ThingName *string // A collection of name/value pairs that describe the status of the job execution. // If not specified, the statusDetails are unchanged. StatusDetails map[string]string // Specifies the amount of time this device has to finish execution of this job. If // the job execution status is not set to a terminal state before this timer // expires, or before the timer is reset (by calling UpdateJobExecution, setting // the status to IN_PROGRESS and specifying a new timeout value in field // stepTimeoutInMinutes) the job execution status will be automatically set to // TIMED_OUT. Note that setting this timeout has no effect on that job execution // timeout which may have been specified when the job was created (CreateJob using // field timeoutConfig). StepTimeoutInMinutes *int64 // contains filtered or unexported fields }
type StartNextPendingJobExecutionOutput ¶
type StartNextPendingJobExecutionOutput struct { // A JobExecution object. Execution *types.JobExecution // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type UpdateJobExecutionInput ¶
type UpdateJobExecutionInput struct { // The unique identifier assigned to this job when it was created. // // This member is required. JobId *string // The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or // REJECTED). This must be specified on every update. // // This member is required. Status types.JobExecutionStatus // The name of the thing associated with the device. // // This member is required. ThingName *string // Optional. A number that identifies a particular job execution on a particular // device. ExecutionNumber *int64 // Optional. The expected current version of the job execution. Each time you // update the job execution, its version is incremented. If the version of the job // execution stored in Jobs does not match, the update is rejected with a // VersionMismatch error, and an ErrorResponse that contains the current job // execution status data is returned. (This makes it unnecessary to perform a // separate DescribeJobExecution request in order to obtain the job execution // status data.) ExpectedVersion *int64 // Optional. When set to true, the response contains the job document. The default // is false. IncludeJobDocument *bool // Optional. When included and set to true, the response contains the // JobExecutionState data. The default is false. IncludeJobExecutionState *bool // Optional. A collection of name/value pairs that describe the status of the job // execution. If not specified, the statusDetails are unchanged. StatusDetails map[string]string // Specifies the amount of time this device has to finish execution of this job. If // the job execution status is not set to a terminal state before this timer // expires, or before the timer is reset (by again calling UpdateJobExecution, // setting the status to IN_PROGRESS and specifying a new timeout value in this // field) the job execution status will be automatically set to TIMED_OUT. Note // that setting or resetting this timeout has no effect on that job execution // timeout which may have been specified when the job was created (CreateJob using // field timeoutConfig). StepTimeoutInMinutes *int64 // contains filtered or unexported fields }
type UpdateJobExecutionOutput ¶
type UpdateJobExecutionOutput struct { // A JobExecutionState object. ExecutionState *types.JobExecutionState // The contents of the Job Documents. JobDocument *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
Source Files ¶
api_client.go api_op_DescribeJobExecution.go api_op_GetPendingJobExecutions.go api_op_StartNextPendingJobExecution.go api_op_UpdateJobExecution.go deserializers.go doc.go endpoints.go go_module_metadata.go serializers.go validators.go
Directories ¶
Path | Synopsis |
---|---|
internal | |
types |
- Version
- v1.7.1
- Published
- Nov 19, 2021
- Platform
- js/wasm
- Imports
- 29 packages
- Last checked
- now –
Tools for package owners.