SDK for PHP 3.x

Client: Aws\GreengrassV2\GreengrassV2Client
Service ID: greengrassv2
Version: 2020-11-30

This page describes the parameters and results for the operations of the AWS IoT Greengrass V2 (2020-11-30), and shows how to use the Aws\GreengrassV2\GreengrassV2Client object to call the described operations. This documentation is specific to the 2020-11-30 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AssociateServiceRoleToAccount ( array $params = [] )
Associates a Greengrass service role with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
BatchAssociateClientDeviceWithCoreDevice ( array $params = [] )
Associates a list of client devices with a core device.
BatchDisassociateClientDeviceFromCoreDevice ( array $params = [] )
Disassociates a list of client devices from a core device.
CancelDeployment ( array $params = [] )
Cancels a deployment.
CreateComponentVersion ( array $params = [] )
Creates a component.
CreateDeployment ( array $params = [] )
Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices.
DeleteComponent ( array $params = [] )
Deletes a version of a component from IoT Greengrass.
DeleteCoreDevice ( array $params = [] )
Deletes a Greengrass core device, which is an IoT thing.
DeleteDeployment ( array $params = [] )
Deletes a deployment.
DescribeComponent ( array $params = [] )
Retrieves metadata for a version of a component.
DisassociateServiceRoleFromAccount ( array $params = [] )
Disassociates the Greengrass service role from IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
GetComponent ( array $params = [] )
Gets the recipe for a version of a component.
GetComponentVersionArtifact ( array $params = [] )
Gets the pre-signed URL to download a public or a Lambda component artifact.
GetConnectivityInfo ( array $params = [] )
Retrieves connectivity information for a Greengrass core device.
GetCoreDevice ( array $params = [] )
Retrieves metadata for a Greengrass core device.
GetDeployment ( array $params = [] )
Gets a deployment.
GetServiceRoleForAccount ( array $params = [] )
Gets the service role associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
ListClientDevicesAssociatedWithCoreDevice ( array $params = [] )
Retrieves a paginated list of client devices that are associated with a core device.
ListComponentVersions ( array $params = [] )
Retrieves a paginated list of all versions for a component.
ListComponents ( array $params = [] )
Retrieves a paginated list of component summaries.
ListCoreDevices ( array $params = [] )
Retrieves a paginated list of Greengrass core devices.
ListDeployments ( array $params = [] )
Retrieves a paginated list of deployments.
ListEffectiveDeployments ( array $params = [] )
Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.
ListInstalledComponents ( array $params = [] )
Retrieves a paginated list of the components that a Greengrass core device runs.
ListTagsForResource ( array $params = [] )
Retrieves the list of tags for an IoT Greengrass resource.
ResolveComponentCandidates ( array $params = [] )
Retrieves a list of components that meet the component, version, and platform requirements of a deployment.
TagResource ( array $params = [] )
Adds tags to an IoT Greengrass resource.
UntagResource ( array $params = [] )
Removes a tag from an IoT Greengrass resource.
UpdateConnectivityInfo ( array $params = [] )
Updates connectivity information for a Greengrass core device.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListClientDevicesAssociatedWithCoreDevice
ListComponentVersions
ListComponents
ListCoreDevices
ListDeployments
ListEffectiveDeployments
ListInstalledComponents

Operations

AssociateServiceRoleToAccount

$result = $client->associateServiceRoleToAccount([/* ... */]);
$promise = $client->associateServiceRoleToAccountAsync([/* ... */]);

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

Parameter Syntax

$result = $client->associateServiceRoleToAccount([
    'roleArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
roleArn
Required: Yes
Type: string

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

Result Syntax

[
    'associatedAt' => '<string>',
]

Result Details

Members
associatedAt
Type: string

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

Errors

ValidationException:

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

InternalServerException:

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

BatchAssociateClientDeviceWithCoreDevice

$result = $client->batchAssociateClientDeviceWithCoreDevice([/* ... */]);
$promise = $client->batchAssociateClientDeviceWithCoreDeviceAsync([/* ... */]);

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

Client devices are local IoT devices that connect to and communicate with an IoT Greengrass core device over MQTT. You can connect client devices to a core device to sync MQTT messages and data to Amazon Web Services IoT Core and interact with client devices in Greengrass components. For more information, see Interact with local IoT devices in the IoT Greengrass V2 Developer Guide.

Parameter Syntax

$result = $client->batchAssociateClientDeviceWithCoreDevice([
    'coreDeviceThingName' => '<string>', // REQUIRED
    'entries' => [
        [
            'thingName' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
coreDeviceThingName
Required: Yes
Type: string

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

entries
Type: Array of AssociateClientDeviceWithCoreDeviceEntry structures

The list of client devices to associate.

Result Syntax

[
    'errorEntries' => [
        [
            'code' => '<string>',
            'message' => '<string>',
            'thingName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
errorEntries

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

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

BatchDisassociateClientDeviceFromCoreDevice

$result = $client->batchDisassociateClientDeviceFromCoreDevice([/* ... */]);
$promise = $client->batchDisassociateClientDeviceFromCoreDeviceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->batchDisassociateClientDeviceFromCoreDevice([
    'coreDeviceThingName' => '<string>', // REQUIRED
    'entries' => [
        [
            'thingName' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
coreDeviceThingName
Required: Yes
Type: string

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

entries

The list of client devices to disassociate.

Result Syntax

[
    'errorEntries' => [
        [
            'code' => '<string>',
            'message' => '<string>',
            'thingName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
errorEntries

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

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

CancelDeployment

$result = $client->cancelDeployment([/* ... */]);
$promise = $client->cancelDeploymentAsync([/* ... */]);

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

Parameter Syntax

$result = $client->cancelDeployment([
    'deploymentId' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The ID of the deployment.

Result Syntax

[
    'message' => '<string>',
]

Result Details

Members
message
Type: string

A message that communicates if the cancel was successful.

Errors

ResourceNotFoundException:

The requested resource can't be found.

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ConflictException:

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

ThrottlingException:

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

CreateComponentVersion

$result = $client->createComponentVersion([/* ... */]);
$promise = $client->createComponentVersionAsync([/* ... */]);

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

You can use this operation to do the following:

  • Create components from recipes

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

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

  • Create components from Lambda functions

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

    This function accepts Lambda functions in all supported versions of Python, Node.js, and Java runtimes. IoT Greengrass doesn't apply any additional restrictions on deprecated Lambda runtime versions.

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

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

Parameter Syntax

$result = $client->createComponentVersion([
    'clientToken' => '<string>',
    'inlineRecipe' => <string || resource || Psr\Http\Message\StreamInterface>,
    'lambdaFunction' => [
        'componentDependencies' => [
            '<NonEmptyString>' => [
                'dependencyType' => 'HARD|SOFT',
                'versionRequirement' => '<string>',
            ],
            // ...
        ],
        'componentLambdaParameters' => [
            'environmentVariables' => ['<string>', ...],
            'eventSources' => [
                [
                    'topic' => '<string>', // REQUIRED
                    'type' => 'PUB_SUB|IOT_CORE', // REQUIRED
                ],
                // ...
            ],
            'execArgs' => ['<string>', ...],
            'inputPayloadEncodingType' => 'json|binary',
            'linuxProcessParams' => [
                'containerParams' => [
                    'devices' => [
                        [
                            'addGroupOwner' => true || false,
                            'path' => '<string>', // REQUIRED
                            'permission' => 'ro|rw',
                        ],
                        // ...
                    ],
                    'memorySizeInKB' => <integer>,
                    'mountROSysfs' => true || false,
                    'volumes' => [
                        [
                            'addGroupOwner' => true || false,
                            'destinationPath' => '<string>', // REQUIRED
                            'permission' => 'ro|rw',
                            'sourcePath' => '<string>', // REQUIRED
                        ],
                        // ...
                    ],
                ],
                'isolationMode' => 'GreengrassContainer|NoContainer',
            ],
            'maxIdleTimeInSeconds' => <integer>,
            'maxInstancesCount' => <integer>,
            'maxQueueSize' => <integer>,
            'pinned' => true || false,
            'statusTimeoutInSeconds' => <integer>,
            'timeoutInSeconds' => <integer>,
        ],
        'componentName' => '<string>',
        'componentPlatforms' => [
            [
                'attributes' => ['<string>', ...],
                'name' => '<string>',
            ],
            // ...
        ],
        'componentVersion' => '<string>',
        'lambdaArn' => '<string>', // REQUIRED
    ],
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Type: string

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

inlineRecipe
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

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

You must specify either inlineRecipe or lambdaFunction.

lambdaFunction
Type: LambdaFunctionRecipeSource structure

The parameters to create a component from a Lambda function.

You must specify either inlineRecipe or lambdaFunction.

tags
Type: Associative array of custom strings keys (TagKey) to strings

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

Result Syntax

[
    'arn' => '<string>',
    'componentName' => '<string>',
    'componentVersion' => '<string>',
    'creationTimestamp' => <DateTime>,
    'status' => [
        'componentState' => 'REQUESTED|INITIATED|DEPLOYABLE|FAILED|DEPRECATED',
        'errors' => ['<string>', ...],
        'message' => '<string>',
        'vendorGuidance' => 'ACTIVE|DISCONTINUED|DELETED',
        'vendorGuidanceMessage' => '<string>',
    ],
]

Result Details

Members
arn
Type: string

The ARN of the component version.

componentName
Required: Yes
Type: string

The name of the component.

componentVersion
Required: Yes
Type: string

The version of the component.

creationTimestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

status
Required: Yes
Type: CloudComponentStatus structure

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

Errors

ValidationException:

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

ServiceQuotaExceededException:

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

AccessDeniedException:

You don't have permission to perform the action.

ConflictException:

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

ThrottlingException:

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

InternalServerException:

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

RequestAlreadyInProgressException:

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

CreateDeployment

$result = $client->createDeployment([/* ... */]);
$promise = $client->createDeploymentAsync([/* ... */]);

Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices. When you add a new core device to a group of core devices that has a deployment, IoT Greengrass deploys that group's deployment to the new device.

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

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

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

Parameter Syntax

$result = $client->createDeployment([
    'clientToken' => '<string>',
    'components' => [
        '<NonEmptyString>' => [
            'componentVersion' => '<string>', // REQUIRED
            'configurationUpdate' => [
                'merge' => '<string>',
                'reset' => ['<string>', ...],
            ],
            'runWith' => [
                'posixUser' => '<string>',
                'systemResourceLimits' => [
                    'cpus' => <float>,
                    'memory' => <integer>,
                ],
                'windowsUser' => '<string>',
            ],
        ],
        // ...
    ],
    'deploymentName' => '<string>',
    'deploymentPolicies' => [
        'componentUpdatePolicy' => [
            'action' => 'NOTIFY_COMPONENTS|SKIP_NOTIFY_COMPONENTS',
            'timeoutInSeconds' => <integer>,
        ],
        'configurationValidationPolicy' => [
            'timeoutInSeconds' => <integer>,
        ],
        'failureHandlingPolicy' => 'ROLLBACK|DO_NOTHING',
    ],
    'iotJobConfiguration' => [
        'abortConfig' => [
            'criteriaList' => [ // REQUIRED
                [
                    'action' => 'CANCEL', // REQUIRED
                    'failureType' => 'FAILED|REJECTED|TIMED_OUT|ALL', // REQUIRED
                    'minNumberOfExecutedThings' => <integer>, // REQUIRED
                    'thresholdPercentage' => <float>, // REQUIRED
                ],
                // ...
            ],
        ],
        'jobExecutionsRolloutConfig' => [
            'exponentialRate' => [
                'baseRatePerMinute' => <integer>, // REQUIRED
                'incrementFactor' => <float>, // REQUIRED
                'rateIncreaseCriteria' => [ // REQUIRED
                    'numberOfNotifiedThings' => <integer>,
                    'numberOfSucceededThings' => <integer>,
                ],
            ],
            'maximumPerMinute' => <integer>,
        ],
        'timeoutConfig' => [
            'inProgressTimeoutInMinutes' => <integer>,
        ],
    ],
    'parentTargetArn' => '<string>',
    'tags' => ['<string>', ...],
    'targetArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: string

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

components
Type: Associative array of custom strings keys (NonEmptyString) to ComponentDeploymentSpecification structures

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

deploymentName
Type: string

The name of the deployment.

deploymentPolicies
Type: DeploymentPolicies structure

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

iotJobConfiguration

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

parentTargetArn
Type: string

The parent deployment's target ARN within a subdeployment.

tags
Type: Associative array of custom strings keys (TagKey) to strings

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

targetArn
Required: Yes
Type: string

The ARN of the target IoT thing or thing group. When creating a subdeployment, the targetARN can only be a thing group.

Result Syntax

[
    'deploymentId' => '<string>',
    'iotJobArn' => '<string>',
    'iotJobId' => '<string>',
]

Result Details

Members
deploymentId
Type: string

The ID of the deployment.

iotJobArn
Type: string

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

iotJobId
Type: string

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

Errors

ResourceNotFoundException:

The requested resource can't be found.

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ThrottlingException:

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

InternalServerException:

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

ConflictException:

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

RequestAlreadyInProgressException:

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

DeleteComponent

$result = $client->deleteComponent([/* ... */]);
$promise = $client->deleteComponentAsync([/* ... */]);

Deletes a version of a component from IoT Greengrass.

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

Parameter Syntax

$result = $client->deleteComponent([
    'arn' => '<string>', // REQUIRED
]);

Parameter Details

Members
arn
Required: Yes
Type: string

The ARN of the component version.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ConflictException:

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

ResourceNotFoundException:

The requested resource can't be found.

ThrottlingException:

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

InternalServerException:

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

DeleteCoreDevice

$result = $client->deleteCoreDevice([/* ... */]);
$promise = $client->deleteCoreDeviceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->deleteCoreDevice([
    'coreDeviceThingName' => '<string>', // REQUIRED
]);

Parameter Details

Members
coreDeviceThingName
Required: Yes
Type: string

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

ConflictException:

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

DeleteDeployment

$result = $client->deleteDeployment([/* ... */]);
$promise = $client->deleteDeploymentAsync([/* ... */]);

Deletes a deployment. To delete an active deployment, you must first cancel it. For more information, see CancelDeployment.

Deleting a deployment doesn't affect core devices that run that deployment, because core devices store the deployment's configuration on the device. Additionally, core devices can roll back to a previous deployment that has been deleted.

Parameter Syntax

$result = $client->deleteDeployment([
    'deploymentId' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The ID of the deployment.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The requested resource can't be found.

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ConflictException:

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

ThrottlingException:

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

DescribeComponent

$result = $client->describeComponent([/* ... */]);
$promise = $client->describeComponentAsync([/* ... */]);

Retrieves metadata for a version of a component.

Parameter Syntax

$result = $client->describeComponent([
    'arn' => '<string>', // REQUIRED
]);

Parameter Details

Members
arn
Required: Yes
Type: string

The ARN of the component version.

Result Syntax

[
    'arn' => '<string>',
    'componentName' => '<string>',
    'componentVersion' => '<string>',
    'creationTimestamp' => <DateTime>,
    'description' => '<string>',
    'platforms' => [
        [
            'attributes' => ['<string>', ...],
            'name' => '<string>',
        ],
        // ...
    ],
    'publisher' => '<string>',
    'status' => [
        'componentState' => 'REQUESTED|INITIATED|DEPLOYABLE|FAILED|DEPRECATED',
        'errors' => ['<string>', ...],
        'message' => '<string>',
        'vendorGuidance' => 'ACTIVE|DISCONTINUED|DELETED',
        'vendorGuidanceMessage' => '<string>',
    ],
    'tags' => ['<string>', ...],
]

Result Details

Members
arn
Type: string

The ARN of the component version.

componentName
Type: string

The name of the component.

componentVersion
Type: string

The version of the component.

creationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

description
Type: string

The description of the component version.

platforms
Type: Array of ComponentPlatform structures

The platforms that the component version supports.

publisher
Type: string

The publisher of the component version.

status
Type: CloudComponentStatus structure

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

tags
Type: Associative array of custom strings keys (TagKey) to strings

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

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ResourceNotFoundException:

The requested resource can't be found.

ThrottlingException:

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

InternalServerException:

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

DisassociateServiceRoleFromAccount

$result = $client->disassociateServiceRoleFromAccount([/* ... */]);
$promise = $client->disassociateServiceRoleFromAccountAsync([/* ... */]);

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

Parameter Syntax

$result = $client->disassociateServiceRoleFromAccount([
]);

Parameter Details

Members

Result Syntax

[
    'disassociatedAt' => '<string>',
]

Result Details

Members
disassociatedAt
Type: string

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

Errors

InternalServerException:

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

GetComponent

$result = $client->getComponent([/* ... */]);
$promise = $client->getComponentAsync([/* ... */]);

Gets the recipe for a version of a component.

Parameter Syntax

$result = $client->getComponent([
    'arn' => '<string>', // REQUIRED
    'recipeOutputFormat' => 'JSON|YAML',
]);

Parameter Details

Members
arn
Required: Yes
Type: string

The ARN of the component version.

recipeOutputFormat
Type: string

The format of the recipe.

Result Syntax

[
    'recipe' => <string || resource || Psr\Http\Message\StreamInterface>,
    'recipeOutputFormat' => 'JSON|YAML',
    'tags' => ['<string>', ...],
]

Result Details

Members
recipe
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The recipe of the component version.

recipeOutputFormat
Required: Yes
Type: string

The format of the recipe.

tags
Type: Associative array of custom strings keys (TagKey) to strings

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

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ResourceNotFoundException:

The requested resource can't be found.

ThrottlingException:

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

InternalServerException:

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

GetComponentVersionArtifact

$result = $client->getComponentVersionArtifact([/* ... */]);
$promise = $client->getComponentVersionArtifactAsync([/* ... */]);

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

Parameter Syntax

$result = $client->getComponentVersionArtifact([
    'arn' => '<string>', // REQUIRED
    'artifactName' => '<string>', // REQUIRED
    'iotEndpointType' => 'fips|standard',
    's3EndpointType' => 'REGIONAL|GLOBAL',
]);

Parameter Details

Members
arn
Required: Yes
Type: string

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

artifactName
Required: Yes
Type: string

The name of the artifact.

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

iotEndpointType
Type: string

Determines if the Amazon S3 URL returned is a FIPS pre-signed URL endpoint. Specify fips if you want the returned Amazon S3 pre-signed URL to point to an Amazon S3 FIPS endpoint. If you don't specify a value, the default is standard.

s3EndpointType
Type: string

Specifies the endpoint to use when getting Amazon S3 pre-signed URLs.

All Amazon Web Services Regions except US East (N. Virginia) use REGIONAL in all cases. In the US East (N. Virginia) Region the default is GLOBAL, but you can change it to REGIONAL with this parameter.

Result Syntax

[
    'preSignedUrl' => '<string>',
]

Result Details

Members
preSignedUrl
Required: Yes
Type: string

The URL of the artifact.

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ResourceNotFoundException:

The requested resource can't be found.

ThrottlingException:

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

InternalServerException:

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

GetConnectivityInfo

$result = $client->getConnectivityInfo([/* ... */]);
$promise = $client->getConnectivityInfoAsync([/* ... */]);

Retrieves connectivity information for a Greengrass core device.

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

Parameter Syntax

$result = $client->getConnectivityInfo([
    'thingName' => '<string>', // REQUIRED
]);

Parameter Details

Members
thingName
Required: Yes
Type: string

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

Result Syntax

[
    'connectivityInfo' => [
        [
            'hostAddress' => '<string>',
            'id' => '<string>',
            'metadata' => '<string>',
            'portNumber' => <integer>,
        ],
        // ...
    ],
    'message' => '<string>',
]

Result Details

Members
connectivityInfo
Type: Array of ConnectivityInfo structures

The connectivity information for the core device.

message
Type: string

A message about the connectivity information request.

Errors

ValidationException:

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

InternalServerException:

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

GetCoreDevice

$result = $client->getCoreDevice([/* ... */]);
$promise = $client->getCoreDeviceAsync([/* ... */]);

Retrieves metadata for a Greengrass core device.

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated.

Core devices send status updates at the following times:

  • When the IoT Greengrass Core software starts

  • When the core device receives a deployment from the Amazon Web Services Cloud

  • When the status of any component on the core device becomes BROKEN

  • At a regular interval that you can configure, which defaults to 24 hours

  • For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment

Parameter Syntax

$result = $client->getCoreDevice([
    'coreDeviceThingName' => '<string>', // REQUIRED
]);

Parameter Details

Members
coreDeviceThingName
Required: Yes
Type: string

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

Result Syntax

[
    'architecture' => '<string>',
    'coreDeviceThingName' => '<string>',
    'coreVersion' => '<string>',
    'lastStatusUpdateTimestamp' => <DateTime>,
    'platform' => '<string>',
    'runtime' => '<string>',
    'status' => 'HEALTHY|UNHEALTHY',
    'tags' => ['<string>', ...],
]

Result Details

Members
architecture
Type: string

The computer architecture of the core device.

coreDeviceThingName
Type: string

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

coreVersion
Type: string

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

lastStatusUpdateTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

platform
Type: string

The operating system platform that the core device runs.

runtime
Type: string

The runtime for the core device. The runtime can be:

  • aws_nucleus_classic

  • aws_nucleus_lite

status
Type: string

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

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

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

tags
Type: Associative array of custom strings keys (TagKey) to strings

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

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

GetDeployment

$result = $client->getDeployment([/* ... */]);
$promise = $client->getDeploymentAsync([/* ... */]);

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

Parameter Syntax

$result = $client->getDeployment([
    'deploymentId' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The ID of the deployment.

Result Syntax

[
    'components' => [
        '<NonEmptyString>' => [
            'componentVersion' => '<string>',
            'configurationUpdate' => [
                'merge' => '<string>',
                'reset' => ['<string>', ...],
            ],
            'runWith' => [
                'posixUser' => '<string>',
                'systemResourceLimits' => [
                    'cpus' => <float>,
                    'memory' => <integer>,
                ],
                'windowsUser' => '<string>',
            ],
        ],
        // ...
    ],
    'creationTimestamp' => <DateTime>,
    'deploymentId' => '<string>',
    'deploymentName' => '<string>',
    'deploymentPolicies' => [
        'componentUpdatePolicy' => [
            'action' => 'NOTIFY_COMPONENTS|SKIP_NOTIFY_COMPONENTS',
            'timeoutInSeconds' => <integer>,
        ],
        'configurationValidationPolicy' => [
            'timeoutInSeconds' => <integer>,
        ],
        'failureHandlingPolicy' => 'ROLLBACK|DO_NOTHING',
    ],
    'deploymentStatus' => 'ACTIVE|COMPLETED|CANCELED|FAILED|INACTIVE',
    'iotJobArn' => '<string>',
    'iotJobConfiguration' => [
        'abortConfig' => [
            'criteriaList' => [
                [
                    'action' => 'CANCEL',
                    'failureType' => 'FAILED|REJECTED|TIMED_OUT|ALL',
                    'minNumberOfExecutedThings' => <integer>,
                    'thresholdPercentage' => <float>,
                ],
                // ...
            ],
        ],
        'jobExecutionsRolloutConfig' => [
            'exponentialRate' => [
                'baseRatePerMinute' => <integer>,
                'incrementFactor' => <float>,
                'rateIncreaseCriteria' => [
                    'numberOfNotifiedThings' => <integer>,
                    'numberOfSucceededThings' => <integer>,
                ],
            ],
            'maximumPerMinute' => <integer>,
        ],
        'timeoutConfig' => [
            'inProgressTimeoutInMinutes' => <integer>,
        ],
    ],
    'iotJobId' => '<string>',
    'isLatestForTarget' => true || false,
    'parentTargetArn' => '<string>',
    'revisionId' => '<string>',
    'tags' => ['<string>', ...],
    'targetArn' => '<string>',
]

Result Details

Members
components
Type: Associative array of custom strings keys (NonEmptyString) to ComponentDeploymentSpecification structures

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

creationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

deploymentId
Type: string

The ID of the deployment.

deploymentName
Type: string

The name of the deployment.

deploymentPolicies
Type: DeploymentPolicies structure

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

deploymentStatus
Type: string

The status of the deployment.

iotJobArn
Type: string

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

iotJobConfiguration

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

iotJobId
Type: string

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

isLatestForTarget
Type: boolean

Whether or not the deployment is the latest revision for its target.

parentTargetArn
Type: string

The parent deployment's target ARN within a subdeployment.

revisionId
Type: string

The revision number of the deployment.

tags
Type: Associative array of custom strings keys (TagKey) to strings

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

targetArn
Type: string

The ARN of the target IoT thing or thing group.

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

GetServiceRoleForAccount

$result = $client->getServiceRoleForAccount([/* ... */]);
$promise = $client->getServiceRoleForAccountAsync([/* ... */]);

Gets the service role associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.

Parameter Syntax

$result = $client->getServiceRoleForAccount([
]);

Parameter Details

Members

Result Syntax

[
    'associatedAt' => '<string>',
    'roleArn' => '<string>',
]

Result Details

Members
associatedAt
Type: string

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

roleArn
Type: string

The ARN of the service role that is associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.

Errors

InternalServerException:

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

ListClientDevicesAssociatedWithCoreDevice

$result = $client->listClientDevicesAssociatedWithCoreDevice([/* ... */]);
$promise = $client->listClientDevicesAssociatedWithCoreDeviceAsync([/* ... */]);

Retrieves a paginated list of client devices that are associated with a core device.

Parameter Syntax

$result = $client->listClientDevicesAssociatedWithCoreDevice([
    'coreDeviceThingName' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
coreDeviceThingName
Required: Yes
Type: string

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

maxResults
Type: int

The maximum number of results to be returned per paginated request.

nextToken
Type: string

The token to be used for the next set of paginated results.

Result Syntax

[
    'associatedClientDevices' => [
        [
            'associationTimestamp' => <DateTime>,
            'thingName' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
associatedClientDevices
Type: Array of AssociatedClientDevice structures

A list that describes the client devices that are associated with the core device.

nextToken
Type: string

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

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

ListComponentVersions

$result = $client->listComponentVersions([/* ... */]);
$promise = $client->listComponentVersionsAsync([/* ... */]);

Retrieves a paginated list of all versions for a component. Greater versions are listed first.

Parameter Syntax

$result = $client->listComponentVersions([
    'arn' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
arn
Required: Yes
Type: string

The ARN of the component.

maxResults
Type: int

The maximum number of results to be returned per paginated request.

nextToken
Type: string

The token to be used for the next set of paginated results.

Result Syntax

[
    'componentVersions' => [
        [
            'arn' => '<string>',
            'componentName' => '<string>',
            'componentVersion' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
componentVersions
Type: Array of ComponentVersionListItem structures

A list of versions that exist for the component.

nextToken
Type: string

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

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ResourceNotFoundException:

The requested resource can't be found.

ThrottlingException:

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

InternalServerException:

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

ListComponents

$result = $client->listComponents([/* ... */]);
$promise = $client->listComponentsAsync([/* ... */]);

Retrieves a paginated list of component summaries. This list includes components that you have permission to view.

Parameter Syntax

$result = $client->listComponents([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'scope' => 'PRIVATE|PUBLIC',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of results to be returned per paginated request.

nextToken
Type: string

The token to be used for the next set of paginated results.

scope
Type: string

The scope of the components to list.

Default: PRIVATE

Result Syntax

[
    'components' => [
        [
            'arn' => '<string>',
            'componentName' => '<string>',
            'latestVersion' => [
                'arn' => '<string>',
                'componentVersion' => '<string>',
                'creationTimestamp' => <DateTime>,
                'description' => '<string>',
                'platforms' => [
                    [
                        'attributes' => ['<string>', ...],
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'publisher' => '<string>',
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
components
Type: Array of Component structures

A list that summarizes each component.

nextToken
Type: string

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

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ResourceNotFoundException:

The requested resource can't be found.

ThrottlingException:

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

InternalServerException:

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

ListCoreDevices

$result = $client->listCoreDevices([/* ... */]);
$promise = $client->listCoreDevicesAsync([/* ... */]);

Retrieves a paginated list of Greengrass core devices.

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated.

Core devices send status updates at the following times:

  • When the IoT Greengrass Core software starts

  • When the core device receives a deployment from the Amazon Web Services Cloud

  • For Greengrass nucleus 2.12.2 and earlier, the core device sends status updates when the status of any component on the core device becomes ERRORED or BROKEN.

  • For Greengrass nucleus 2.12.3 and later, the core device sends status updates when the status of any component on the core device becomes ERRORED, BROKEN, RUNNING, or FINISHED.

  • At a regular interval that you can configure, which defaults to 24 hours

  • For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment

Parameter Syntax

$result = $client->listCoreDevices([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'runtime' => '<string>',
    'status' => 'HEALTHY|UNHEALTHY',
    'thingGroupArn' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of results to be returned per paginated request.

nextToken
Type: string

The token to be used for the next set of paginated results.

runtime
Type: string

The runtime to be used by the core device. The runtime can be:

  • aws_nucleus_classic

  • aws_nucleus_lite

status
Type: string

The core device status by which to filter. If you specify this parameter, the list includes only core devices that have this status. Choose one of the following options:

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

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

thingGroupArn
Type: string

The ARN of the IoT thing group by which to filter. If you specify this parameter, the list includes only core devices that have successfully deployed a deployment that targets the thing group. When you remove a core device from a thing group, the list continues to include that core device.

Result Syntax

[
    'coreDevices' => [
        [
            'architecture' => '<string>',
            'coreDeviceThingName' => '<string>',
            'lastStatusUpdateTimestamp' => <DateTime>,
            'platform' => '<string>',
            'runtime' => '<string>',
            'status' => 'HEALTHY|UNHEALTHY',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
coreDevices
Type: Array of CoreDevice structures

A list that summarizes each core device.

nextToken
Type: string

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

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

ListDeployments

$result = $client->listDeployments([/* ... */]);
$promise = $client->listDeploymentsAsync([/* ... */]);

Retrieves a paginated list of deployments.

Parameter Syntax

$result = $client->listDeployments([
    'historyFilter' => 'ALL|LATEST_ONLY',
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'parentTargetArn' => '<string>',
    'targetArn' => '<string>',
]);

Parameter Details

Members
historyFilter
Type: string

The filter for the list of deployments. Choose one of the following options:

  • ALL – The list includes all deployments.

  • LATEST_ONLY – The list includes only the latest revision of each deployment.

Default: LATEST_ONLY

maxResults
Type: int

The maximum number of results to be returned per paginated request.

Default: 50

nextToken
Type: string

The token to be used for the next set of paginated results.

parentTargetArn
Type: string

The parent deployment's target ARN within a subdeployment.

targetArn
Type: string

The ARN of the target IoT thing or thing group.

Result Syntax

[
    'deployments' => [
        [
            'creationTimestamp' => <DateTime>,
            'deploymentId' => '<string>',
            'deploymentName' => '<string>',
            'deploymentStatus' => 'ACTIVE|COMPLETED|CANCELED|FAILED|INACTIVE',
            'isLatestForTarget' => true || false,
            'parentTargetArn' => '<string>',
            'revisionId' => '<string>',
            'targetArn' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
deployments
Type: Array of Deployment structures

A list that summarizes each deployment.

nextToken
Type: string

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

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

ListEffectiveDeployments

$result = $client->listEffectiveDeployments([/* ... */]);
$promise = $client->listEffectiveDeploymentsAsync([/* ... */]);

Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.

Parameter Syntax

$result = $client->listEffectiveDeployments([
    'coreDeviceThingName' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
coreDeviceThingName
Required: Yes
Type: string

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

maxResults
Type: int

The maximum number of results to be returned per paginated request.

nextToken
Type: string

The token to be used for the next set of paginated results.

Result Syntax

[
    'effectiveDeployments' => [
        [
            'coreDeviceExecutionStatus' => 'IN_PROGRESS|QUEUED|FAILED|COMPLETED|TIMED_OUT|CANCELED|REJECTED|SUCCEEDED',
            'creationTimestamp' => <DateTime>,
            'deploymentId' => '<string>',
            'deploymentName' => '<string>',
            'description' => '<string>',
            'iotJobArn' => '<string>',
            'iotJobId' => '<string>',
            'modifiedTimestamp' => <DateTime>,
            'reason' => '<string>',
            'statusDetails' => [
                'errorStack' => ['<string>', ...],
                'errorTypes' => ['<string>', ...],
            ],
            'targetArn' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
effectiveDeployments
Type: Array of EffectiveDeployment structures

A list that summarizes each deployment on the core device.

nextToken
Type: string

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

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

ListInstalledComponents

$result = $client->listInstalledComponents([/* ... */]);
$promise = $client->listInstalledComponentsAsync([/* ... */]);

Retrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. To include dependencies in the response, set the topologyFilter parameter to ALL.

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated.

Core devices send status updates at the following times:

  • When the IoT Greengrass Core software starts

  • When the core device receives a deployment from the Amazon Web Services Cloud

  • When the status of any component on the core device becomes BROKEN

  • At a regular interval that you can configure, which defaults to 24 hours

  • For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment

Parameter Syntax

$result = $client->listInstalledComponents([
    'coreDeviceThingName' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'topologyFilter' => 'ALL|ROOT',
]);

Parameter Details

Members
coreDeviceThingName
Required: Yes
Type: string

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

maxResults
Type: int

The maximum number of results to be returned per paginated request.

nextToken
Type: string

The token to be used for the next set of paginated results.

topologyFilter
Type: string

The filter for the list of components. Choose from the following options:

  • ALL – The list includes all components installed on the core device.

  • ROOT – The list includes only root components, which are components that you specify in a deployment. When you choose this option, the list doesn't include components that the core device installs as dependencies of other components.

Default: ROOT

Result Syntax

[
    'installedComponents' => [
        [
            'componentName' => '<string>',
            'componentVersion' => '<string>',
            'isRoot' => true || false,
            'lastInstallationSource' => '<string>',
            'lastReportedTimestamp' => <DateTime>,
            'lastStatusChangeTimestamp' => <DateTime>,
            'lifecycleState' => 'NEW|INSTALLED|STARTING|RUNNING|STOPPING|ERRORED|BROKEN|FINISHED',
            'lifecycleStateDetails' => '<string>',
            'lifecycleStatusCodes' => ['<string>', ...],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
installedComponents
Type: Array of InstalledComponent structures

A list that summarizes each component on the core device.

Greengrass nucleus v2.7.0 or later is required to get an accurate lastStatusChangeTimestamp response. This response can be inaccurate in earlier Greengrass nucleus versions.

Greengrass nucleus v2.8.0 or later is required to get an accurate lastInstallationSource and lastReportedTimestamp response. This response can be inaccurate or null in earlier Greengrass nucleus versions.

nextToken
Type: string

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

Errors

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

AccessDeniedException:

You don't have permission to perform the action.

InternalServerException:

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

ThrottlingException:

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

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Retrieves the list of tags for an IoT Greengrass resource.

Parameter Syntax

$result = $client->listTagsForResource([
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The ARN of the resource.

Result Syntax

[
    'tags' => ['<string>', ...],
]

Result Details

Members
tags
Type: Associative array of custom strings keys (TagKey) to strings

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

Errors

InternalServerException:

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

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

ResolveComponentCandidates

$result = $client->resolveComponentCandidates([/* ... */]);
$promise = $client->resolveComponentCandidatesAsync([/* ... */]);

Retrieves a list of components that meet the component, version, and platform requirements of a deployment. Greengrass core devices call this operation when they receive a deployment to identify the components to install.

This operation identifies components that meet all dependency requirements for a deployment. If the requirements conflict, then this operation returns an error and the deployment fails. For example, this occurs if component A requires version >2.0.0 and component B requires version <2.0.0 of a component dependency.

When you specify the component candidates to resolve, IoT Greengrass compares each component's digest from the core device with the component's digest in the Amazon Web Services Cloud. If the digests don't match, then IoT Greengrass specifies to use the version from the Amazon Web Services Cloud.

To use this operation, you must use the data plane API endpoint and authenticate with an IoT device certificate. For more information, see IoT Greengrass endpoints and quotas.

Parameter Syntax

$result = $client->resolveComponentCandidates([
    'componentCandidates' => [
        [
            'componentName' => '<string>',
            'componentVersion' => '<string>',
            'versionRequirements' => ['<string>', ...],
        ],
        // ...
    ],
    'platform' => [
        'attributes' => ['<string>', ...],
        'name' => '<string>',
    ],
]);

Parameter Details

Members
componentCandidates
Type: Array of ComponentCandidate structures

The list of components to resolve.

platform
Type: ComponentPlatform structure

The platform to use to resolve compatible components.

Result Syntax

[
    'resolvedComponentVersions' => [
        [
            'arn' => '<string>',
            'componentName' => '<string>',
            'componentVersion' => '<string>',
            'message' => '<string>',
            'recipe' => <string || resource || Psr\Http\Message\StreamInterface>,
            'vendorGuidance' => 'ACTIVE|DISCONTINUED|DELETED',
        ],
        // ...
    ],
]

Result Details

Members
resolvedComponentVersions
Type: Array of ResolvedComponentVersion structures

A list of components that meet the requirements that you specify in the request. This list includes each component's recipe that you can use to install the component.

Errors

ValidationException:

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

AccessDeniedException:

You don't have permission to perform the action.

ResourceNotFoundException:

The requested resource can't be found.

ConflictException:

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

ThrottlingException:

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

InternalServerException:

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

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Adds tags to an IoT Greengrass resource. If a tag already exists for the resource, this operation updates the tag's value.

Parameter Syntax

$result = $client->tagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The ARN of the resource to tag.

tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

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

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes a tag from an IoT Greengrass resource.

Parameter Syntax

$result = $client->untagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The ARN of the resource to untag.

tagKeys
Required: Yes
Type: Array of strings

A list of keys for tags to remove from the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

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

ValidationException:

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

ResourceNotFoundException:

The requested resource can't be found.

UpdateConnectivityInfo

$result = $client->updateConnectivityInfo([/* ... */]);
$promise = $client->updateConnectivityInfoAsync([/* ... */]);

Updates connectivity information for a Greengrass core device.

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

Parameter Syntax

$result = $client->updateConnectivityInfo([
    'connectivityInfo' => [ // REQUIRED
        [
            'hostAddress' => '<string>',
            'id' => '<string>',
            'metadata' => '<string>',
            'portNumber' => <integer>,
        ],
        // ...
    ],
    'thingName' => '<string>', // REQUIRED
]);

Parameter Details

Members
connectivityInfo
Required: Yes
Type: Array of ConnectivityInfo structures

The connectivity information for the core device.

thingName
Required: Yes
Type: string

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

Result Syntax

[
    'message' => '<string>',
    'version' => '<string>',
]

Result Details

Members
message
Type: string

A message about the connectivity information update request.

version
Type: string

The new version of the connectivity information for the core device.

Errors

ValidationException:

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

InternalServerException:

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

Shapes

AccessDeniedException

Description

You don't have permission to perform the action.

Members
message
Required: Yes
Type: string

AssociateClientDeviceWithCoreDeviceEntry

Description

Contains a request to associate a client device with a core device. The BatchAssociateClientDeviceWithCoreDevice operation consumes a list of these requests.

Members
thingName
Required: Yes
Type: string

The name of the IoT thing that represents the client device to associate.

AssociateClientDeviceWithCoreDeviceErrorEntry

Description

Contains an error that occurs from a request to associate a client device with a core device. The BatchAssociateClientDeviceWithCoreDevice operation returns a list of these errors.

Members
code
Type: string

The error code for the request.

message
Type: string

A message that provides additional information about the error.

thingName
Type: string

The name of the IoT thing whose associate request failed.

AssociatedClientDevice

Description

Contains information about a client device that is associated to a core device for cloud discovery.

Members
associationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that the client device was associated, expressed in ISO 8601 format.

thingName
Type: string

The name of the IoT thing that represents the associated client device.

CloudComponentStatus

Description

Contains the status of a component version in the IoT Greengrass service.

Members
componentState
Type: string

The state of the component version.

errors
Type: Associative array of custom strings keys (NonEmptyString) to strings

A dictionary of errors that communicate why the component version is in an error state. For example, if IoT Greengrass can't access an artifact for the component version, then errors contains the artifact's URI as a key, and the error message as the value for that key.

message
Type: string

A message that communicates details, such as errors, about the status of the component version.

vendorGuidance
Type: string

The vendor guidance state for the component version. This state indicates whether the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:

  • ACTIVE – This component version is available and recommended for use.

  • DISCONTINUED – This component version has been discontinued by its publisher. You can deploy this component version, but we recommend that you use a different version of this component.

  • DELETED – This component version has been deleted by its publisher, so you can't deploy it. If you have any existing deployments that specify this component version, those deployments will fail.

vendorGuidanceMessage
Type: string

A message that communicates details about the vendor guidance state of the component version. This message communicates why a component version is discontinued or deleted.

Component

Description

Contains information about a component.

Members
arn
Type: string

The ARN of the component version.

componentName
Type: string

The name of the component.

latestVersion
Type: ComponentLatestVersion structure

The latest version of the component and its details.

ComponentCandidate

Description

Contains information about a component that is a candidate to deploy to a Greengrass core device.

Members
componentName
Type: string

The name of the component.

componentVersion
Type: string

The version of the component.

versionRequirements
Type: Associative array of custom strings keys (NonEmptyString) to strings

The version requirements for the component's dependencies. Greengrass core devices get the version requirements from component recipes.

IoT Greengrass V2 uses semantic version constraints. For more information, see Semantic Versioning.

ComponentConfigurationUpdate

Description

Contains information about a deployment's update to a component's configuration on Greengrass core devices. For more information, see Update component configurations in the IoT Greengrass V2 Developer Guide.

Members
merge
Type: string

A serialized JSON string that contains the configuration object to merge to target devices. The core device merges this configuration with the component's existing configuration. If this is the first time a component deploys on a device, the core device merges this configuration with the component's default configuration. This means that the core device keeps it's existing configuration for keys and values that you don't specify in this object. For more information, see Merge configuration updates in the IoT Greengrass V2 Developer Guide.

reset
Type: Array of strings

The list of configuration nodes to reset to default values on target devices. Use JSON pointers to specify each node to reset. JSON pointers start with a forward slash (/) and use forward slashes to separate the key for each level in the object. For more information, see the JSON pointer specification and Reset configuration updates in the IoT Greengrass V2 Developer Guide.

ComponentDependencyRequirement

Description

Contains information about a component dependency for a Lambda function component.

Members
dependencyType
Type: string

The type of this dependency. Choose from the following options:

  • SOFT – The component doesn't restart if the dependency changes state.

  • HARD – The component restarts if the dependency changes state.

Default: HARD

versionRequirement
Type: string

The component version requirement for the component dependency.

IoT Greengrass V2 uses semantic version constraints. For more information, see Semantic Versioning.

ComponentDeploymentSpecification

Description

Contains information about a component to deploy.

Members
componentVersion
Required: Yes
Type: string

The version of the component.

configurationUpdate

The configuration updates to deploy for the component. You can define reset updates and merge updates. A reset updates the keys that you specify to the default configuration for the component. A merge updates the core device's component configuration with the keys and values that you specify. The IoT Greengrass Core software applies reset updates before it applies merge updates. For more information, see Update component configurations in the IoT Greengrass V2 Developer Guide.

runWith
Type: ComponentRunWith structure

The system user and group that the IoT Greengrass Core software uses to run component processes on the core device. If you omit this parameter, the IoT Greengrass Core software uses the system user and group that you configure for the core device. For more information, see Configure the user and group that run components in the IoT Greengrass V2 Developer Guide.

ComponentLatestVersion

Description

Contains information about the latest version of a component.

Members
arn
Type: string

The ARN of the component version.

componentVersion
Type: string

The version of the component.

creationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

description
Type: string

The description of the component version.

platforms
Type: Array of ComponentPlatform structures

The platforms that the component version supports.

publisher
Type: string

The publisher of the component version.

ComponentPlatform

Description

Contains information about a platform that a component supports.

Members
attributes
Type: Associative array of custom strings keys (NonEmptyString) to strings

A dictionary of attributes for the platform. The IoT Greengrass Core software defines the os and architecture by default. You can specify additional platform attributes for a core device when you deploy the Greengrass nucleus component. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide.

name
Type: string

The friendly name of the platform. This name helps you identify the platform.

If you omit this parameter, IoT Greengrass creates a friendly name from the os and architecture of the platform.

ComponentRunWith

Description

Contains information system user and group that the IoT Greengrass Core software uses to run component processes on the core device. For more information, see Configure the user and group that run components in the IoT Greengrass V2 Developer Guide.

Members
posixUser
Type: string

The POSIX system user and, optionally, group to use to run this component on Linux core devices. The user, and group if specified, must exist on each Linux core device. Specify the user and group separated by a colon (:) in the following format: user:group. The group is optional. If you don't specify a group, the IoT Greengrass Core software uses the primary user for the group.

If you omit this parameter, the IoT Greengrass Core software uses the default system user and group that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run components.

systemResourceLimits
Type: SystemResourceLimits structure

The system resource limits to apply to this component's process on the core device. IoT Greengrass currently supports this feature on only Linux core devices.

If you omit this parameter, the IoT Greengrass Core software uses the default system resource limits that you configure on the Greengrass nucleus component. For more information, see Configure system resource limits for components.

windowsUser
Type: string

The Windows user to use to run this component on Windows core devices. The user must exist on each Windows core device, and its name and password must be in the LocalSystem account's Credentials Manager instance.

If you omit this parameter, the IoT Greengrass Core software uses the default Windows user that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run components.

ComponentVersionListItem

Description

Contains information about a component version in a list.

Members
arn
Type: string

The ARN of the component version.

componentName
Type: string

The name of the component.

componentVersion
Type: string

The version of the component.

ConflictException

Description

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

Members
message
Required: Yes
Type: string
resourceId
Required: Yes
Type: string

The ID of the resource that conflicts with the request.

resourceType
Required: Yes
Type: string

The type of the resource that conflicts with the request.

ConnectivityInfo

Description

Contains information about an endpoint and port where client devices can connect to an MQTT broker on a Greengrass core device.

Members
hostAddress
Type: string

The IP address or DNS address where client devices can connect to an MQTT broker on the Greengrass core device.

id
Type: string

An ID for the connectivity information.

metadata
Type: string

Additional metadata to provide to client devices that connect to this core device.

portNumber
Type: int

The port where the MQTT broker operates on the core device. This port is typically 8883, which is the default port for the MQTT broker component that runs on core devices.

CoreDevice

Description

Contains information about a Greengrass core device, which is an IoT thing that runs the IoT Greengrass Core software.

Members
architecture
Type: string

The computer architecture of the core device.

coreDeviceThingName
Type: string

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

lastStatusUpdateTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

platform
Type: string

The operating system platform that the core device runs.

runtime
Type: string

The runtime for the core device. The runtime can be:

  • aws_nucleus_classic

  • aws_nucleus_lite

status
Type: string

The status of the core device. Core devices can have the following statuses:

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

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

Deployment

Description

Contains information about a deployment.

Members
creationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

deploymentId
Type: string

The ID of the deployment.

deploymentName
Type: string

The name of the deployment.

deploymentStatus
Type: string

The status of the deployment.

isLatestForTarget
Type: boolean

Whether or not the deployment is the latest revision for its target.

parentTargetArn
Type: string

The parent deployment's target ARN within a subdeployment.

revisionId
Type: string

The revision number of the deployment.

targetArn
Type: string

The ARN of the target IoT thing or thing group. When creating a subdeployment, the targetARN can only be a thing group.

DeploymentComponentUpdatePolicy

Description

Contains information about a deployment's policy that defines when components are safe to update.

Each component on a device can report whether or not it's ready to update. After a component and its dependencies are ready, they can apply the update in the deployment. You can configure whether or not the deployment notifies components of an update and waits for a response. You specify the amount of time each component has to respond to the update notification.

Members
action
Type: string

Whether or not to notify components and wait for components to become safe to update. Choose from the following options:

  • NOTIFY_COMPONENTS – The deployment notifies each component before it stops and updates that component. Components can use the SubscribeToComponentUpdates IPC operation to receive these notifications. Then, components can respond with the DeferComponentUpdate IPC operation. For more information, see Create deployments in the IoT Greengrass V2 Developer Guide.

  • SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify components or wait for them to be safe to update.

Default: NOTIFY_COMPONENTS

timeoutInSeconds
Type: int

The amount of time in seconds that each component on a device has to report that it's safe to update. If the component waits for longer than this timeout, then the deployment proceeds on the device.

Default: 60

DeploymentConfigurationValidationPolicy

Description

Contains information about how long a component on a core device can validate its configuration updates before it times out. Components can use the SubscribeToValidateConfigurationUpdates IPC operation to receive notifications when a deployment specifies a configuration update. Then, components can respond with the SendConfigurationValidityReport IPC operation. For more information, see Create deployments in the IoT Greengrass V2 Developer Guide.

Members
timeoutInSeconds
Type: int

The amount of time in seconds that a component can validate its configuration updates. If the validation time exceeds this timeout, then the deployment proceeds for the device.

Default: 30

DeploymentIoTJobConfiguration

Description

Contains information about an IoT job configuration.

Members
abortConfig
Type: IoTJobAbortConfig structure

The stop configuration for the job. This configuration defines when and how to stop a job rollout.

jobExecutionsRolloutConfig

The rollout configuration for the job. This configuration defines the rate at which the job rolls out to the fleet of target devices.

timeoutConfig
Type: IoTJobTimeoutConfig structure

The timeout configuration for the job. This configuration defines the amount of time each device has to complete the job.

DeploymentPolicies

Description

Contains information about policies that define how a deployment updates components and handles failure.

Members
componentUpdatePolicy

The component update policy for the configuration deployment. This policy defines when it's safe to deploy the configuration to devices.

configurationValidationPolicy

The configuration validation policy for the configuration deployment. This policy defines how long each component has to validate its configure updates.

failureHandlingPolicy
Type: string

The failure handling policy for the configuration deployment. This policy defines what to do if the deployment fails.

Default: ROLLBACK

DisassociateClientDeviceFromCoreDeviceEntry

Description

Contains a request to disassociate a client device from a core device. The BatchDisassociateClientDeviceWithCoreDevice operation consumes a list of these requests.

Members
thingName
Required: Yes
Type: string

The name of the IoT thing that represents the client device to disassociate.

DisassociateClientDeviceFromCoreDeviceErrorEntry

Description

Contains an error that occurs from a request to disassociate a client device from a core device. The BatchDisassociateClientDeviceWithCoreDevice operation returns a list of these errors.

Members
code
Type: string

The error code for the request.

message
Type: string

A message that provides additional information about the error.

thingName
Type: string

The name of the IoT thing whose disassociate request failed.

EffectiveDeployment

Description

Contains information about a deployment job that IoT Greengrass sends to a Greengrass core device.

Members
coreDeviceExecutionStatus
Required: Yes
Type: string

The status of the deployment job on the Greengrass core device.

  • IN_PROGRESS – The deployment job is running.

  • QUEUED – The deployment job is in the job queue and waiting to run.

  • FAILED – The deployment failed. For more information, see the statusDetails field.

  • COMPLETED – The deployment to an IoT thing was completed successfully.

  • TIMED_OUT – The deployment didn't complete in the allotted time.

  • CANCELED – The deployment was canceled by the user.

  • REJECTED – The deployment was rejected. For more information, see the statusDetails field.

  • SUCCEEDED – The deployment to an IoT thing group was completed successfully.

creationTimestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

deploymentId
Required: Yes
Type: string

The ID of the deployment.

deploymentName
Required: Yes
Type: string

The name of the deployment.

description
Type: string

The description of the deployment job.

iotJobArn
Type: string

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

iotJobId
Type: string

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

modifiedTimestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the deployment job was last modified, expressed in ISO 8601 format.

reason
Type: string

The reason code for the update, if the job was updated.

statusDetails

The status details that explain why a deployment has an error. This response will be null if the deployment is in a success state.

targetArn
Required: Yes
Type: string

The ARN of the target IoT thing or thing group.

EffectiveDeploymentStatusDetails

Description

Contains all error-related information for the deployment record. The status details will be null if the deployment is in a success state.

Greengrass nucleus v2.8.0 or later is required to get an accurate errorStack and errorTypes response. This field will not be returned for earlier Greengrass nucleus versions.

Members
errorStack
Type: Array of strings

Contains an ordered list of short error codes that range from the most generic error to the most specific one. The error codes describe the reason for failure whenever the coreDeviceExecutionStatus is in a failed state. The response will be an empty list if there is no error.

errorTypes
Type: Array of strings

Contains tags which describe the error. You can use the error types to classify errors to assist with remediating the failure. The response will be an empty list if there is no error.

InstalledComponent

Description

Contains information about a component on a Greengrass core device.

Members
componentName
Type: string

The name of the component.

componentVersion
Type: string

The version of the component.

isRoot
Type: boolean

Whether or not the component is a root component.

lastInstallationSource
Type: string

The most recent deployment source that brought the component to the Greengrass core device. For a thing group deployment or thing deployment, the source will be the ID of the last deployment that contained the component. For local deployments it will be LOCAL.

Any deployment will attempt to reinstall currently broken components on the device, which will update the last installation source.

lastReportedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The last time the Greengrass core device sent a message containing a component's state to the Amazon Web Services Cloud.

A component does not need to see a state change for this field to update.

lastStatusChangeTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The status of how current the data is.

This response is based off of component state changes. The status reflects component disruptions and deployments. If a component only sees a configuration update during a deployment, it might not undergo a state change and this status would not be updated.

lifecycleState
Type: string

The lifecycle state of the component.

lifecycleStateDetails
Type: string

A detailed response about the lifecycle state of the component that explains the reason why a component has an error or is broken.

lifecycleStatusCodes
Type: Array of strings

The status codes that indicate the reason for failure whenever the lifecycleState has an error or is in a broken state.

Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes response. This response can be inaccurate in earlier Greengrass nucleus versions.

InternalServerException

Description

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

Members
message
Required: Yes
Type: string
retryAfterSeconds
Type: int

The amount of time to wait before you retry the request.

IoTJobAbortConfig

Description

Contains a list of criteria that define when and how to cancel a configuration deployment.

Members
criteriaList
Required: Yes
Type: Array of IoTJobAbortCriteria structures

The list of criteria that define when and how to cancel the configuration deployment.

IoTJobAbortCriteria

Description

Contains criteria that define when and how to cancel a job.

The deployment stops if the following conditions are true:

  1. The number of things that receive the deployment exceeds the minNumberOfExecutedThings.

  2. The percentage of failures with type failureType exceeds the thresholdPercentage.

Members
action
Required: Yes
Type: string

The action to perform when the criteria are met.

failureType
Required: Yes
Type: string

The type of job deployment failure that can cancel a job.

minNumberOfExecutedThings
Required: Yes
Type: int

The minimum number of things that receive the configuration before the job can cancel.

thresholdPercentage
Required: Yes
Type: double

The minimum percentage of failureType failures that occur before the job can cancel.

This parameter supports up to two digits after the decimal (for example, you can specify 10.9 or 10.99, but not 10.999).

IoTJobExecutionsRolloutConfig

Description

Contains information about the rollout configuration for a job. This configuration defines the rate at which the job deploys a configuration to a fleet of target devices.

Members
exponentialRate

The exponential rate to increase the job rollout rate.

maximumPerMinute
Type: int

The maximum number of devices that receive a pending job notification, per minute.

IoTJobExponentialRolloutRate

Description

Contains information about an exponential rollout rate for a configuration deployment job.

Members
baseRatePerMinute
Required: Yes
Type: int

The minimum number of devices that receive a pending job notification, per minute, when the job starts. This parameter defines the initial rollout rate of the job.

incrementFactor
Required: Yes
Type: double

The exponential factor to increase the rollout rate for the job.

This parameter supports up to one digit after the decimal (for example, you can specify 1.5, but not 1.55).

rateIncreaseCriteria
Required: Yes
Type: IoTJobRateIncreaseCriteria structure

The criteria to increase the rollout rate for the job.

IoTJobRateIncreaseCriteria

Description

Contains information about criteria to meet before a job increases its rollout rate. Specify either numberOfNotifiedThings or numberOfSucceededThings.

Members
numberOfNotifiedThings
Type: int

The number of devices to receive the job notification before the rollout rate increases.

numberOfSucceededThings
Type: int

The number of devices to successfully run the configuration job before the rollout rate increases.

IoTJobTimeoutConfig

Description

Contains information about the timeout configuration for a job.

Members
inProgressTimeoutInMinutes
Type: long (int|float)

The amount of time, in minutes, that devices have to complete the job. The timer starts when the job status is set to IN_PROGRESS. If the job status doesn't change to a terminal state before the time expires, then the job status is set to TIMED_OUT.

The timeout interval must be between 1 minute and 7 days (10080 minutes).

LambdaContainerParams

Description

Contains information about a container in which Lambda functions run on Greengrass core devices.

Members
devices
Type: Array of LambdaDeviceMount structures

The list of system devices that the container can access.

memorySizeInKB
Type: int

The memory size of the container, expressed in kilobytes.

Default: 16384 (16 MB)

mountROSysfs
Type: boolean

Whether or not the container can read information from the device's /sys folder.

Default: false

volumes
Type: Array of LambdaVolumeMount structures

The list of volumes that the container can access.

LambdaDeviceMount

Description

Contains information about a device that Linux processes in a container can access.

Members
addGroupOwner
Type: boolean

Whether or not to add the component's system user as an owner of the device.

Default: false

path
Required: Yes
Type: string

The mount path for the device in the file system.

permission
Type: string

The permission to access the device: read/only (ro) or read/write (rw).

Default: ro

LambdaEventSource

Description

Contains information about an event source for an Lambda function. The event source defines the topics on which this Lambda function subscribes to receive messages that run the function.

Members
topic
Required: Yes
Type: string

The topic to which to subscribe to receive event messages.

type
Required: Yes
Type: string

The type of event source. Choose from the following options:

  • PUB_SUB – Subscribe to local publish/subscribe messages. This event source type doesn't support MQTT wildcards (+ and #) in the event source topic.

  • IOT_CORE – Subscribe to Amazon Web Services IoT Core MQTT messages. This event source type supports MQTT wildcards (+ and #) in the event source topic.

LambdaExecutionParameters

Description

Contains parameters for a Lambda function that runs on IoT Greengrass.

Members
environmentVariables
Type: Associative array of custom strings keys (NonEmptyString) to strings

The map of environment variables that are available to the Lambda function when it runs.

eventSources
Type: Array of LambdaEventSource structures

The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and Amazon Web Services IoT Core MQTT messages.

execArgs
Type: Array of strings

The list of arguments to pass to the Lambda function when it runs.

inputPayloadEncodingType
Type: string

The encoding type that the Lambda function supports.

Default: json

linuxProcessParams
Type: LambdaLinuxProcessParams structure

The parameters for the Linux process that contains the Lambda function.

maxIdleTimeInSeconds
Type: int

The maximum amount of time in seconds that a non-pinned Lambda function can idle before the IoT Greengrass Core software stops its process.

maxInstancesCount
Type: int

The maximum number of instances that a non-pinned Lambda function can run at the same time.

maxQueueSize
Type: int

The maximum size of the message queue for the Lambda function component. The IoT Greengrass core stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.

pinned
Type: boolean

Whether or not the Lambda function is pinned, or long-lived.

  • A pinned Lambda function starts when IoT Greengrass starts and keeps running in its own container.

  • A non-pinned Lambda function starts only when it receives a work item and exists after it idles for maxIdleTimeInSeconds. If the function has multiple work items, the IoT Greengrass Core software creates multiple instances of the function.

Default: true

statusTimeoutInSeconds
Type: int

The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.

timeoutInSeconds
Type: int

The maximum amount of time in seconds that the Lambda function can process a work item.

LambdaFunctionRecipeSource

Description

Contains information about an Lambda function to import to create a component.

Members
componentDependencies
Type: Associative array of custom strings keys (NonEmptyString) to ComponentDependencyRequirement structures

The component versions on which this Lambda function component depends.

componentLambdaParameters
Type: LambdaExecutionParameters structure

The system and runtime parameters for the Lambda function as it runs on the Greengrass core device.

componentName
Type: string

The name of the component.

Defaults to the name of the Lambda function.

componentPlatforms
Type: Array of ComponentPlatform structures

The platforms that the component version supports.

componentVersion
Type: string

The version of the component.

Defaults to the version of the Lambda function as a semantic version. For example, if your function version is 3, the component version becomes 3.0.0.

lambdaArn
Required: Yes
Type: string

The ARN of the Lambda function. The ARN must include the version of the function to import. You can't use version aliases like $LATEST.

LambdaLinuxProcessParams

Description

Contains parameters for a Linux process that contains an Lambda function.

Members
containerParams
Type: LambdaContainerParams structure

The parameters for the container in which the Lambda function runs.

isolationMode
Type: string

The isolation mode for the process that contains the Lambda function. The process can run in an isolated runtime environment inside the IoT Greengrass container, or as a regular process outside any container.

Default: GreengrassContainer

LambdaVolumeMount

Description

Contains information about a volume that Linux processes in a container can access. When you define a volume, the IoT Greengrass Core software mounts the source files to the destination inside the container.

Members
addGroupOwner
Type: boolean

Whether or not to add the IoT Greengrass user group as an owner of the volume.

Default: false

destinationPath
Required: Yes
Type: string

The path to the logical volume in the file system.

permission
Type: string

The permission to access the volume: read/only (ro) or read/write (rw).

Default: ro

sourcePath
Required: Yes
Type: string

The path to the physical volume in the file system.

RequestAlreadyInProgressException

Description

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

Members
message
Required: Yes
Type: string

ResolvedComponentVersion

Description

Contains information about a component version that is compatible to run on a Greengrass core device.

Members
arn
Type: string

The ARN of the component version.

componentName
Type: string

The name of the component.

componentVersion
Type: string

The version of the component.

message
Type: string

A message that communicates details about the vendor guidance state of the component version. This message communicates why a component version is discontinued or deleted.

recipe
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The recipe of the component version.

vendorGuidance
Type: string

The vendor guidance state for the component version. This state indicates whether the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:

  • ACTIVE – This component version is available and recommended for use.

  • DISCONTINUED – This component version has been discontinued by its publisher. You can deploy this component version, but we recommend that you use a different version of this component.

  • DELETED – This component version has been deleted by its publisher, so you can't deploy it. If you have any existing deployments that specify this component version, those deployments will fail.

ResourceNotFoundException

Description

The requested resource can't be found.

Members
message
Required: Yes
Type: string
resourceId
Required: Yes
Type: string

The ID of the resource that isn't found.

resourceType
Required: Yes
Type: string

The type of the resource that isn't found.

ServiceQuotaExceededException

Description

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

Members
message
Required: Yes
Type: string
quotaCode
Required: Yes
Type: string

The code for the quota in Service Quotas.

resourceId
Type: string

The ID of the resource that exceeds the service quota.

resourceType
Type: string

The type of the resource that exceeds the service quota.

serviceCode
Required: Yes
Type: string

The code for the service in Service Quotas.

SystemResourceLimits

Description

Contains information about system resource limits that the IoT Greengrass Core software applies to a component's processes. For more information, see Configure system resource limits for components.

Members
cpus
Type: double

The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.

memory
Type: long (int|float)

The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.

ThrottlingException

Description

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

Members
message
Required: Yes
Type: string
quotaCode
Type: string

The code for the quota in Service Quotas.

retryAfterSeconds
Type: int

The amount of time to wait before you retry the request.

serviceCode
Type: string

The code for the service in Service Quotas.

ValidationException

Description

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

Members
fields
Type: Array of ValidationExceptionField structures

The list of fields that failed to validate.

message
Required: Yes
Type: string
reason
Type: string

The reason for the validation exception.

ValidationExceptionField

Description

Contains information about a validation exception field.

Members
message
Required: Yes
Type: string

The message of the exception field.

name
Required: Yes
Type: string

The name of the exception field.