• 沒有找到結果。

AWS IoT Greengrass

N/A
N/A
Protected

Academic year: 2022

Share "AWS IoT Greengrass"

Copied!
145
0
0

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

全文

(1)

AWS IoT Greengrass

API Reference, Version 2

(2)

AWS IoT Greengrass: API Reference, Version 2

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

Welcome ... 1

Actions ... 2

AssociateServiceRoleToAccount ... 3

Request Syntax ... 3

URI Request Parameters ... 3

Request Body ... 3

Response Syntax ... 3

Response Elements ... 3

Errors ... 4

See Also ... 4

BatchAssociateClientDeviceWithCoreDevice ... 5

Request Syntax ... 5

URI Request Parameters ... 5

Request Body ... 5

Response Syntax ... 5

Response Elements ... 6

Errors ... 6

See Also ... 7

BatchDisassociateClientDeviceFromCoreDevice ... 8

Request Syntax ... 8

URI Request Parameters ... 8

Request Body ... 8

Response Syntax ... 8

Response Elements ... 9

Errors ... 9

See Also ... 9

CancelDeployment ... 11

Request Syntax ... 11

URI Request Parameters ... 11

Request Body ... 11

Response Syntax ... 11

Response Elements ... 11

Errors ... 11

See Also ... 12

CreateComponentVersion ... 13

Request Syntax ... 13

URI Request Parameters ... 14

Request Body ... 14

Response Syntax ... 15

Response Elements ... 16

Errors ... 16

See Also ... 17

CreateDeployment ... 18

Request Syntax ... 18

URI Request Parameters ... 19

Request Body ... 19

Response Syntax ... 20

Response Elements ... 20

Errors ... 21

See Also ... 22

DeleteComponent ... 23

Request Syntax ... 23

URI Request Parameters ... 23

Request Body ... 23

(4)

Response Syntax ... 23

Response Elements ... 23

Errors ... 23

See Also ... 24

DeleteCoreDevice ... 25

Request Syntax ... 25

URI Request Parameters ... 25

Request Body ... 25

Response Syntax ... 25

Response Elements ... 25

Errors ... 25

See Also ... 26

DescribeComponent ... 27

Request Syntax ... 27

URI Request Parameters ... 27

Request Body ... 27

Response Syntax ... 27

Response Elements ... 28

Errors ... 29

See Also ... 29

DisassociateServiceRoleFromAccount ... 31

Request Syntax ... 31

URI Request Parameters ... 31

Request Body ... 31

Response Syntax ... 31

Response Elements ... 31

Errors ... 31

See Also ... 32

GetComponent ... 33

Request Syntax ... 33

URI Request Parameters ... 33

Request Body ... 33

Response Syntax ... 33

Response Elements ... 33

Errors ... 34

See Also ... 34

GetComponentVersionArtifact ... 36

Request Syntax ... 36

URI Request Parameters ... 36

Request Body ... 36

Response Syntax ... 36

Response Elements ... 36

Errors ... 37

See Also ... 37

GetConnectivityInfo ... 39

Request Syntax ... 39

URI Request Parameters ... 39

Request Body ... 39

Response Syntax ... 39

Response Elements ... 39

Errors ... 40

See Also ... 40

GetCoreDevice ... 41

Request Syntax ... 41

URI Request Parameters ... 41

Request Body ... 41

Response Syntax ... 41

(5)

Response Elements ... 41

Errors ... 42

See Also ... 43

GetDeployment ... 44

Request Syntax ... 44

URI Request Parameters ... 44

Request Body ... 44

Response Syntax ... 44

Response Elements ... 45

Errors ... 47

See Also ... 47

GetServiceRoleForAccount ... 49

Request Syntax ... 49

URI Request Parameters ... 49

Request Body ... 49

Response Syntax ... 49

Response Elements ... 49

Errors ... 49

See Also ... 50

ListClientDevicesAssociatedWithCoreDevice ... 51

Request Syntax ... 51

URI Request Parameters ... 51

Request Body ... 51

Response Syntax ... 51

Response Elements ... 51

Errors ... 52

See Also ... 52

ListComponents ... 54

Request Syntax ... 54

URI Request Parameters ... 54

Request Body ... 54

Response Syntax ... 54

Response Elements ... 55

Errors ... 55

See Also ... 55

ListComponentVersions ... 57

Request Syntax ... 57

URI Request Parameters ... 57

Request Body ... 57

Response Syntax ... 57

Response Elements ... 57

Errors ... 58

See Also ... 58

