• 沒有找到結果。

AWS IoT 1-Click

N/A
N/A
Protected

Academic year: 2022

Share "AWS IoT 1-Click"

Copied!
47
0
0

加載中.... (立即查看全文)

全文

(1)

AWS IoT 1-Click

Devices API Reference

(2)

AWS IoT 1-Click: Devices API Reference

Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

(3)

Table of Contents

What Is AWS IoT 1-Click? ... 1

Document History ... 2

AWS glossary ... 3

Resources ... 4

Claim Code ... 4

URI ... 4

HTTP methods ... 4

Schemas ... 5

Properties ... 5

See also ... 7

Device ... 7

URI ... 7

HTTP methods ... 7

Schemas ... 8

Properties ... 9

See also ... 11

Device Events ... 11

URI ... 11

HTTP methods ... 11

Schemas ... 12

Properties ... 13

See also ... 16

Device Methods ... 16

URI ... 16

HTTP methods ... 16

Schemas ... 17

Properties ... 19

See also ... 22

Device State ... 22

URI ... 22

HTTP methods ... 22

Schemas ... 23

Properties ... 24

See also ... 25

Devices ... 25

URI ... 25

HTTP methods ... 26

Schemas ... 26

Properties ... 27

See also ... 29

Finalize Claim ... 30

URI ... 30

HTTP methods ... 30

Schemas ... 31

Properties ... 32

See also ... 34

Initiate Claim ... 34

URI ... 34

HTTP methods ... 34

Schemas ... 35

Properties ... 36

See also ... 37

Tags resource-arn ... 38

URI ... 38

(4)

HTTP methods ... 38

Schemas ... 39

Properties ... 39

See also ... 40

Unclaim Device ... 41

URI ... 41

HTTP methods ... 41

Schemas ... 41

Properties ... 42

See also ... 43

(5)

What Is AWS IoT 1-Click?

Welcome to the AWS IoT 1-Click Devices API Reference. For a description of AWS IoT 1-Click and how it works, see the AWS IoT 1-Click Developer Guide.

(6)

Document History for the Devices API Reference

The following table describes the documentation for this release of AWS IoT 1-Click.

API version: latest

Latest documentation update: May 14, 2018

Change Description Date

Major release Initial documentation release. May 14, 2018

(7)

AWS glossary

For the latest AWS terminology, see the AWS glossary in the AWS General Reference.

(8)

Claim Code

Resources

The AWS IoT 1-Click REST API includes the following resources.

Topics

• Claim Code (p. 4)

• Device (p. 7)

• Device Events (p. 11)

• Device Methods (p. 16)

• Device State (p. 22)

• Devices (p. 25)

• Finalize Claim (p. 30)

• Initiate Claim (p. 34)

• Tags resource-arn (p. 38)

• Unclaim Device (p. 41)

Claim Code

A code is a value used to claim one or more devices.

URI

/claims/claimCode

HTTP methods

PUT

Operation ID: ClaimDevicesByClaimCode

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).

Path parameters

Name Type Required Description

claimCode String True The claim code,

starting with "C-", as provided by the device manufacturer.

Responses

Status code Response model Description

200 ClaimDevicesByClaimCodeResponse (p. 5)200 response 400 InvalidRequestException (p. 5)400 response

403 ForbiddenException (p. 5) 403 response

(9)

Schemas

Status code Response model Description

500 InternalFailureException (p. 5)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Response bodies

ClaimDevicesByClaimCodeResponse schema

{

"total": integer, "claimCode": "string"

}

InvalidRequestException schema

{ "code": "string", "message": "string"

}

ForbiddenException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{ "code": "string", "message": "string"

}

Properties

ClaimDevicesByClaimCodeResponse

total

The total number of devices associated with the claim code that has been processed in the claim request.

(10)

Properties

Type: integer Required: False Format: int32

claimCode

The claim code provided by the device manufacturer.

Type: string Required: False MinLength: 12 MaxLength: 40

ForbiddenException

code

403

Type: string Required: False

message

The 403 error message returned by the web server.

Type: string Required: False

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

Type: string Required: False

InvalidRequestException

code

400

Type: string Required: False

(11)

See also

message

The 400 error message returned by the web server.

Type: string Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

ClaimDevicesByClaimCode

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Device

Represents a device given the device's ID.

URI

/devices/deviceId

HTTP methods

GET

Operation ID: DescribeDevice

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

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

Responses

Status code Response model Description

200 DescribeDeviceResponse (p. 8)200 response

(12)

Schemas

Status code Response model Description

400 InvalidRequestException (p. 8)400 response 404 ResourceNotFoundException (p. 8)404 response 500 InternalFailureException (p. 8)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Response bodies

DescribeDeviceResponse schema

{ "deviceDescription": { "remainingLife": number, "attributes": {

},

"type": "string", "arn": "string", "deviceId": "string", "enabled": boolean }

}

InvalidRequestException schema

{

"code": "string", "message": "string"

}

ResourceNotFoundException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{

"code": "string", "message": "string"

(13)

Properties

}

Properties

DescribeDeviceResponse

deviceDescription

Device details.

Type: DeviceDescription (p. 9) Required: False

DeviceAttributes

DeviceAttributes is a string-to-string map specified by the user.

key-value pairs

Type: string

DeviceDescription

remainingLife

A value between 0 and 1 inclusive, representing the fraction of life remaining for the device.

Type: number Required: False Minimum: 0.0 Maximum: 100.0

attributes

An array of zero or more elements of DeviceAttribute objects providing user specified device attributes.

Type: DeviceAttributes (p. 9) Required: False

type

The type of the device, such as "button".

Type: string Required: False

arn

The ARN of the device.

Type: string Required: False

(14)

Properties

deviceId

The unique identifier of the device.

Type: string Required: False

enabled

A Boolean value indicating whether or not the device is enabled.

Type: boolean Required: False

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

Type: string Required: False

InvalidRequestException

code

400

Type: string Required: False

message

The 400 error message returned by the web server.

Type: string Required: False

ResourceNotFoundException

code

404

Type: string

(15)

See also

Required: False

message

The requested device could not be found.

Type: string Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

DescribeDevice

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Device Events

Represents a collection of events associated with the device. A device event is the event published by a device which are translated into a standard device-type event by the AWS IoT 1-Click service.

URI

/devices/deviceId/events

HTTP methods

GET

Operation ID: ListDeviceEvents

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

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

(16)

Schemas

Query parameters

Name Type Required Description

nextToken String False The token to retrieve

the next set of results.

maxResults String False The maximum number

of results to return per request. If not set, a default value of 100 is used.

fromTimeStamp String True The start date for

the device event query, in ISO8061 format. For example,

2018-03-28T15:45:12.880Z

toTimeStamp String True The end date for

the device event query, in ISO8061 format. For example,

2018-03-28T15:45:12.880Z

Responses

Status code Response model Description

200 DeviceEventsResponse (p. 12)200 response

400 InvalidRequestException (p. 13)400 response 404 ResourceNotFoundException (p. 13)404 response 416 RangeNotSatisfiableException (p. 13)416 response 500 InternalFailureException (p. 13)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Response bodies

DeviceEventsResponse schema

{

(17)

Properties

"nextToken": "string", "events": [

{

"stdEvent": "string", "device": {

"attributes": { },

"type": "string", "deviceId": "string"

} } ]}

InvalidRequestException schema

{ "code": "string", "message": "string"

}

ResourceNotFoundException schema

{ "code": "string", "message": "string"

}

RangeNotSatisfiableException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{

"code": "string", "message": "string"

}

Properties

Device

attributes

The user specified attributes associated with the device for an event.

Type: object Required: False

(18)

Properties

type

The device type, such as "button".

Type: string Required: False

deviceId

The unique identifier of the device.

Type: string Required: False

DeviceEvent

stdEvent

A serialized JSON object representing the device-type specific event.

Type: string Required: False

device

An object representing the device associated with the event.

Type: Device (p. 13) Required: False

DeviceEventsResponse

nextToken

The token to retrieve the next set of results.

Type: string Required: False

events

An array of zero or more elements describing the event(s) associated with the device.

Type: Array of type DeviceEvent (p. 14) Required: False

InternalFailureException

code

500

Type: string Required: False

(19)

Properties

message

The 500 error message returned by the web server.

Type: string Required: False

InvalidRequestException

code

400

Type: string Required: False

message

The 400 error message returned by the web server.

Type: string Required: False

RangeNotSatisfiableException

code

416

Type: string Required: False

message

The requested number of results specified by nextToken cannot be satisfied.

Type: string Required: False

ResourceNotFoundException

code

404

Type: string Required: False

message

The requested device could not be found.

Type: string

(20)

See also

Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

ListDeviceEvents

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Device Methods

Given a device ID, represents the collection of invokable device methods. For more information, see Device Methods in the AWS IoT 1-Click Developer Guide.

URI

/devices/deviceId/methods

HTTP methods

GET

Operation ID: GetDeviceMethods

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

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

Responses

Status code Response model Description

200 GetDeviceMethodsResponse (p. 18)200 response 400 InvalidRequestException (p. 18)400 response

(21)

