GreengrassClient

AWS IoT Greengrass seamlessly extends AWS onto physical devices so they can act locally on the data they generate, while still using the cloud for management, analytics, and durable storage. AWS IoT Greengrass ensures your devices can respond quickly to local events and operate with intermittent connectivity. AWS IoT Greengrass minimizes the cost of transmitting data to the cloud by allowing you to author AWS Lambda functions that execute locally.

Installation

NPM
npm install @aws-sdk/client-greengrass
Yarn
yarn add @aws-sdk/client-greengrass
pnpm
pnpm add @aws-sdk/client-greengrass

GreengrassClient Operations

Command
Summary
AssociateRoleToGroupCommand
Associates a role with a group. Your Greengrass core will use the role to access AWS cloud services. The role's permissions should allow Greengrass core Lambda functions to perform actions against the cloud.
AssociateServiceRoleToAccountCommand
Associates a role with your account. AWS IoT Greengrass will use the role to access your Lambda functions and AWS IoT resources. This is necessary for deployments to succeed. The role must have at least minimum permissions in the policy ''AWSGreengrassResourceAccessRolePolicy''.
CreateConnectorDefinitionCommand
Creates a connector definition. You may provide the initial version of the connector definition now or use ''CreateConnectorDefinitionVersion'' at a later time.
CreateConnectorDefinitionVersionCommand
Creates a version of a connector definition which has already been defined.
CreateCoreDefinitionCommand
Creates a core definition. You may provide the initial version of the core definition now or use ''CreateCoreDefinitionVersion'' at a later time. Greengrass groups must each contain exactly one Greengrass core.
CreateCoreDefinitionVersionCommand
Creates a version of a core definition that has already been defined. Greengrass groups must each contain exactly one Greengrass core.
CreateDeploymentCommand
Creates a deployment. ''CreateDeployment'' requests are idempotent with respect to the ''X-Amzn-Client-Token'' token and the request parameters.
CreateDeviceDefinitionCommand
Creates a device definition. You may provide the initial version of the device definition now or use ''CreateDeviceDefinitionVersion'' at a later time.
CreateDeviceDefinitionVersionCommand
Creates a version of a device definition that has already been defined.
CreateFunctionDefinitionCommand
Creates a Lambda function definition which contains a list of Lambda functions and their configurations to be used in a group. You can create an initial version of the definition by providing a list of Lambda functions and their configurations now, or use ''CreateFunctionDefinitionVersion'' later.
CreateFunctionDefinitionVersionCommand
Creates a version of a Lambda function definition that has already been defined.
CreateGroupCertificateAuthorityCommand
Creates a CA for the group. If a CA already exists, it will rotate the existing CA.
CreateGroupCommand
Creates a group. You may provide the initial version of the group or use ''CreateGroupVersion'' at a later time. Tip: You can use the ''gg_group_setup'' package (https://github.com/awslabs/aws-greengrass-group-setup) as a library or command-line application to create and deploy Greengrass groups.
CreateGroupVersionCommand
Creates a version of a group which has already been defined.
CreateLoggerDefinitionCommand
Creates a logger definition. You may provide the initial version of the logger definition now or use ''CreateLoggerDefinitionVersion'' at a later time.
CreateLoggerDefinitionVersionCommand
Creates a version of a logger definition that has already been defined.
CreateResourceDefinitionCommand
Creates a resource definition which contains a list of resources to be used in a group. You can create an initial version of the definition by providing a list of resources now, or use ''CreateResourceDefinitionVersion'' later.
CreateResourceDefinitionVersionCommand
Creates a version of a resource definition that has already been defined.
CreateSoftwareUpdateJobCommand
Creates a software update for a core or group of cores (specified as an IoT thing group.) Use this to update the OTA Agent as well as the Greengrass core software. It makes use of the IoT Jobs feature which provides additional commands to manage a Greengrass core software update job.
CreateSubscriptionDefinitionCommand
Creates a subscription definition. You may provide the initial version of the subscription definition now or use ''CreateSubscriptionDefinitionVersion'' at a later time.
CreateSubscriptionDefinitionVersionCommand
Creates a version of a subscription definition which has already been defined.
DeleteConnectorDefinitionCommand
Deletes a connector definition.
DeleteCoreDefinitionCommand
Deletes a core definition.
DeleteDeviceDefinitionCommand
Deletes a device definition.
DeleteFunctionDefinitionCommand
Deletes a Lambda function definition.
DeleteGroupCommand
Deletes a group.
DeleteLoggerDefinitionCommand
Deletes a logger definition.
DeleteResourceDefinitionCommand
Deletes a resource definition.
DeleteSubscriptionDefinitionCommand
Deletes a subscription definition.
DisassociateRoleFromGroupCommand
Disassociates the role from a group.
DisassociateServiceRoleFromAccountCommand
Disassociates the service role from your account. Without a service role, deployments will not work.
GetAssociatedRoleCommand
Retrieves the role associated with a particular group.
GetBulkDeploymentStatusCommand
Returns the status of a bulk deployment.
GetConnectivityInfoCommand
Retrieves the connectivity information for a core.
GetConnectorDefinitionCommand
Retrieves information about a connector definition.
GetConnectorDefinitionVersionCommand
Retrieves information about a connector definition version, including the connectors that the version contains. Connectors are prebuilt modules that interact with local infrastructure, device protocols, AWS, and other cloud services.
GetCoreDefinitionCommand
Retrieves information about a core definition version.
GetCoreDefinitionVersionCommand
Retrieves information about a core definition version.
GetDeploymentStatusCommand
Returns the status of a deployment.
GetDeviceDefinitionCommand
Retrieves information about a device definition.
GetDeviceDefinitionVersionCommand
Retrieves information about a device definition version.
GetFunctionDefinitionCommand
Retrieves information about a Lambda function definition, including its creation time and latest version.
GetFunctionDefinitionVersionCommand
Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.
GetGroupCertificateAuthorityCommand
Retreives the CA associated with a group. Returns the public key of the CA.
GetGroupCertificateConfigurationCommand
Retrieves the current configuration for the CA used by the group.
GetGroupCommand
Retrieves information about a group.
GetGroupVersionCommand
Retrieves information about a group version.
GetLoggerDefinitionCommand
Retrieves information about a logger definition.
GetLoggerDefinitionVersionCommand
Retrieves information about a logger definition version.
GetResourceDefinitionCommand
Retrieves information about a resource definition, including its creation time and latest version.
GetResourceDefinitionVersionCommand
Retrieves information about a resource definition version, including which resources are included in the version.
GetServiceRoleForAccountCommand
Retrieves the service role that is attached to your account.
GetSubscriptionDefinitionCommand
Retrieves information about a subscription definition.
GetSubscriptionDefinitionVersionCommand
Retrieves information about a subscription definition version.
GetThingRuntimeConfigurationCommand
Get the runtime configuration of a thing.
ListBulkDeploymentDetailedReportsCommand
Gets a paginated list of the deployments that have been started in a bulk deployment operation, and their current deployment status.
ListBulkDeploymentsCommand
Returns a list of bulk deployments.
ListConnectorDefinitionVersionsCommand
Lists the versions of a connector definition, which are containers for connectors. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.
ListConnectorDefinitionsCommand
Retrieves a list of connector definitions.
ListCoreDefinitionVersionsCommand
Lists the versions of a core definition.
ListCoreDefinitionsCommand
Retrieves a list of core definitions.
ListDeploymentsCommand
Returns a history of deployments for the group.
ListDeviceDefinitionVersionsCommand
Lists the versions of a device definition.
ListDeviceDefinitionsCommand
Retrieves a list of device definitions.
ListFunctionDefinitionVersionsCommand
Lists the versions of a Lambda function definition.
ListFunctionDefinitionsCommand
Retrieves a list of Lambda function definitions.
ListGroupCertificateAuthoritiesCommand
Retrieves the current CAs for a group.
ListGroupVersionsCommand
Lists the versions of a group.
ListGroupsCommand
Retrieves a list of groups.
ListLoggerDefinitionVersionsCommand
Lists the versions of a logger definition.
ListLoggerDefinitionsCommand
Retrieves a list of logger definitions.
ListResourceDefinitionVersionsCommand
Lists the versions of a resource definition.
ListResourceDefinitionsCommand
Retrieves a list of resource definitions.
ListSubscriptionDefinitionVersionsCommand
Lists the versions of a subscription definition.
ListSubscriptionDefinitionsCommand
Retrieves a list of subscription definitions.
ListTagsForResourceCommand
Retrieves a list of resource tags for a resource arn.
ResetDeploymentsCommand
Resets a group's deployments.
StartBulkDeploymentCommand
Deploys multiple groups in one operation. This action starts the bulk deployment of a specified set of group versions. Each group version deployment will be triggered with an adaptive rate that has a fixed upper limit. We recommend that you include an ''X-Amzn-Client-Token'' token in every ''StartBulkDeployment'' request. These requests are idempotent with respect to the token and the request parameters.
StopBulkDeploymentCommand
Stops the execution of a bulk deployment. This action returns a status of ''Stopping'' until the deployment is stopped. You cannot start a new bulk deployment while a previous deployment is in the ''Stopping'' state. This action doesn't rollback completed deployments or cancel pending deployments.
TagResourceCommand
Adds tags to a Greengrass resource. Valid resources are 'Group', 'ConnectorDefinition', 'CoreDefinition', 'DeviceDefinition', 'FunctionDefinition', 'LoggerDefinition', 'SubscriptionDefinition', 'ResourceDefinition', and 'BulkDeployment'.
UntagResourceCommand
Remove resource tags from a Greengrass Resource.
UpdateConnectivityInfoCommand
Updates the connectivity information for the core. Any devices that belong to the group which has this core will receive this information in order to find the location of the core and connect to it.
UpdateConnectorDefinitionCommand
Updates a connector definition.
UpdateCoreDefinitionCommand
Updates a core definition.
UpdateDeviceDefinitionCommand
Updates a device definition.
UpdateFunctionDefinitionCommand
Updates a Lambda function definition.
UpdateGroupCertificateConfigurationCommand
Updates the Certificate expiry time for a group.
UpdateGroupCommand
Updates a group.
UpdateLoggerDefinitionCommand
Updates a logger definition.
UpdateResourceDefinitionCommand
Updates a resource definition.
UpdateSubscriptionDefinitionCommand
Updates a subscription definition.
UpdateThingRuntimeConfigurationCommand
Updates the runtime configuration of a thing.

GreengrassClient Configuration

Parameter
Type
Description
defaultsMode
Optional
DefaultsMode | Provider<DefaultsMode>
The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
disableHostPrefix
Optional
boolean
Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.
extensions
Optional
RuntimeExtension[]
Optional extensions
logger
Optional
Logger
Optional logger for logging debug/info/warn/error.
maxAttempts
Optional
number | Provider<number>
Value for how many times a request will be made at most in case of retry.
profile
Optional
string
Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.
region
Optional
string | Provider<string>
The AWS region to which this client will send requests
requestHandler
Optional
__HttpHandlerUserInput
The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
retryMode
Optional
string | Provider<string>
Specifies which retry algorithm to use.
useDualstackEndpoint
Optional
boolean | Provider<boolean>
Enables IPv6/IPv4 dualstack endpoint.
useFipsEndpoint
Optional
boolean | Provider<boolean>
Enables FIPS compatible endpoints.
Additional config fields are described in the full configuration type: GreengrassClientConfig