ListCoreDevices ... 60

Request Syntax ... 60

URI Request Parameters ... 60

Request Body ... 60

Response Syntax ... 60

Response Elements ... 61

Errors ... 61

See Also ... 61

ListDeployments ... 63

Request Syntax ... 63

URI Request Parameters ... 63

Request Body ... 63

Response Syntax ... 63

Response Elements ... 64

(6)

Errors ... 64

See Also ... 64

ListEffectiveDeployments ... 66

Request Syntax ... 66

URI Request Parameters ... 66

Request Body ... 66

Response Syntax ... 66

Response Elements ... 67

Errors ... 67

See Also ... 67

ListInstalledComponents ... 69

Request Syntax ... 69

URI Request Parameters ... 69

Request Body ... 69

Response Syntax ... 69

Response Elements ... 69

Errors ... 70

See Also ... 70

ListTagsForResource ... 72

Request Syntax ... 72

URI Request Parameters ... 72

Request Body ... 72

Response Syntax ... 72

Response Elements ... 72

Errors ... 73

See Also ... 73

ResolveComponentCandidates ... 74

Request Syntax ... 74

URI Request Parameters ... 74

Request Body ... 74

Response Syntax ... 75

Response Elements ... 75

Errors ... 75

See Also ... 76

TagResource ... 77

Request Syntax ... 77

URI Request Parameters ... 77

Request Body ... 77

Response Syntax ... 77

Response Elements ... 78

Errors ... 78

See Also ... 78

UntagResource ... 79

Request Syntax ... 79

URI Request Parameters ... 79

Request Body ... 79

Response Syntax ... 79

Response Elements ... 79

Errors ... 79

See Also ... 80

UpdateConnectivityInfo ... 81

Request Syntax ... 81

URI Request Parameters ... 81

Request Body ... 81

Response Syntax ... 81

Response Elements ... 82

Errors ... 82

(7)

See Also ... 82

Data Types ... 83

AssociateClientDeviceWithCoreDeviceEntry ... 85

Contents ... 85

See Also ... 85

AssociateClientDeviceWithCoreDeviceErrorEntry ... 86

Contents ... 86

See Also ... 86

AssociatedClientDevice ... 87

Contents ... 87

See Also ... 87

CloudComponentStatus ... 88

Contents ... 88

See Also ... 88

Component ... 89

Contents ... 89

See Also ... 89

ComponentCandidate ... 90

Contents ... 90

See Also ... 90

ComponentConfigurationUpdate ... 91

Contents ... 91

See Also ... 91

ComponentDependencyRequirement ... 92

Contents ... 92

See Also ... 92

ComponentDeploymentSpecification ... 93

Contents ... 93

See Also ... 93

ComponentLatestVersion ... 94

Contents ... 94

See Also ... 95

ComponentPlatform ... 96

Contents ... 96

See Also ... 96

ComponentRunWith ... 97

Contents ... 97

See Also ... 97

ComponentVersionListItem ... 99

Contents ... 99

See Also ... 99

ConnectivityInfo ... 100

Contents ... 100

See Also ... 100

CoreDevice ... 101

Contents ... 101

See Also ... 101

Deployment ... 102

Contents ... 102

See Also ... 103

DeploymentComponentUpdatePolicy ... 104

Contents ... 104

See Also ... 104

DeploymentConfigurationValidationPolicy ... 105

Contents ... 105

See Also ... 105

DeploymentIoTJobConfiguration ... 106

(8)

Contents ... 106

See Also ... 106

DeploymentPolicies ... 107

Contents ... 107

See Also ... 107

DisassociateClientDeviceFromCoreDeviceEntry ... 108

Contents ... 108

See Also ... 108

DisassociateClientDeviceFromCoreDeviceErrorEntry ... 109

Contents ... 109

See Also ... 109

EffectiveDeployment ... 110

Contents ... 110

See Also ... 111

InstalledComponent ... 112

Contents ... 112

See Also ... 112

IoTJobAbortConfig ... 114

Contents ... 114

See Also ... 114

IoTJobAbortCriteria ... 115

Contents ... 115

See Also ... 115

IoTJobExecutionsRolloutConfig ... 117

Contents ... 117

See Also ... 117

IoTJobExponentialRolloutRate ... 118

Contents ... 118

See Also ... 118

IoTJobRateIncreaseCriteria ... 119

Contents ... 119

See Also ... 119

IoTJobTimeoutConfig ... 120

Contents ... 120

See Also ... 120

LambdaContainerParams ... 121

Contents ... 121