Schemas

Status code Response model Description

404 ResourceNotFoundException (p. 18)404 response 500 InternalFailureException (p. 19)500 response

POST

Operation ID: InvokeDeviceMethod

Given a device ID, issues a request to invoke a named device method (with possible parameters). See the

"Example POST" code snippet below.

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

Responses

Status code Response model Description

200 InvokeDeviceMethodResponse (p. 18)200 response 400 InvalidRequestException (p. 18)400 response 404 ResourceNotFoundException (p. 18)404 response 409 ResourceConflictException (p. 18)409 response 412 PreconditionFailedException (p. 18)412 response 416 RangeNotSatisfiableException (p. 19)416 response 500 InternalFailureException (p. 19)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Request bodies

POST schema

{ "deviceMethodParameters": "string",

(22)

Schemas

"deviceMethod": {

"deviceType": "string", "methodName": "string"

} }

Response bodies

GetDeviceMethodsResponse schema

{

"deviceMethods": [ {

"deviceType": "string", "methodName": "string"

} ]}

InvokeDeviceMethodResponse schema

{ "deviceMethodResponse": "string"

}

InvalidRequestException schema

{

"code": "string", "message": "string"

}

ResourceNotFoundException schema

{ "code": "string", "message": "string"

}

ResourceConflictException schema

{ "code": "string", "message": "string"

}

PreconditionFailedException schema

{ "code": "string", "message": "string"

}

(23)

Properties

RangeNotSatisfiableException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{ "code": "string", "message": "string"

}

Properties

DeviceMethod

deviceType

The type of the device, such as "button".

Type: string Required: False

methodName

The name of the method applicable to the deviceType.

Type: string Required: False

GetDeviceMethodsResponse

deviceMethods

List of available device APIs.

Type: Array of type DeviceMethod (p. 19) Required: False

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

(24)

Properties

Type: string Required: False

InvalidRequestException

code

400

Type: string Required: False

message

The 400 error message returned by the web server.

Type: string Required: False

InvokeDeviceMethodRequest

deviceMethodParameters

A JSON encoded string containing the device method request parameters.

Type: string Required: False

deviceMethod

The device method to invoke.

Type: DeviceMethod (p. 19) Required: False

InvokeDeviceMethodResponse

deviceMethodResponse

A JSON encoded string containing the device method response.

Type: string Required: False

PreconditionFailedException

code

412

Type: string Required: False

(25)

Properties

message

An error message explaining the error or its remedy.

Type: string Required: False

RangeNotSatisfiableException

code

416

Type: string Required: False

message

The requested number of results specified by nextToken cannot be satisfied.

Type: string Required: False

ResourceConflictException

code

409

Type: string Required: False

message

An error message explaining the error or its remedy.

Type: string Required: False

ResourceNotFoundException

code

404

Type: string Required: False

message

The requested device could not be found.

Type: string

(26)

See also

Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

GetDeviceMethods

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

InvokeDeviceMethod

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Device State

Represents the device's state.

URI

/devices/deviceId/state

HTTP methods

PUT

Operation ID: UpdateDeviceState

(27)

Schemas

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

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

Responses

Status code Response model Description

200 Empty (p. 23) 200 response

400 InvalidRequestException (p. 23)400 response 404 ResourceNotFoundException (p. 24)404 response 500 InternalFailureException (p. 24)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Request bodies

PUT schema

{

"enabled": boolean }

Response bodies

Empty schema

{}

InvalidRequestException schema

{

"code": "string", "message": "string"

}

(28)

Properties

ResourceNotFoundException schema

{

"code": "string", "message": "string"

}

InternalFailureException schema

{ "code": "string", "message": "string"

}

Properties

Empty

On success, an empty object is returned.

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

Type: string Required: False

InvalidRequestException

code

400

Type: string Required: False

message

The 400 error message returned by the web server.

Type: string Required: False

(29)

See also

ResourceNotFoundException

code

404

Type: string Required: False

message

The requested device could not be found.

Type: string Required: False

UpdateDeviceStateRequest

enabled

If true, the device is enabled. If false, the device is disabled.

Type: boolean Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

UpdateDeviceState

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Devices

Represents a collection of claimed devices.

URI

/devices

(30)

HTTP methods

HTTP methods

GET

Operation ID: ListDevices

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

Query parameters

Name Type Required Description

deviceType String False The type of the device,

such as "button".

nextToken String False The token to retrieve

the next set of results.

maxResults String False The maximum number

of results to return per request. If not set, a default value of 100 is used.

Responses

Status code Response model Description

200 ListDevicesResponse (p. 26)200 response

