

End of support notice: On October 7th, 2026, AWS will discontinue support for AWS IoT Greengrass Version 1. After October 7th, 2026, you will no longer be able to access the AWS IoT Greengrass V1 resources. For more information, please visit [Migrate from AWS IoT Greengrass Version 1](https://docs.aws.amazon.com/greengrass/v2/developerguide/migrate-from-v1.html).

# Endpoints
<a name="api-endpoints"></a>

**Topics**
+ [

# /greengrass/bulk/deployments
](-greengrass-bulk-deployments.md)
+ [

# /greengrass/bulk/deployments/BulkDeploymentId/\$1stop
](-greengrass-bulk-deployments-bulkdeploymentid-stop.md)
+ [

# /greengrass/bulk/deployments/BulkDeploymentId/detailed-reports
](-greengrass-bulk-deployments-bulkdeploymentid-detailed-reports.md)
+ [

# /greengrass/bulk/deployments/BulkDeploymentId/status
](-greengrass-bulk-deployments-bulkdeploymentid-status.md)
+ [

# /greengrass/definition/connectors
](-greengrass-definition-connectors.md)
+ [

# /greengrass/definition/connectors/ConnectorDefinitionId
](-greengrass-definition-connectors-connectordefinitionid.md)
+ [

# /greengrass/definition/connectors/ConnectorDefinitionId/versions
](-greengrass-definition-connectors-connectordefinitionid-versions.md)
+ [

# /greengrass/definition/connectors/ConnectorDefinitionId/versions/ConnectorDefinitionVersionId
](-greengrass-definition-connectors-connectordefinitionid-versions-connectordefinitionversionid.md)
+ [

# /greengrass/definition/cores
](-greengrass-definition-cores.md)
+ [

# /greengrass/definition/cores/CoreDefinitionId
](-greengrass-definition-cores-coredefinitionid.md)
+ [

# /greengrass/definition/cores/CoreDefinitionId/versions
](-greengrass-definition-cores-coredefinitionid-versions.md)
+ [

# /greengrass/definition/cores/CoreDefinitionId/versions/CoreDefinitionVersionId
](-greengrass-definition-cores-coredefinitionid-versions-coredefinitionversionid.md)
+ [

# /greengrass/definition/devices
](-greengrass-definition-devices.md)
+ [

# /greengrass/definition/devices/DeviceDefinitionId
](-greengrass-definition-devices-devicedefinitionid.md)
+ [

# /greengrass/definition/devices/DeviceDefinitionId/versions
](-greengrass-definition-devices-devicedefinitionid-versions.md)
+ [

# /greengrass/definition/devices/DeviceDefinitionId/versions/DeviceDefinitionVersionId
](-greengrass-definition-devices-devicedefinitionid-versions-devicedefinitionversionid.md)
+ [

# /greengrass/definition/functions
](-greengrass-definition-functions.md)
+ [

# /greengrass/definition/functions/FunctionDefinitionId
](-greengrass-definition-functions-functiondefinitionid.md)
+ [

# /greengrass/definition/functions/FunctionDefinitionId/versions
](-greengrass-definition-functions-functiondefinitionid-versions.md)
+ [

# /greengrass/definition/functions/FunctionDefinitionId/versions/FunctionDefinitionVersionId
](-greengrass-definition-functions-functiondefinitionid-versions-functiondefinitionversionid.md)
+ [

# /greengrass/definition/loggers
](-greengrass-definition-loggers.md)
+ [

# /greengrass/definition/loggers/LoggerDefinitionId
](-greengrass-definition-loggers-loggerdefinitionid.md)
+ [

# /greengrass/definition/loggers/LoggerDefinitionId/versions
](-greengrass-definition-loggers-loggerdefinitionid-versions.md)
+ [

# /greengrass/definition/loggers/LoggerDefinitionId/versions/LoggerDefinitionVersionId
](-greengrass-definition-loggers-loggerdefinitionid-versions-loggerdefinitionversionid.md)
+ [

# /greengrass/definition/resources
](-greengrass-definition-resources.md)
+ [

# /greengrass/definition/resources/ResourceDefinitionId
](-greengrass-definition-resources-resourcedefinitionid.md)
+ [

# /greengrass/definition/resources/ResourceDefinitionId/versions
](-greengrass-definition-resources-resourcedefinitionid-versions.md)
+ [

# /greengrass/definition/resources/ResourceDefinitionId/versions/ResourceDefinitionVersionId
](-greengrass-definition-resources-resourcedefinitionid-versions-resourcedefinitionversionid.md)
+ [

# /greengrass/definition/subscriptions
](-greengrass-definition-subscriptions.md)
+ [

# /greengrass/definition/subscriptions/SubscriptionDefinitionId
](-greengrass-definition-subscriptions-subscriptiondefinitionid.md)
+ [

# /greengrass/definition/subscriptions/SubscriptionDefinitionId/versions
](-greengrass-definition-subscriptions-subscriptiondefinitionid-versions.md)
+ [

# /greengrass/definition/subscriptions/SubscriptionDefinitionId/versions/SubscriptionDefinitionVersionId
](-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-subscriptiondefinitionversionid.md)
+ [

# /greengrass/groups
](-greengrass-groups.md)
+ [

# /greengrass/groups/GroupId
](-greengrass-groups-groupid.md)
+ [

# /greengrass/groups/GroupId/certificateauthorities
](-greengrass-groups-groupid-certificateauthorities.md)
+ [

# /greengrass/groups/GroupId/certificateauthorities/configuration/expiry
](-greengrass-groups-groupid-certificateauthorities-configuration-expiry.md)
+ [

# /greengrass/groups/GroupId/certificateauthorities/CertificateAuthorityId
](-greengrass-groups-groupid-certificateauthorities-certificateauthorityid.md)
+ [

# /greengrass/groups/GroupId/deployments
](-greengrass-groups-groupid-deployments.md)
+ [

# /greengrass/groups/GroupId/deployments/\$1reset
](-greengrass-groups-groupid-deployments-reset.md)
+ [

# /greengrass/groups/GroupId/deployments/DeploymentId/status
](-greengrass-groups-groupid-deployments-deploymentid-status.md)
+ [

# /greengrass/groups/GroupId/role
](-greengrass-groups-groupid-role.md)
+ [

# /greengrass/groups/GroupId/versions
](-greengrass-groups-groupid-versions.md)
+ [

# /greengrass/groups/GroupId/versions/GroupVersionId
](-greengrass-groups-groupid-versions-groupversionid.md)
+ [

# /greengrass/servicerole
](-greengrass-servicerole.md)
+ [

# /greengrass/things/ThingName/connectivityInfo
](-greengrass-things-thingname-connectivityinfo.md)
+ [

# /greengrass/things/ThingName/runtimeconfig
](-greengrass-things-thingname-runtimeconfig.md)
+ [

# /greengrass/updates
](-greengrass-updates.md)
+ [

# /tags/resource-arn
](-tags-resource-arn.md)

# /greengrass/bulk/deployments
<a name="-greengrass-bulk-deployments"></a>

## POST
<a name="-greengrass-bulk-deployments-post"></a>

 `POST /greengrass/bulk/deployments`

Operation ID: [StartBulkDeployment](startbulkdeployment-post.md)

Deploys multiple groups in one operation. This action starts the bulk deployment of a specified set of group versions. Each group version deployment is triggered with an adaptive rate that has a fixed upper limit. We recommend that you include an `X-Amzn-Client-Token` token in every `StartBulkDeployment` request. These requests are idempotent with respect to the token and the request parameters. 

Produces: application/json

### Body Parameters
<a name="-greengrass-bulk-deployments-post-body"></a>

[**StartBulkDeploymentRequestBody**](parameters-startbulkdeploymentrequestbody.md)  
  
where used: body; required: true  

```
{
"InputFileUri": "string",
"ExecutionRoleArn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
}
```  
StartBulkDeploymentRequest  
Information about a bulk deployment. You cannot start a new bulk deployment while another one is still running or in a non-terminal state.  
type: object  
required: ["InputFileUri", "ExecutionRoleArn"]  
InputFileUri  
The URI of the input file in the S3 bucket. The execution role must have `getObject` permissions on this bucket to access the input file. The input file is a JSON-serialized, line-delimited file with UTF-8 encoding that provides a list of group and version IDs and the deployment type. This file must be less than 100 MB. Currently, AWS IoT Greengrass supports only `NewDeployment` deployment types.   

```
{"GroupId":"groupId1", "GroupVersionId":"groupVersionId1", "DeploymentType":"NewDeployment"}
{"GroupId":"groupId2", "GroupVersionId":"groupVersionId2", "DeploymentType":"NewDeployment"}
{"GroupId":"groupId3", "GroupVersionId":"groupVersionId3", "DeploymentType":"NewDeployment"}
...
```
For more information, including the input file format, see [Create Bulk Deployments For Groups](https://docs.aws.amazon.com/greengrass/latest/developerguide/bulk-deploy-cli.html).  
type: string  
ExecutionRoleArn  
The ARN of the execution role to associate with the bulk deployment operation. This IAM role must allow the `greengrass:CreateDeployment` action for all group versions that are listed in the input file. This IAM role must have access to the S3 bucket that contains the input file.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-bulk-deployments-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-bulk-deployments-post-cli"></a>

```
aws greengrass start-bulk-deployment \
  [--input-file-uri <value>] \
  [--execution-role-arn <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"InputFileUri": "string",
"ExecutionRoleArn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-bulk-deployments-post-responses"></a>

**200**  
Success.  
 [ StartBulkDeploymentResponse](definitions-startbulkdeploymentresponse.md)   

```
{
"BulkDeploymentId": "string",
"BulkDeploymentArn": "string"
}
```  
StartBulkDeploymentResponse  
type: object  
BulkDeploymentId  
The ID of the bulk deployment.  
type: string  
BulkDeploymentArn  
The ARN of the bulk deployment.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-bulk-deployments-get"></a>

 `GET /greengrass/bulk/deployments`

Operation ID: [ListBulkDeployments](listbulkdeployments-get.md)

Returns a list of bulk deployments.

Produces: application/json

### Query Parameters
<a name="-greengrass-bulk-deployments-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-bulk-deployments-get-cli"></a>

```
aws greengrass list-bulk-deployments \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-bulk-deployments-get-responses"></a>

**200**  
Success. The response body contains the list of bulk deployments.  
 [ ListBulkDeploymentsResponse](definitions-listbulkdeploymentsresponse.md)   

```
{
"BulkDeployments": [
  {
    "BulkDeploymentId": "string",
    "BulkDeploymentArn": "string",
    "CreatedAt": "string"
  }
],
"NextToken": "string"
}
```  
ListBulkDeploymentsResponse  
type: object  
BulkDeployments  
type: array  
items: [BulkDeployment](definitions-bulkdeployment.md)  
BulkDeployment  
Information about a bulk deployment. You cannot start a new bulk deployment while another one is still running or in a non-terminal state.  
type: object  
BulkDeploymentId  
The ID of the bulk deployment.  
type: string  
BulkDeploymentArn  
The ARN of the bulk deployment.  
type: string  
CreatedAt  
The time, in ISO format, when the deployment was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
in: query  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/bulk/deployments/BulkDeploymentId/\$1stop
<a name="-greengrass-bulk-deployments-bulkdeploymentid-stop"></a>

## PUT
<a name="-greengrass-bulk-deployments-bulkdeploymentid-stop-put"></a>

 `PUT /greengrass/bulk/deployments/BulkDeploymentId/$stop`

Operation ID: [StopBulkDeployment](stopbulkdeployment-put.md)

Stops the execution of a bulk deployment. This action returns a status of `Stopping` until the deployment is stopped. You cannot start a new bulk deployment while a previous deployment is in the `Stopping` state. This action doesn't roll back completed deployments or cancel pending deployments. 

Produces: application/json

### Path Parameters
<a name="-greengrass-bulk-deployments-bulkdeploymentid-stop-put-path"></a>

[**BulkDeploymentId**](parameters-bulkdeploymentidparam.md)  
The ID of the bulk deployment.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-bulk-deployments-bulkdeploymentid-stop-put-cli"></a>

```
aws greengrass stop-bulk-deployment \
  --bulk-deployment-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"BulkDeploymentId": "string"
}
```

### Responses
<a name="-greengrass-bulk-deployments-bulkdeploymentid-stop-put-responses"></a>

**200**  
Success. The bulk deployment is being stopped.

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/bulk/deployments/BulkDeploymentId/detailed-reports
<a name="-greengrass-bulk-deployments-bulkdeploymentid-detailed-reports"></a>

## GET
<a name="-greengrass-bulk-deployments-bulkdeploymentid-detailed-reports-get"></a>

 `GET /greengrass/bulk/deployments/BulkDeploymentId/detailed-reports`

Operation ID: [ListBulkDeploymentDetailedReports](listbulkdeploymentdetailedreports-get.md)

Gets a paginated list of the deployments that have been started in a bulk deployment operation, and their current deployment status.

Produces: application/json

### Path Parameters
<a name="-greengrass-bulk-deployments-bulkdeploymentid-detailed-reports-get-path"></a>

[**BulkDeploymentId**](parameters-bulkdeploymentidparam.md)  
The ID of the bulk deployment.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-bulk-deployments-bulkdeploymentid-detailed-reports-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-bulk-deployments-bulkdeploymentid-detailed-reports-get-cli"></a>

```
aws greengrass list-bulk-deployment-detailed-reports \
  --bulk-deployment-id <value> \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"BulkDeploymentId": "string",
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-bulk-deployments-bulkdeploymentid-detailed-reports-get-responses"></a>

**200**  
Success. The response body contains the list of deployments for the given group.  
 [ ListBulkDeploymentDetailedReportsResponse](definitions-listbulkdeploymentdetailedreportsresponse.md)   

```
{
"Deployments": [
  {
    "DeploymentId": "string",
    "DeploymentArn": "string",
    "GroupArn": "string",
    "DeploymentType": "NewDeployment|Redeployment|ResetDeployment|ForceResetDeployment",
    "CreatedAt": "string",
    "DeploymentStatus": "string",
    "ErrorMessage": "string",
    "ErrorDetails": [
      {
        "DetailedErrorCode": "string",
        "DetailedErrorMessage": "string"
      }
    ]
  }
],
"NextToken": "string"
}
```  
ListBulkDeploymentDetailedReportsResponse  
type: object  
Deployments  
type: array  
items: [BulkDeploymentResult](definitions-bulkdeploymentresult.md)  
BulkDeploymentResult  
Information about an individual group deployment in a bulk deployment operation.  
type: object  
DeploymentId  
The ID of the group deployment.  
type: string  
DeploymentArn  
The ARN of the group deployment.  
type: string  
GroupArn  
The ARN of the Greengrass group.  
type: string  
DeploymentType  
The type of deployment. When used for `CreateDeployment`, only `NewDeployment` and `Redeployment` are valid.   
type: string  
enum: ["NewDeployment", "Redeployment", "ResetDeployment", "ForceResetDeployment"]  
CreatedAt  
The time, in ISO format, when the deployment was created.  
type: string  
DeploymentStatus  
The current status of the group deployment: ` `Building`, `InProgress `, `Success `, or `Failure``.   
type: string  
ErrorMessage  
The error message for a failed deployment.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
in: query  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/bulk/deployments/BulkDeploymentId/status
<a name="-greengrass-bulk-deployments-bulkdeploymentid-status"></a>

## GET
<a name="-greengrass-bulk-deployments-bulkdeploymentid-status-get"></a>

 `GET /greengrass/bulk/deployments/BulkDeploymentId/status`

Operation ID: [GetBulkDeploymentStatus](getbulkdeploymentstatus-get.md)

Returns the status of a bulk deployment.

Produces: application/json

### Path Parameters
<a name="-greengrass-bulk-deployments-bulkdeploymentid-status-get-path"></a>

[**BulkDeploymentId**](parameters-bulkdeploymentidparam.md)  
The ID of the bulk deployment.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-bulk-deployments-bulkdeploymentid-status-get-cli"></a>

```
aws greengrass get-bulk-deployment-status \
  --bulk-deployment-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"BulkDeploymentId": "string"
}
```

### Responses
<a name="-greengrass-bulk-deployments-bulkdeploymentid-status-get-responses"></a>

**200**  
Success. The response body contains the status of the bulk deployment.  
 [ GetBulkDeploymentStatusResponse](definitions-getbulkdeploymentstatusresponse.md)   

```
{
"BulkDeploymentStatus": "Initializing|Running|Completed|Stopping|Stopped|Failed",
"BulkDeploymentMetrics": {
  "RecordsProcessed": 0,
  "InvalidInputRecords": 0,
  "RetryAttempts": 0
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"CreatedAt": "string",
"ErrorMessage": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GetBulkDeploymentStatusResponse  
Information about the status of a bulk deployment at the time of the request.  
type: object  
BulkDeploymentStatus  
The current status of the bulk deployment.  
type: string  
enum: ["Initializing", "Running", "Completed", "Stopping", "Stopped", "Failed"]  
BulkDeploymentMetrics  
Relevant metrics on input records processed during bulk deployment.  
type: object  
RecordsProcessed  
The total number of group records from the input file that have been processed or attempted so far.  
type: integer  
InvalidInputRecords  
The total number of records that returned a non-retryable error. For example, this can occur if a group record from the input file uses an invalid format or specifies a nonexistent group version, or if the execution role doesn't grant permission to deploy a group or group version.  
type: integer  
RetryAttempts  
The total number of deployment attempts that returned a retryable error. For example, a retry is triggered if the attempt to deploy a group returns a throttling error. `StartBulkDeployment` retries a group deployment up to five times.  
type: integer  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
CreatedAt  
The time, in ISO format, when the deployment was created.  
type: string  
ErrorMessage  
Error message  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/connectors
<a name="-greengrass-definition-connectors"></a>

## GET
<a name="-greengrass-definition-connectors-get"></a>

 `GET /greengrass/definition/connectors`

Operation ID: [ListConnectorDefinitions](listconnectordefinitions-get.md)

Retrieves a list of connector definitions.

Produces: application/json

### Query Parameters
<a name="-greengrass-definition-connectors-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-connectors-get-cli"></a>

```
aws greengrass list-connector-definitions \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-connectors-get-responses"></a>

**200** (ListConnectorDefinitionsResponse)  
  
 [ ListDefinitionsResponse](definitions-listdefinitionsresponse.md)   

```
{
"Definitions": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "tags": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListDefinitionsResponse  
A list of definitions.  
type: object  
Definitions  
Information about a definition.  
type: array  
items: [DefinitionInformation](definitions-definitioninformation.md)  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-definition-connectors-post"></a>

 `POST /greengrass/definition/connectors`

Operation ID: [CreateConnectorDefinition](createconnectordefinition-post.md)

Creates a connector definition. You can provide the initial version of the connector definition now or use `CreateConnectorDefinitionVersion` later.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-connectors-post-body"></a>

[**CreateConnectorDefinitionRequestBody**](parameters-createconnectordefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "Connectors": [
    {
      "Id": "string",
      "ConnectorArn": "string",
      "Parameters": {
        "additionalProperty0": "string",
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      }
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
}
```  
Name  
The name of the connector definition.  
type: string  
InitialVersion  
Information about the connector definition version, which is a container for connectors.  
type: object  
Connectors  
A list of references to connectors in this version, with their corresponding configuration settings.  
type: array  
items: [Connector](definitions-connector.md)  
Connector  
Information about a connector. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.  
type: object  
required: ["Id", "ConnectorArn"]  
Id  
A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Maximum length is 128 characters with the pattern [a-zA-Z0-9:\$1-]\$1.  
type: string  
ConnectorArn  
The ARN of the connector.  
type: string  
Parameters  
The parameters or configuration used by the connector.  
type: object  
additionalProperties: An object with properties of type `string` that represent the connector configuration.  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-definition-connectors-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to enforce the idempotency of this API.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-definition-connectors-post-cli"></a>

```
aws greengrass create-connector-definition \
  [--name <value>] \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "Connectors": [
    {
      "Id": "string",
      "ConnectorArn": "string",
      "Parameters": {
        "additionalProperty0": "string",
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      }
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-connectors-post-responses"></a>

**200** (CreateConnectorDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/connectors/ConnectorDefinitionId
<a name="-greengrass-definition-connectors-connectordefinitionid"></a>

## GET
<a name="-greengrass-definition-connectors-connectordefinitionid-get"></a>

 `GET /greengrass/definition/connectors/ConnectorDefinitionId`

Operation ID: [GetConnectorDefinition](getconnectordefinition-get.md)

Retrieves information about a connector definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-get-path"></a>

[**ConnectorDefinitionId**](parameters-connectordefinitionidparam.md)  
The ID of the connector definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-connectors-connectordefinitionid-get-cli"></a>

```
aws greengrass get-connector-definition \
  --connector-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ConnectorDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-connectors-connectordefinitionid-get-responses"></a>

**200** (GetConnectorDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-definition-connectors-connectordefinitionid-delete"></a>

 `DELETE /greengrass/definition/connectors/ConnectorDefinitionId`

Operation ID: [DeleteConnectorDefinition](deleteconnectordefinition-delete.md)

Deletes a connector definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-delete-path"></a>

[**ConnectorDefinitionId**](parameters-connectordefinitionidparam.md)  
The ID of the connector definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-connectors-connectordefinitionid-delete-cli"></a>

```
aws greengrass delete-connector-definition \
  --connector-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ConnectorDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-connectors-connectordefinitionid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-definition-connectors-connectordefinitionid-put"></a>

 `PUT /greengrass/definition/connectors/ConnectorDefinitionId`

Operation ID: [UpdateConnectorDefinition](updateconnectordefinition-put.md)

Updates the name of a connector definition. To update the list of available connectors, use `CreateConnectorDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-put-path"></a>

[**ConnectorDefinitionId**](parameters-connectordefinitionidparam.md)  
The ID of the connector definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-connectors-connectordefinitionid-put-cli"></a>

```
aws greengrass update-connector-definition \
  --connector-definition-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ConnectorDefinitionId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-definition-connectors-connectordefinitionid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/connectors/ConnectorDefinitionId/versions
<a name="-greengrass-definition-connectors-connectordefinitionid-versions"></a>

## GET
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-get"></a>

 `GET /greengrass/definition/connectors/ConnectorDefinitionId/versions`

Operation ID: [ListConnectorDefinitionVersions](listconnectordefinitionversions-get.md)

Lists the versions of a connector definition, which are containers for connectors. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-get-path"></a>

[**ConnectorDefinitionId**](parameters-connectordefinitionidparam.md)  
The ID of the connector definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-get-cli"></a>

```
aws greengrass list-connector-definition-versions \
  --connector-definition-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ConnectorDefinitionId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-get-responses"></a>

**200** (ListConnectorDefinitionVersionsResponse)  
  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## POST
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-post"></a>

 `POST /greengrass/definition/connectors/ConnectorDefinitionId/versions`

Operation ID: [CreateConnectorDefinitionVersion](createconnectordefinitionversion-post.md)

Creates a version of a connector definition that has already been defined.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-post-body"></a>

[**CreateConnectorDefinitionVersionRequestBody**](parameters-createconnectordefinitionversionrequestbody.md)  
  
where used: body; required: true  

```
{
"Connectors": [
  {
    "Id": "string",
    "ConnectorArn": "string",
    "Parameters": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    }
  }
]
}
```  
ConnectorDefinitionVersion  
Information about the connector definition version, which is a container for connectors.  
type: object  
Connectors  
A list of references to connectors in this version, with their corresponding configuration settings.  
type: array  
items: [Connector](definitions-connector.md)  
Connector  
Information about a connector. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.  
type: object  
required: ["Id", "ConnectorArn"]  
Id  
A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Maximum length is 128 characters with the pattern [a-zA-Z0-9:\$1-]\$1.  
type: string  
ConnectorArn  
The ARN of the connector.  
type: string  
Parameters  
The parameters or configuration used by the connector.  
type: object  
additionalProperties: An object with properties of type `string` that represent the connector configuration.

### Header Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to enforce the idempotency of this API.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-post-path"></a>

[**ConnectorDefinitionId**](parameters-connectordefinitionidparam.md)  
The ID of the connector definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-post-cli"></a>

```
aws greengrass create-connector-definition-version \
  --connector-definition-id <value> \
  [--connectors <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ConnectorDefinitionId": "string",
"Connectors": [
  {
    "Id": "string",
    "ConnectorArn": "string",
    "Parameters": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    }
  }
],
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-post-responses"></a>

**200** (CreateConnectorDefinitionVersionResponse)  
  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/connectors/ConnectorDefinitionId/versions/ConnectorDefinitionVersionId
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-connectordefinitionversionid"></a>

## GET
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-connectordefinitionversionid-get"></a>

 `GET /greengrass/definition/connectors/ConnectorDefinitionId/versions/ConnectorDefinitionVersionId`

Operation ID: [GetConnectorDefinitionVersion](getconnectordefinitionversion-get.md)

Retrieves information about a connector definition version, including the connectors that the version contains. Connectors are prebuilt modules that interact with local infrastructure, device protocols, AWS, and other cloud services.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-connectordefinitionversionid-get-path"></a>

[**ConnectorDefinitionId**](parameters-connectordefinitionidparam.md)  
The ID of the connector definition.  
where used: path; required: true  
type: string

[**ConnectorDefinitionVersionId**](parameters-connectordefinitionversionidparam.md)  
The ID of the connector definition version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListConnectorDefinitionVersions` requests. If the version is the last one that was associated with a connector definition, the value also maps to the `LatestVersion` property of the corresponding `DefinitionInformation` object.   
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-connectordefinitionversionid-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-connectordefinitionversionid-get-cli"></a>

```
aws greengrass get-connector-definition-version \
  --connector-definition-id <value> \
  --connector-definition-version-id <value> \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ConnectorDefinitionId": "string",
"ConnectorDefinitionVersionId": "string",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-connectors-connectordefinitionid-versions-connectordefinitionversionid-get-responses"></a>

**200** (GetConnectorDefinitionVersionResponse)  
  
 [ GetConnectorDefinitionVersionResponse](definitions-getconnectordefinitionversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "Connectors": [
    {
      "Id": "string",
      "ConnectorArn": "string",
      "Parameters": {
        "additionalProperty0": "string",
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      }
    }
  ]
},
"NextToken": "string"
}
```  
GetConnectorDefinitionVersionResponse  
Information about a connector definition version.  
type: object  
Arn  
The ARN of the connector definition version.  
type: string  
Id  
The ID of the connector definition version.  
type: string  
Version  
The version of the connector definition version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the connector definition version was created.  
type: string  
Definition  
Information about the connector definition version, which is a container for connectors.  
type: object  
Connectors  
A list of references to connectors in this version, with their corresponding configuration settings.  
type: array  
items: [Connector](definitions-connector.md)  
Connector  
Information about a connector. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.  
type: object  
required: ["Id", "ConnectorArn"]  
Id  
A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Maximum length is 128 characters with the pattern [a-zA-Z0-9:\$1-]\$1.  
type: string  
ConnectorArn  
The ARN of the connector.  
type: string  
Parameters  
The parameters or configuration used by the connector.  
type: object  
additionalProperties: An object with properties of type `string` that represent the connector configuration.  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/cores
<a name="-greengrass-definition-cores"></a>

## GET
<a name="-greengrass-definition-cores-get"></a>

 `GET /greengrass/definition/cores`

Operation ID: [ListCoreDefinitions](listcoredefinitions-get.md)

Retrieves a list of core definitions.

Produces: application/json

### Query Parameters
<a name="-greengrass-definition-cores-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-cores-get-cli"></a>

```
aws greengrass list-core-definitions \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-cores-get-responses"></a>

**200** (ListCoreDefinitionsResponse)  
  
 [ ListDefinitionsResponse](definitions-listdefinitionsresponse.md)   

```
{
"Definitions": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "tags": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListDefinitionsResponse  
A list of definitions.  
type: object  
Definitions  
Information about a definition.  
type: array  
items: [DefinitionInformation](definitions-definitioninformation.md)  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-definition-cores-post"></a>

 `POST /greengrass/definition/cores`

Operation ID: [CreateCoreDefinition](createcoredefinition-post.md)

Creates a core definition. You can provide the initial version of the core definition now or use `CreateCoreDefinitionVersion` later. Greengrass groups must each contain exactly one Greengrass core.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-cores-post-body"></a>

[**CreateCoreDefinitionRequestBody**](parameters-createcoredefinitionrequestbody.md)  
Information required to create a core definition.  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "Cores": [
    {
      "Id": "string",
      "ThingArn": "string",
      "CertificateArn": "string",
      "SyncShadow": true
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
}
```  
Name  
The name of the core definition.  
type: string  
InitialVersion  
Information about a core definition version.  
type: object  
Cores  
A list of cores in the core definition version.  
type: array  
items: [Core](definitions-core.md)  
Core  
Information about a core.  
type: object  
required: ["Id", "ThingArn", "CertificateArn"]  
Id  
A descriptive or arbitrary ID for the core. This value must be unique within the core definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
ThingArn  
The ARN of the thing that is the core.  
type: string  
CertificateArn  
The ARN of the certificate associated with the core.  
type: string  
SyncShadow  
If true, the core's local shadow is synced with the cloud automatically.  
type: boolean  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-definition-cores-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-definition-cores-post-cli"></a>

```
aws greengrass create-core-definition \
  [--name <value>] \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "Cores": [
    {
      "Id": "string",
      "ThingArn": "string",
      "CertificateArn": "string",
      "SyncShadow": "boolean"
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-cores-post-responses"></a>

**200** (CreateCoreDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/cores/CoreDefinitionId
<a name="-greengrass-definition-cores-coredefinitionid"></a>

## GET
<a name="-greengrass-definition-cores-coredefinitionid-get"></a>

 `GET /greengrass/definition/cores/CoreDefinitionId`

Operation ID: [GetCoreDefinition](getcoredefinition-get.md)

Retrieves information about a core definition version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-cores-coredefinitionid-get-path"></a>

[**CoreDefinitionId**](parameters-coredefinitionidparam.md)  
The ID of the core definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-cores-coredefinitionid-get-cli"></a>

```
aws greengrass get-core-definition \
  --core-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"CoreDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-cores-coredefinitionid-get-responses"></a>

**200** (GetCoreDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-definition-cores-coredefinitionid-delete"></a>

 `DELETE /greengrass/definition/cores/CoreDefinitionId`

Operation ID: [DeleteCoreDefinition](deletecoredefinition-delete.md)

Deletes a core definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-cores-coredefinitionid-delete-path"></a>

[**CoreDefinitionId**](parameters-coredefinitionidparam.md)  
The ID of the core definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-cores-coredefinitionid-delete-cli"></a>

```
aws greengrass delete-core-definition \
  --core-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"CoreDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-cores-coredefinitionid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-definition-cores-coredefinitionid-put"></a>

 `PUT /greengrass/definition/cores/CoreDefinitionId`

Operation ID: [UpdateCoreDefinition](updatecoredefinition-put.md)

Updates the name of a core definition. To update the list of available cores, use `CreateCoreDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-cores-coredefinitionid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-definition-cores-coredefinitionid-put-path"></a>

[**CoreDefinitionId**](parameters-coredefinitionidparam.md)  
The ID of the core definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-cores-coredefinitionid-put-cli"></a>

```
aws greengrass update-core-definition \
  --core-definition-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"CoreDefinitionId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-definition-cores-coredefinitionid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/cores/CoreDefinitionId/versions
<a name="-greengrass-definition-cores-coredefinitionid-versions"></a>

## POST
<a name="-greengrass-definition-cores-coredefinitionid-versions-post"></a>

 `POST /greengrass/definition/cores/CoreDefinitionId/versions`

Operation ID: [CreateCoreDefinitionVersion](createcoredefinitionversion-post.md)

Creates a version of a core definition that has already been defined. Greengrass groups must each contain exactly one Greengrass core.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-cores-coredefinitionid-versions-post-body"></a>

[**CreateCoreDefinitionVersionRequestBody**](parameters-createcoredefinitionversionrequestbody.md)  
  
where used: body; required: true  

```
{
"Cores": [
  {
    "Id": "string",
    "ThingArn": "string",
    "CertificateArn": "string",
    "SyncShadow": true
  }
]
}
```  
CoreDefinitionVersion  
Information about a core definition version.  
type: object  
Cores  
A list of cores in the core definition version.  
type: array  
items: [Core](definitions-core.md)  
Core  
Information about a core.  
type: object  
required: ["Id", "ThingArn", "CertificateArn"]  
Id  
A descriptive or arbitrary ID for the core. This value must be unique within the core definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
ThingArn  
The ARN of the thing that is the core.  
type: string  
CertificateArn  
The ARN of the certificate associated with the core.  
type: string  
SyncShadow  
If true, the core's local shadow is synced with the cloud automatically.  
type: boolean

### Header Parameters
<a name="-greengrass-definition-cores-coredefinitionid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-definition-cores-coredefinitionid-versions-post-path"></a>

[**CoreDefinitionId**](parameters-coredefinitionidparam.md)  
The ID of the core definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-cores-coredefinitionid-versions-post-cli"></a>

```
aws greengrass create-core-definition-version \
  --core-definition-id <value> \
  [--cores <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"CoreDefinitionId": "string",
"Cores": [
  {
    "Id": "string",
    "ThingArn": "string",
    "CertificateArn": "string",
    "SyncShadow": "boolean"
  }
],
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-cores-coredefinitionid-versions-post-responses"></a>

**200** (CreateCoreDefinitionVersionResponse)  
  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-definition-cores-coredefinitionid-versions-get"></a>

 `GET /greengrass/definition/cores/CoreDefinitionId/versions`

Operation ID: [ListCoreDefinitionVersions](listcoredefinitionversions-get.md)

Lists the versions of a core definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-cores-coredefinitionid-versions-get-path"></a>

[**CoreDefinitionId**](parameters-coredefinitionidparam.md)  
The ID of the core definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-cores-coredefinitionid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-definition-cores-coredefinitionid-versions-get-cli"></a>

```
aws greengrass list-core-definition-versions \
  --core-definition-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"CoreDefinitionId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-definition-cores-coredefinitionid-versions-get-responses"></a>

**200** (ListCoreDefinitionVersionsResponse)  
  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/cores/CoreDefinitionId/versions/CoreDefinitionVersionId
<a name="-greengrass-definition-cores-coredefinitionid-versions-coredefinitionversionid"></a>

## GET
<a name="-greengrass-definition-cores-coredefinitionid-versions-coredefinitionversionid-get"></a>

 `GET /greengrass/definition/cores/CoreDefinitionId/versions/CoreDefinitionVersionId`

Operation ID: [GetCoreDefinitionVersion](getcoredefinitionversion-get.md)

Retrieves information about a core definition version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-cores-coredefinitionid-versions-coredefinitionversionid-get-path"></a>

[**CoreDefinitionId**](parameters-coredefinitionidparam.md)  
The ID of the core definition.  
where used: path; required: true  
type: string

[**CoreDefinitionVersionId**](parameters-coredefinitionversionidparam.md)  
The ID of the core definition version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListCoreDefinitionVersions` requests. If the version is the last one that was associated with a core definition, the value also maps to the `LatestVersion` property of the corresponding `DefinitionInformation` object.   
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-cores-coredefinitionid-versions-coredefinitionversionid-get-cli"></a>

```
aws greengrass get-core-definition-version \
  --core-definition-id <value> \
  --core-definition-version-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"CoreDefinitionId": "string",
"CoreDefinitionVersionId": "string"
}
```

### Responses
<a name="-greengrass-definition-cores-coredefinitionid-versions-coredefinitionversionid-get-responses"></a>

**200**  
Success.  
 [ GetCoreDefinitionVersionResponse](definitions-getcoredefinitionversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "Cores": [
    {
      "Id": "string",
      "ThingArn": "string",
      "CertificateArn": "string",
      "SyncShadow": true
    }
  ]
},
"NextToken": "string"
}
```  
GetCoreDefinitionVersionResponse  
type: object  
Arn  
The ARN of the core definition version.  
type: string  
Id  
The ID of the core definition version.  
type: string  
Version  
The version of the core definition version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the core definition version was created.  
type: string  
Definition  
Information about a core definition version.  
type: object  
Cores  
A list of cores in the core definition version.  
type: array  
items: [Core](definitions-core.md)  
Core  
Information about a core.  
type: object  
required: ["Id", "ThingArn", "CertificateArn"]  
Id  
A descriptive or arbitrary ID for the core. This value must be unique within the core definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
ThingArn  
The ARN of the thing that is the core.  
type: string  
CertificateArn  
The ARN of the certificate associated with the core.  
type: string  
SyncShadow  
If true, the core's local shadow is synced with the cloud automatically.  
type: boolean  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/devices
<a name="-greengrass-definition-devices"></a>

## GET
<a name="-greengrass-definition-devices-get"></a>

 `GET /greengrass/definition/devices`

Operation ID: [ListDeviceDefinitions](listdevicedefinitions-get.md)

Retrieves a list of device definitions.

Produces: application/json

### Query Parameters
<a name="-greengrass-definition-devices-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-devices-get-cli"></a>

```
aws greengrass list-device-definitions \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-devices-get-responses"></a>

**200** (ListDeviceDefinitionsResponse)  
  
 [ ListDefinitionsResponse](definitions-listdefinitionsresponse.md)   

```
{
"Definitions": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "tags": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListDefinitionsResponse  
A list of definitions.  
type: object  
Definitions  
Information about a definition.  
type: array  
items: [DefinitionInformation](definitions-definitioninformation.md)  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-definition-devices-post"></a>

 `POST /greengrass/definition/devices`

Operation ID: [CreateDeviceDefinition](createdevicedefinition-post.md)

Creates a device definition. You can provide the initial version of the device definition now or use `CreateDeviceDefinitionVersion` later.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-devices-post-body"></a>

[**CreateDeviceDefinitionRequestBody**](parameters-createdevicedefinitionrequestbody.md)  
Information required to create a device definition.  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "Devices": [
    {
      "Id": "string",
      "ThingArn": "string",
      "CertificateArn": "string",
      "SyncShadow": true
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
}
```  
Name  
The name of the device definition.  
type: string  
InitialVersion  
Information about a device definition version.  
type: object  
Devices  
A list of devices in the definition version.  
type: array  
items: [Device](definitions-device.md)  
Device  
Information about a device.  
type: object  
required: ["Id", "ThingArn", "CertificateArn"]  
Id  
A descriptive or arbitrary ID for the device. This value must be unique within the device definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
ThingArn  
The thing ARN of the device.  
type: string  
CertificateArn  
The ARN of the certificate associated with the device.  
type: string  
SyncShadow  
If true, the device's local shadow is synced with the cloud automatically.  
type: boolean  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-definition-devices-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-definition-devices-post-cli"></a>

```
aws greengrass create-device-definition \
  [--name <value>] \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "Devices": [
    {
      "Id": "string",
      "ThingArn": "string",
      "CertificateArn": "string",
      "SyncShadow": "boolean"
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-devices-post-responses"></a>

**200** (CreateDeviceDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/devices/DeviceDefinitionId
<a name="-greengrass-definition-devices-devicedefinitionid"></a>

## GET
<a name="-greengrass-definition-devices-devicedefinitionid-get"></a>

 `GET /greengrass/definition/devices/DeviceDefinitionId`

Operation ID: [GetDeviceDefinition](getdevicedefinition-get.md)

Retrieves information about a device definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-get-path"></a>

[**DeviceDefinitionId**](parameters-devicedefinitionidparam.md)  
The ID of the device definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-devices-devicedefinitionid-get-cli"></a>

```
aws greengrass get-device-definition \
  --device-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"DeviceDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-devices-devicedefinitionid-get-responses"></a>

**200** (GetDeviceDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-definition-devices-devicedefinitionid-delete"></a>

 `DELETE /greengrass/definition/devices/DeviceDefinitionId`

Operation ID: [DeleteDeviceDefinition](deletedevicedefinition-delete.md)

Deletes a device definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-delete-path"></a>

[**DeviceDefinitionId**](parameters-devicedefinitionidparam.md)  
The ID of the device definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-devices-devicedefinitionid-delete-cli"></a>

```
aws greengrass delete-device-definition \
  --device-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"DeviceDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-devices-devicedefinitionid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-definition-devices-devicedefinitionid-put"></a>

 `PUT /greengrass/definition/devices/DeviceDefinitionId`

Operation ID: [UpdateDeviceDefinition](updatedevicedefinition-put.md)

Updates the name of a device definition. To update the list of available devices, use `CreateDeviceDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-put-path"></a>

[**DeviceDefinitionId**](parameters-devicedefinitionidparam.md)  
The ID of the device definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-devices-devicedefinitionid-put-cli"></a>

```
aws greengrass update-device-definition \
  --device-definition-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"DeviceDefinitionId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-definition-devices-devicedefinitionid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/devices/DeviceDefinitionId/versions
<a name="-greengrass-definition-devices-devicedefinitionid-versions"></a>

## POST
<a name="-greengrass-definition-devices-devicedefinitionid-versions-post"></a>

 `POST /greengrass/definition/devices/DeviceDefinitionId/versions`

Operation ID: [CreateDeviceDefinitionVersion](createdevicedefinitionversion-post.md)

Creates a version of a device definition that has already been defined.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-versions-post-body"></a>

[**CreateDeviceDefinitionVersionRequestBody**](parameters-createdevicedefinitionversionrequestbody.md)  
  
where used: body; required: true  

```
{
"Devices": [
  {
    "Id": "string",
    "ThingArn": "string",
    "CertificateArn": "string",
    "SyncShadow": true
  }
]
}
```  
DeviceDefinitionVersion  
Information about a device definition version.  
type: object  
Devices  
A list of devices in the definition version.  
type: array  
items: [Device](definitions-device.md)  
Device  
Information about a device.  
type: object  
required: ["Id", "ThingArn", "CertificateArn"]  
Id  
A descriptive or arbitrary ID for the device. This value must be unique within the device definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
ThingArn  
The thing ARN of the device.  
type: string  
CertificateArn  
The ARN of the certificate associated with the device.  
type: string  
SyncShadow  
If true, the device's local shadow is synced with the cloud automatically.  
type: boolean

### Header Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-versions-post-path"></a>

[**DeviceDefinitionId**](parameters-devicedefinitionidparam.md)  
The ID of the device definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-devices-devicedefinitionid-versions-post-cli"></a>

```
aws greengrass create-device-definition-version \
  --device-definition-id <value> \
  [--devices <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"DeviceDefinitionId": "string",
"Devices": [
  {
    "Id": "string",
    "ThingArn": "string",
    "CertificateArn": "string",
    "SyncShadow": "boolean"
  }
],
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-devices-devicedefinitionid-versions-post-responses"></a>

**200** (CreateDeviceDefinitionVersionResponse)  
  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-definition-devices-devicedefinitionid-versions-get"></a>

 `GET /greengrass/definition/devices/DeviceDefinitionId/versions`

Operation ID: [ListDeviceDefinitionVersions](listdevicedefinitionversions-get.md)

Lists the versions of a device definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-versions-get-path"></a>

[**DeviceDefinitionId**](parameters-devicedefinitionidparam.md)  
The ID of the device definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-definition-devices-devicedefinitionid-versions-get-cli"></a>

```
aws greengrass list-device-definition-versions \
  --device-definition-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"DeviceDefinitionId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-definition-devices-devicedefinitionid-versions-get-responses"></a>

**200** (ListDeviceDefinitionVersionsResponse)  
  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/devices/DeviceDefinitionId/versions/DeviceDefinitionVersionId
<a name="-greengrass-definition-devices-devicedefinitionid-versions-devicedefinitionversionid"></a>

## GET
<a name="-greengrass-definition-devices-devicedefinitionid-versions-devicedefinitionversionid-get"></a>

 `GET /greengrass/definition/devices/DeviceDefinitionId/versions/DeviceDefinitionVersionId`

Operation ID: [GetDeviceDefinitionVersion](getdevicedefinitionversion-get.md)

Retrieves information about a device definition version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-versions-devicedefinitionversionid-get-path"></a>

[**DeviceDefinitionId**](parameters-devicedefinitionidparam.md)  
The ID of the device definition.  
where used: path; required: true  
type: string

[**DeviceDefinitionVersionId**](parameters-devicedefinitionversionidparam.md)  
The ID of the device definition version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListDeviceDefinitionVersions` requests. If the version is the last one that was associated with a device definition, the value also maps to the `LatestVersion` property of the corresponding `DefinitionInformation` object.   
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-devices-devicedefinitionid-versions-devicedefinitionversionid-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-devices-devicedefinitionid-versions-devicedefinitionversionid-get-cli"></a>

```
aws greengrass get-device-definition-version \
  --device-definition-id <value> \
  --device-definition-version-id <value> \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"DeviceDefinitionId": "string",
"DeviceDefinitionVersionId": "string",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-devices-devicedefinitionid-versions-devicedefinitionversionid-get-responses"></a>

**200** (GetDeviceDefinitionVersionResponse)  
  
 [ GetDeviceDefinitionVersionResponse](definitions-getdevicedefinitionversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "Devices": [
    {
      "Id": "string",
      "ThingArn": "string",
      "CertificateArn": "string",
      "SyncShadow": true
    }
  ]
},
"NextToken": "string"
}
```  
GetDeviceDefinitionVersionResponse  
type: object  
Arn  
The ARN of the device definition version.  
type: string  
Id  
The ID of the device definition version.  
type: string  
Version  
The version of the device definition version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the device definition version was created.  
type: string  
Definition  
Information about a device definition version.  
type: object  
Devices  
A list of devices in the definition version.  
type: array  
items: [Device](definitions-device.md)  
Device  
Information about a device.  
type: object  
required: ["Id", "ThingArn", "CertificateArn"]  
Id  
A descriptive or arbitrary ID for the device. This value must be unique within the device definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
ThingArn  
The thing ARN of the device.  
type: string  
CertificateArn  
The ARN of the certificate associated with the device.  
type: string  
SyncShadow  
If true, the device's local shadow is synced with the cloud automatically.  
type: boolean  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/functions
<a name="-greengrass-definition-functions"></a>

## GET
<a name="-greengrass-definition-functions-get"></a>

 `GET /greengrass/definition/functions`

Operation ID: [ListFunctionDefinitions](listfunctiondefinitions-get.md)

Retrieves a list of Lambda function definitions.

Produces: application/json

### Query Parameters
<a name="-greengrass-definition-functions-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-functions-get-cli"></a>

```
aws greengrass list-function-definitions \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-functions-get-responses"></a>

**200** (ListFunctionDefinitionsResponse)  
Success. The response contains the IDs of all of the Greengrass Lambda function definitions in this account.  
 [ ListDefinitionsResponse](definitions-listdefinitionsresponse.md)   

```
{
"Definitions": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "tags": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListDefinitionsResponse  
A list of definitions.  
type: object  
Definitions  
Information about a definition.  
type: array  
items: [DefinitionInformation](definitions-definitioninformation.md)  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-definition-functions-post"></a>

 `POST /greengrass/definition/functions`

Operation ID: [CreateFunctionDefinition](createfunctiondefinition-post.md)

Creates a function definition that contains a list of Lambda functions and their configurations to use in a group. You can create an initial version of the definition now by providing a list of Lambda functions and their configurations, or later by using `CreateFunctionDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-functions-post-body"></a>

[**CreateFunctionDefinitionRequestBody**](parameters-createfunctiondefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "DefaultConfig": {
    "Execution": {
      "IsolationMode": "GreengrassContainer|NoContainer",
      "RunAs": {
        "Uid": 1001,
        "Gid": 1002
      }
    }
  },
  "Functions": [
    {
      "Id": "string",
      "FunctionArn": "string",
      "FunctionConfiguration": {
        "Pinned": true,
        "Executable": "string",
        "ExecArgs": "string",
        "MemorySize": 0,
        "Timeout": 0,
        "EncodingType": "binary|json",
        "Environment": {
          "Variables": {
            "additionalProperty0": "string",
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "ResourceAccessPolicies": [
            {
              "ResourceId": "string",
              "Permission": "ro|rw"
            }
          ],
          "AccessSysfs": true,
          "Execution": {
            "IsolationMode": "GreengrassContainer|NoContainer",
            "RunAs": {
              "Uid": 1001,
              "Gid": 1002
            }
          }
        }
      }
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
}
```  
Name  
The name of the function definition.  
type: string  
InitialVersion  
Information about a function definition version.  
type: object  
DefaultConfig  
The default configuration that applies to all Lambda functions in the group. Individual Lambda functions can override these settings.  
type: object  
Execution  
Configuration information that specifies how a Lambda function runs.  
Functions  
A list of Lambda functions in this function definition version.  
type: array  
items: [Function](definitions-function.md)  
  
Information about a Lambda function.  
type: object  
required: ["Id"]  
Id  
A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
FunctionArn  
The ARN of the alias (recommended) or version of the target Lambda function.  
type: string  
FunctionConfiguration  
The configuration of the Lambda function.  
type: object  
Pinned  
True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.  
type: boolean  
Executable  
The name of the function executable.  
type: string  
ExecArgs  
The execution arguments.  
type: string  
MemorySize  
The memory size, in KB, required by the function. This setting does not apply and should be cleared when you run the Lambda function without containerization.  
type: integer  
Timeout  
The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.  
type: integer  
EncodingType  
The expected encoding type of the input payload for the function. The default is `json`.  
type: string  
enum: ["binary", "json"]  
Environment  
The environment configuration of the function.  
type: object  
Variables  
Environment variables for the Lambda function's configuration.  
type: object  
additionalProperties: An object with properties of type `string` that represent the environment variables.  
ResourceAccessPolicies  
A list of the resources, with their permissions, to which the Lambda function is granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies applies only when you run the Lambda function in a Greengrass container.  
type: array  
items: [ResourceAccessPolicy](definitions-resourceaccesspolicy.md)  
ResourceAccessPolicy  
A policy used by the function to access a resource.  
type: object  
required: ["ResourceId"]  
ResourceId  
The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)  
type: string  
Permission  
The type of permission a function has to access a resource.  
type: string  
enum: ["ro", "rw"]  
AccessSysfs  
If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.  
type: boolean  
Execution  
Configuration information that specifies how a Lambda function runs.   
type: object  
IsolationMode  
Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.  
type: string  
enum: ["GreengrassContainer", "NoContainer"]  
RunAs  
Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. To minimize the risk of unintended changes or malicious attacks, we recommend that you avoid running as root unless absolutely necessary. To run as root, you must update config.json in `greengrass-root/config` to set `allowFunctionsToRunAsRoot` to `yes`.   
type: object  
Uid  
The user ID whose permissions are used to run a Lambda function.  
type: integer  
Gid  
The group ID whose permissions are used to run a Lambda function.  
type: integer  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-definition-functions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-definition-functions-post-cli"></a>

```
aws greengrass create-function-definition \
  [--name <value>] \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "DefaultConfig": {
    "Execution": {
      "IsolationMode": "GreengrassContainer|NoContainer",
      "RunAs": {
        "Uid": "integer",
        "Gid": "integer"
      }
    }
  },
  "Functions": [
    {
      "Id": "string",
      "FunctionArn": "string",
      "FunctionConfiguration": {
        "Pinned": "boolean",
        "Executable": "string",
        "ExecArgs": "string",
        "MemorySize": "integer",
        "Timeout": "integer",
        "EncodingType": "binary|json",
        "Environment": {
          "Variables": {
            "additionalProperty0": "string",
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "ResourceAccessPolicies": [
            {
              "ResourceId": "string",
              "Permission": "ro|rw"
            }
          ],
          "AccessSysfs": "boolean",
          "Execution": {
            "IsolationMode": "GreengrassContainer|NoContainer",
            "RunAs": {
              "Uid": "integer",
              "Gid": "integer"
            }
          }
        }
      }
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-functions-post-responses"></a>

**200** (CreateFunctionDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/functions/FunctionDefinitionId
<a name="-greengrass-definition-functions-functiondefinitionid"></a>

## GET
<a name="-greengrass-definition-functions-functiondefinitionid-get"></a>

 `GET /greengrass/definition/functions/FunctionDefinitionId`

Operation ID: [GetFunctionDefinition](getfunctiondefinition-get.md)

Retrieves information about a Lambda function definition, including its creation time and latest version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-get-path"></a>

[**FunctionDefinitionId**](parameters-functiondefinitionidparam.md)  
The ID of the function definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-functions-functiondefinitionid-get-cli"></a>

```
aws greengrass get-function-definition \
  --function-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"FunctionDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-functions-functiondefinitionid-get-responses"></a>

**200** (GetFunctionDefinitionResponse)  
Success.  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-definition-functions-functiondefinitionid-delete"></a>

 `DELETE /greengrass/definition/functions/FunctionDefinitionId`

Operation ID: [DeleteFunctionDefinition](deletefunctiondefinition-delete.md)

Deletes a Lambda function definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-delete-path"></a>

[**FunctionDefinitionId**](parameters-functiondefinitionidparam.md)  
The ID of the function definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-functions-functiondefinitionid-delete-cli"></a>

```
aws greengrass delete-function-definition \
  --function-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"FunctionDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-functions-functiondefinitionid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-definition-functions-functiondefinitionid-put"></a>

 `PUT /greengrass/definition/functions/FunctionDefinitionId`

Operation ID: [UpdateFunctionDefinition](updatefunctiondefinition-put.md)

Updates the name of a function definition. To update the list of available functions, use `CreateFunctionDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-put-path"></a>

[**FunctionDefinitionId**](parameters-functiondefinitionidparam.md)  
The ID of the function definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-functions-functiondefinitionid-put-cli"></a>

```
aws greengrass update-function-definition \
  --function-definition-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"FunctionDefinitionId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-definition-functions-functiondefinitionid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/functions/FunctionDefinitionId/versions
<a name="-greengrass-definition-functions-functiondefinitionid-versions"></a>

## POST
<a name="-greengrass-definition-functions-functiondefinitionid-versions-post"></a>

 `POST /greengrass/definition/functions/FunctionDefinitionId/versions`

Operation ID: [CreateFunctionDefinitionVersion](createfunctiondefinitionversion-post.md)

Creates a version of a Lambda function definition that has already been defined.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-versions-post-body"></a>

[**CreateFunctionDefinitionVersionRequestBody**](parameters-createfunctiondefinitionversionrequestbody.md)  
Information about the function definition version.  
where used: body; required: true  

```
{
"DefaultConfig": {
  "Execution": {
    "IsolationMode": "GreengrassContainer|NoContainer",
    "RunAs": {
      "Uid": 1001,
      "Gid": 1002
    }
  }
},
"Functions": [
  {
    "Id": "string",
    "FunctionArn": "string",
    "FunctionConfiguration": {
      "Pinned": true,
      "Executable": "string",
      "ExecArgs": "string",
      "MemorySize": 0,
      "Timeout": 0,
      "EncodingType": "binary|json",
      "Environment": {
        "Variables": {
          "additionalProperty0": "string",
          "additionalProperty1": "string",
          "additionalProperty2": "string"
        },
        "ResourceAccessPolicies": [
          {
            "ResourceId": "string",
            "Permission": "ro|rw"
          }
        ],
        "AccessSysfs": true,
        "Execution": {
          "IsolationMode": "GreengrassContainer|NoContainer",
          "RunAs": {
            "Uid": 1001,
            "Gid": 1002
          }
        }
      }
    }
  }
]
}
```  
FunctionDefinitionVersion  
Information about a function definition version.  
type: object  
DefaultConfig  
The default configuration that applies to all Lambda functions in the group. Individual Lambda functions can override these settings.  
type: object  
Execution  
Configuration information that specifies how a Lambda function runs.  
Functions  
A list of Lambda functions in this function definition version.  
type: array  
items: [Function](definitions-function.md)  
  
Information about a Lambda function.  
type: object  
required: ["Id"]  
Id  
A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
FunctionArn  
The ARN of the alias (recommended) or version of the target Lambda function.  
type: string  
FunctionConfiguration  
The configuration of the Lambda function.  
type: object  
Pinned  
True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.  
type: boolean  
Executable  
The name of the function executable.  
type: string  
ExecArgs  
The execution arguments.  
type: string  
MemorySize  
The memory size, in KB, required by the function. This setting does not apply and should be cleared when you run the Lambda function without containerization.  
type: integer  
Timeout  
The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.  
type: integer  
EncodingType  
The expected encoding type of the input payload for the function. The default is `json`.  
type: string  
enum: ["binary", "json"]  
Environment  
The environment configuration of the function.  
type: object  
Variables  
Environment variables for the Lambda function's configuration.  
type: object  
additionalProperties: An object with properties of type `string` that represent the environment variables.  
ResourceAccessPolicies  
A list of the resources, with their permissions, to which the Lambda function is granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies applies only when you run the Lambda function in a Greengrass container.  
type: array  
items: [ResourceAccessPolicy](definitions-resourceaccesspolicy.md)  
ResourceAccessPolicy  
A policy used by the function to access a resource.  
type: object  
required: ["ResourceId"]  
ResourceId  
The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)  
type: string  
Permission  
The type of permission a function has to access a resource.  
type: string  
enum: ["ro", "rw"]  
AccessSysfs  
If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.  
type: boolean  
Execution  
Configuration information that specifies how a Lambda function runs.   
type: object  
IsolationMode  
Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.  
type: string  
enum: ["GreengrassContainer", "NoContainer"]  
RunAs  
Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. To minimize the risk of unintended changes or malicious attacks, we recommend that you avoid running as root unless absolutely necessary. To run as root, you must update config.json in `greengrass-root/config` to set `allowFunctionsToRunAsRoot` to `yes`.   
type: object  
Uid  
The user ID whose permissions are used to run a Lambda function.  
type: integer  
Gid  
The group ID whose permissions are used to run a Lambda function.  
type: integer

### Header Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-versions-post-path"></a>

[**FunctionDefinitionId**](parameters-functiondefinitionidparam.md)  
The ID of the function definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-functions-functiondefinitionid-versions-post-cli"></a>

```
aws greengrass create-function-definition-version \
  --function-definition-id <value> \
  [--default-config <value>] \
  [--functions <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"FunctionDefinitionId": "string",
"DefaultConfig": {
  "Execution": {
    "IsolationMode": "GreengrassContainer|NoContainer",
    "RunAs": {
      "Uid": "integer",
      "Gid": "integer"
    }
  }
},
"Functions": [
  {
    "Id": "string",
    "FunctionArn": "string",
    "FunctionConfiguration": {
      "Pinned": "boolean",
      "Executable": "string",
      "ExecArgs": "string",
      "MemorySize": "integer",
      "Timeout": "integer",
      "EncodingType": "binary|json",
      "Environment": {
        "Variables": {
          "additionalProperty0": "string",
          "additionalProperty1": "string",
          "additionalProperty2": "string"
        },
        "ResourceAccessPolicies": [
          {
            "ResourceId": "string",
            "Permission": "ro|rw"
          }
        ],
        "AccessSysfs": "boolean",
        "Execution": {
          "IsolationMode": "GreengrassContainer|NoContainer",
          "RunAs": {
            "Uid": "integer",
            "Gid": "integer"
          }
        }
      }
    }
  }
],
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-functions-functiondefinitionid-versions-post-responses"></a>

**200** (CreateFunctionDefinitionVersionResponse)  
  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-definition-functions-functiondefinitionid-versions-get"></a>

 `GET /greengrass/definition/functions/FunctionDefinitionId/versions`

Operation ID: [ListFunctionDefinitionVersions](listfunctiondefinitionversions-get.md)

Lists the versions of a Lambda function definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-versions-get-path"></a>

[**FunctionDefinitionId**](parameters-functiondefinitionidparam.md)  
The ID of the function definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-definition-functions-functiondefinitionid-versions-get-cli"></a>

```
aws greengrass list-function-definition-versions \
  --function-definition-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"FunctionDefinitionId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-definition-functions-functiondefinitionid-versions-get-responses"></a>

**200** (ListFunctionDefinitionVersionsResponse)  
  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/functions/FunctionDefinitionId/versions/FunctionDefinitionVersionId
<a name="-greengrass-definition-functions-functiondefinitionid-versions-functiondefinitionversionid"></a>

## GET
<a name="-greengrass-definition-functions-functiondefinitionid-versions-functiondefinitionversionid-get"></a>

 `GET /greengrass/definition/functions/FunctionDefinitionId/versions/FunctionDefinitionVersionId`

Operation ID: [GetFunctionDefinitionVersion](getfunctiondefinitionversion-get.md)

Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-versions-functiondefinitionversionid-get-path"></a>

[**FunctionDefinitionId**](parameters-functiondefinitionidparam.md)  
The ID of the function definition.  
where used: path; required: true  
type: string

[**FunctionDefinitionVersionId**](parameters-functiondefinitionversionidparam.md)  
The ID of the function definition version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListFunctionDefinitionVersions` requests. If the version is the last one that was associated with a function definition, the value also maps to the `LatestVersion` property of the corresponding `DefinitionInformation` object.   
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-functions-functiondefinitionid-versions-functiondefinitionversionid-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-functions-functiondefinitionid-versions-functiondefinitionversionid-get-cli"></a>

```
aws greengrass get-function-definition-version \
  --function-definition-id <value> \
  --function-definition-version-id <value> \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"FunctionDefinitionId": "string",
"FunctionDefinitionVersionId": "string",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-functions-functiondefinitionid-versions-functiondefinitionversionid-get-responses"></a>

**200**  
Success.  
 [ GetFunctionDefinitionVersionResponse](definitions-getfunctiondefinitionversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "DefaultConfig": {
    "Execution": {
      "IsolationMode": "GreengrassContainer|NoContainer",
      "RunAs": {
        "Uid": 1001,
        "Gid": 1002
      }
    }
  },
  "Functions": [
    {
      "Id": "string",
      "FunctionArn": "string",
      "FunctionConfiguration": {
        "Pinned": true,
        "Executable": "string",
        "ExecArgs": "string",
        "MemorySize": 0,
        "Timeout": 0,
        "EncodingType": "binary|json",
        "Environment": {
          "Variables": {
            "additionalProperty0": "string",
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "ResourceAccessPolicies": [
            {
              "ResourceId": "string",
              "Permission": "ro|rw"
            }
          ],
          "AccessSysfs": true,
          "Execution": {
            "IsolationMode": "GreengrassContainer|NoContainer",
            "RunAs": {
              "Uid": 1001,
              "Gid": 1002
            }
          }
        },
        "FunctionRuntimeOverride": "string"
      }
    }
  ]
},
"NextToken": "string"
}
```  
GetFunctionDefinitionVersionResponse  
Information about a function definition version.  
type: object  
Arn  
The ARN of the function definition version.  
type: string  
Id  
The ID of the function definition version.  
type: string  
Version  
The version of the function definition version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the function definition version was created.  
type: string  
Definition  
Information about a function definition version.  
type: object  
DefaultConfig  
The default configuration that applies to all Lambda functions in the group. Individual Lambda functions can override these settings.  
type: object  
Execution  
Configuration information that specifies how a Lambda function runs.  
Functions  
A list of Lambda functions in this function definition version.  
type: array  
items: [Function](definitions-function.md)  
  
Information about a Lambda function.  
type: object  
required: ["Id"]  
Id  
A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
FunctionArn  
The ARN of the alias (recommended) or version of the target Lambda function.  
type: string  
FunctionConfiguration  
The configuration of the Lambda function.  
type: object  
Pinned  
True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.  
type: boolean  
Executable  
The name of the function executable.  
type: string  
ExecArgs  
The execution arguments.  
type: string  
MemorySize  
The memory size, in KB, required by the function. This setting does not apply and should be cleared when you run the Lambda function without containerization.  
type: integer  
Timeout  
The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.  
type: integer  
EncodingType  
The expected encoding type of the input payload for the function. The default is `json`.  
type: string  
enum: ["binary", "json"]  
Environment  
The environment configuration of the function.  
type: object  
Variables  
Environment variables for the Lambda function's configuration.  
type: object  
additionalProperties: An object with properties of type `string` that represent the environment variables.  
ResourceAccessPolicies  
A list of the resources, with their permissions, to which the Lambda function is granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies applies only when you run the Lambda function in a Greengrass container.  
type: array  
items: [ResourceAccessPolicy](definitions-resourceaccesspolicy.md)  
ResourceAccessPolicy  
A policy used by the function to access a resource.  
type: object  
required: ["ResourceId"]  
ResourceId  
The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)  
type: string  
Permission  
The type of permission a function has to access a resource.  
type: string  
enum: ["ro", "rw"]  
AccessSysfs  
If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.  
type: boolean  
Execution  
Configuration information that specifies how a Lambda function runs.   
type: object  
IsolationMode  
Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.  
type: string  
enum: ["GreengrassContainer", "NoContainer"]  
RunAs  
Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. To minimize the risk of unintended changes or malicious attacks, we recommend that you avoid running as root unless absolutely necessary. To run as root, you must update config.json in `greengrass-root/config` to set `allowFunctionsToRunAsRoot` to `yes`.   
type: object  
Uid  
The user ID whose permissions are used to run a Lambda function.  
type: integer  
Gid  
The group ID whose permissions are used to run a Lambda function.  
type: integer  
FunctionRuntimeOverride  
The Lambda runtime supported by Greengrass which is to be used instead of the one specified in the Lambda function.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/loggers
<a name="-greengrass-definition-loggers"></a>

## GET
<a name="-greengrass-definition-loggers-get"></a>

 `GET /greengrass/definition/loggers`

Operation ID: [ListLoggerDefinitions](listloggerdefinitions-get.md)

Retrieves a list of logger definitions.

Produces: application/json

### Query Parameters
<a name="-greengrass-definition-loggers-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-loggers-get-cli"></a>

```
aws greengrass list-logger-definitions \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-loggers-get-responses"></a>

**200** (ListLoggerDefinitionsResponse)  
  
 [ ListDefinitionsResponse](definitions-listdefinitionsresponse.md)   

```
{
"Definitions": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "tags": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListDefinitionsResponse  
A list of definitions.  
type: object  
Definitions  
Information about a definition.  
type: array  
items: [DefinitionInformation](definitions-definitioninformation.md)  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-definition-loggers-post"></a>

 `POST /greengrass/definition/loggers`

Operation ID: [CreateLoggerDefinition](createloggerdefinition-post.md)

Creates a logger definition. You can provide the initial version of the logger definition now or use `CreateLoggerDefinitionVersion` later.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-loggers-post-body"></a>

[**CreateLoggerDefinitionRequestBody**](parameters-createloggerdefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "Loggers": [
    {
      "Id": "string",
      "Type": "FileSystem|AWSCloudWatch",
      "Component": "GreengrassSystem|Lambda",
      "Level": "DEBUG|INFO|WARN|ERROR|FATAL",
      "Space": 0
    }
  ]
},
"tags": {
  "keyName0": "string",
  "keyName1": "string",
  "keyName2": "string"
}
}
```  
Name  
The name of the logger definition.  
type: string  
InitialVersion  
Information about a logger definition version.  
type: object  
Loggers  
A list of loggers.  
type: array  
items: [Logger](definitions-logger.md)  
Logger  
Information about a logger  
type: object  
required: ["Id", "Type", "Component", "Level"]  
Id  
A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
Type  
type: string  
enum: ["FileSystem", "AWSCloudWatch"]  
Component  
type: string  
enum: ["GreengrassSystem", "Lambda"]  
Level  
type: string  
enum: ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"]  
Space  
The amount of file space, in KB, to use if the local file system is used for logging purposes.  
type: integer  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-definition-loggers-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-definition-loggers-post-cli"></a>

```
aws greengrass create-logger-definition \
  [--name <value>] \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "Loggers": [
    {
      "Id": "string",
      "Type": "FileSystem|AWSCloudWatch",
      "Component": "GreengrassSystem|Lambda",
      "Level": "DEBUG|INFO|WARN|ERROR|FATAL",
      "Space": "integer"
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-loggers-post-responses"></a>

**200** (CreateLoggerDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/loggers/LoggerDefinitionId
<a name="-greengrass-definition-loggers-loggerdefinitionid"></a>

## GET
<a name="-greengrass-definition-loggers-loggerdefinitionid-get"></a>

 `GET /greengrass/definition/loggers/LoggerDefinitionId`

Operation ID: [GetLoggerDefinition](getloggerdefinition-get.md)

Retrieves information about a logger definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-get-path"></a>

[**LoggerDefinitionId**](parameters-loggerdefinitionidparam.md)  
The ID of the logger definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-loggers-loggerdefinitionid-get-cli"></a>

```
aws greengrass get-logger-definition \
  --logger-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"LoggerDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-loggers-loggerdefinitionid-get-responses"></a>

**200** (GetLoggerDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-definition-loggers-loggerdefinitionid-delete"></a>

 `DELETE /greengrass/definition/loggers/LoggerDefinitionId`

Operation ID: [DeleteLoggerDefinition](deleteloggerdefinition-delete.md)

Deletes a logger definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-delete-path"></a>

[**LoggerDefinitionId**](parameters-loggerdefinitionidparam.md)  
The ID of the logger definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-loggers-loggerdefinitionid-delete-cli"></a>

```
aws greengrass delete-logger-definition \
  --logger-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"LoggerDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-loggers-loggerdefinitionid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-definition-loggers-loggerdefinitionid-put"></a>

 `PUT /greengrass/definition/loggers/LoggerDefinitionId`

Operation ID: [UpdateLoggerDefinition](updateloggerdefinition-put.md)

Updates the name of a logger definition. To update the list of available loggers, use `CreateLoggerDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-put-path"></a>

[**LoggerDefinitionId**](parameters-loggerdefinitionidparam.md)  
The ID of the logger definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-loggers-loggerdefinitionid-put-cli"></a>

```
aws greengrass update-logger-definition \
  --logger-definition-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"LoggerDefinitionId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-definition-loggers-loggerdefinitionid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/loggers/LoggerDefinitionId/versions
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions"></a>

## POST
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-post"></a>

 `POST /greengrass/definition/loggers/LoggerDefinitionId/versions`

Operation ID: [CreateLoggerDefinitionVersion](createloggerdefinitionversion-post.md)

Creates a version of a logger definition that has already been defined.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-post-body"></a>

[**CreateLoggerDefinitionVersionRequestBody**](parameters-createloggerdefinitionversionrequestbody.md)  
  
where used: body; required: true  

```
{
"Loggers": [
  {
    "Id": "string",
    "Type": "FileSystem|AWSCloudWatch",
    "Component": "GreengrassSystem|Lambda",
    "Level": "DEBUG|INFO|WARN|ERROR|FATAL",
    "Space": 0
  }
]
}
```  
LoggerDefinitionVersion  
Information about a logger definition version.  
type: object  
Loggers  
A list of loggers.  
type: array  
items: [Logger](definitions-logger.md)  
Logger  
Information about a logger  
type: object  
required: ["Id", "Type", "Component", "Level"]  
Id  
A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
Type  
type: string  
enum: ["FileSystem", "AWSCloudWatch"]  
Component  
type: string  
enum: ["GreengrassSystem", "Lambda"]  
Level  
type: string  
enum: ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"]  
Space  
The amount of file space, in KB, to use if the local file system is used for logging purposes.  
type: integer

### Header Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-post-path"></a>

[**LoggerDefinitionId**](parameters-loggerdefinitionidparam.md)  
The ID of the logger definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-post-cli"></a>

```
aws greengrass create-logger-definition-version \
  --logger-definition-id <value> \
  [--loggers <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"LoggerDefinitionId": "string",
"Loggers": [
  {
    "Id": "string",
    "Type": "FileSystem|AWSCloudWatch",
    "Component": "GreengrassSystem|Lambda",
    "Level": "DEBUG|INFO|WARN|ERROR|FATAL",
    "Space": "integer"
  }
],
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-post-responses"></a>

**200** (CreateLoggerDefinitionVersionResponse)  
  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-get"></a>

 `GET /greengrass/definition/loggers/LoggerDefinitionId/versions`

Operation ID: [ListLoggerDefinitionVersions](listloggerdefinitionversions-get.md)

Lists the versions of a logger definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-get-path"></a>

[**LoggerDefinitionId**](parameters-loggerdefinitionidparam.md)  
The ID of the logger definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-get-cli"></a>

```
aws greengrass list-logger-definition-versions \
  --logger-definition-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"LoggerDefinitionId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-get-responses"></a>

**200** (ListLoggerDefinitionVersionsResponse)  
  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/loggers/LoggerDefinitionId/versions/LoggerDefinitionVersionId
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-loggerdefinitionversionid"></a>

## GET
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-loggerdefinitionversionid-get"></a>

 `GET /greengrass/definition/loggers/LoggerDefinitionId/versions/LoggerDefinitionVersionId`

Operation ID: [GetLoggerDefinitionVersion](getloggerdefinitionversion-get.md)

Retrieves information about a logger definition version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-loggerdefinitionversionid-get-path"></a>

[**LoggerDefinitionVersionId**](parameters-loggerdefinitionversionidparam.md)  
The ID of the logger definition version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListLoggerDefinitionVersions` requests. If the version is the last one that was associated with a logger definition, the value also maps to the `LatestVersion` property of the corresponding `DefinitionInformation` object.   
where used: path; required: true  
type: string

[**LoggerDefinitionId**](parameters-loggerdefinitionidparam.md)  
The ID of the logger definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-loggerdefinitionversionid-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-loggerdefinitionversionid-get-cli"></a>

```
aws greengrass get-logger-definition-version \
  --logger-definition-version-id <value> \
  --logger-definition-id <value> \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"LoggerDefinitionVersionId": "string",
"LoggerDefinitionId": "string",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-loggers-loggerdefinitionid-versions-loggerdefinitionversionid-get-responses"></a>

**200** (GetLoggerDefinitionVersionResponse)  
Success.  
 [ GetLoggerDefinitionVersionResponse](definitions-getloggerdefinitionversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "Loggers": [
    {
      "Id": "string",
      "Type": "FileSystem|AWSCloudWatch",
      "Component": "GreengrassSystem|Lambda",
      "Level": "DEBUG|INFO|WARN|ERROR|FATAL",
      "Space": 0
    }
  ]
}
}
```  
GetLoggerDefinitionVersionResponse  
Information about a logger definition version.  
type: object  
Arn  
The ARN of the logger definition version.  
type: string  
Id  
The ID of the logger definition version.  
type: string  
Version  
The version of the logger definition version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the logger definition version was created.  
type: string  
Definition  
Information about a logger definition version.  
type: object  
Loggers  
A list of loggers.  
type: array  
items: [Logger](definitions-logger.md)  
Logger  
Information about a logger  
type: object  
required: ["Id", "Type", "Component", "Level"]  
Id  
A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
Type  
type: string  
enum: ["FileSystem", "AWSCloudWatch"]  
Component  
type: string  
enum: ["GreengrassSystem", "Lambda"]  
Level  
type: string  
enum: ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"]  
Space  
The amount of file space, in KB, to use if the local file system is used for logging purposes.  
type: integer

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/resources
<a name="-greengrass-definition-resources"></a>

## GET
<a name="-greengrass-definition-resources-get"></a>

 `GET /greengrass/definition/resources`

Operation ID: [ListResourceDefinitions](listresourcedefinitions-get.md)

Retrieves a list of resource definitions.

Produces: application/json

### Query Parameters
<a name="-greengrass-definition-resources-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-resources-get-cli"></a>

```
aws greengrass list-resource-definitions \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-resources-get-responses"></a>

**200** (ListResourceDefinitionsResponse)  
The IDs of all the Greengrass resource definitions in this account.  
 [ ListDefinitionsResponse](definitions-listdefinitionsresponse.md)   

```
{
"Definitions": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "tags": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListDefinitionsResponse  
A list of definitions.  
type: object  
Definitions  
Information about a definition.  
type: array  
items: [DefinitionInformation](definitions-definitioninformation.md)  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-definition-resources-post"></a>

 `POST /greengrass/definition/resources`

Operation ID: [CreateResourceDefinition](createresourcedefinition-post.md)

Creates a resource definition that contains a list of resources to be used in a group. You can create an initial version of the definition by providing a list of resources now, or use `CreateResourceDefinitionVersion` later.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-resources-post-body"></a>

[**CreateResourceDefinitionRequestBody**](parameters-createresourcedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "Resources": [
    {
      "Id": "string",
      "Name": "string",
      "ResourceDataContainer": {
        "*-- NOTE:": "choose one of the following --*",
        "LocalDeviceResourceData": {
          "SourcePath": "string",
          "GroupOwnerSetting": {
            "AutoAddGroupOwner": true,
            "GroupOwner": "string"
          }
        },
        "LocalVolumeResourceData": {
          "SourcePath": "string",
          "DestinationPath": "string",
          "GroupOwnerSetting": {
            "AutoAddGroupOwner": true,
            "GroupOwner": "string"
          }
        },
        "SageMakerMachineLearningModelResourceData": {
          "SageMakerJobArn": "string",
          "DestinationPath": "string",
          "OwnerSetting": {
            "GroupOwner": "string",
            "GroupPermission": "ro|rw"
          }
        },
        "S3MachineLearningModelResourceData": {
          "S3Uri": "string",
          "DestinationPath": "string",
          "OwnerSetting": {
            "GroupOwner": "string",
            "GroupPermission": "ro|rw"
          }
        },
        "SecretsManagerSecretResourceData": {
          "ARN": "string",
          "AdditionalStagingLabelsToDownload": [
            "string"
          ]
        }
      }
    }
  ]
},
"tags": {
  "keyName0": "string",
  "keyName1": "string",
  "keyName2": "string"
}
}
```  
Name  
The name of the resource definition.  
type: string  
InitialVersion  
Information about a resource definition version.  
type: object  
Resources  
A list of resources.  
type: array  
items: [Resource](definitions-resource.md)  
Resource  
Information about a resource.  
type: object  
required: ["Id", "Name", "ResourceDataContainer"]  
Id  
The resource ID, used to refer to a resource in the Lambda function configuration. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`. This must be unique within a Greengrass group.  
type: string  
Name  
The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`. This must be unique within a Greengrass group.  
type: string  
ResourceDataContainer  
A container for resource data. The container takes only one of the following supported resource data types: `LocalDeviceResourceData`, `LocalVolumeResourceData`, `SageMakerMachineLearningModelResourceData`, `S3MachineLearningModelResourceData`, `SecretsManagerSecretResourceData`.   
type: object  
NOTE: oneOf  
LocalDeviceResourceData  
Attributes that define a local device resource.  
type: object  
SourcePath  
The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under `/dev`.  
type: string  
GroupOwnerSetting  
Group owner related settings for local resources.  
type: object  
AutoAddGroupOwner  
If true, AWS IoT Greengrass adds the specified Linux OS group owner of the resource to the Lambda process privileges. The Lambda process then has the file access permissions of the added Linux group.  
type: boolean  
GroupOwner  
The name of the Linux OS group whose privileges are added to the Lambda process. This field is optional.  
type: string  
LocalVolumeResourceData  
Attributes that define a local volume resource.  
type: object  
SourcePath  
The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with `/sys`.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
GroupOwnerSetting  
Group owner related settings for local resources.  
type: object  
AutoAddGroupOwner  
If true, AWS IoT Greengrass adds the specified Linux OS group owner of the resource to the Lambda process privileges. The Lambda process then has the file access permissions of the added Linux group.  
type: boolean  
GroupOwner  
The name of the Linux OS group whose privileges are added to the Lambda process. This field is optional.  
type: string  
SageMakerMachineLearningModelResourceData  
Attributes that define an Amazon SageMaker machine learning resource.  
type: object  
SageMakerJobArn  
The ARN of the Amazon SageMaker training job that represents the source model.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
OwnerSetting  
The owner setting for the downloaded machine learning resource.  
type: object  
required: ["GroupOwner", "GroupPermission"]  
GroupOwner  
The group owner of the resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
type: string  
GroupPermission  
The permissions that the group owner has to the resource. Valid values are `rw` (read-write) or `ro` (read-only).  
type: string  
enum: ["ro", "rw"]  
S3MachineLearningModelResourceData  
Attributes that define an Amazon S3 machine learning resource.  
type: object  
S3Uri  
The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
OwnerSetting  
The owner setting for the downloaded machine learning resource.  
type: object  
required: ["GroupOwner", "GroupPermission"]  
GroupOwner  
The group owner of the resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
type: string  
GroupPermission  
The permissions that the group owner has to the resource. Valid values are `rw` (read-write) or `ro` (read-only).  
type: string  
enum: ["ro", "rw"]  
SecretsManagerSecretResourceData  
Attributes that define a secret resource, which references a secret from AWS Secrets Manager. AWS IoT Greengrass stores a local, encrypted copy of the secret on the Greengrass core, where it can be securely accessed by connectors and Lambda functions.  
type: object  
ARN  
The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the `AWSCURRENT` staging label) is included by default.  
type: string  
AdditionalStagingLabelsToDownload  
Optional. The staging labels in addition to `AWSCURRENT` whose values you want to make available on the core.  
type: array  
  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-definition-resources-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-definition-resources-post-cli"></a>

```
aws greengrass create-resource-definition \
  [--name <value>] \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "Resources": [
    {
      "Id": "string",
      "Name": "string",
      "ResourceDataContainer": {
        "*-- NOTE:": "choose one of the following --*",
        "LocalDeviceResourceData": {
          "SourcePath": "string",
          "GroupOwnerSetting": {
            "AutoAddGroupOwner": "boolean",
            "GroupOwner": "string"
          }
        },
        "LocalVolumeResourceData": {
          "SourcePath": "string",
          "DestinationPath": "string",
          "GroupOwnerSetting": {
            "AutoAddGroupOwner": "boolean",
            "GroupOwner": "string"
          }
        },
        "SageMakerMachineLearningModelResourceData": {
          "SageMakerJobArn": "string",
          "DestinationPath": "string",
          "OwnerSetting": {
            "GroupOwner": "string",
            "GroupPermission": "ro|rw"
          }
        },
        "S3MachineLearningModelResourceData": {
          "S3Uri": "string",
          "DestinationPath": "string",
          "OwnerSetting": {
            "GroupOwner": "string",
            "GroupPermission": "ro|rw"
          }
        },
        "SecretsManagerSecretResourceData": {
          "ARN": "string",
          "AdditionalStagingLabelsToDownload": [
            "string"
          ]
        }
      }
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-resources-post-responses"></a>

**200** (CreateResourceDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/resources/ResourceDefinitionId
<a name="-greengrass-definition-resources-resourcedefinitionid"></a>

## GET
<a name="-greengrass-definition-resources-resourcedefinitionid-get"></a>

 `GET /greengrass/definition/resources/ResourceDefinitionId`

Operation ID: [GetResourceDefinition](getresourcedefinition-get.md)

Retrieves information about a resource definition, including its creation time and latest version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-get-path"></a>

[**ResourceDefinitionId**](parameters-resourcedefinitionidparam.md)  
The ID of the resource definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-resources-resourcedefinitionid-get-cli"></a>

```
aws greengrass get-resource-definition \
  --resource-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-resources-resourcedefinitionid-get-responses"></a>

**200** (GetResourceDefinitionResponse)  
Success.  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-definition-resources-resourcedefinitionid-delete"></a>

 `DELETE /greengrass/definition/resources/ResourceDefinitionId`

Operation ID: [DeleteResourceDefinition](deleteresourcedefinition-delete.md)

Deletes a resource definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-delete-path"></a>

[**ResourceDefinitionId**](parameters-resourcedefinitionidparam.md)  
The ID of the resource definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-resources-resourcedefinitionid-delete-cli"></a>

```
aws greengrass delete-resource-definition \
  --resource-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-resources-resourcedefinitionid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-definition-resources-resourcedefinitionid-put"></a>

 `PUT /greengrass/definition/resources/ResourceDefinitionId`

Operation ID: [UpdateResourceDefinition](updateresourcedefinition-put.md)

Updates the name of a resource definition. To update the list of available resources, use `CreateResourceDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-put-path"></a>

[**ResourceDefinitionId**](parameters-resourcedefinitionidparam.md)  
The ID of the resource definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-resources-resourcedefinitionid-put-cli"></a>

```
aws greengrass update-resource-definition \
  --resource-definition-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceDefinitionId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-definition-resources-resourcedefinitionid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/resources/ResourceDefinitionId/versions
<a name="-greengrass-definition-resources-resourcedefinitionid-versions"></a>

## POST
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-post"></a>

 `POST /greengrass/definition/resources/ResourceDefinitionId/versions`

Operation ID: [CreateResourceDefinitionVersion](createresourcedefinitionversion-post.md)

Creates a version of a resource definition that has already been defined.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-post-body"></a>

[**CreateResourceDefinitionVersionRequestBody**](parameters-createresourcedefinitionversionrequestbody.md)  
Information about the resource definition version.  
where used: body; required: true  

```
{
"Resources": [
  {
    "Id": "string",
    "Name": "string",
    "ResourceDataContainer": {
      "*-- NOTE:": "choose one of the following --*",
      "LocalDeviceResourceData": {
        "SourcePath": "string",
        "GroupOwnerSetting": {
          "AutoAddGroupOwner": true,
          "GroupOwner": "string"
        }
      },
      "LocalVolumeResourceData": {
        "SourcePath": "string",
        "DestinationPath": "string",
        "GroupOwnerSetting": {
          "AutoAddGroupOwner": true,
          "GroupOwner": "string"
        }
      },
      "SageMakerMachineLearningModelResourceData": {
        "SageMakerJobArn": "string",
        "DestinationPath": "string",
        "OwnerSetting": {
          "GroupOwner": "string",
          "GroupPermission": "ro|rw"
        }
      },
      "S3MachineLearningModelResourceData": {
        "S3Uri": "string",
        "DestinationPath": "string",
        "OwnerSetting": {
          "GroupOwner": "string",
          "GroupPermission": "ro|rw"
        }
      },
      "SecretsManagerSecretResourceData": {
        "ARN": "string",
        "AdditionalStagingLabelsToDownload": [
          "string"
        ]
      }
    }
  }
]
}
```  
ResourceDefinitionVersion  
Information about a resource definition version.  
type: object  
Resources  
A list of resources.  
type: array  
items: [Resource](definitions-resource.md)  
Resource  
Information about a resource.  
type: object  
required: ["Id", "Name", "ResourceDataContainer"]  
Id  
The resource ID, used to refer to a resource in the Lambda function configuration. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`. This must be unique within a Greengrass group.  
type: string  
Name  
The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`. This must be unique within a Greengrass group.  
type: string  
ResourceDataContainer  
A container for resource data. The container takes only one of the following supported resource data types: `LocalDeviceResourceData`, `LocalVolumeResourceData`, `SageMakerMachineLearningModelResourceData`, `S3MachineLearningModelResourceData`, `SecretsManagerSecretResourceData`.   
type: object  
NOTE: oneOf  
LocalDeviceResourceData  
Attributes that define a local device resource.  
type: object  
SourcePath  
The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under `/dev`.  
type: string  
GroupOwnerSetting  
Group owner related settings for local resources.  
type: object  
AutoAddGroupOwner  
If true, AWS IoT Greengrass adds the specified Linux OS group owner of the resource to the Lambda process privileges. The Lambda process then has the file access permissions of the added Linux group.  
type: boolean  
GroupOwner  
The name of the Linux OS group whose privileges are added to the Lambda process. This field is optional.  
type: string  
LocalVolumeResourceData  
Attributes that define a local volume resource.  
type: object  
SourcePath  
The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with `/sys`.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
GroupOwnerSetting  
Group owner related settings for local resources.  
type: object  
AutoAddGroupOwner  
If true, AWS IoT Greengrass adds the specified Linux OS group owner of the resource to the Lambda process privileges. The Lambda process then has the file access permissions of the added Linux group.  
type: boolean  
GroupOwner  
The name of the Linux OS group whose privileges are added to the Lambda process. This field is optional.  
type: string  
SageMakerMachineLearningModelResourceData  
Attributes that define an Amazon SageMaker machine learning resource.  
type: object  
SageMakerJobArn  
The ARN of the Amazon SageMaker training job that represents the source model.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
OwnerSetting  
The owner setting for the downloaded machine learning resource.  
type: object  
required: ["GroupOwner", "GroupPermission"]  
GroupOwner  
The group owner of the resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
type: string  
GroupPermission  
The permissions that the group owner has to the resource. Valid values are `rw` (read-write) or `ro` (read-only).  
type: string  
enum: ["ro", "rw"]  
S3MachineLearningModelResourceData  
Attributes that define an Amazon S3 machine learning resource.  
type: object  
S3Uri  
The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
OwnerSetting  
The owner setting for the downloaded machine learning resource.  
type: object  
required: ["GroupOwner", "GroupPermission"]  
GroupOwner  
The group owner of the resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
type: string  
GroupPermission  
The permissions that the group owner has to the resource. Valid values are `rw` (read-write) or `ro` (read-only).  
type: string  
enum: ["ro", "rw"]  
SecretsManagerSecretResourceData  
Attributes that define a secret resource, which references a secret from AWS Secrets Manager. AWS IoT Greengrass stores a local, encrypted copy of the secret on the Greengrass core, where it can be securely accessed by connectors and Lambda functions.  
type: object  
ARN  
The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the `AWSCURRENT` staging label) is included by default.  
type: string  
AdditionalStagingLabelsToDownload  
Optional. The staging labels in addition to `AWSCURRENT` whose values you want to make available on the core.  
type: array  


### Header Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-post-path"></a>

[**ResourceDefinitionId**](parameters-resourcedefinitionidparam.md)  
The ID of the resource definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-post-cli"></a>

```
aws greengrass create-resource-definition-version \
  --resource-definition-id <value> \
  [--resources <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceDefinitionId": "string",
"Resources": [
  {
    "Id": "string",
    "Name": "string",
    "ResourceDataContainer": {
      "*-- NOTE:": "choose one of the following --*",
      "LocalDeviceResourceData": {
        "SourcePath": "string",
        "GroupOwnerSetting": {
          "AutoAddGroupOwner": "boolean",
          "GroupOwner": "string"
        }
      },
      "LocalVolumeResourceData": {
        "SourcePath": "string",
        "DestinationPath": "string",
        "GroupOwnerSetting": {
          "AutoAddGroupOwner": "boolean",
          "GroupOwner": "string"
        }
      },
      "SageMakerMachineLearningModelResourceData": {
        "SageMakerJobArn": "string",
        "DestinationPath": "string",
        "OwnerSetting": {
          "GroupOwner": "string",
          "GroupPermission": "ro|rw"
        }
      },
      "S3MachineLearningModelResourceData": {
        "S3Uri": "string",
        "DestinationPath": "string",
        "OwnerSetting": {
          "GroupOwner": "string",
          "GroupPermission": "ro|rw"
        }
      },
      "SecretsManagerSecretResourceData": {
        "ARN": "string",
        "AdditionalStagingLabelsToDownload": [
          "string"
        ]
      }
    }
  }
],
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-post-responses"></a>

**200** (CreateResourceDefinitionVersionResponse)  
  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-get"></a>

 `GET /greengrass/definition/resources/ResourceDefinitionId/versions`

Operation ID: [ListResourceDefinitionVersions](listresourcedefinitionversions-get.md)

Lists the versions of a resource definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-get-path"></a>

[**ResourceDefinitionId**](parameters-resourcedefinitionidparam.md)  
The ID of the resource definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-get-cli"></a>

```
aws greengrass list-resource-definition-versions \
  --resource-definition-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceDefinitionId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-get-responses"></a>

**200** (ListResourceDefinitionVersionsResponse)  
  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/resources/ResourceDefinitionId/versions/ResourceDefinitionVersionId
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-resourcedefinitionversionid"></a>

## GET
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-resourcedefinitionversionid-get"></a>

 `GET /greengrass/definition/resources/ResourceDefinitionId/versions/ResourceDefinitionVersionId`

Operation ID: [GetResourceDefinitionVersion](getresourcedefinitionversion-get.md)

Retrieves information about a resource definition version, including which resources are included in the version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-resourcedefinitionversionid-get-path"></a>

[**ResourceDefinitionId**](parameters-resourcedefinitionidparam.md)  
The ID of the resource definition.  
where used: path; required: true  
type: string

[**ResourceDefinitionVersionId**](parameters-resourcedefinitionversionidparam.md)  
The ID of the resource definition version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListResourceDefinitionVersions` requests. If the version is the last one that was associated with a resource definition, the value also maps to the `LatestVersion` property of the corresponding `DefinitionInformation` object.   
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-resourcedefinitionversionid-get-cli"></a>

```
aws greengrass get-resource-definition-version \
  --resource-definition-id <value> \
  --resource-definition-version-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceDefinitionId": "string",
"ResourceDefinitionVersionId": "string"
}
```

### Responses
<a name="-greengrass-definition-resources-resourcedefinitionid-versions-resourcedefinitionversionid-get-responses"></a>

**200**  
Success.  
 [ GetResourceDefinitionVersionResponse](definitions-getresourcedefinitionversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "Resources": [
    {
      "Id": "string",
      "Name": "string",
      "ResourceDataContainer": {
        "*-- NOTE:": "choose one of the following --*",
        "LocalDeviceResourceData": {
          "SourcePath": "string",
          "GroupOwnerSetting": {
            "AutoAddGroupOwner": true,
            "GroupOwner": "string"
          }
        },
        "LocalVolumeResourceData": {
          "SourcePath": "string",
          "DestinationPath": "string",
          "GroupOwnerSetting": {
            "AutoAddGroupOwner": true,
            "GroupOwner": "string"
          }
        },
        "SageMakerMachineLearningModelResourceData": {
          "SageMakerJobArn": "string",
          "DestinationPath": "string",
          "OwnerSetting": {
            "GroupOwner": "string",
            "GroupPermission": "ro|rw"
          }
        },
        "S3MachineLearningModelResourceData": {
          "S3Uri": "string",
          "DestinationPath": "string",
          "OwnerSetting": {
            "GroupOwner": "string",
            "GroupPermission": "ro|rw"
          }
        },
        "SecretsManagerSecretResourceData": {
          "ARN": "string",
          "AdditionalStagingLabelsToDownload": [
            "string"
          ]
        }
      }
    }
  ]
}
}
```  
GetResourceDefinitionVersionResponse  
Information about a resource definition version.  
type: object  
Arn  
The ARN of the resource definition version.  
type: string  
Id  
The ID of the resource definition version.  
type: string  
Version  
The version of the resource definition version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the resource definition version was created.  
type: string  
Definition  
Information about a resource definition version.  
type: object  
Resources  
A list of resources.  
type: array  
items: [Resource](definitions-resource.md)  
Resource  
Information about a resource.  
type: object  
required: ["Id", "Name", "ResourceDataContainer"]  
Id  
The resource ID, used to refer to a resource in the Lambda function configuration. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`. This must be unique within a Greengrass group.  
type: string  
Name  
The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`. This must be unique within a Greengrass group.  
type: string  
ResourceDataContainer  
A container for resource data. The container takes only one of the following supported resource data types: `LocalDeviceResourceData`, `LocalVolumeResourceData`, `SageMakerMachineLearningModelResourceData`, `S3MachineLearningModelResourceData`, `SecretsManagerSecretResourceData`.   
type: object  
NOTE: oneOf  
LocalDeviceResourceData  
Attributes that define a local device resource.  
type: object  
SourcePath  
The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under `/dev`.  
type: string  
GroupOwnerSetting  
Group owner related settings for local resources.  
type: object  
AutoAddGroupOwner  
If true, AWS IoT Greengrass adds the specified Linux OS group owner of the resource to the Lambda process privileges. The Lambda process then has the file access permissions of the added Linux group.  
type: boolean  
GroupOwner  
The name of the Linux OS group whose privileges are added to the Lambda process. This field is optional.  
type: string  
LocalVolumeResourceData  
Attributes that define a local volume resource.  
type: object  
SourcePath  
The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with `/sys`.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
GroupOwnerSetting  
Group owner related settings for local resources.  
type: object  
AutoAddGroupOwner  
If true, AWS IoT Greengrass adds the specified Linux OS group owner of the resource to the Lambda process privileges. The Lambda process then has the file access permissions of the added Linux group.  
type: boolean  
GroupOwner  
The name of the Linux OS group whose privileges are added to the Lambda process. This field is optional.  
type: string  
SageMakerMachineLearningModelResourceData  
Attributes that define an Amazon SageMaker machine learning resource.  
type: object  
SageMakerJobArn  
The ARN of the Amazon SageMaker training job that represents the source model.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
OwnerSetting  
The owner setting for the downloaded machine learning resource.  
type: object  
required: ["GroupOwner", "GroupPermission"]  
GroupOwner  
The group owner of the resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
type: string  
GroupPermission  
The permissions that the group owner has to the resource. Valid values are `rw` (read-write) or `ro` (read-only).  
type: string  
enum: ["ro", "rw"]  
S3MachineLearningModelResourceData  
Attributes that define an Amazon S3 machine learning resource.  
type: object  
S3Uri  
The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.  
type: string  
DestinationPath  
The absolute local path of the resource inside the Lambda environment.  
type: string  
OwnerSetting  
The owner setting for the downloaded machine learning resource.  
type: object  
required: ["GroupOwner", "GroupPermission"]  
GroupOwner  
The group owner of the resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
type: string  
GroupPermission  
The permissions that the group owner has to the resource. Valid values are `rw` (read-write) or `ro` (read-only).  
type: string  
enum: ["ro", "rw"]  
SecretsManagerSecretResourceData  
Attributes that define a secret resource, which references a secret from AWS Secrets Manager. AWS IoT Greengrass stores a local, encrypted copy of the secret on the Greengrass core, where it can be securely accessed by connectors and Lambda functions.  
type: object  
ARN  
The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the `AWSCURRENT` staging label) is included by default.  
type: string  
AdditionalStagingLabelsToDownload  
Optional. The staging labels in addition to `AWSCURRENT` whose values you want to make available on the core.  
type: array  


**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/subscriptions
<a name="-greengrass-definition-subscriptions"></a>

## GET
<a name="-greengrass-definition-subscriptions-get"></a>

 `GET /greengrass/definition/subscriptions`

Operation ID: [ListSubscriptionDefinitions](listsubscriptiondefinitions-get.md)

Retrieves a list of subscription definitions.

Produces: application/json

### Query Parameters
<a name="-greengrass-definition-subscriptions-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-subscriptions-get-cli"></a>

```
aws greengrass list-subscription-definitions \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-get-responses"></a>

**200** (ListSubscriptionDefinitionsResponse)  
  
 [ ListDefinitionsResponse](definitions-listdefinitionsresponse.md)   

```
{
"Definitions": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "tags": {
      "additionalProperty0": "string",
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListDefinitionsResponse  
A list of definitions.  
type: object  
Definitions  
Information about a definition.  
type: array  
items: [DefinitionInformation](definitions-definitioninformation.md)  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-definition-subscriptions-post"></a>

 `POST /greengrass/definition/subscriptions`

Operation ID: [CreateSubscriptionDefinition](createsubscriptiondefinition-post.md)

Creates a subscription definition. You can provide the initial version of the subscription definition now or use `CreateSubscriptionDefinitionVersion` later.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-subscriptions-post-body"></a>

[**CreateSubscriptionDefinitionRequestBody**](parameters-createsubscriptiondefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "Subscriptions": [
    {
      "Id": "string",
      "Source": "string",
      "Subject": "string",
      "Target": "string"
    }
  ]
},
"tags": {
  "keyName0": "string",
  "keyName1": "string",
  "keyName2": "string"
}
}
```  
Name  
The name of the subscription definition.  
type: string  
InitialVersion  
Information about a subscription definition version.  
type: object  
Subscriptions  
A list of subscriptions.  
type: array  
items: [Subscription](definitions-subscription.md)  
Subscription  
Information about a subscription.  
type: object  
required: ["Id", "Source", "Subject", "Target"]  
Id  
A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
Source  
The source of the subscription. Can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, 'cloud' (which represents AWS IoT), or 'GGShadowService'. If you specify a Lambda function, this ARN should match the ARN used to add the function to the Greengrass group.  
type: string  
Subject  
The MQTT topic used to route the message.  
type: string  
Target  
Where the message is sent. Can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, 'cloud' (which represents AWS IoT), or 'GGShadowService'. If you specify a Lambda function, this ARN should match the ARN used to add the function to the Greengrass group.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-definition-subscriptions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-definition-subscriptions-post-cli"></a>

```
aws greengrass create-subscription-definition \
  [--name <value>] \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "Subscriptions": [
    {
      "Id": "string",
      "Source": "string",
      "Subject": "string",
      "Target": "string"
    }
  ]
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-post-responses"></a>

**200** (CreateSubscriptionDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/subscriptions/SubscriptionDefinitionId
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid"></a>

## GET
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-get"></a>

 `GET /greengrass/definition/subscriptions/SubscriptionDefinitionId`

Operation ID: [GetSubscriptionDefinition](getsubscriptiondefinition-get.md)

Retrieves information about a subscription definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-get-path"></a>

[**SubscriptionDefinitionId**](parameters-subscriptiondefinitionidparam.md)  
The ID of the subscription definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-get-cli"></a>

```
aws greengrass get-subscription-definition \
  --subscription-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"SubscriptionDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-get-responses"></a>

**200** (GetSubscriptionDefinitionResponse)  
  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-delete"></a>

 `DELETE /greengrass/definition/subscriptions/SubscriptionDefinitionId`

Operation ID: [DeleteSubscriptionDefinition](deletesubscriptiondefinition-delete.md)

Deletes a subscription definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-delete-path"></a>

[**SubscriptionDefinitionId**](parameters-subscriptiondefinitionidparam.md)  
The ID of the subscription definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-delete-cli"></a>

```
aws greengrass delete-subscription-definition \
  --subscription-definition-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"SubscriptionDefinitionId": "string"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-put"></a>

 `PUT /greengrass/definition/subscriptions/SubscriptionDefinitionId`

Operation ID: [UpdateSubscriptionDefinition](updatesubscriptiondefinition-put.md)

Updates the name of a subscription definition. To update the list of available subscriptions, use `CreateSubscriptionDefinitionVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-put-path"></a>

[**SubscriptionDefinitionId**](parameters-subscriptiondefinitionidparam.md)  
The ID of the subscription definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-put-cli"></a>

```
aws greengrass update-subscription-definition \
  --subscription-definition-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"SubscriptionDefinitionId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/subscriptions/SubscriptionDefinitionId/versions
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions"></a>

## POST
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-post"></a>

 `POST /greengrass/definition/subscriptions/SubscriptionDefinitionId/versions`

Operation ID: [CreateSubscriptionDefinitionVersion](createsubscriptiondefinitionversion-post.md)

Creates a version of a subscription definition that has already been defined.

Produces: application/json

### Body Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-post-body"></a>

[**CreateSubscriptionDefinitionVersionRequestBody**](parameters-createsubscriptiondefinitionversionrequestbody.md)  
  
where used: body; required: true  

```
{
"Subscriptions": [
  {
    "Id": "string",
    "Source": "string",
    "Subject": "string",
    "Target": "string"
  }
]
}
```  
SubscriptionDefinitionVersion  
Information about a subscription definition version.  
type: object  
Subscriptions  
A list of subscriptions.  
type: array  
items: [Subscription](definitions-subscription.md)  
Subscription  
Information about a subscription.  
type: object  
required: ["Id", "Source", "Subject", "Target"]  
Id  
A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
Source  
The source of the subscription. Can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, 'cloud' (which represents AWS IoT), or 'GGShadowService'. If you specify a Lambda function, this ARN should match the ARN used to add the function to the Greengrass group.  
type: string  
Subject  
The MQTT topic used to route the message.  
type: string  
Target  
Where the message is sent. Can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, 'cloud' (which represents AWS IoT), or 'GGShadowService'. If you specify a Lambda function, this ARN should match the ARN used to add the function to the Greengrass group.  
type: string

### Header Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-post-path"></a>

[**SubscriptionDefinitionId**](parameters-subscriptiondefinitionidparam.md)  
The ID of the subscription definition.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-post-cli"></a>

```
aws greengrass create-subscription-definition-version \
  --subscription-definition-id <value> \
  [--subscriptions <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"SubscriptionDefinitionId": "string",
"Subscriptions": [
  {
    "Id": "string",
    "Source": "string",
    "Subject": "string",
    "Target": "string"
  }
],
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-post-responses"></a>

**200** (CreateSubscriptionDefinitionVersionResponse)  
  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-get"></a>

 `GET /greengrass/definition/subscriptions/SubscriptionDefinitionId/versions`

Operation ID: [ListSubscriptionDefinitionVersions](listsubscriptiondefinitionversions-get.md)

Lists the versions of a subscription definition.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-get-path"></a>

[**SubscriptionDefinitionId**](parameters-subscriptiondefinitionidparam.md)  
The ID of the subscription definition.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-get-cli"></a>

```
aws greengrass list-subscription-definition-versions \
  --subscription-definition-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"SubscriptionDefinitionId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-get-responses"></a>

**200** (ListSubscriptionDefinitionVersionsResponse)  
  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/definition/subscriptions/SubscriptionDefinitionId/versions/SubscriptionDefinitionVersionId
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-subscriptiondefinitionversionid"></a>

## GET
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-subscriptiondefinitionversionid-get"></a>

 `GET /greengrass/definition/subscriptions/SubscriptionDefinitionId/versions/SubscriptionDefinitionVersionId`

Operation ID: [GetSubscriptionDefinitionVersion](getsubscriptiondefinitionversion-get.md)

Retrieves information about a subscription definition version.

Produces: application/json

### Path Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-subscriptiondefinitionversionid-get-path"></a>

[**SubscriptionDefinitionId**](parameters-subscriptiondefinitionidparam.md)  
The ID of the subscription definition.  
where used: path; required: true  
type: string

[**SubscriptionDefinitionVersionId**](parameters-subscriptiondefinitionversionidparam.md)  
The ID of the subscription definition version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListSubscriptionDefinitionVersions` requests. If the version is the last one that was associated with a subscription definition, the value also maps to the `LatestVersion` property of the corresponding `DefinitionInformation` object.   
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-subscriptiondefinitionversionid-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-subscriptiondefinitionversionid-get-cli"></a>

```
aws greengrass get-subscription-definition-version \
  --subscription-definition-id <value> \
  --subscription-definition-version-id <value> \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"SubscriptionDefinitionId": "string",
"SubscriptionDefinitionVersionId": "string",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-definition-subscriptions-subscriptiondefinitionid-versions-subscriptiondefinitionversionid-get-responses"></a>

**200** (GetSubscriptionDefinitionVersionResponse)  
  
 [ GetSubscriptionDefinitionVersionResponse](definitions-getsubscriptiondefinitionversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "Subscriptions": [
    {
      "Id": "string",
      "Source": "string",
      "Subject": "string",
      "Target": "string"
    }
  ]
},
"NextToken": "string"
}
```  
GetSubscriptionDefinitionVersionResponse  
Information about a subscription definition version.  
type: object  
Arn  
The ARN of the subscription definition version.  
type: string  
Id  
The ID of the subscription definition version.  
type: string  
Version  
The version of the subscription definition version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the subscription definition version was created.  
type: string  
Definition  
Information about a subscription definition version.  
type: object  
Subscriptions  
A list of subscriptions.  
type: array  
items: [Subscription](definitions-subscription.md)  
Subscription  
Information about a subscription.  
type: object  
required: ["Id", "Source", "Subject", "Target"]  
Id  
A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription definition version. Maximum length is 128 characters with the pattern `[a‑zA‑Z0‑9:_‑]+`.  
type: string  
Source  
The source of the subscription. Can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, 'cloud' (which represents AWS IoT), or 'GGShadowService'. If you specify a Lambda function, this ARN should match the ARN used to add the function to the Greengrass group.  
type: string  
Subject  
The MQTT topic used to route the message.  
type: string  
Target  
Where the message is sent. Can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, 'cloud' (which represents AWS IoT), or 'GGShadowService'. If you specify a Lambda function, this ARN should match the ARN used to add the function to the Greengrass group.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups
<a name="-greengrass-groups"></a>

## GET
<a name="-greengrass-groups-get"></a>

 `GET /greengrass/groups`

Operation ID: [ListGroups](listgroups-get.md)

Retrieves a list of groups.

Produces: application/json

### Query Parameters
<a name="-greengrass-groups-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-groups-get-cli"></a>

```
aws greengrass list-groups \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-groups-get-responses"></a>

**200** (ListGroupsResponse)  
  
 [ ListGroupsResponse](definitions-listgroupsresponse.md)   

```
{
"Groups": [
  {
    "Name": "string",
    "Id": "string",
    "Arn": "string",
    "LastUpdatedTimestamp": "string",
    "CreationTimestamp": "string",
    "LatestVersion": "string",
    "LatestVersionArn": "string"
  }
],
"NextToken": "string"
}
```  
ListGroupsResponse  
type: object  
Groups  
Information about a group.  
type: array  
items: [GroupInformation](definitions-groupinformation.md)  
GroupInformation  
Information about a group.  
type: object  
Name  
The name of the group.  
type: string  
Id  
The ID of the group.  
type: string  
Arn  
The ARN of the group.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the group was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the group was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the group.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the group.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

## POST
<a name="-greengrass-groups-post"></a>

 `POST /greengrass/groups`

Operation ID: [CreateGroup](creategroup-post.md)

Creates a group. You can provide the initial version of the group or use `CreateGroupVersion` later. Tip: You can use the `gg_group_setup` package (https://github.com/awslabs/aws-greengrass-group-setup) as a library or command-line application to create and deploy Greengrass groups. 

Produces: application/json

### Body Parameters
<a name="-greengrass-groups-post-body"></a>

[**CreateGroupRequestBody**](parameters-creategrouprequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string",
"InitialVersion": {
  "CoreDefinitionVersionArn": "string",
  "DeviceDefinitionVersionArn": "string",
  "FunctionDefinitionVersionArn": "string",
  "SubscriptionDefinitionVersionArn": "string",
  "LoggerDefinitionVersionArn": "string",
  "ResourceDefinitionVersionArn": "string",
  "ConnectorDefinitionVersionArn": "string"
},
"tags": {
  "keyName0": "string",
  "keyName1": "string",
  "keyName2": "string"
}
}
```  
Name  
The name of the group.  
type: string  
InitialVersion  
Information about a group version.  
type: object  
CoreDefinitionVersionArn  
The ARN of the core definition version for this group.  
type: string  
DeviceDefinitionVersionArn  
The ARN of the client device definition version for this group.  
type: string  
FunctionDefinitionVersionArn  
The ARN of the function definition version for this group.  
type: string  
SubscriptionDefinitionVersionArn  
The ARN of the subscription definition version for this group.  
type: string  
LoggerDefinitionVersionArn  
The ARN of the logger definition version for this group.  
type: string  
ResourceDefinitionVersionArn  
The ARN of the resource definition version for this group.  
type: string  
ConnectorDefinitionVersionArn  
The ARN of the connector definition version for this group.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

### Header Parameters
<a name="-greengrass-groups-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-groups-post-cli"></a>

```
aws greengrass create-group \
  --name <value> \
  [--initial-version <value>] \
  [--tags <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"Name": "string",
"InitialVersion": {
  "CoreDefinitionVersionArn": "string",
  "DeviceDefinitionVersionArn": "string",
  "FunctionDefinitionVersionArn": "string",
  "SubscriptionDefinitionVersionArn": "string",
  "LoggerDefinitionVersionArn": "string",
  "ResourceDefinitionVersionArn": "string",
  "ConnectorDefinitionVersionArn": "string"
},
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-groups-post-responses"></a>

**200** (CreateGroupResponse)  
Success. The group was created.  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId
<a name="-greengrass-groups-groupid"></a>

## GET
<a name="-greengrass-groups-groupid-get"></a>

 `GET /greengrass/groups/GroupId`

Operation ID: [GetGroup](getgroup-get.md)

Retrieves information about a group.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-get-cli"></a>

```
aws greengrass get-group \
  --group-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-get-responses"></a>

**200** (GetGroupResponse)  
Success.  
 [ DefinitionInformation](definitions-definitioninformation.md)   

```
{
"Name": "string",
"Id": "string",
"Arn": "string",
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
},
"LastUpdatedTimestamp": "string",
"CreationTimestamp": "string",
"LatestVersion": "string",
"LatestVersionArn": "string"
}
```  
DefinitionInformation  
Information about a definition.  
type: object  
Name  
The name of the definition.  
type: string  
Id  
The ID of the definition.  
type: string  
Arn  
The ARN of the definition.  
type: string  
tags  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string  
LastUpdatedTimestamp  
The time, in milliseconds since the epoch, when the definition was last updated.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the definition was created.  
type: string  
LatestVersion  
The ID of the latest version associated with the definition.  
type: string  
LatestVersionArn  
The ARN of the latest version associated with the definition.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-groups-groupid-delete"></a>

 `DELETE /greengrass/groups/GroupId`

Operation ID: [DeleteGroup](deletegroup-delete.md)

Deletes a group.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-delete-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-delete-cli"></a>

```
aws greengrass delete-group \
  --group-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-delete-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-groups-groupid-put"></a>

 `PUT /greengrass/groups/GroupId`

Operation ID: [UpdateGroup](updategroup-put.md)

Updates the name of a group. To update group components, use `CreateGroupVersion`.

Produces: application/json

### Body Parameters
<a name="-greengrass-groups-groupid-put-body"></a>

[**UpdateDefinitionRequestBody**](parameters-updatedefinitionrequestbody.md)  
  
where used: body; required: true  

```
{
"Name": "string"
}
```  
Name  
The name of the definition.  
required: true  
type: string

### Path Parameters
<a name="-greengrass-groups-groupid-put-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-put-cli"></a>

```
aws greengrass update-group \
  --group-id <value> \
  [--name <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"Name": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-put-responses"></a>

**200**  
Success.  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/certificateauthorities
<a name="-greengrass-groups-groupid-certificateauthorities"></a>

## GET
<a name="-greengrass-groups-groupid-certificateauthorities-get"></a>

 `GET /greengrass/groups/GroupId/certificateauthorities`

Operation ID: [ListGroupCertificateAuthorities](listgroupcertificateauthorities-get.md)

Retrieves the current CAs for a group.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-certificateauthorities-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-certificateauthorities-get-cli"></a>

```
aws greengrass list-group-certificate-authorities \
  --group-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-certificateauthorities-get-responses"></a>

**200**  
Success. The response body contains the PKI configuration.  
 [ ListGroupCertificateAuthoritiesResponse](definitions-listgroupcertificateauthoritiesresponse.md)   

```
{
"GroupCertificateAuthorities": [
  {
    "GroupCertificateAuthorityId": "string",
    "GroupCertificateAuthorityArn": "string"
  }
]
}
```  
ListGroupCertificateAuthoritiesResponse  
type: object  
GroupCertificateAuthorities  
A list of certificate authorities associated with the group.  
type: array  
items: [GroupCertificateAuthorityProperties](definitions-groupcertificateauthorityproperties.md)  
Group Certificate Authority Properties  
Information about a certificate authority for a group.  
type: object  
GroupCertificateAuthorityId  
The ID of the certificate authority for the group.  
type: string  
GroupCertificateAuthorityArn  
The ARN of the certificate authority for the group.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## POST
<a name="-greengrass-groups-groupid-certificateauthorities-post"></a>

 `POST /greengrass/groups/GroupId/certificateauthorities`

Operation ID: [CreateGroupCertificateAuthority](creategroupcertificateauthority-post.md)

Creates a CA for the group. If a CA already exists, it rotates the existing CA.

Produces: application/json

### Header Parameters
<a name="-greengrass-groups-groupid-certificateauthorities-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-groups-groupid-certificateauthorities-post-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-certificateauthorities-post-cli"></a>

```
aws greengrass create-group-certificate-authority \
  --group-id <value> \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-certificateauthorities-post-responses"></a>

**200**  
Success. The response body contains the new, active CA ARN.  
 [ CreateGroupCertificateAuthorityResponse](definitions-creategroupcertificateauthorityresponse.md)   

```
{
"GroupCertificateAuthorityArn": "string"
}
```  
CreateGroupCertificateAuthorityResponse  
type: object  
GroupCertificateAuthorityArn  
The ARN of the group certificate authority.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/certificateauthorities/configuration/expiry
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry"></a>

## GET
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-get"></a>

 `GET /greengrass/groups/GroupId/certificateauthorities/configuration/expiry`

Operation ID: [GetGroupCertificateConfiguration](getgroupcertificateconfiguration-get.md)

Retrieves the current configuration for the CA used by the group.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-get-cli"></a>

```
aws greengrass get-group-certificate-configuration \
  --group-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-get-responses"></a>

**200**  
Success. The response body contains the PKI configuration.  
 [ GroupCertificateConfiguration](definitions-groupcertificateconfiguration.md)   

```
{
"GroupId": "string",
"CertificateAuthorityExpiryInMilliseconds": "string",
"CertificateExpiryInMilliseconds": "string"
}
```  
GroupCertificateConfiguration  
Information about a group certificate configuration.  
type: object  
GroupId  
The ID of the group certificate configuration.  
type: string  
CertificateAuthorityExpiryInMilliseconds  
The amount of time, in milliseconds, before the certificate authority expires.  
type: string  
CertificateExpiryInMilliseconds  
The amount of time, in milliseconds, before the certificate expires.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-put"></a>

 `PUT /greengrass/groups/GroupId/certificateauthorities/configuration/expiry`

Operation ID: [UpdateGroupCertificateConfiguration](updategroupcertificateconfiguration-put.md)

Updates the certificate expiry time for a group.

Produces: application/json

### Body Parameters
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-put-body"></a>

[**UpdateGroupCertificateConfigurationRequestBody**](parameters-updategroupcertificateconfigurationrequestbody.md)  
  
where used: body; required: true  

```
{
"CertificateExpiryInMilliseconds": "string"
}
```  
updateGroupCertificateConfigurationRequest  
type: object  
required: ["CertificateExpiryInMilliseconds"]  
CertificateExpiryInMilliseconds  
The amount of time, in milliseconds, before the certificate expires.  
type: string

### Path Parameters
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-put-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-put-cli"></a>

```
aws greengrass update-group-certificate-configuration \
  --group-id <value> \
  [--certificate-expiry-in-milliseconds <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"CertificateExpiryInMilliseconds": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-certificateauthorities-configuration-expiry-put-responses"></a>

**200**  
Success. The response body contains the PKI configuration.  
 [ GroupCertificateConfiguration](definitions-groupcertificateconfiguration.md)   

```
{
"GroupId": "string",
"CertificateAuthorityExpiryInMilliseconds": "string",
"CertificateExpiryInMilliseconds": "string"
}
```  
GroupCertificateConfiguration  
Information about a group certificate configuration.  
type: object  
GroupId  
The ID of the group certificate configuration.  
type: string  
CertificateAuthorityExpiryInMilliseconds  
The amount of time, in milliseconds, before the certificate authority expires.  
type: string  
CertificateExpiryInMilliseconds  
The amount of time, in milliseconds, before the certificate expires.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/certificateauthorities/CertificateAuthorityId
<a name="-greengrass-groups-groupid-certificateauthorities-certificateauthorityid"></a>

## GET
<a name="-greengrass-groups-groupid-certificateauthorities-certificateauthorityid-get"></a>

 `GET /greengrass/groups/GroupId/certificateauthorities/CertificateAuthorityId`

Operation ID: [GetGroupCertificateAuthority](getgroupcertificateauthority-get.md)

Retreives the CA associated with a group. Returns the public key of the CA.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-certificateauthorities-certificateauthorityid-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

[**CertificateAuthorityId**](parameters-certificateauthorityidparam.md)  
The ID of the certificate authority.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-certificateauthorities-certificateauthorityid-get-cli"></a>

```
aws greengrass get-group-certificate-authority \
  --group-id <value> \
  --certificate-authority-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"CertificateAuthorityId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-certificateauthorities-certificateauthorityid-get-responses"></a>

**200**  
Success. The response body contains the PKI configuration.  
 [ GetGroupCertificateAuthorityResponse](definitions-getgroupcertificateauthorityresponse.md)   

```
{
"PemEncodedCertificate": "string",
"GroupCertificateAuthorityArn": "string",
"GroupCertificateAuthorityId": "string"
}
```  
GetGroupCertificateAuthorityResponse  
Information about a certificate authority for a group.  
type: object  
PemEncodedCertificate  
The PEM encoded certificate for the group.  
type: string  
GroupCertificateAuthorityArn  
The ARN of the certificate authority for the group.  
type: string  
GroupCertificateAuthorityId  
The ID of the certificate authority for the group.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/deployments
<a name="-greengrass-groups-groupid-deployments"></a>

## POST
<a name="-greengrass-groups-groupid-deployments-post"></a>

 `POST /greengrass/groups/GroupId/deployments`

Operation ID: [CreateDeployment](createdeployment-post.md)

Creates a deployment. `CreateDeployment` requests are idempotent with respect to the `X-Amzn-Client-Token` token and the request parameters. 

Produces: application/json

### Body Parameters
<a name="-greengrass-groups-groupid-deployments-post-body"></a>

[**CreateDeploymentRequestBody**](parameters-createdeploymentrequestbody.md)  
  
where used: body; required: true  

```
{
"DeploymentType": "NewDeployment|Redeployment|ResetDeployment|ForceResetDeployment",
"DeploymentId": "string",
"GroupVersionId": "string"
}
```  
CreateDeploymentRequest  
Information about a deployment.  
type: object  
required: ["DeploymentType"]  
DeploymentType  
The type of deployment. When used for `CreateDeployment`, only `NewDeployment` and `Redeployment` are valid.   
type: string  
enum: ["NewDeployment", "Redeployment", "ResetDeployment", "ForceResetDeployment"]  
DeploymentId  
The ID of the previous deployment you want to redeploy.  
type: string  
GroupVersionId  
The ID of the group version to be deployed.  
type: string

### Header Parameters
<a name="-greengrass-groups-groupid-deployments-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-groups-groupid-deployments-post-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-deployments-post-cli"></a>

```
aws greengrass create-deployment \
  --group-id <value> \
  [--deployment-type <value>] \
  [--deployment-id <value>] \
  [--group-version-id <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"DeploymentType": "NewDeployment|Redeployment|ResetDeployment|ForceResetDeployment",
"DeploymentId": "string",
"GroupVersionId": "string",
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-deployments-post-responses"></a>

**200**  
Success. The group was deployed.  
 [ CreateDeploymentResponse](definitions-createdeploymentresponse.md)   

```
{
"DeploymentArn": "string",
"DeploymentId": "string"
}
```  
CreateDeploymentResponse  
type: object  
DeploymentArn  
The ARN of the deployment.  
type: string  
DeploymentId  
The ID of the deployment.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-groups-groupid-deployments-get"></a>

 `GET /greengrass/groups/GroupId/deployments`

Operation ID: [ListDeployments](listdeployments-get.md)

Returns a history of deployments for the group.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-deployments-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-groups-groupid-deployments-get-query"></a>

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

### CLI
<a name="-greengrass-groups-groupid-deployments-get-cli"></a>

```
aws greengrass list-deployments \
  --group-id <value> \
  [--max-results <value>] \
  [--next-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"MaxResults": "integer",
"NextToken": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-deployments-get-responses"></a>

**200**  
Success. The response body contains the list of deployments for the given group.  
 [ ListDeploymentsResponse](definitions-listdeploymentsresponse.md)   

```
{
"Deployments": [
  {
    "GroupArn": "string",
    "DeploymentId": "string",
    "DeploymentArn": "string",
    "DeploymentType": "NewDeployment|Redeployment|ResetDeployment|ForceResetDeployment",
    "CreatedAt": "string"
  }
],
"NextToken": "string"
}
```  
ListDeploymentsResponse  
type: object  
Deployments  
type: array  
items: [Deployment](definitions-deployment.md)  
Deployment  
Information about a deployment.  
type: object  
GroupArn  
The ARN of the group for this deployment.  
type: string  
DeploymentId  
The ID of the deployment.  
type: string  
DeploymentArn  
The ARN of the deployment.  
type: string  
DeploymentType  
The type of deployment. When used for `CreateDeployment`, only `NewDeployment` and `Redeployment` are valid.   
type: string  
enum: ["NewDeployment", "Redeployment", "ResetDeployment", "ForceResetDeployment"]  
CreatedAt  
The time, in milliseconds since the epoch, when the deployment was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
in: query  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/deployments/\$1reset
<a name="-greengrass-groups-groupid-deployments-reset"></a>

## POST
<a name="-greengrass-groups-groupid-deployments-reset-post"></a>

 `POST /greengrass/groups/GroupId/deployments/$reset`

Operation ID: [ResetDeployments](resetdeployments-post.md)

Resets a group's deployments.

Produces: application/json

### Body Parameters
<a name="-greengrass-groups-groupid-deployments-reset-post-body"></a>

[**ResetDeploymentsRequestBody**](parameters-resetdeploymentsrequestbody.md)  
Information required to reset deployments.  
where used: body; required: true  

```
{
"Force": true
}
```  
ResetDeploymentsRequest  
Information about a group reset request.  
type: object  
Force  
If true, performs a best-effort only core reset.  
type: boolean

### Header Parameters
<a name="-greengrass-groups-groupid-deployments-reset-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-groups-groupid-deployments-reset-post-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-deployments-reset-post-cli"></a>

```
aws greengrass reset-deployments \
  --group-id <value> \
  [--force | --no-force] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"Force": "boolean",
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-deployments-reset-post-responses"></a>

**200**  
Success. The group's deployments were reset.  
 [ ResetDeploymentsResponse](definitions-resetdeploymentsresponse.md)   

```
{
"DeploymentArn": "string",
"DeploymentId": "string"
}
```  
ResetDeploymentsResponse  
type: object  
DeploymentArn  
The ARN of the deployment.  
type: string  
DeploymentId  
The ID of the deployment.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/deployments/DeploymentId/status
<a name="-greengrass-groups-groupid-deployments-deploymentid-status"></a>

## GET
<a name="-greengrass-groups-groupid-deployments-deploymentid-status-get"></a>

 `GET /greengrass/groups/GroupId/deployments/DeploymentId/status`

Operation ID: [GetDeploymentStatus](getdeploymentstatus-get.md)

Returns the status of a deployment.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-deployments-deploymentid-status-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

[**DeploymentId**](parameters-deploymentidparam.md)  
The ID of the deployment.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-deployments-deploymentid-status-get-cli"></a>

```
aws greengrass get-deployment-status \
  --group-id <value> \
  --deployment-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"DeploymentId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-deployments-deploymentid-status-get-responses"></a>

**200**  
Success. The response body contains the status of the deployment for the group.  
 [ GetDeploymentStatusResponse](definitions-getdeploymentstatusresponse.md)   

```
{
"DeploymentStatus": "string",
"DeploymentType": "NewDeployment|Redeployment|ResetDeployment|ForceResetDeployment",
"UpdatedAt": "string",
"ErrorMessage": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GetDeploymentStatusResponse  
Information about the status of a deployment for a group.  
type: object  
DeploymentStatus  
The status of the deployment: `Building`, `InProgress`, `Success`, or `Failure`.   
type: string  
DeploymentType  
The type of deployment. When used for `CreateDeployment`, only `NewDeployment` and `Redeployment` are valid.   
type: string  
enum: ["NewDeployment", "Redeployment", "ResetDeployment", "ForceResetDeployment"]  
UpdatedAt  
The time, in milliseconds since the epoch, when the deployment status was updated.  
type: string  
ErrorMessage  
Error message  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/role
<a name="-greengrass-groups-groupid-role"></a>

## PUT
<a name="-greengrass-groups-groupid-role-put"></a>

 `PUT /greengrass/groups/GroupId/role`

Operation ID: [AssociateRoleToGroup](associateroletogroup-put.md)

Associates a role with a group. Your Greengrass core uses the role to access AWS services. The role's permissions should allow Greengrass Lambda functions and connectors to perform actions against the cloud.

### Body Parameters
<a name="-greengrass-groups-groupid-role-put-body"></a>

[**AssociateRoleToGroupRequestBody**](parameters-associateroletogrouprequestbody.md)  
  
where used: body; required: true  

```
{
"RoleArn": "string"
}
```  
AssociateRoleToGroupRequest  
type: object  
required: ["RoleArn"]  
RoleArn  
The ARN of the role to associate with this group.  
type: string

### Path Parameters
<a name="-greengrass-groups-groupid-role-put-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-role-put-cli"></a>

```
aws greengrass associate-role-to-group \
  --group-id <value> \
  [--role-arn <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"RoleArn": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-role-put-responses"></a>

**200**  
Success.  
 [ AssociateRoleToGroupResponse](definitions-associateroletogroupresponse.md)   

```
{
"AssociatedAt": "string"
}
```  
Group  
type: object  
AssociatedAt  
The time, in milliseconds since the epoch, when the role ARN was associated with the group.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-groups-groupid-role-delete"></a>

 `DELETE /greengrass/groups/GroupId/role`

Operation ID: [DisassociateRoleFromGroup](disassociaterolefromgroup-delete.md)

Disassociates the role from a group.

### Path Parameters
<a name="-greengrass-groups-groupid-role-delete-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-role-delete-cli"></a>

```
aws greengrass disassociate-role-from-group \
  --group-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-role-delete-responses"></a>

**200**  
Success.  
 [ DisassociateRoleFromGroupResponse](definitions-disassociaterolefromgroupresponse.md)   

```
{
"DisassociatedAt": "string"
}
```  
DisassociateRoleFromGroupResponse  
type: object  
DisassociatedAt  
The time, in milliseconds since the epoch, when the role was disassociated from the group.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-groups-groupid-role-get"></a>

 `GET /greengrass/groups/GroupId/role`

Operation ID: [GetAssociatedRole](getassociatedrole-get.md)

Retrieves the role associated with a group.

### Path Parameters
<a name="-greengrass-groups-groupid-role-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-role-get-cli"></a>

```
aws greengrass get-associated-role \
  --group-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-role-get-responses"></a>

**200**  
Success.  
 [ GetAssociatedRoleResponse](definitions-getassociatedroleresponse.md)   

```
{
"AssociatedAt": "string",
"RoleArn": "string"
}
```  
GetAssociatedRoleResponse  
type: object  
AssociatedAt  
The time when the role was associated with the group.  
type: string  
RoleArn  
The ARN of the role that is associated with the group.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/versions
<a name="-greengrass-groups-groupid-versions"></a>

## POST
<a name="-greengrass-groups-groupid-versions-post"></a>

 `POST /greengrass/groups/GroupId/versions`

Operation ID: [CreateGroupVersion](creategroupversion-post.md)

Creates a version of a group that has already been defined.

Produces: application/json

### Body Parameters
<a name="-greengrass-groups-groupid-versions-post-body"></a>

[**CreateGroupVersionRequestBody**](parameters-creategroupversionrequestbody.md)  
  
where used: body; required: true  

```
{
"CoreDefinitionVersionArn": "string",
"DeviceDefinitionVersionArn": "string",
"FunctionDefinitionVersionArn": "string",
"SubscriptionDefinitionVersionArn": "string",
"LoggerDefinitionVersionArn": "string",
"ResourceDefinitionVersionArn": "string",
"ConnectorDefinitionVersionArn": "string"
}
```  
GroupVersion  
Information about a group version.  
type: object  
CoreDefinitionVersionArn  
The ARN of the core definition version for this group.  
type: string  
DeviceDefinitionVersionArn  
The ARN of the client device definition version for this group.  
type: string  
FunctionDefinitionVersionArn  
The ARN of the function definition version for this group.  
type: string  
SubscriptionDefinitionVersionArn  
The ARN of the subscription definition version for this group.  
type: string  
LoggerDefinitionVersionArn  
The ARN of the logger definition version for this group.  
type: string  
ResourceDefinitionVersionArn  
The ARN of the resource definition version for this group.  
type: string  
ConnectorDefinitionVersionArn  
The ARN of the connector definition version for this group.  
type: string

### Header Parameters
<a name="-greengrass-groups-groupid-versions-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### Path Parameters
<a name="-greengrass-groups-groupid-versions-post-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-versions-post-cli"></a>

```
aws greengrass create-group-version \
  --group-id <value> \
  [--core-definition-version-arn <value>] \
  [--device-definition-version-arn <value>] \
  [--function-definition-version-arn <value>] \
  [--subscription-definition-version-arn <value>] \
  [--logger-definition-version-arn <value>] \
  [--resource-definition-version-arn <value>] \
  [--connector-definition-version-arn <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"CoreDefinitionVersionArn": "string",
"DeviceDefinitionVersionArn": "string",
"FunctionDefinitionVersionArn": "string",
"SubscriptionDefinitionVersionArn": "string",
"LoggerDefinitionVersionArn": "string",
"ResourceDefinitionVersionArn": "string",
"ConnectorDefinitionVersionArn": "string",
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-versions-post-responses"></a>

**200** (CreateGroupVersionResponse)  
Success. The response contains information about the group version.  
 [ VersionInformation](definitions-versioninformation.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string"
}
```  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-groups-groupid-versions-get"></a>

 `GET /greengrass/groups/GroupId/versions`

Operation ID: [ListGroupVersions](listgroupversions-get.md)

Lists the versions of a group.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-versions-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

### Query Parameters
<a name="-greengrass-groups-groupid-versions-get-query"></a>

[**NextToken**](parameters-nexttokenparam.md)  
The token for the next set of results, or `null` if there are no more results.  
where used: query; required: false  
type: string

[**MaxResults**](parameters-maxresultsparam.md)  
The maximum number of results to be returned per request.  
where used: query; required: false  
type: integer

### CLI
<a name="-greengrass-groups-groupid-versions-get-cli"></a>

```
aws greengrass list-group-versions \
  --group-id <value> \
  [--next-token <value>] \
  [--max-results <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"NextToken": "string",
"MaxResults": "integer"
}
```

### Responses
<a name="-greengrass-groups-groupid-versions-get-responses"></a>

**200** (ListGroupVersionsResponse)  
Success. The response contains the list of versions and metadata for the given group.  
 [ ListVersionsResponse](definitions-listversionsresponse.md)   

```
{
"Versions": [
  {
    "Arn": "string",
    "Id": "string",
    "Version": "string",
    "CreationTimestamp": "string"
  }
],
"NextToken": "string"
}
```  
ListVersionsResponse  
A list of versions.  
type: object  
Versions  
Information about a version.  
type: array  
items: [VersionInformation](definitions-versioninformation.md)  
VersionInformation  
Information about a version.  
type: object  
Arn  
The ARN of the version.  
type: string  
Id  
The ID of the parent definition that the version is associated with.  
type: string  
Version  
The ID of the version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the version was created.  
type: string  
NextToken  
The token for the next set of results, or `null` if there are no more results.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/groups/GroupId/versions/GroupVersionId
<a name="-greengrass-groups-groupid-versions-groupversionid"></a>

## GET
<a name="-greengrass-groups-groupid-versions-groupversionid-get"></a>

 `GET /greengrass/groups/GroupId/versions/GroupVersionId`

Operation ID: [GetGroupVersion](getgroupversion-get.md)

Retrieves information about a group version.

Produces: application/json

### Path Parameters
<a name="-greengrass-groups-groupid-versions-groupversionid-get-path"></a>

[**GroupId**](parameters-groupidparam.md)  
The ID of the Greengrass group.  
where used: path; required: true  
type: string

[**GroupVersionId**](parameters-groupversionidparam.md)  
The ID of the group version. This value maps to the `Version` property of the corresponding `VersionInformation` object, which is returned by `ListGroupVersions` requests. If the version is the last one that was associated with a group, the value also maps to the `LatestVersion` property of the corresponding `GroupInformation` object.   
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-groups-groupid-versions-groupversionid-get-cli"></a>

```
aws greengrass get-group-version \
  --group-id <value> \
  --group-version-id <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"GroupId": "string",
"GroupVersionId": "string"
}
```

### Responses
<a name="-greengrass-groups-groupid-versions-groupversionid-get-responses"></a>

**200**  
Success.  
 [ GetGroupVersionResponse](definitions-getgroupversionresponse.md)   

```
{
"Arn": "string",
"Id": "string",
"Version": "string",
"CreationTimestamp": "string",
"Definition": {
  "CoreDefinitionVersionArn": "string",
  "DeviceDefinitionVersionArn": "string",
  "FunctionDefinitionVersionArn": "string",
  "SubscriptionDefinitionVersionArn": "string",
  "LoggerDefinitionVersionArn": "string",
  "ResourceDefinitionVersionArn": "string",
  "ConnectorDefinitionVersionArn": "string"
}
}
```  
GetGroupVersionResponse  
Information about a group version.  
type: object  
Arn  
The ARN of the group version.  
type: string  
Id  
The ID of the group that the version is associated with.  
type: string  
Version  
The ID of the group version.  
type: string  
CreationTimestamp  
The time, in milliseconds since the epoch, when the group version was created.  
type: string  
Definition  
Information about a group version.  
type: object  
CoreDefinitionVersionArn  
The ARN of the core definition version for this group.  
type: string  
DeviceDefinitionVersionArn  
The ARN of the client device definition version for this group.  
type: string  
FunctionDefinitionVersionArn  
The ARN of the function definition version for this group.  
type: string  
SubscriptionDefinitionVersionArn  
The ARN of the subscription definition version for this group.  
type: string  
LoggerDefinitionVersionArn  
The ARN of the logger definition version for this group.  
type: string  
ResourceDefinitionVersionArn  
The ARN of the resource definition version for this group.  
type: string  
ConnectorDefinitionVersionArn  
The ARN of the connector definition version for this group.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/servicerole
<a name="-greengrass-servicerole"></a>

## GET
<a name="-greengrass-servicerole-get"></a>

 `GET /greengrass/servicerole`

Operation ID: [GetServiceRoleForAccount](getserviceroleforaccount-get.md)



Produces: application/json

### CLI
<a name="-greengrass-servicerole-get-cli"></a>

```
aws greengrass get-service-role-for-account  \
    [--cli-input-json <value>] \
    [--generate-cli-skeleton]
```

### Responses
<a name="-greengrass-servicerole-get-responses"></a>

**200**  
Success.  
 [ GetServiceRoleForAccountResponse](definitions-getserviceroleforaccountresponse.md)   

```
{
  "AssociatedAt": "string",
  "RoleArn": "string"
}
```  
GetServiceRoleForAccountResponse  
type: object  
AssociatedAt  
The time when the service role was associated with the account.  
type: string  
RoleArn  
The ARN of the role associated with the account.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
  "Message": "string",
  "ErrorDetails": [
    {
      "DetailedErrorCode": "string",
      "DetailedErrorMessage": "string"
    }
  ]
}
```  
GeneralError  
General error information.  
type: object  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-servicerole-put"></a>

 `PUT /greengrass/servicerole`

Operation ID: [AssociateServiceRoleToAccount](associateserviceroletoaccount-put.md)

Associates a role with your account. AWS IoT Greengrass uses the role to access your Lambda functions and AWS IoT resources. A role is required for deployments to succeed. The role must have at least minimum permissions in the policy `AWSGreengrassResourceAccessRolePolicy`.

### Body Parameters
<a name="-greengrass-servicerole-put-body"></a>

[**AssociateServiceRoleToAccountRequestBody**](parameters-associateserviceroletoaccountrequestbody.md)  
  
where used: body; required: true  

```
{
"RoleArn": "string"
}
```  
AssociateServiceRoleToAccountRequest  
type: object  
required: ["RoleArn"]  
RoleArn  
The ARN of the service role to associate with your account.  
type: string

### CLI
<a name="-greengrass-servicerole-put-cli"></a>

```
aws greengrass associate-service-role-to-account \
  [--role-arn <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"RoleArn": "string"
}
```

### Responses
<a name="-greengrass-servicerole-put-responses"></a>

**200**  
Success.  
 [ AssociateServiceRoleToAccountResponse](definitions-associateserviceroletoaccountresponse.md)   

```
{
"AssociatedAt": "string"
}
```  
AssociateServiceRoleToAccountResponse  
type: object  
AssociatedAt  
The time when the service role was associated with the account.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-greengrass-servicerole-delete"></a>

 `DELETE /greengrass/servicerole`

Operation ID: [DisassociateServiceRoleFromAccount](disassociateservicerolefromaccount-delete.md)

Disassociates the service role from your account. Without a service role, deployments do not work.

### CLI
<a name="-greengrass-servicerole-delete-cli"></a>

```
aws greengrass disassociate-service-role-from-account  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

### Responses
<a name="-greengrass-servicerole-delete-responses"></a>

**200**  
Success.  
 [ DisassociateServiceRoleFromAccountResponse](definitions-disassociateservicerolefromaccountresponse.md)   

```
{
"DisassociatedAt": "string"
}
```  
DisassociateServiceRoleFromAccountResponse  
type: object  
DisassociatedAt  
The time when the service role was disassociated from the account.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## GET
<a name="-greengrass-servicerole-get"></a>

 `GET /greengrass/servicerole`

Operation ID: [GetServiceRoleForAccount](getserviceroleforaccount-get.md)

Retrieves the service role that is attached to your account.

### CLI
<a name="-greengrass-servicerole-get-cli"></a>

```
aws greengrass get-service-role-for-account  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

### Responses
<a name="-greengrass-servicerole-get-responses"></a>

**200**  
Success.  
 [ GetServiceRoleForAccountResponse](definitions-getserviceroleforaccountresponse.md)   

```
{
"AssociatedAt": "string",
"RoleArn": "string"
}
```  
GetServiceRoleForAccountResponse  
type: object  
AssociatedAt  
The time when the service role was associated with the account.  
type: string  
RoleArn  
The ARN of the role associated with the account.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/things/ThingName/connectivityInfo
<a name="-greengrass-things-thingname-connectivityinfo"></a>

## GET
<a name="-greengrass-things-thingname-connectivityinfo-get"></a>

 `GET /greengrass/things/ThingName/connectivityInfo`

Operation ID: [GetConnectivityInfo](getconnectivityinfo-get.md)

Retrieves the connectivity information for a core.

Produces: application/json

### Path Parameters
<a name="-greengrass-things-thingname-connectivityinfo-get-path"></a>

[**ThingName**](parameters-thingnameparam.md)  
The thing name.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-things-thingname-connectivityinfo-get-cli"></a>

```
aws greengrass get-connectivity-info \
  --thing-name <value>  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ThingName": "string"
}
```

### Responses
<a name="-greengrass-things-thingname-connectivityinfo-get-responses"></a>

**200**  
Success.  
 [ GetConnectivityInfoResponse](definitions-getconnectivityinforesponse.md)   

```
{
"message": "string",
"ConnectivityInfo": [
  {
    "Id": "string",
    "HostAddress": "string",
    "PortNumber": 0x01,
    "Metadata": "string"
  }
]
}
```  
  
Information about a Greengrass core's connectivity.  
message  
A message about the connectivity info request.  
type: string  
ConnectivityInfo  
Connectivity info list.  
type: array  
items: [ConnectivityInfo](definitions-connectivityinfo.md)  
  
Information about a Greengrass core's connectivity.  
required: ["Id", "HostAddress"]  
Id  
The ID of the connectivity information.  
type: string  
HostAddress  
The endpoint for the Greengrass core. Can be an IP address or DNS address.  
type: string  
PortNumber  
The port of the Greengrass core, usually 8883.  
type: integer  
format: int32  
Metadata  
Metadata for this endpoint.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-things-thingname-connectivityinfo-put"></a>

 `PUT /greengrass/things/ThingName/connectivityInfo`

Operation ID: [UpdateConnectivityInfo](updateconnectivityinfo-put.md)

Updates the connectivity information for the core. Devices that belong to the group that has this core receive this information to find the location of the core and connect to it.

Produces: application/json

### Body Parameters
<a name="-greengrass-things-thingname-connectivityinfo-put-body"></a>

[**UpdateConnectivityInfoRequestBody**](parameters-updateconnectivityinforequestbody.md)  
The connectivity information.  
where used: body; required:   

```
{
"ConnectivityInfo": [
  {
    "Id": "string",
    "HostAddress": "string",
    "PortNumber": 0x01,
    "Metadata": "string"
  }
]
}
```  
  
Information required to update a Greengrass core's connectivity.  
ConnectivityInfo  
A list of connectivity info.  
type: array  
items: [ConnectivityInfo](definitions-connectivityinfo.md)  
  
Information about a Greengrass core's connectivity.  
required: ["Id", "HostAddress"]  
Id  
The ID of the connectivity information.  
type: string  
HostAddress  
The endpoint for the Greengrass core. Can be an IP address or DNS address.  
type: string  
PortNumber  
The port of the Greengrass core, usually 8883.  
type: integer  
format: int32  
Metadata  
Metadata for this endpoint.  
type: string

### Path Parameters
<a name="-greengrass-things-thingname-connectivityinfo-put-path"></a>

[**ThingName**](parameters-thingnameparam.md)  
The thing name.  
where used: path; required: true  
type: string

### CLI
<a name="-greengrass-things-thingname-connectivityinfo-put-cli"></a>

```
aws greengrass update-connectivity-info \
  --thing-name <value> \
  [--connectivity-info <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ThingName": "string",
"ConnectivityInfo": [
  {
    "Id": "string",
    "HostAddress": "string",
    "PortNumber": "int32-integer",
    "Metadata": "string"
  }
]
}
```

### Responses
<a name="-greengrass-things-thingname-connectivityinfo-put-responses"></a>

**200**  
Success.  
 [ UpdateConnectivityInfoResponse](definitions-updateconnectivityinforesponse.md)   

```
{
"message": "string",
"Version": "string"
}
```  
message  
A message about the connectivity info update request.  
type: string  
Version  
The new version of the connectivity info.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/things/ThingName/runtimeconfig
<a name="-greengrass-things-thingname-runtimeconfig"></a>

## GET
<a name="-greengrass-things-thingname-runtimeconfig-get"></a>

 `GET /greengrass/things/{ThingName}/runtimeconfig`

Operation ID: [GetThingRuntimeConfiguration](getthingruntimeconfiguration-get.md)



Produces: application/json

### CLI
<a name="-greengrass-things-thingname-runtimeconfig-get-cli"></a>

```
aws greengrass get-thing-runtime-configuration  \
    [--cli-input-json <value>] \
    [--generate-cli-skeleton]
```

### Responses
<a name="-greengrass-things-thingname-runtimeconfig-get-responses"></a>

**200**  
200 response  
 [ GetThingRuntimeConfigurationResponse](definitions-getthingruntimeconfigurationresponse.md)   

```
{
  "RuntimeConfiguration": {
    "TelemetryConfiguration": {
      "Telemetry": "On|Off",
      "ConfigurationSyncStatus": "InSync|OutOfSync"
    }
  }
}
```  
GetThingRuntimeConfigurationResponse  
The runtime configuration for a thing.  
type: object  
RuntimeConfiguration  
Runtime configuration for a thing.  
type: object  
TelemetryConfiguration  
The configuration setting for running telemetry.  
type: object  
required: ["Telemetry"]  
Telemetry  
The configuration setting to turn on or turn off telemetry.  
type: string  
enum: ["On", "Off"]  
ConfigurationSyncStatus  
The synchronization status of the device-reported configuration with the desired configuration.  
type: string  
enum: ["InSync", "OutOfSync"]

**400**  
400 response  
 [ GeneralError](definitions-generalerror.md)   

```
{
  "Message": "string",
  "ErrorDetails": [
    {
      "DetailedErrorCode": "string",
      "DetailedErrorMessage": "string"
    }
  ]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
500 response  
 [ GeneralError](definitions-generalerror.md)   

```
{
  "Message": "string",
  "ErrorDetails": [
    {
      "DetailedErrorCode": "string",
      "DetailedErrorMessage": "string"
    }
  ]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## PUT
<a name="-greengrass-things-thingname-runtimeconfig-put"></a>

 `PUT /greengrass/things/{ThingName}/runtimeconfig`

Operation ID: [UpdateThingRuntimeConfiguration](updatethingruntimeconfiguration-put.md)



Produces: application/json

### CLI
<a name="-greengrass-things-thingname-runtimeconfig-put-cli"></a>

```
aws greengrass update-thing-runtime-configuration \
    [--telemetry-configuration <value>]  \
    [--cli-input-json <value>] \
    [--generate-cli-skeleton]
```

cli-input-json format:

```
{
  "TelemetryConfiguration": {
    "Telemetry": "On|Off"
  }
}
```

### Responses
<a name="-greengrass-things-thingname-runtimeconfig-put-responses"></a>

**200**  
200 response  
 [ Empty](definitions-empty.md)   

```
{
}
```  
Empty Schema  
Empty  
type: object

**400**  
400 response  
 [ GeneralError](definitions-generalerror.md)   

```
{
  "Message": "string",
  "ErrorDetails": [
    {
      "DetailedErrorCode": "string",
      "DetailedErrorMessage": "string"
    }
  ]
}
```  
GeneralError  
General error information.  
type: object  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
500 response  
 [ GeneralError](definitions-generalerror.md)   

```
{
  "Message": "string",
  "ErrorDetails": [
    {
      "DetailedErrorCode": "string",
      "DetailedErrorMessage": "string"
    }
  ]
}
```  
GeneralError  
General error information.  
type: object  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /greengrass/updates
<a name="-greengrass-updates"></a>

## POST
<a name="-greengrass-updates-post"></a>

 `POST /greengrass/updates`

Operation ID: [CreateSoftwareUpdateJob](createsoftwareupdatejob-post.md)

Creates a software update for a core or group of cores (specified as an IoT thing group.) Use this to update the OTA agent and the Greengrass core software. It uses the AWS IoT Jobs feature, which provides more commands for managing a Greengrass Core software update job.

Produces: application/json

### Body Parameters
<a name="-greengrass-updates-post-body"></a>

[**CreateSoftwareUpdateJobRequestBody**](parameters-createsoftwareupdatejobrequestbody.md)  
  
where used: body; required: true  

```
{
"UpdateTargetsArchitecture": "armv6l|armv7l|x86_64|aarch64",
"UpdateTargets": [
  "string"
],
"SoftwareToUpdate": "core|ota_agent",
"S3UrlSignerRole": "string",
"UpdateAgentLogLevel": "NONE|TRACE|DEBUG|VERBOSE|INFO|WARN|ERROR|FATAL",
"UpdateTargetsOperatingSystem": "ubuntu|raspbian|amazon_linux|openwrt"
}
```  
CreateSoftwareUpdateJobRequest  
Request for the CreateSoftwareUpdateJob API.  
type: object  
required: ["UpdateTargetsArchitecture", "UpdateTargets", "SoftwareToUpdate", "S3UrlSignerRole", "UpdateTargetsOperatingSystem"]  
UpdateTargetsArchitecture  
The architecture of the cores that are the targets of an update.  
type: string  
enum: ["armv6l", "armv7l", "x86\$164", "aarch64"]  
UpdateTargets  
The ARNs of the targets (IoT things or IoT thing groups) that this update is applied to.  
type: array  
  
SoftwareToUpdate  
The piece of software on the Greengrass core that will be updated.  
type: string  
enum: ["core", "ota\$1agent"]  
S3UrlSignerRole  
The IAM role that Greengrass uses to create presigned URLs that point to the update artifact.  
type: string  
UpdateAgentLogLevel  
The minimum level of log statements that should be logged by the OTA agent during an update.  
type: string  
enum: ["NONE", "TRACE", "DEBUG", "VERBOSE", "INFO", "WARN", "ERROR", "FATAL"]  
UpdateTargetsOperatingSystem  
The operating system of the cores that are the targets of an update.  
type: string  
enum: ["ubuntu", "raspbian", "amazon\$1linux", "openwrt"]

### Header Parameters
<a name="-greengrass-updates-post-header"></a>

[**X-Amzn-Client-Token**](parameters-clienttoken.md)  
A client token used to correlate requests and responses.  
where used: header; required: false  
type: string

### CLI
<a name="-greengrass-updates-post-cli"></a>

```
aws greengrass create-software-update-job \
  [--update-targets-architecture <value>] \
  [--update-targets <value>] \
  [--software-to-update <value>] \
  [--s3-url-signer-role <value>] \
  [--update-agent-log-level <value>] \
  [--update-targets-operating-system <value>] \
  [--amzn-client-token <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"UpdateTargetsArchitecture": "armv6l|armv7l|x86_64|aarch64",
"UpdateTargets": [
  "string"
],
"SoftwareToUpdate": "core|ota_agent",
"S3UrlSignerRole": "string",
"UpdateAgentLogLevel": "NONE|TRACE|DEBUG|VERBOSE|INFO|WARN|ERROR|FATAL",
"UpdateTargetsOperatingSystem": "ubuntu|raspbian|amazon_linux|openwrt",
"AmznClientToken": "string"
}
```

### Responses
<a name="-greengrass-updates-post-responses"></a>

**200**  
Success.  
 [ CreateSoftwareUpdateJobResponse](definitions-createsoftwareupdatejobresponse.md)   

```
{
"IotJobId": "string",
"IotJobArn": "string",
"PlatformSoftwareVersion": "string"
}
```  
CreateSoftwareUpdateJobResponse  
type: object  
IotJobId  
The IoT job ID that corresponds to this update.  
type: string  
IotJobArn  
The IoT job ARN that corresponds to this update.  
type: string  
PlatformSoftwareVersion  
The software version installed on the device or devices after the update.  
type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

**500**  
Server error.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

# /tags/resource-arn
<a name="-tags-resource-arn"></a>

## GET
<a name="-tags-resource-arn-get"></a>

 `GET /tags/resource-arn`

Operation ID: [ListTagsForResource](listtagsforresource-get.md)

Lists tags for a Greengrass resource. Valid resources are `Group`, `ConnectorDefinition`, `CoreDefinition`, `DeviceDefinition`, `FunctionDefinition`, `LoggerDefinition`, `ResourceDefinition`, `SubscriptionDefinition`, and `BulkDeployment`. 

Produces: application/json

### CLI
<a name="-tags-resource-arn-get-cli"></a>

```
aws greengrass list-tags-for-resource  \
  --resource-arn <value> \								  
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceArn": "string"
}
```

### Parameters:
<a name="-tags-resource-arn-get-params"></a>

 [**ResourceArn**](parameters-resourcearnparam.md)  
The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.  
where used: path; required: true  
type: string

### Responses
<a name="-tags-resource-arn-get-responses"></a>

**200**  
HTTP Status Code 200: OK.  
 [ tags](definitions-tags.md)   

```
{
  "tags": {
      "keyName0": "value0",
      "keyName1": "value1",
      "keyName2": "value2"
  }
}
```  
  
The resource tags.  
type: object  
additionalProperties: The key-value pair for the resource tag. Type: string

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## POST
<a name="-tags-resource-arn-post"></a>

 `POST /tags/resource-arn`

Operation ID: [TagResource](tagresource-post.md)

Adds tags to a Greengrass resource. Valid resources are `Group`, `ConnectorDefinition`, `CoreDefinition`, `DeviceDefinition`, `FunctionDefinition`, `LoggerDefinition`, `ResourceDefinition`, `SubscriptionDefinition`, and `BulkDeployment`. 

Produces: application/json

### CLI
<a name="-tags-resource-arn-post-cli"></a>

```
aws greengrass tag-resource \
  --resource-arn <value> \								  
  [--tags <value>]  \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceArn": "string",				  
"tags": {
  "additionalProperty0": "string",
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
}
```

### Parameters:
<a name="-tags-resource-arn-post-params"></a>

[**ResourceArn**](parameters-resourcearnparam.md)  
The Amazon Resource Name (ARN) of the resource to attach the tags to.  
where used: path; required: true  
type: string

[**tags**](parameters-tagsparam.md)  
A map of the key-value pairs for the resource tag.  
where used: body; required: true  
type: tags

### Responses
<a name="-tags-resource-arn-post-responses"></a>

**204**  
HTTP Status Code 204: Successful response.

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string

## DELETE
<a name="-tags-resource-arn-delete"></a>

 `DELETE /tags/resource-arn`

Operation ID: [UntagResource](untagresource-delete.md)

Removes tags from a Greengrass resource. Valid resources are `Group`, `ConnectorDefinition`, `CoreDefinition`, `DeviceDefinition`, `FunctionDefinition`, `LoggerDefinition`, `ResourceDefinition`, `SubscriptionDefinition`, and `BulkDeployment`. 

Produces: application/json

### CLI
<a name="-tags-resource-arn-delete-cli"></a>

```
aws greengrass untag-resource  \
  --resource-arn <value> \
  --tag-keys <value> \
  [--cli-input-json <value>] \
  [--generate-cli-skeleton]
```

cli-input-json format:

```
{
"ResourceArn": "string",
"TagKeys": [
  "string"
]
}
```

### Parameters:
<a name="-tags-resource-arn-delete-params"></a>

[**TagKeys**](parameters-tagkeysparam.md)  
An array of tag keys to delete.  
where used: query; required: true  
type: array of strings

[**ResourceArn**](parameters-resourcearnparam.md)  
The Amazon Resource Name (ARN) of the resource to remove the tags from.  
where used: path; required: true  
type: string

### Responses
<a name="-tags-resource-arn-delete-responses"></a>

**204**  
HTTP Status Code 204: Successful response.

**400**  
Invalid request.  
 [ GeneralError](definitions-generalerror.md)   

```
{
"Message": "string",
"ErrorDetails": [
  {
    "DetailedErrorCode": "string",
    "DetailedErrorMessage": "string"
  }
]
}
```  
GeneralError  
General error information.  
type: object  
required: ["Message"]  
Message  
A message that contains information about the error.  
type: string  
ErrorDetails  
A list of error details.  
type: array  
items: [ErrorDetail](definitions-errordetail.md)  
ErrorDetail  
Details about the error.  
type: object  
DetailedErrorCode  
A detailed error code.  
type: string  
DetailedErrorMessage  
A detailed error message.  
type: string