See Also ... 121

LambdaDeviceMount ... 122

Contents ... 122

See Also ... 122

LambdaEventSource ... 123

Contents ... 123

See Also ... 123

LambdaExecutionParameters ... 124

Contents ... 124

See Also ... 125

LambdaFunctionRecipeSource ... 126

Contents ... 126

See Also ... 127

LambdaLinuxProcessParams ... 128

Contents ... 128

See Also ... 128

LambdaVolumeMount ... 129

Contents ... 129

See Also ... 129

ResolvedComponentVersion ... 130

(9)

Contents ... 130

See Also ... 130

SystemResourceLimits ... 131

Contents ... 131

See Also ... 131

ValidationExceptionField ... 132

Contents ... 132

See Also ... 132

Common Parameters ... 133

Common Errors ... 135

(10)

Welcome

AWS IoT Greengrass brings local compute, messaging, data management, sync, and ML inference capabilities to edge devices. This enables devices to collect and analyze data closer to the source of information, react autonomously to local events, and communicate securely with each other on local networks. Local devices can also communicate securely with AWS IoT Core and export IoT data to the AWS Cloud. AWS IoT Greengrass developers can use AWS Lambda functions and components to create and deploy applications to fleets of edge devices for local operation.

AWS IoT Greengrass Version 2 provides a new major version of the AWS IoT Greengrass Core software, new APIs, and a new console. Use this API reference to learn how to use the AWS IoT Greengrass V2 API operations to manage components, manage deployments, and core devices.

For more information, see What is AWS IoT Greengrass? in the AWS IoT Greengrass V2 Developer Guide.

This document was last published on March 6, 2022.

(11)

Actions

The following actions are supported:

• AssociateServiceRoleToAccount (p. 3)

• BatchAssociateClientDeviceWithCoreDevice (p. 5)

• BatchDisassociateClientDeviceFromCoreDevice (p. 8)

• CancelDeployment (p. 11)

• CreateComponentVersion (p. 13)

• CreateDeployment (p. 18)

• DeleteComponent (p. 23)

• DeleteCoreDevice (p. 25)

• DescribeComponent (p. 27)

• DisassociateServiceRoleFromAccount (p. 31)

• GetComponent (p. 33)

• GetComponentVersionArtifact (p. 36)

• GetConnectivityInfo (p. 39)

• GetCoreDevice (p. 41)

• GetDeployment (p. 44)

• GetServiceRoleForAccount (p. 49)

• ListClientDevicesAssociatedWithCoreDevice (p. 51)

• ListComponents (p. 54)

• ListComponentVersions (p. 57)

• ListCoreDevices (p. 60)

• ListDeployments (p. 63)

• ListEffectiveDeployments (p. 66)

• ListInstalledComponents (p. 69)

• ListTagsForResource (p. 72)

• ResolveComponentCandidates (p. 74)

• TagResource (p. 77)

• UntagResource (p. 79)

• UpdateConnectivityInfo (p. 81)

(12)

AssociateServiceRoleToAccount

AssociateServiceRoleToAccount

Associates a Greengrass service role with AWS IoT Greengrass for your AWS account in this AWS Region.

AWS IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. The role must include the AWSGreengrassResourceAccessRolePolicy managed policy or a custom policy that defines equivalent permissions for the AWS IoT Greengrass features that you use. For more information, see Greengrass service role in the AWS IoT Greengrass Version 2 Developer Guide.

Request Syntax

PUT /greengrass/servicerole HTTP/1.1 Content-type: application/json { "RoleArn": "string"

}

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

RoleArn (p. 3)

The Amazon Resource Name (ARN) of the service role to associate with AWS IoT Greengrass for your AWS account in this AWS Region.

Type: String Required: Yes

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"AssociatedAt": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AssociatedAt (p. 3)

The time when the service role was associated with AWS IoT Greengrass for your AWS account in this AWS Region.

(13)

Errors

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(14)

BatchAssociateClientDeviceWithCoreDevice

BatchAssociateClientDeviceWithCoreDevice

Associates a list of client devices with a core device. Use this API operation to specify which client devices can discover a core device through cloud discovery. With cloud discovery, client devices connect to AWS IoT Greengrass to retrieve associated core devices' connectivity information and certificates. For more information, see Configure cloud discovery in the AWS IoT Greengrass V2 Developer Guide.

NoteClient devices are local IoT devices that connect to and communicate with an AWS IoT

Greengrass core device over MQTT. You can connect client devices to a core device to sync MQTT messages and data to AWS IoT Core and interact with client devices in Greengrass components.