400 InvalidRequestException (p. 27)400 response 416 RangeNotSatisfiableException (p. 27)416 response 500 InternalFailureException (p. 27)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Response bodies

ListDevicesResponse schema

{

"devices": [ {

(31)

Properties

"remainingLife": number, "attributes": {

},

"type": "string", "arn": "string", "deviceId": "string", "enabled": boolean }

],

"nextToken": "string"

}

InvalidRequestException schema

{

"code": "string", "message": "string"

}

RangeNotSatisfiableException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{

"code": "string", "message": "string"

}

Properties

DeviceAttributes

DeviceAttributes is a string-to-string map specified by the user.

key-value pairs

Type: string

DeviceDescription

remainingLife

A value between 0 and 1 inclusive, representing the fraction of life remaining for the device.

Type: number Required: False Minimum: 0.0

(32)

Properties

Maximum: 100.0

attributes

An array of zero or more elements of DeviceAttribute objects providing user specified device attributes.

Type: DeviceAttributes (p. 27) Required: False

type

The type of the device, such as "button".

Type: string Required: False

arn

The ARN of the device.

Type: string Required: False

deviceId

The unique identifier of the device.

Type: string Required: False

enabled

A Boolean value indicating whether or not the device is enabled.

Type: boolean Required: False

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

Type: string Required: False

(33)

See also

InvalidRequestException

code

400

Type: string Required: False

message

The 400 error message returned by the web server.

Type: string Required: False

ListDevicesResponse

devices

A list of devices.

Type: Array of type DeviceDescription (p. 27) Required: False

nextToken

The token to retrieve the next set of results.

Type: string Required: False

RangeNotSatisfiableException

code

416

Type: string Required: False

message

The requested number of results specified by nextToken cannot be satisfied.

Type: string Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

(34)

Finalize Claim

ListDevices

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Finalize Claim

Finalizes a device claim request initiated by a InitiateDeviceClaim operation.

URI

/devices/deviceId/finalize-claim

HTTP methods

PUT

Operation ID: FinalizeDeviceClaim

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

Note

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.

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

Responses

Status code Response model Description

200 DeviceClaimResponse (p. 31)200 response

400 InvalidRequestException (p. 31)400 response 404 ResourceNotFoundException (p. 31)404 response 409 ResourceConflictException (p. 31)409 response 412 PreconditionFailedException (p. 32)412 response

(35)

Schemas

Status code Response model Description

500 InternalFailureException (p. 32)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Request bodies

PUT schema

{ "tags": { }

}

Response bodies

DeviceClaimResponse schema

{ "state": "string"

}

InvalidRequestException schema

{ "code": "string", "message": "string"

}

ResourceNotFoundException schema

{

"code": "string", "message": "string"

}

ResourceConflictException schema

{ "code": "string",

(36)

Properties

"message": "string"

}

PreconditionFailedException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{ "code": "string", "message": "string"

}

Properties

DeviceClaimResponse

state

The device's final claim state.

Type: string Required: False

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

Type: string Required: False

InvalidRequestException

code

400

Type: string Required: False

(37)

Properties

message

The 400 error message returned by the web server.

Type: string Required: False

PreconditionFailedException

code

412

Type: string Required: False

message

An error message explaining the error or its remedy.

Type: string Required: False

ResourceConflictException

code

409

Type: string Required: False

message

An error message explaining the error or its remedy.

Type: string Required: False

ResourceNotFoundException

code

404

Type: string Required: False

message

The requested device could not be found.

Type: string Required: False

(38)

See also

tagsModel

Contains tag information (resource metadata key/value pairs).

tags

A collection of key/value pairs defining the resource tags. For example, { "tags": {"key1":

"value1", "key2": "value2"} }. For more information, see AWS Tagging Strategies.

Type: object Required: True

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

FinalizeDeviceClaim

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

Initiate Claim

Initiates a claim request for a device given its device ID.

URI

/devices/deviceId/initiate-claim

HTTP methods

PUT

Operation ID: InitiateDeviceClaim

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

Note

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.

(39)

Schemas

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

Responses

Status code Response model Description

200 DeviceClaimResponse (p. 35)200 response

400 InvalidRequestException (p. 35)400 response 404 ResourceNotFoundException (p. 35)404 response 409 ResourceConflictException (p. 36)409 response 500 InternalFailureException (p. 36)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Response bodies

DeviceClaimResponse schema

{ "state": "string"

}

InvalidRequestException schema

{ "code": "string", "message": "string"

}

ResourceNotFoundException schema

{

"code": "string", "message": "string"

}

(40)

Properties

ResourceConflictException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{ "code": "string", "message": "string"

}

