envs_1
/
data
/lib
/python3.10
/site-packages
/awscli
/examples
/greengrass
/create-resource-definition.rst
| **To create a resource definition** | |
| The following ``create-resource-definition`` example creates a resource definition that contains a list of resources to be used in a Greengrass group. In this example, an initial version of the resource definition is included by providing a list of resources. The list includes one resource for a Twilio authorization token and the ARN for a secret stored in AWS Secrets Manager. You must create the secret before you can create the resource definition. :: | |
| aws greengrass create-resource-definition \ | |
| --name MyGreengrassResources \ | |
| --initial-version "{\"Resources\": [{\"Id\": \"TwilioAuthToken\",\"Name\": \"MyTwilioAuthToken\",\"ResourceDataContainer\": {\"SecretsManagerSecretResourceData\": {\"ARN\": \"arn:aws:secretsmanager:us-west-2:123456789012:secret:greengrass-TwilioAuthToken-ntSlp6\"}}}]}" | |
| Output:: | |
| { | |
| "Arn": "arn:aws:greengrass:us-west-2:123456789012:/greengrass/definition/resources/c8bb9ebc-c3fd-40a4-9c6a-568d75569d38", | |
| "CreationTimestamp": "2019-06-19T21:51:28.212Z", | |
| "Id": "c8bb9ebc-c3fd-40a4-9c6a-568d75569d38", | |
| "LastUpdatedTimestamp": "2019-06-19T21:51:28.212Z", | |
| "LatestVersion": "a5f94d0b-f6bc-40f4-bb78-7a1c5fe13ba1", | |
| "LatestVersionArn": "arn:aws:greengrass:us-west-2:123456789012:/greengrass/definition/resources/c8bb9ebc-c3fd-40a4-9c6a-568d75569d38/versions/a5f94d0b-f6bc-40f4-bb78-7a1c5fe13ba1", | |
| "Name": "MyGreengrassResources" | |
| } | |
| For more information, see `How to Configure Local Resource Access Using the AWS Command Line Interface <https://docs.aws.amazon.com/greengrass/latest/developerguide/lra-cli.html>`__ in the *AWS IoT Greengrass Developer Guide*. | |