Menu
AWS Greengrass
API Reference

/greengrass/definition/resources/ResourceDefinitionId/versions

POST

POST /greengrass/definition/resources/ResourceDefinitionId/versions

Operation ID: CreateResourceDefinitionVersion

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

Produces: application/json

Body Parameters

CreateResourceDefinitionVersionRequestBody

Information about the resource definition version.

where used: body; required: true

Copy
{ "Resources": [ { "Id": "string", "Name": "string", "ResourceDataContainer": { "LocalDeviceResourceData": { "SourcePath": "string", "GroupOwnerSetting": { "AutoAddGroupOwner": true, "GroupOwner": "string" } }, *-- or --* "LocalVolumeResourceData": { "SourcePath": "string", "DestinationPath": "string", "GroupOwnerSetting": { "AutoAddGroupOwner": true, "GroupOwner": "string" } }, *-- or --* "SageMakerMachineLearningModelResourceData": { "SageMakerJobArn": "string", "DestinationPath": "string" }, *-- or --* "S3MachineLearningModelResourceData": { "S3Uri": "string", "DestinationPath": "string" } } } ] }
ResourceDefinitionVersion

Information about a resource definition version.

type: object

Resources

A list of resources.

type: array

items: Resource

Resource

Information about a resource.

type: object

required: ["Id", "ResourceDataContainer"]

Id

The resource ID.

type: string

Name

A descriptive resource name.

type: string

ResourceDataContainer

Should contain one of LocalDeviceResourceData, LocalVolumeResourceData, SageMakerMachineLearningModelResourceData or S3MachineLearningModelResourceData.

type: object

LocalDeviceResourceData

Attributes that define a local device resource.

type: object

SourcePath

The local source path of the resource.

type: string

GroupOwnerSetting

Group owner related settings for local resources.

type: object

AutoAddGroupOwner

If true, the auto added group owner is enabled.

type: boolean

GroupOwner

The name of the group owner.

type: string

LocalVolumeResourceData

Attributes that define a Local Volume Resource.

type: object

SourcePath

The local source path of the resource.

type: string

DestinationPath

The local destination path of the resource.

type: string

GroupOwnerSetting

Group owner related settings for local resources.

type: object

AutoAddGroupOwner

If true, the auto added group owner is enabled.

type: boolean

GroupOwner

The name of the group owner.

type: string

SageMakerMachineLearningModelResourceData

Attributes that define the AWS SageMaker Machine Learning Model Resource.

type: object

SageMakerJobArn

The ARN of an AWS SageMaker training job.

type: string

DestinationPath

Local destination path of the AWS SageMaker Machine Learning resource.

type: string

S3MachineLearningModelResourceData

Attributes that define the S3 Machine Learning Model Resource.

type: object

S3Uri

The URI of an S3 object.

type: string

DestinationPath

Local destination path of the S3 Machine Learning resource.

type: string

Header Parameters

X-Amzn-Client-Token

A client token used to make idempotent requests. Provide a unique token to help prevent duplicate updates from being created due to internal retries.

where used: header; required: false

type: string

Path Parameters

ResourceDefinitionId

The ID of the resource definition.

where used: path; required: true

type: string

CLI

Copy
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:

Copy
{ "ResourceDefinitionId": "string", "Resources": [ { "Id": "string", "Name": "string", "ResourceDataContainer": { "LocalDeviceResourceData": { "SourcePath": "string", "GroupOwnerSetting": { "AutoAddGroupOwner": "boolean", "GroupOwner": "string" } }, *-- or --* "LocalVolumeResourceData": { "SourcePath": "string", "DestinationPath": "string", "GroupOwnerSetting": { "AutoAddGroupOwner": "boolean", "GroupOwner": "string" } }, *-- or --* "SageMakerMachineLearningModelResourceData": { "SageMakerJobArn": "string", "DestinationPath": "string" }, *-- or --* "S3MachineLearningModelResourceData": { "S3Uri": "string", "DestinationPath": "string" } } } ], "AmznClientToken": "string" }

Responses

200 (CreateResourceDefinitionVersionResponse)

VersionInformation

Copy
{ "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 version.

type: string

Version

The unique 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

Copy
{ "Message": "string", "ErrorDetails": [ { "DetailedErrorCode": "string", "DetailedErrorMessage": "string" } ] }
GeneralError

General error information.

type: object

required: ["Message"]

Message

A message containing information about the error.

type: string

ErrorDetails

A list of error details.

type: array

items: ErrorDetail

ErrorDetail

Details about the error.

type: object

DetailedErrorCode

A detailed error code.

type: string

DetailedErrorMessage

A detailed error message.

type: string

GET

GET /greengrass/definition/resources/ResourceDefinitionId/versions

Operation ID: ListResourceDefinitionVersions

Lists the versions of a resource definition.

Produces: application/json

Path Parameters

ResourceDefinitionId

The ID of the resource definition.

where used: path; required: true

type: string

Query Parameters

NextToken

The token for the next set of results, or null if there are no additional results.

where used: query; required: false

type: string

MaxResults

The maximum number of results to be returned per request.

where used: query; required: false

type: integer

CLI

Copy
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:

Copy
{ "ResourceDefinitionId": "string", "NextToken": "string", "MaxResults": "integer" }

Responses

200 (ListResourceDefinitionVersionsResponse)

ListVersionsResponse

Copy
{ "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

VersionInformation

Information about a version.

type: object

Arn

The ARN of the version.

type: string

Id

The ID of the version.

type: string

Version

The unique 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 additional results.

type: string

400

invalid request

GeneralError

Copy
{ "Message": "string", "ErrorDetails": [ { "DetailedErrorCode": "string", "DetailedErrorMessage": "string" } ] }
GeneralError

General error information.

type: object

required: ["Message"]

Message

A message containing information about the error.

type: string

ErrorDetails

A list of error details.

type: array

items: ErrorDetail

ErrorDetail

Details about the error.

type: object

DetailedErrorCode

A detailed error code.

type: string

DetailedErrorMessage

A detailed error message.

type: string

On this page: