AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

IoT1ClickDevicesService

import "github.com/aws/aws-sdk-go/service/iot1clickdevicesservice"

type IoT1ClickDevicesService struct { *client.Client }

IoT1ClickDevicesService provides the API operation methods for making requests to AWS IoT 1-Click Devices Service. See this package's package overview docs for details on the service.

IoT1ClickDevicesService methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

ClaimDevicesByClaimCode

func (c *IoT1ClickDevicesService) ClaimDevicesByClaimCode(input *ClaimDevicesByClaimCodeInput) (*ClaimDevicesByClaimCodeOutput, error)

ClaimDevicesByClaimCode API operation for AWS IoT 1-Click Devices Service.

Adds device(s) to your account (i.e., claim one or more devices) if and only if you received a claim code with the device(s).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation ClaimDevicesByClaimCode for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

  • ErrCodeForbiddenException "ForbiddenException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ClaimDevicesByClaimCode

ClaimDevicesByClaimCodeRequest

func (c *IoT1ClickDevicesService) ClaimDevicesByClaimCodeRequest(input *ClaimDevicesByClaimCodeInput) (req *request.Request, output *ClaimDevicesByClaimCodeOutput)

ClaimDevicesByClaimCodeRequest generates a "aws/request.Request" representing the client's request for the ClaimDevicesByClaimCode operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ClaimDevicesByClaimCode for more information on using the ClaimDevicesByClaimCode API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ClaimDevicesByClaimCodeRequest method. req, resp := client.ClaimDevicesByClaimCodeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ClaimDevicesByClaimCode

ClaimDevicesByClaimCodeWithContext

func (c *IoT1ClickDevicesService) ClaimDevicesByClaimCodeWithContext(ctx aws.Context, input *ClaimDevicesByClaimCodeInput, opts ...request.Option) (*ClaimDevicesByClaimCodeOutput, error)

ClaimDevicesByClaimCodeWithContext is the same as ClaimDevicesByClaimCode with the addition of the ability to pass a context and additional request options.

See ClaimDevicesByClaimCode for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeDevice

func (c *IoT1ClickDevicesService) DescribeDevice(input *DescribeDeviceInput) (*DescribeDeviceOutput, error)

DescribeDevice API operation for AWS IoT 1-Click Devices Service.

Given a device ID, returns a DescribeDeviceResponse object describing the details of the device.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation DescribeDevice for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/DescribeDevice

DescribeDeviceRequest

func (c *IoT1ClickDevicesService) DescribeDeviceRequest(input *DescribeDeviceInput) (req *request.Request, output *DescribeDeviceOutput)

DescribeDeviceRequest generates a "aws/request.Request" representing the client's request for the DescribeDevice operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeDevice for more information on using the DescribeDevice API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeDeviceRequest method. req, resp := client.DescribeDeviceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/DescribeDevice

DescribeDeviceWithContext

func (c *IoT1ClickDevicesService) DescribeDeviceWithContext(ctx aws.Context, input *DescribeDeviceInput, opts ...request.Option) (*DescribeDeviceOutput, error)

DescribeDeviceWithContext is the same as DescribeDevice with the addition of the ability to pass a context and additional request options.

See DescribeDevice for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

FinalizeDeviceClaim

func (c *IoT1ClickDevicesService) FinalizeDeviceClaim(input *FinalizeDeviceClaimInput) (*FinalizeDeviceClaimOutput, error)

FinalizeDeviceClaim API operation for AWS IoT 1-Click Devices Service.

Given a device ID, finalizes the claim request for the associated device.

Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim. For a device of type button, a device event can be published by simply clicking the device.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation FinalizeDeviceClaim for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

  • ErrCodePreconditionFailedException "PreconditionFailedException"

  • ErrCodeResourceConflictException "ResourceConflictException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/FinalizeDeviceClaim

FinalizeDeviceClaimRequest

func (c *IoT1ClickDevicesService) FinalizeDeviceClaimRequest(input *FinalizeDeviceClaimInput) (req *request.Request, output *FinalizeDeviceClaimOutput)

FinalizeDeviceClaimRequest generates a "aws/request.Request" representing the client's request for the FinalizeDeviceClaim operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See FinalizeDeviceClaim for more information on using the FinalizeDeviceClaim API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the FinalizeDeviceClaimRequest method. req, resp := client.FinalizeDeviceClaimRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/FinalizeDeviceClaim

FinalizeDeviceClaimWithContext

func (c *IoT1ClickDevicesService) FinalizeDeviceClaimWithContext(ctx aws.Context, input *FinalizeDeviceClaimInput, opts ...request.Option) (*FinalizeDeviceClaimOutput, error)

FinalizeDeviceClaimWithContext is the same as FinalizeDeviceClaim with the addition of the ability to pass a context and additional request options.