Properties

DeviceClaimResponse

state

The device's final claim state.

Type: string Required: False

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

Type: string Required: False

InvalidRequestException

code

400

Type: string Required: False

message

The 400 error message returned by the web server.

(41)

See also

Type: string Required: False

ResourceConflictException

code

409

Type: string Required: False

message

An error message explaining the error or its remedy.

Type: string Required: False

ResourceNotFoundException

code

404

Type: string Required: False

message

The requested device could not be found.

Type: string Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

InitiateDeviceClaim

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

(42)

Tags resource-arn

• AWS SDK for Ruby V3

Tags resource-arn

Adds, modifies or deletes one or more resource tags (metadata key/value pairs associated with a resource) given the ARN of a resource. For more information, see AWS Tagging Strategies

URI

/tags/resource-arn

HTTP methods

GET

Operation ID: ListTagsForResource

Lists the tags associated with the specified resource ARN.

Path parameters

Name Type Required Description

resource-arn String True The ARN of the

resource.

Responses

Status code Response model Description

200 tagsModel (p. 39) 200 response

POST

Operation ID: TagResource

Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per resource.

Path parameters

Name Type Required Description

resource-arn String True The ARN of the

resource.

Responses

Status code Response model Description

204 None 204 response

(43)

Schemas

DELETE

Operation ID: UntagResource

Using tag keys, deletes the tags (key/value pairs) associated with the specified resource ARN.

Path parameters

Name Type Required Description

resource-arn String True The ARN of the

resource.

Query parameters

Name Type Required Description

tagKeys String True A collections of tag

keys. For example, {"key1","key2"}

Responses

Status code Response model Description

204 None 204 response

Schemas

Request bodies

POST schema

{ "tags": { }}

Response bodies

tagsModel schema

{

"tags": { }

}

Properties

tagsModel

Contains tag information (resource metadata key/value pairs).

(44)

See also

tags

A collection of key/value pairs defining the resource tags. For example, { "tags": {"key1":

"value1", "key2": "value2"} }. For more information, see AWS Tagging Strategies.

Type: object Required: True

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

ListTagsForResource

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

TagResource

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UntagResource

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

(45)

Unclaim Device

• AWS SDK for Python

• AWS SDK for Ruby V3

Unclaim Device

Unclaims a device using its device ID.

URI

/devices/deviceId/unclaim

HTTP methods

PUT

Operation ID: UnclaimDevice

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

Path parameters

Name Type Required Description

deviceId String True The unique identifier of

the device.

Responses

Status code Response model Description

200 DeviceClaimResponse (p. 42)200 response

400 InvalidRequestException (p. 42)400 response 404 ResourceNotFoundException (p. 42)404 response 500 InternalFailureException (p. 42)500 response

OPTIONS

Responses

Status code Response model Description

200 None 200 response

Schemas

Response bodies

(46)

Properties

DeviceClaimResponse schema

{

"state": "string"

}

InvalidRequestException schema

{

"code": "string", "message": "string"

}

ResourceNotFoundException schema

{ "code": "string", "message": "string"

}

InternalFailureException schema

{ "code": "string", "message": "string"

}

Properties

DeviceClaimResponse

state

The device's final claim state.

Type: string Required: False

InternalFailureException

code

500

Type: string Required: False

message

The 500 error message returned by the web server.

Type: string

(47)

See also

Required: False

InvalidRequestException

code

400

Type: string Required: False

message

The 400 error message returned by the web server.

Type: string Required: False

ResourceNotFoundException

code

404

Type: string Required: False

message

The requested device could not be found.

Type: string Required: False

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

UnclaimDevice

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

參考文獻

相關文件

We further want to be able to embed our KK GUTs in string theory, as higher dimensional gauge theories are highly non-renormalisable.. This works beautifully in the heterotic

introduction to continuum and matrix model formulation of non-critical string theory.. They typically describe strings in 1+0 or 1+1 dimensions with a

Hikami proposed a state integral model which gives a topological invariant for hyperbolic 3-manifold.. Saddle Point of

◆ Understand the time evolutions of the matrix model to reveal the time evolution of string/gravity. ◆ Study the GGE and consider the application to string and

It should be stressed that the four eigenvalues obtained here do not change even if we include other field outside KBc subalgebra or outside the dressed B 0 gauge, since such fields

[CIY4], Analytic Study for the String Theory Landscapes via Matrix Models, Phys.Rev... THEME:

„ „ The The extended nature extended nature of string theory introduces of string theory introduces additional degrees of freedom?. additional degrees of freedom localized

Q: Can we at least find the exact string theory background that gives our universe. A: A