For more information, see Interact with local IoT devices in the AWS IoT Greengrass V2 Developer Guide.

Request Syntax

POST /greengrass/v2/coreDevices/coreDeviceThingName/associateClientDevices HTTP/1.1 Content-type: application/json

{

"entries": [ {

"thingName": "string"

} ] }

URI Request Parameters

The request uses the following URI parameters.

coreDeviceThingName (p. 5)

The name of the core device. This is also the name of the AWS IoT thing.

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

Request Body

The request accepts the following data in JSON format.

entries (p. 5)

The list of client devices to associate.

Type: Array of AssociateClientDeviceWithCoreDeviceEntry (p. 85) objects Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

Response Syntax

HTTP/1.1 200

(15)

Response Elements

Content-type: application/json { "errorEntries": [

{

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

} ]}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

errorEntries (p. 5)

The list of any errors for the entries in the request. Each error entry contains the name of the AWS IoT thing that failed to associate.

Type: Array of AssociateClientDeviceWithCoreDeviceErrorEntry (p. 86) objects Array Members: Minimum number of 1 item. Maximum number of 100 items.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

(16)

See Also

See Also

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

• 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

(17)

BatchDisassociateClientDeviceFromCoreDevice

BatchDisassociateClientDeviceFromCoreDevice

Disassociates a list of client devices from a core device. After you disassociate a client device from a core device, the client device won't be able to use cloud discovery to retrieve the core device's connectivity information and certificates.

Request Syntax

POST /greengrass/v2/coreDevices/coreDeviceThingName/disassociateClientDevices HTTP/1.1 Content-type: application/json

{ "entries": [ {

"thingName": "string"

} ]}

URI Request Parameters

The request uses the following URI parameters.

coreDeviceThingName (p. 8)

The name of the core device. This is also the name of the AWS IoT thing.

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

Request Body

The request accepts the following data in JSON format.

entries (p. 8)

The list of client devices to disassociate.

Type: Array of DisassociateClientDeviceFromCoreDeviceEntry (p. 108) objects Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "errorEntries": [

{

"code": "string",

(18)

Response Elements

"message": "string", "thingName": "string"

} ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

errorEntries (p. 8)

The list of any errors for the entries in the request. Each error entry contains the name of the AWS IoT thing that failed to disassociate.

Type: Array of DisassociateClientDeviceFromCoreDeviceErrorEntry (p. 109) objects Array Members: Minimum number of 1 item. Maximum number of 100 items.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

(19)

See Also

• 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

(20)

CancelDeployment

CancelDeployment

Cancels a deployment. This operation cancels the deployment for devices that haven't yet received it. If a device already received the deployment, this operation doesn't change anything for that device.

Request Syntax

POST /greengrass/v2/deployments/deploymentId/cancel HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

deploymentId (p. 11)

The ID of the deployment.

Length Constraints: Minimum length of 1.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "message": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

message (p. 11)

A message that communicates if the cancel was successful.

Type: String

Length Constraints: Minimum length of 1.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

(21)

See Also

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 ConflictException

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

HTTP Status Code: 409 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(22)

CreateComponentVersion

CreateComponentVersion

Creates a component. Components are software that run on Greengrass core devices. After you develop and test a component on your core device, you can use this operation to upload your component to AWS IoT Greengrass. Then, you can deploy the component to other core devices.

You can use this operation to do the following:

Create components from recipes

Create a component from a recipe, which is a file that defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For more information, see AWS IoT

Greengrass component recipe reference in the AWS IoT Greengrass V2 Developer Guide.

To create a component from a recipe, specify inlineRecipe when you call this operation.

Create components from Lambda functions

Create a component from an AWS Lambda function that runs on AWS IoT Greengrass. This creates a recipe and artifacts from the Lambda function's deployment package. You can use this operation to migrate Lambda functions from AWS IoT Greengrass V1 to AWS IoT Greengrass V2.

This function only accepts Lambda functions that use the following runtimes:

• Python 2.7 – python2.7

• Python 3.7 – python3.7

• Python 3.8 – python3.8

• Java 8 – java8

• Node.js 10 – nodejs10.x

• Node.js 12 – nodejs12.x

To create a component from a Lambda function, specify lambdaFunction when you call this operation.

NoteAWS IoT Greengrass currently supports Lambda functions on only Linux core devices.

Request Syntax

POST /greengrass/v2/createComponentVersion HTTP/1.1 Content-type: application/json

{ "clientToken": "string", "inlineRecipe": blob, "lambdaFunction": {

"componentDependencies": { "string" : {

"dependencyType": "string", "versionRequirement": "string"

} },

"componentLambdaParameters": { "environmentVariables": { "string" : "string"

},

"eventSources": [ {

"topic": "string",

(23)

URI Request Parameters

"type": "string"

} ],

"execArgs": [ "string" ],

"inputPayloadEncodingType": "string", "linuxProcessParams": {

"containerParams": { "devices": [ {

"addGroupOwner": boolean, "path": "string",

"permission": "string"

} ],

"memorySizeInKB": number, "mountROSysfs": boolean, "volumes": [

{

"addGroupOwner": boolean, "destinationPath": "string", "permission": "string", "sourcePath": "string"

} ] },

"isolationMode": "string"

},

"maxIdleTimeInSeconds": number, "maxInstancesCount": number, "maxQueueSize": number, "pinned": boolean,

"statusTimeoutInSeconds": number, "timeoutInSeconds": number

},

"componentName": "string", "componentPlatforms": [ {

"attributes": { "string" : "string"

},

"name": "string"

} ],

"componentVersion": "string", "lambdaArn": "string"

},

"tags": {

"string" : "string"

} }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

clientToken (p. 13)

A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent.

Idempotency means that the request is successfully processed only once, even if you send the

(24)

Response Syntax

request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the AWS IoT Greengrass V2 service returns the successful response that it caches from the previous request. AWS IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9-]+$

Required: No inlineRecipe (p. 13)

The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.

You must specify either inlineRecipe or lambdaFunction.

Type: Base64-encoded binary data object Required: No

lambdaFunction (p. 13)

The parameters to create a component from a Lambda function.

You must specify either inlineRecipe or lambdaFunction.

Type: LambdaFunctionRecipeSource (p. 126) object Required: No

tags (p. 13)

A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the AWS IoT Greengrass V2 Developer Guide.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Required: No

Response Syntax

HTTP/1.1 201

Content-type: application/json { "arn": "string",

"componentName": "string", "componentVersion": "string", "creationTimestamp": number, "status": {

"componentState": "string",

(25)

Response Elements

"errors": {

"string" : "string"

},

"message": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

arn (p. 15)

The ARN of the component version.

Type: String

Pattern: arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:

[^:]+:versions:[^:]+

componentName (p. 15)

The name of the component.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9-_.]+

componentVersion (p. 15) The version of the component.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [0-9a-zA-Z-.+]+

creationTimestamp (p. 15)

The time at which the component was created, expressed in ISO 8601 format.

Type: Timestamp status (p. 15)

The status of the component version in AWS IoT Greengrass V2. This status is different from the status of the component on a core device.

Type: CloudComponentStatus (p. 88) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

(26)

See Also

HTTP Status Code: 403 ConflictException

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

HTTP Status Code: 409 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500

RequestAlreadyInProgressException

The request is already in progress. This exception occurs when you use a client token for multiple requests while AWS IoT Greengrass is still processing an earlier request that uses the same client token.

HTTP Status Code: 400 ServiceQuotaExceededException

Your request exceeds a service quota. For example, you might have the maximum number of components that you can create.

HTTP Status Code: 402 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(27)

CreateDeployment

CreateDeployment

Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices.

When you add a new core device to a group of core devices that has a deployment, AWS IoT Greengrass deploys that group's deployment to the new device.

You can define one deployment for each target. When you create a new deployment for a target that has an existing deployment, you replace the previous deployment. AWS IoT Greengrass applies the new deployment to the target devices.

Every deployment has a revision number that indicates how many deployment revisions you define for a target. Use this operation to create a new revision of an existing deployment.

For more information, see the Create deployments in the AWS IoT Greengrass V2 Developer Guide.

Request Syntax

POST /greengrass/v2/deployments HTTP/1.1 Content-type: application/json

{

"clientToken": "string", "components": {

"string" : {

"componentVersion": "string", "configurationUpdate": { "merge": "string", "reset": [ "string" ] },

"runWith": {

"posixUser": "string", "systemResourceLimits": { "cpus": number,

"memory": number },

"windowsUser": "string"

} } },

"deploymentName": "string", "deploymentPolicies": { "componentUpdatePolicy": { "action": "string", "timeoutInSeconds": number },

"configurationValidationPolicy": { "timeoutInSeconds": number },

"failureHandlingPolicy": "string"

},

"iotJobConfiguration": { "abortConfig": { "criteriaList": [ {

"action": "string", "failureType": "string",

"minNumberOfExecutedThings": number, "thresholdPercentage": number }

] },

(28)

URI Request Parameters

"jobExecutionsRolloutConfig": { "exponentialRate": {

"baseRatePerMinute": number, "incrementFactor": number, "rateIncreaseCriteria": {

"numberOfNotifiedThings": number, "numberOfSucceededThings": number }

},

"maximumPerMinute": number },

"timeoutConfig": {

"inProgressTimeoutInMinutes": number }

},

"tags": {

"string" : "string"

},

"targetArn": "string"

}

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

clientToken (p. 18)

A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent.

Idempotency means that the request is successfully processed only once, even if you send the request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the AWS IoT Greengrass V2 service returns the successful response that it caches from the previous request. AWS IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9-]+$

Required: No components (p. 18)

The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.

Type: String to ComponentDeploymentSpecification (p. 93) object map Key Length Constraints: Minimum length of 1.

Required: No

deploymentName (p. 18)

The name of the deployment.

Type: String

(29)

Response Syntax

Length Constraints: Minimum length of 1.

Required: No

deploymentPolicies (p. 18)

The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.

Type: DeploymentPolicies (p. 107) object Required: No

iotJobConfiguration (p. 18)

The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.

Type: DeploymentIoTJobConfiguration (p. 106) object Required: No

tags (p. 18)

A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the AWS IoT Greengrass V2 Developer Guide.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Required: No targetArn (p. 18)

The ARN of the target AWS IoT thing or thing group.

Type: String

Pattern: arn:aws(-cn|-us-gov)?:iot:[^:]+:[0-9]+:(thing|thinggroup)/.+

Required: Yes

Response Syntax

HTTP/1.1 201

Content-type: application/json { "deploymentId": "string", "iotJobArn": "string", "iotJobId": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

(30)

Errors

The following data is returned in JSON format by the service.

deploymentId (p. 20)

The ID of the deployment.

Type: String

Length Constraints: Minimum length of 1.

iotJobArn (p. 20)

The ARN of the AWS IoT job that applies the deployment to target devices.

Type: String

Pattern: arn:aws(-cn|-us-gov)?:iot:[^:]+:[0-9]+:job/.+

iotJobId (p. 20)

The ID of the AWS IoT job that applies the deployment to target devices.

Type: String

Length Constraints: Minimum length of 1.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500

RequestAlreadyInProgressException

The request is already in progress. This exception occurs when you use a client token for multiple requests while AWS IoT Greengrass is still processing an earlier request that uses the same client token.

HTTP Status Code: 400 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429

(31)

See Also

ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(32)

DeleteComponent

DeleteComponent

Deletes a version of a component from AWS IoT Greengrass.

NoteThis operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.

Request Syntax

DELETE /greengrass/v2/components/arn HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

arn (p. 23)

The ARN of the component version.

Pattern: arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:

[^:]+:versions:[^:]+

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 ConflictException

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

(33)

See Also

HTTP Status Code: 409 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(34)

DeleteCoreDevice

DeleteCoreDevice

Deletes a Greengrass core device, which is an AWS IoT thing. This operation removes the core device from the list of core devices. This operation doesn't delete the AWS IoT thing. For more information about how to delete the AWS IoT thing, see DeleteThing in the AWS IoT API Reference.

Request Syntax

DELETE /greengrass/v2/coreDevices/coreDeviceThingName HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

coreDeviceThingName (p. 25)

The name of the core device. This is also the name of the AWS IoT thing.

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 ConflictException

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

HTTP Status Code: 409 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

(35)

See Also

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(36)

DescribeComponent

DescribeComponent

Retrieves metadata for a version of a component.

Request Syntax

GET /greengrass/v2/components/arn/metadata HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

arn (p. 27)

The ARN of the component version.

Pattern: arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:

[^:]+:versions:[^:]+

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"arn": "string",

"componentName": "string", "componentVersion": "string", "creationTimestamp": number, "description": "string", "platforms": [

{

"attributes": { "string" : "string"

},

"name": "string"

} ],

"publisher": "string", "status": {

"componentState": "string", "errors": {

"string" : "string"

},

"message": "string"

},

"tags": {

"string" : "string"

}}

(37)

Response Elements

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 27)

The ARN of the component version.

Type: String

Pattern: arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:

[^:]+:versions:[^:]+

componentName (p. 27)

The name of the component.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9-_.]+

componentVersion (p. 27) The version of the component.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [0-9a-zA-Z-.+]+

creationTimestamp (p. 27)

The time at which the component was created, expressed in ISO 8601 format.

Type: Timestamp description (p. 27)

The description of the component version.

Type: String platforms (p. 27)

The platforms that the component version supports.

Type: Array of ComponentPlatform (p. 96) objects publisher (p. 27)

The publisher of the component version.

Type: String status (p. 27)

The status of the component version in AWS IoT Greengrass V2. This status is different from the status of the component on a core device.

Type: CloudComponentStatus (p. 88) object

(38)

Errors

tags (p. 27)

A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the AWS IoT Greengrass V2 Developer Guide.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

(39)

See Also

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(40)

DisassociateServiceRoleFromAccount

DisassociateServiceRoleFromAccount

Disassociates the Greengrass service role from AWS IoT Greengrass for your AWS account in this AWS Region. Without a service role, AWS IoT Greengrass can't verify the identity of client devices or manage core device connectivity information. For more information, see Greengrass service role in the AWS IoT Greengrass Version 2 Developer Guide.

Request Syntax

DELETE /greengrass/servicerole HTTP/1.1

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "DisassociatedAt": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

DisassociatedAt (p. 31)

The time when the service role was disassociated from AWS IoT Greengrass for your AWS account in this AWS Region.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500

(41)

See Also

See Also

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

• 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

(42)

GetComponent

GetComponent

Gets the recipe for a version of a component. Core devices can call this operation to identify the artifacts and requirements to install a component.

Request Syntax

GET /greengrass/v2/components/arn?recipeOutputFormat=recipeOutputFormat HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

arn (p. 33)

The ARN of the component version.

Pattern: arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:

[^:]+:versions:[^:]+

Required: Yes

recipeOutputFormat (p. 33) The format of the recipe.

Valid Values: JSON | YAML

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "recipe": blob,

"recipeOutputFormat": "string", "tags": {

"string" : "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

recipe (p. 33)

The recipe of the component version.

(43)

Errors

Type: Base64-encoded binary data object recipeOutputFormat (p. 33)

The format of the recipe.

Type: String

Valid Values: JSON | YAML tags (p. 33)

A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the AWS IoT Greengrass V2 Developer Guide.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

(44)

See Also

• 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

(45)

GetComponentVersionArtifact

GetComponentVersionArtifact

Gets the pre-signed URL to download a public component artifact. Core devices call this operation to identify the URL that they can use to download an artifact to install.

Request Syntax

GET /greengrass/v2/components/arn/artifacts/artifactName+ HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

arn (p. 36)

The ARN of the component version. Specify the ARN of a public component version.

Pattern: arn:aws(-cn|-us-gov)?:greengrass:[^:]+:(aws|[0-9]+):components:

[^:]+:versions:[^:]+

Required: Yes artifactName (p. 36)

The name of the artifact.

You can use the GetComponent operation to download the component recipe, which includes the URI of the artifact. The artifact name is the section of the URI after the scheme. For example, in the artifact URI greengrass:SomeArtifact.zip, the artifact name is SomeArtifact.zip.

Length Constraints: Minimum length of 1.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"preSignedUrl": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

(46)

Errors

preSignedUrl (p. 36) The URL of the artifact.

Type: String

Length Constraints: Minimum length of 1.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(47)

See Also

(48)

GetConnectivityInfo

GetConnectivityInfo

Retrieves connectivity information for a Greengrass core device.

Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the AWS IoT Greengrass discovery API, AWS IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the AWS IoT Greengrass Version 2 Developer Guide.

Request Syntax

GET /greengrass/things/thingName/connectivityInfo HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

thingName (p. 39)

The name of the core device. This is also the name of the AWS IoT thing.

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "ConnectivityInfo": [ {

"HostAddress": "string", "Id": "string",

"Metadata": "string", "PortNumber": number }

],

"Message": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

(49)

Errors

ConnectivityInfo (p. 39)

The connectivity information for the core device.

Type: Array of ConnectivityInfo (p. 100) objects Message (p. 39)

A message about the connectivity information request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(50)

GetCoreDevice

GetCoreDevice

Retrieves metadata for a Greengrass core device.

Request Syntax

GET /greengrass/v2/coreDevices/coreDeviceThingName HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

coreDeviceThingName (p. 41)

The name of the core device. This is also the name of the AWS IoT thing.

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"architecture": "string", "coreDeviceThingName": "string", "coreVersion": "string",

"lastStatusUpdateTimestamp": number, "platform": "string",

"status": "string", "tags": {

"string" : "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

architecture (p. 41)

The computer architecture of the core device.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

(51)

Errors

coreDeviceThingName (p. 41)

The name of the core device. This is also the name of the AWS IoT thing.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

coreVersion (p. 41)

The version of the AWS IoT Greengrass Core software that the core device runs. This version is equivalent to the version of the Greengrass nucleus component that runs on the core device. For more information, see the Greengrass nucleus component in the AWS IoT Greengrass V2 Developer Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

lastStatusUpdateTimestamp (p. 41)

The time at which the core device's status last updated, expressed in ISO 8601 format.

Type: Timestamp platform (p. 41)

The operating system platform that the core device runs.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

status (p. 41)

The status of the core device. The core device status can be:

• HEALTHY – The AWS IoT Greengrass Core software and all components run on the core device without issue.

• UNHEALTHY – The AWS IoT Greengrass Core software or a component is in a failed state on the core device.

Type: String

Valid Values: HEALTHY | UNHEALTHY tags (p. 41)

A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the AWS IoT Greengrass V2 Developer Guide.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 135).

(52)

See Also

AccessDeniedException

You don't have permission to perform the action.

HTTP Status Code: 403 InternalServerException

AWS IoT Greengrass can't process your request right now. Try again later.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource can't be found.

HTTP Status Code: 404 ThrottlingException

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

HTTP Status Code: 429 ValidationException

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

HTTP Status Code: 400

See Also

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

• 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

(53)

GetDeployment

GetDeployment

Gets a deployment. Deployments define the components that run on Greengrass core devices.

Request Syntax

GET /greengrass/v2/deployments/deploymentId HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

deploymentId (p. 44)

The ID of the deployment.

Length Constraints: Minimum length of 1.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"components": { "string" : {

"componentVersion": "string", "configurationUpdate": { "merge": "string", "reset": [ "string" ] },

"runWith": {

"posixUser": "string", "systemResourceLimits": { "cpus": number,

"memory": number },

"windowsUser": "string"

} } },

"creationTimestamp": number, "deploymentId": "string", "deploymentName": "string", "deploymentPolicies": { "componentUpdatePolicy": { "action": "string",

"timeoutInSeconds": number },

"configurationValidationPolicy": { "timeoutInSeconds": number

(54)

Response Elements

},

"failureHandlingPolicy": "string"

},

"deploymentStatus": "string", "iotJobArn": "string",

"iotJobConfiguration": { "abortConfig": { "criteriaList": [ {

"action": "string", "failureType": "string",

"minNumberOfExecutedThings": number, "thresholdPercentage": number }

] },

"jobExecutionsRolloutConfig": { "exponentialRate": {

"baseRatePerMinute": number, "incrementFactor": number, "rateIncreaseCriteria": {

"numberOfNotifiedThings": number, "numberOfSucceededThings": number }

},

"maximumPerMinute": number },

"timeoutConfig": {

"inProgressTimeoutInMinutes": number }

},

"iotJobId": "string",

"isLatestForTarget": boolean, "revisionId": "string", "tags": {

"string" : "string"

},

"targetArn": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

components (p. 44)

The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.

Type: String to ComponentDeploymentSpecification (p. 93) object map Key Length Constraints: Minimum length of 1.

creationTimestamp (p. 44)

The time at which the deployment was created, expressed in ISO 8601 format.

Type: Timestamp deploymentId (p. 44)

The ID of the deployment.

參考文獻

相關文件

It costs >1TB memory to simply save the raw  graph data (without attributes, labels nor content).. This can cause problems for

• Describe the role and importance of the following key business functions: human resources management, financial management, operations management, marketing management, information

Kielsmeier (2002) “Recasting the Role of Youth in the 21st Century: Active Learning and Civic Engagement” Paper presented in the National Service-Learning Conference 2002:

So the WiSee receiver computes the average energy in the positive and negative Doppler frequencies (other than the DC and the four frequency bins around it). If the ratio between

ƒ Regardless of terminal or network logins, the file descriptors 0, 1, 2 of a login shell is connected to a terminal device or a pseudo- terminal device. ƒ Login does

“A Comprehensive Model for Assessing the Quality and Productivity of the Information System Function Toward a Theory for Information System Assessment.”,

Narasimhan, Ram, and Anand Nair (2005), “The Antecedent Role of Quality, Information Sharing and Supply Chain Proximity on Strategic Alliance Formation and Performance,”

Through the enforcement of information security management, policies, and regulations, this study uses RBAC (Role-Based Access Control) as the model to focus on different