See FinalizeDeviceClaim for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetDeviceMethods

func (c *IoT1ClickDevicesService) GetDeviceMethods(input *GetDeviceMethodsInput) (*GetDeviceMethodsOutput, error)

GetDeviceMethods API operation for AWS IoT 1-Click Devices Service.

Given a device ID, returns the invokable methods associated with the device.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation GetDeviceMethods for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/GetDeviceMethods

GetDeviceMethodsRequest

func (c *IoT1ClickDevicesService) GetDeviceMethodsRequest(input *GetDeviceMethodsInput) (req *request.Request, output *GetDeviceMethodsOutput)

GetDeviceMethodsRequest generates a "aws/request.Request" representing the client's request for the GetDeviceMethods operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetDeviceMethods for more information on using the GetDeviceMethods API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetDeviceMethodsRequest method. req, resp := client.GetDeviceMethodsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/GetDeviceMethods

GetDeviceMethodsWithContext

func (c *IoT1ClickDevicesService) GetDeviceMethodsWithContext(ctx aws.Context, input *GetDeviceMethodsInput, opts ...request.Option) (*GetDeviceMethodsOutput, error)

GetDeviceMethodsWithContext is the same as GetDeviceMethods with the addition of the ability to pass a context and additional request options.

See GetDeviceMethods for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

InitiateDeviceClaim

func (c *IoT1ClickDevicesService) InitiateDeviceClaim(input *InitiateDeviceClaimInput) (*InitiateDeviceClaimOutput, error)

InitiateDeviceClaim API operation for AWS IoT 1-Click Devices Service.

Given a device ID, initiates a claim request for the associated device.

Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim. For a device of type button, a device event can be published by simply clicking the device.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation InitiateDeviceClaim for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

  • ErrCodeResourceConflictException "ResourceConflictException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InitiateDeviceClaim

InitiateDeviceClaimRequest

func (c *IoT1ClickDevicesService) InitiateDeviceClaimRequest(input *InitiateDeviceClaimInput) (req *request.Request, output *InitiateDeviceClaimOutput)

InitiateDeviceClaimRequest generates a "aws/request.Request" representing the client's request for the InitiateDeviceClaim operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See InitiateDeviceClaim for more information on using the InitiateDeviceClaim API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the InitiateDeviceClaimRequest method. req, resp := client.InitiateDeviceClaimRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InitiateDeviceClaim

InitiateDeviceClaimWithContext

func (c *IoT1ClickDevicesService) InitiateDeviceClaimWithContext(ctx aws.Context, input *InitiateDeviceClaimInput, opts ...request.Option) (*InitiateDeviceClaimOutput, error)

InitiateDeviceClaimWithContext is the same as InitiateDeviceClaim with the addition of the ability to pass a context and additional request options.

See InitiateDeviceClaim for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

InvokeDeviceMethod

func (c *IoT1ClickDevicesService) InvokeDeviceMethod(input *InvokeDeviceMethodInput) (*InvokeDeviceMethodOutput, error)

InvokeDeviceMethod API operation for AWS IoT 1-Click Devices Service.

Given a device ID, issues a request to invoke a named device method (with possible parameters). See the "Example POST" code snippet below.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation InvokeDeviceMethod for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodePreconditionFailedException "PreconditionFailedException"

  • ErrCodeInternalFailureException "InternalFailureException"

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeRangeNotSatisfiableException "RangeNotSatisfiableException"

  • ErrCodeResourceConflictException "ResourceConflictException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InvokeDeviceMethod

InvokeDeviceMethodRequest

func (c *IoT1ClickDevicesService) InvokeDeviceMethodRequest(input *InvokeDeviceMethodInput) (req *request.Request, output *InvokeDeviceMethodOutput)

InvokeDeviceMethodRequest generates a "aws/request.Request" representing the client's request for the InvokeDeviceMethod operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See InvokeDeviceMethod for more information on using the InvokeDeviceMethod API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the InvokeDeviceMethodRequest method. req, resp := client.InvokeDeviceMethodRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InvokeDeviceMethod

InvokeDeviceMethodWithContext

func (c *IoT1ClickDevicesService) InvokeDeviceMethodWithContext(ctx aws.Context, input *InvokeDeviceMethodInput, opts ...request.Option) (*InvokeDeviceMethodOutput, error)

InvokeDeviceMethodWithContext is the same as InvokeDeviceMethod with the addition of the ability to pass a context and additional request options.

See InvokeDeviceMethod for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListDeviceEvents

func (c *IoT1ClickDevicesService) ListDeviceEvents(input *ListDeviceEventsInput) (*ListDeviceEventsOutput, error)

ListDeviceEvents API operation for AWS IoT 1-Click Devices Service.

Using a device ID, returns a DeviceEventsResponse object containing an array of events for the device.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation ListDeviceEvents for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeRangeNotSatisfiableException "RangeNotSatisfiableException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDeviceEvents

ListDeviceEventsRequest

func (c *IoT1ClickDevicesService) ListDeviceEventsRequest(input *ListDeviceEventsInput) (req *request.Request, output *ListDeviceEventsOutput)

ListDeviceEventsRequest generates a "aws/request.Request" representing the client's request for the ListDeviceEvents operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListDeviceEvents for more information on using the ListDeviceEvents API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListDeviceEventsRequest method. req, resp := client.ListDeviceEventsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDeviceEvents

ListDeviceEventsWithContext

func (c *IoT1ClickDevicesService) ListDeviceEventsWithContext(ctx aws.Context, input *ListDeviceEventsInput, opts ...request.Option) (*ListDeviceEventsOutput, error)

ListDeviceEventsWithContext is the same as ListDeviceEvents with the addition of the ability to pass a context and additional request options.

See ListDeviceEvents for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListDevices

func (c *IoT1ClickDevicesService) ListDevices(input *ListDevicesInput) (*ListDevicesOutput, error)

ListDevices API operation for AWS IoT 1-Click Devices Service.

Lists the 1-Click compatible devices associated with your AWS account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation ListDevices for usage and error information.

Returned Error Codes:

  • ErrCodeRangeNotSatisfiableException "RangeNotSatisfiableException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDevices

ListDevicesRequest

func (c *IoT1ClickDevicesService) ListDevicesRequest(input *ListDevicesInput) (req *request.Request, output *ListDevicesOutput)

ListDevicesRequest generates a "aws/request.Request" representing the client's request for the ListDevices operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListDevices for more information on using the ListDevices API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListDevicesRequest method. req, resp := client.ListDevicesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDevices

ListDevicesWithContext

func (c *IoT1ClickDevicesService) ListDevicesWithContext(ctx aws.Context, input *ListDevicesInput, opts ...request.Option) (*ListDevicesOutput, error)

ListDevicesWithContext is the same as ListDevices with the addition of the ability to pass a context and additional request options.

See ListDevices for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UnclaimDevice

func (c *IoT1ClickDevicesService) UnclaimDevice(input *UnclaimDeviceInput) (*UnclaimDeviceOutput, error)

UnclaimDevice API operation for AWS IoT 1-Click Devices Service.

Disassociates a device from your AWS account using its device ID.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation UnclaimDevice for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UnclaimDevice

UnclaimDeviceRequest

func (c *IoT1ClickDevicesService) UnclaimDeviceRequest(input *UnclaimDeviceInput) (req *request.Request, output *UnclaimDeviceOutput)

UnclaimDeviceRequest generates a "aws/request.Request" representing the client's request for the UnclaimDevice operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UnclaimDevice for more information on using the UnclaimDevice API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UnclaimDeviceRequest method. req, resp := client.UnclaimDeviceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UnclaimDevice

UnclaimDeviceWithContext

func (c *IoT1ClickDevicesService) UnclaimDeviceWithContext(ctx aws.Context, input *UnclaimDeviceInput, opts ...request.Option) (*UnclaimDeviceOutput, error)

UnclaimDeviceWithContext is the same as UnclaimDevice with the addition of the ability to pass a context and additional request options.

See UnclaimDevice for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateDeviceState

func (c *IoT1ClickDevicesService) UpdateDeviceState(input *UpdateDeviceStateInput) (*UpdateDeviceStateOutput, error)

UpdateDeviceState API operation for AWS IoT 1-Click Devices Service.

Using a Boolean value (true or false), this operation enables or disables the device given a device ID.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS IoT 1-Click Devices Service's API operation UpdateDeviceState for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException"

  • ErrCodeInvalidRequestException "InvalidRequestException"

  • ErrCodeInternalFailureException "InternalFailureException"

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UpdateDeviceState

UpdateDeviceStateRequest

func (c *IoT1ClickDevicesService) UpdateDeviceStateRequest(input *UpdateDeviceStateInput) (req *request.Request, output *UpdateDeviceStateOutput)

UpdateDeviceStateRequest generates a "aws/request.Request" representing the client's request for the UpdateDeviceState operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateDeviceState for more information on using the UpdateDeviceState API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateDeviceStateRequest method. req, resp := client.UpdateDeviceStateRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UpdateDeviceState

UpdateDeviceStateWithContext

func (c *IoT1ClickDevicesService) UpdateDeviceStateWithContext(ctx aws.Context, input *UpdateDeviceStateInput, opts ...request.Option) (*UpdateDeviceStateOutput, error)

UpdateDeviceStateWithContext is the same as UpdateDeviceState with the addition of the ability to pass a context and additional request options.

See UpdateDeviceState for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

On this page: