You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.Greengrass

Inherits:
AWS.Service show all
Identifier:
greengrass
API Version:
2017-06-07
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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.

Sending a Request Using Greengrass

var greengrass = new AWS.Greengrass();
greengrass.associateRoleToGroup(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Greengrass object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var greengrass = new AWS.Greengrass({apiVersion: '2017-06-07'});

You can also set the API version globally in AWS.config.apiVersions using the greengrass service identifier:

AWS.config.apiVersions = {
  greengrass: '2017-06-07',
  // other service API versions
};

var greengrass = new AWS.Greengrass();

Version:

  • 2017-06-07

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Greengrass(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Greengrass object

var greengrass = new AWS.Greengrass({apiVersion: '2017-06-07'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Greengrass.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Greengrass.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Greengrass.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

associateRoleToGroup(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the associateRoleToGroup operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  RoleArn: 'STRING_VALUE' /* required */
};
greengrass.associateRoleToGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.
    • RoleArn — (String) The ARN of the role you wish to associate with this group. The existence of the role is not validated.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AssociatedAt — (String) The time, in milliseconds since the epoch, when the role ARN was associated with the group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateServiceRoleToAccount(params = {}, callback) ⇒ AWS.Request

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''.

Service Reference:

Examples:

Calling the associateServiceRoleToAccount operation

var params = {
  RoleArn: 'STRING_VALUE' /* required */
};
greengrass.associateServiceRoleToAccount(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • RoleArn — (String) The ARN of the service role you wish to associate with your account.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AssociatedAt — (String) The time when the service role was associated with the account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createConnectorDefinition(params = {}, callback) ⇒ AWS.Request

Creates a connector definition. You may provide the initial version of the connector definition now or use ''CreateConnectorDefinitionVersion'' at a later time.

Service Reference:

Examples:

Calling the createConnectorDefinition operation

var params = {
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    Connectors: [
      {
        ConnectorArn: 'STRING_VALUE', /* required */
        Id: 'STRING_VALUE', /* required */
        Parameters: {
          '<__string>': 'STRING_VALUE',
          /* '<__string>': ... */
        }
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createConnectorDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the connector definition.
      • Connectors — (Array<map>) A list of references to connectors in this version, with their corresponding configuration settings.
        • ConnectorArnrequired — (String) The ARN of the connector.
        • Idrequired — (String) A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Max length is 128 characters with pattern [a-zA-Z0-9:_-]+.
        • Parameters — (map<String>) The parameters or configuration that the connector uses.
    • Name — (String) The name of the connector definition.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createConnectorDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the createConnectorDefinitionVersion operation

var params = {
  ConnectorDefinitionId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  Connectors: [
    {
      ConnectorArn: 'STRING_VALUE', /* required */
      Id: 'STRING_VALUE', /* required */
      Parameters: {
        '<__string>': 'STRING_VALUE',
        /* '<__string>': ... */
      }
    },
    /* more items */
  ]
};
greengrass.createConnectorDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • ConnectorDefinitionId — (String) The ID of the connector definition.
    • Connectors — (Array<map>) A list of references to connectors in this version, with their corresponding configuration settings.
      • ConnectorArnrequired — (String) The ARN of the connector.
      • Idrequired — (String) A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Max length is 128 characters with pattern [a-zA-Z0-9:_-]+.
      • Parameters — (map<String>) The parameters or configuration that the connector uses.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createCoreDefinition(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createCoreDefinition operation

var params = {
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    Cores: [
      {
        CertificateArn: 'STRING_VALUE', /* required */
        Id: 'STRING_VALUE', /* required */
        ThingArn: 'STRING_VALUE', /* required */
        SyncShadow: true || false
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createCoreDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the core definition.
      • Cores — (Array<map>) A list of cores in the core definition version.
        • CertificateArnrequired — (String) The ARN of the certificate associated with the core.
        • Idrequired — (String) A descriptive or arbitrary ID for the core. This value must be unique within the core definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
        • SyncShadow — (Boolean) If true, the core's local shadow is automatically synced with the cloud.
        • ThingArnrequired — (String) The ARN of the thing which is the core.
    • Name — (String) The name of the core definition.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createCoreDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createCoreDefinitionVersion operation

var params = {
  CoreDefinitionId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  Cores: [
    {
      CertificateArn: 'STRING_VALUE', /* required */
      Id: 'STRING_VALUE', /* required */
      ThingArn: 'STRING_VALUE', /* required */
      SyncShadow: true || false
    },
    /* more items */
  ]
};
greengrass.createCoreDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • CoreDefinitionId — (String) The ID of the core definition.
    • Cores — (Array<map>) A list of cores in the core definition version.
      • CertificateArnrequired — (String) The ARN of the certificate associated with the core.
      • Idrequired — (String) A descriptive or arbitrary ID for the core. This value must be unique within the core definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
      • SyncShadow — (Boolean) If true, the core's local shadow is automatically synced with the cloud.
      • ThingArnrequired — (String) The ARN of the thing which is the core.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeployment(params = {}, callback) ⇒ AWS.Request

Creates a deployment. ''CreateDeployment'' requests are idempotent with respect to the ''X-Amzn-Client-Token'' token and the request parameters.

Service Reference:

Examples:

Calling the createDeployment operation

var params = {
  DeploymentType: NewDeployment | Redeployment | ResetDeployment | ForceResetDeployment, /* required */
  GroupId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  DeploymentId: 'STRING_VALUE',
  GroupVersionId: 'STRING_VALUE'
};
greengrass.createDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • DeploymentId — (String) The ID of the deployment if you wish to redeploy a previous deployment.
    • DeploymentType — (String) The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid. Possible values include:
      • "NewDeployment"
      • "Redeployment"
      • "ResetDeployment"
      • "ForceResetDeployment"
    • GroupId — (String) The ID of the Greengrass group.
    • GroupVersionId — (String) The ID of the group version to be deployed.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DeploymentArn — (String) The ARN of the deployment.
      • DeploymentId — (String) The ID of the deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeviceDefinition(params = {}, callback) ⇒ AWS.Request

Creates a device definition. You may provide the initial version of the device definition now or use ''CreateDeviceDefinitionVersion'' at a later time.

Service Reference:

Examples:

Calling the createDeviceDefinition operation

var params = {
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    Devices: [
      {
        CertificateArn: 'STRING_VALUE', /* required */
        Id: 'STRING_VALUE', /* required */
        ThingArn: 'STRING_VALUE', /* required */
        SyncShadow: true || false
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createDeviceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the device definition.
      • Devices — (Array<map>) A list of devices in the definition version.
        • CertificateArnrequired — (String) The ARN of the certificate associated with the device.
        • Idrequired — (String) A descriptive or arbitrary ID for the device. This value must be unique within the device definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
        • SyncShadow — (Boolean) If true, the device's local shadow will be automatically synced with the cloud.
        • ThingArnrequired — (String) The thing ARN of the device.
    • Name — (String) The name of the device definition.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeviceDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createDeviceDefinitionVersion operation

var params = {
  DeviceDefinitionId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  Devices: [
    {
      CertificateArn: 'STRING_VALUE', /* required */
      Id: 'STRING_VALUE', /* required */
      ThingArn: 'STRING_VALUE', /* required */
      SyncShadow: true || false
    },
    /* more items */
  ]
};
greengrass.createDeviceDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • DeviceDefinitionId — (String) The ID of the device definition.
    • Devices — (Array<map>) A list of devices in the definition version.
      • CertificateArnrequired — (String) The ARN of the certificate associated with the device.
      • Idrequired — (String) A descriptive or arbitrary ID for the device. This value must be unique within the device definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
      • SyncShadow — (Boolean) If true, the device's local shadow will be automatically synced with the cloud.
      • ThingArnrequired — (String) The thing ARN of the device.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createFunctionDefinition(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createFunctionDefinition operation

var params = {
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    DefaultConfig: {
      Execution: {
        IsolationMode: GreengrassContainer | NoContainer,
        RunAs: {
          Gid: 'NUMBER_VALUE',
          Uid: 'NUMBER_VALUE'
        }
      }
    },
    Functions: [
      {
        Id: 'STRING_VALUE', /* required */
        FunctionArn: 'STRING_VALUE',
        FunctionConfiguration: {
          EncodingType: binary | json,
          Environment: {
            AccessSysfs: true || false,
            Execution: {
              IsolationMode: GreengrassContainer | NoContainer,
              RunAs: {
                Gid: 'NUMBER_VALUE',
                Uid: 'NUMBER_VALUE'
              }
            },
            ResourceAccessPolicies: [
              {
                ResourceId: 'STRING_VALUE', /* required */
                Permission: ro | rw
              },
              /* more items */
            ],
            Variables: {
              '<__string>': 'STRING_VALUE',
              /* '<__string>': ... */
            }
          },
          ExecArgs: 'STRING_VALUE',
          Executable: 'STRING_VALUE',
          MemorySize: 'NUMBER_VALUE',
          Pinned: true || false,
          Timeout: 'NUMBER_VALUE'
        }
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createFunctionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the function definition.
      • DefaultConfig — (map) The default configuration that applies to all Lambda functions in this function definition version. Individual Lambda functions can override these settings.
        • Execution — (map) Configuration information that specifies how a Lambda function runs.
          • IsolationMode — (String) Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group. Possible values include:
            • "GreengrassContainer"
            • "NoContainer"
          • RunAs — (map) Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.
            • Gid — (Integer) The group ID whose permissions are used to run a Lambda function.
            • Uid — (Integer) The user ID whose permissions are used to run a Lambda function.
      • Functions — (Array<map>) A list of Lambda functions in this function definition version.
        • FunctionArn — (String) The ARN of the Lambda function.
        • FunctionConfiguration — (map) The configuration of the Lambda function.
          • EncodingType — (String) The expected encoding type of the input payload for the function. The default is ''json''. Possible values include:
            • "binary"
            • "json"
          • Environment — (map) The environment configuration of the function.
            • AccessSysfs — (Boolean) If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.
            • Execution — (map) Configuration related to executing the Lambda function
              • IsolationMode — (String) Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group. Possible values include:
                • "GreengrassContainer"
                • "NoContainer"
              • RunAs — (map) Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.
                • Gid — (Integer) The group ID whose permissions are used to run a Lambda function.
                • Uid — (Integer) The user ID whose permissions are used to run a Lambda function.
            • ResourceAccessPolicies — (Array<map>) A list of the resources, with their permissions, to which the Lambda function will be granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass container.
              • Permission — (String) The permissions that the Lambda function has to the resource. Can be one of ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
                • "ro"
                • "rw"
              • ResourceIdrequired — (String) The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)
            • Variables — (map<String>) Environment variables for the Lambda function's configuration.
          • ExecArgs — (String) The execution arguments.
          • Executable — (String) The name of the function executable.
          • MemorySize — (Integer) The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.
          • Pinned — (Boolean) True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.
          • Timeout — (Integer) The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.
        • Idrequired — (String) A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
    • Name — (String) The name of the function definition.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createFunctionDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createFunctionDefinitionVersion operation

var params = {
  FunctionDefinitionId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  DefaultConfig: {
    Execution: {
      IsolationMode: GreengrassContainer | NoContainer,
      RunAs: {
        Gid: 'NUMBER_VALUE',
        Uid: 'NUMBER_VALUE'
      }
    }
  },
  Functions: [
    {
      Id: 'STRING_VALUE', /* required */
      FunctionArn: 'STRING_VALUE',
      FunctionConfiguration: {
        EncodingType: binary | json,
        Environment: {
          AccessSysfs: true || false,
          Execution: {
            IsolationMode: GreengrassContainer | NoContainer,
            RunAs: {
              Gid: 'NUMBER_VALUE',
              Uid: 'NUMBER_VALUE'
            }
          },
          ResourceAccessPolicies: [
            {
              ResourceId: 'STRING_VALUE', /* required */
              Permission: ro | rw
            },
            /* more items */
          ],
          Variables: {
            '<__string>': 'STRING_VALUE',
            /* '<__string>': ... */
          }
        },
        ExecArgs: 'STRING_VALUE',
        Executable: 'STRING_VALUE',
        MemorySize: 'NUMBER_VALUE',
        Pinned: true || false,
        Timeout: 'NUMBER_VALUE'
      }
    },
    /* more items */
  ]
};
greengrass.createFunctionDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • DefaultConfig — (map) The default configuration that applies to all Lambda functions in this function definition version. Individual Lambda functions can override these settings.
      • Execution — (map) Configuration information that specifies how a Lambda function runs.
        • IsolationMode — (String) Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group. Possible values include:
          • "GreengrassContainer"
          • "NoContainer"
        • RunAs — (map) Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.
          • Gid — (Integer) The group ID whose permissions are used to run a Lambda function.
          • Uid — (Integer) The user ID whose permissions are used to run a Lambda function.
    • FunctionDefinitionId — (String) The ID of the Lambda function definition.
    • Functions — (Array<map>) A list of Lambda functions in this function definition version.
      • FunctionArn — (String) The ARN of the Lambda function.
      • FunctionConfiguration — (map) The configuration of the Lambda function.
        • EncodingType — (String) The expected encoding type of the input payload for the function. The default is ''json''. Possible values include:
          • "binary"
          • "json"
        • Environment — (map) The environment configuration of the function.
          • AccessSysfs — (Boolean) If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.
          • Execution — (map) Configuration related to executing the Lambda function
            • IsolationMode — (String) Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group. Possible values include:
              • "GreengrassContainer"
              • "NoContainer"
            • RunAs — (map) Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.
              • Gid — (Integer) The group ID whose permissions are used to run a Lambda function.
              • Uid — (Integer) The user ID whose permissions are used to run a Lambda function.
          • ResourceAccessPolicies — (Array<map>) A list of the resources, with their permissions, to which the Lambda function will be granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass container.
            • Permission — (String) The permissions that the Lambda function has to the resource. Can be one of ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
              • "ro"
              • "rw"
            • ResourceIdrequired — (String) The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)
          • Variables — (map<String>) Environment variables for the Lambda function's configuration.
        • ExecArgs — (String) The execution arguments.
        • Executable — (String) The name of the function executable.
        • MemorySize — (Integer) The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.
        • Pinned — (Boolean) True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.
        • Timeout — (Integer) The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.
      • Idrequired — (String) A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createGroup(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createGroup operation

var params = {
  Name: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    ConnectorDefinitionVersionArn: 'STRING_VALUE',
    CoreDefinitionVersionArn: 'STRING_VALUE',
    DeviceDefinitionVersionArn: 'STRING_VALUE',
    FunctionDefinitionVersionArn: 'STRING_VALUE',
    LoggerDefinitionVersionArn: 'STRING_VALUE',
    ResourceDefinitionVersionArn: 'STRING_VALUE',
    SubscriptionDefinitionVersionArn: 'STRING_VALUE'
  },
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the group.
      • ConnectorDefinitionVersionArn — (String) The ARN of the connector definition version for this group.
      • CoreDefinitionVersionArn — (String) The ARN of the core definition version for this group.
      • DeviceDefinitionVersionArn — (String) The ARN of the device definition version for this group.
      • FunctionDefinitionVersionArn — (String) The ARN of the function definition version for this group.
      • LoggerDefinitionVersionArn — (String) The ARN of the logger definition version for this group.
      • ResourceDefinitionVersionArn — (String) The ARN of the resource definition version for this group.
      • SubscriptionDefinitionVersionArn — (String) The ARN of the subscription definition version for this group.
    • Name — (String) The name of the group.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createGroupCertificateAuthority(params = {}, callback) ⇒ AWS.Request

Creates a CA for the group. If a CA already exists, it will rotate the existing CA.

Service Reference:

Examples:

Calling the createGroupCertificateAuthority operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE'
};
greengrass.createGroupCertificateAuthority(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GroupCertificateAuthorityArn — (String) The ARN of the group certificate authority.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createGroupVersion(params = {}, callback) ⇒ AWS.Request

Creates a version of a group which has already been defined.

Service Reference:

Examples:

Calling the createGroupVersion operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  ConnectorDefinitionVersionArn: 'STRING_VALUE',
  CoreDefinitionVersionArn: 'STRING_VALUE',
  DeviceDefinitionVersionArn: 'STRING_VALUE',
  FunctionDefinitionVersionArn: 'STRING_VALUE',
  LoggerDefinitionVersionArn: 'STRING_VALUE',
  ResourceDefinitionVersionArn: 'STRING_VALUE',
  SubscriptionDefinitionVersionArn: 'STRING_VALUE'
};
greengrass.createGroupVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • ConnectorDefinitionVersionArn — (String) The ARN of the connector definition version for this group.
    • CoreDefinitionVersionArn — (String) The ARN of the core definition version for this group.
    • DeviceDefinitionVersionArn — (String) The ARN of the device definition version for this group.
    • FunctionDefinitionVersionArn — (String) The ARN of the function definition version for this group.
    • GroupId — (String) The ID of the Greengrass group.
    • LoggerDefinitionVersionArn — (String) The ARN of the logger definition version for this group.
    • ResourceDefinitionVersionArn — (String) The ARN of the resource definition version for this group.
    • SubscriptionDefinitionVersionArn — (String) The ARN of the subscription definition version for this group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createLoggerDefinition(params = {}, callback) ⇒ AWS.Request

Creates a logger definition. You may provide the initial version of the logger definition now or use ''CreateLoggerDefinitionVersion'' at a later time.

Service Reference:

Examples:

Calling the createLoggerDefinition operation

var params = {
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    Loggers: [
      {
        Component: GreengrassSystem | Lambda, /* required */
        Id: 'STRING_VALUE', /* required */
        Level: DEBUG | INFO | WARN | ERROR | FATAL, /* required */
        Type: FileSystem | AWSCloudWatch, /* required */
        Space: 'NUMBER_VALUE'
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createLoggerDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the logger definition.
      • Loggers — (Array<map>) A list of loggers.
        • Componentrequired — (String) The component that will be subject to logging. Possible values include:
          • "GreengrassSystem"
          • "Lambda"
        • Idrequired — (String) A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
        • Levelrequired — (String) The level of the logs. Possible values include:
          • "DEBUG"
          • "INFO"
          • "WARN"
          • "ERROR"
          • "FATAL"
        • Space — (Integer) The amount of file space, in KB, to use if the local file system is used for logging purposes.
        • Typerequired — (String) The type of log output which will be used. Possible values include:
          • "FileSystem"
          • "AWSCloudWatch"
    • Name — (String) The name of the logger definition.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createLoggerDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createLoggerDefinitionVersion operation

var params = {
  LoggerDefinitionId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  Loggers: [
    {
      Component: GreengrassSystem | Lambda, /* required */
      Id: 'STRING_VALUE', /* required */
      Level: DEBUG | INFO | WARN | ERROR | FATAL, /* required */
      Type: FileSystem | AWSCloudWatch, /* required */
      Space: 'NUMBER_VALUE'
    },
    /* more items */
  ]
};
greengrass.createLoggerDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • LoggerDefinitionId — (String) The ID of the logger definition.
    • Loggers — (Array<map>) A list of loggers.
      • Componentrequired — (String) The component that will be subject to logging. Possible values include:
        • "GreengrassSystem"
        • "Lambda"
      • Idrequired — (String) A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
      • Levelrequired — (String) The level of the logs. Possible values include:
        • "DEBUG"
        • "INFO"
        • "WARN"
        • "ERROR"
        • "FATAL"
      • Space — (Integer) The amount of file space, in KB, to use if the local file system is used for logging purposes.
      • Typerequired — (String) The type of log output which will be used. Possible values include:
        • "FileSystem"
        • "AWSCloudWatch"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createResourceDefinition(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createResourceDefinition operation

var params = {
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    Resources: [
      {
        Id: 'STRING_VALUE', /* required */
        Name: 'STRING_VALUE', /* required */
        ResourceDataContainer: { /* required */
          LocalDeviceResourceData: {
            GroupOwnerSetting: {
              AutoAddGroupOwner: true || false,
              GroupOwner: 'STRING_VALUE'
            },
            SourcePath: 'STRING_VALUE'
          },
          LocalVolumeResourceData: {
            DestinationPath: 'STRING_VALUE',
            GroupOwnerSetting: {
              AutoAddGroupOwner: true || false,
              GroupOwner: 'STRING_VALUE'
            },
            SourcePath: 'STRING_VALUE'
          },
          S3MachineLearningModelResourceData: {
            DestinationPath: 'STRING_VALUE',
            OwnerSetting: {
              GroupOwner: 'STRING_VALUE', /* required */
              GroupPermission: ro | rw /* required */
            },
            S3Uri: 'STRING_VALUE'
          },
          SageMakerMachineLearningModelResourceData: {
            DestinationPath: 'STRING_VALUE',
            OwnerSetting: {
              GroupOwner: 'STRING_VALUE', /* required */
              GroupPermission: ro | rw /* required */
            },
            SageMakerJobArn: 'STRING_VALUE'
          },
          SecretsManagerSecretResourceData: {
            ARN: 'STRING_VALUE',
            AdditionalStagingLabelsToDownload: [
              'STRING_VALUE',
              /* more items */
            ]
          }
        }
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createResourceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the resource definition.
      • Resources — (Array<map>) A list of resources.
        • Idrequired — (String) The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
        • Namerequired — (String) The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
        • ResourceDataContainerrequired — (map) A container of data for all resource types.
          • LocalDeviceResourceData — (map) Attributes that define the local device resource.
            • GroupOwnerSetting — (map) Group/owner related settings for local resources.
              • AutoAddGroupOwner — (Boolean) If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
              • GroupOwner — (String) The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
            • SourcePath — (String) The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under ''/dev''.
          • LocalVolumeResourceData — (map) Attributes that define the local volume resource.
            • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
            • GroupOwnerSetting — (map) Allows you to configure additional group privileges for the Lambda process. This field is optional.
              • AutoAddGroupOwner — (Boolean) If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
              • GroupOwner — (String) The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
            • SourcePath — (String) The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with ''/sys''.
          • S3MachineLearningModelResourceData — (map) Attributes that define an Amazon S3 machine learning resource.
            • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
            • OwnerSetting — (map) The owner setting for downloaded machine learning resources.
              • GroupOwnerrequired — (String) The group owner of the resource. This is the name of an existing Linux OS group on the system or a GID. The group's permissions are added to the Lambda process.
              • GroupPermissionrequired — (String) The permissions that the group owner has to the resource. Valid values are ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
                • "ro"
                • "rw"
            • S3Uri — (String) The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.
          • SageMakerMachineLearningModelResourceData — (map) Attributes that define an Amazon SageMaker machine learning resource.
            • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
            • OwnerSetting — (map) The owner setting for downloaded machine learning resources.
              • GroupOwnerrequired — (String) The group owner of the resource. This is the name of an existing Linux OS group on the system or a GID. The group's permissions are added to the Lambda process.
              • GroupPermissionrequired — (String) The permissions that the group owner has to the resource. Valid values are ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
                • "ro"
                • "rw"
            • SageMakerJobArn — (String) The ARN of the Amazon SageMaker training job that represents the source model.
          • SecretsManagerSecretResourceData — (map) Attributes that define a secret resource, which references a secret from AWS Secrets Manager.
            • ARN — (String) The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the ''AWSCURRENT'' staging label) is included by default.
            • AdditionalStagingLabelsToDownload — (Array<String>) Optional. The staging labels whose values you want to make available on the core, in addition to ''AWSCURRENT''.
    • Name — (String) The name of the resource definition.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createResourceDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createResourceDefinitionVersion operation

var params = {
  ResourceDefinitionId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  Resources: [
    {
      Id: 'STRING_VALUE', /* required */
      Name: 'STRING_VALUE', /* required */
      ResourceDataContainer: { /* required */
        LocalDeviceResourceData: {
          GroupOwnerSetting: {
            AutoAddGroupOwner: true || false,
            GroupOwner: 'STRING_VALUE'
          },
          SourcePath: 'STRING_VALUE'
        },
        LocalVolumeResourceData: {
          DestinationPath: 'STRING_VALUE',
          GroupOwnerSetting: {
            AutoAddGroupOwner: true || false,
            GroupOwner: 'STRING_VALUE'
          },
          SourcePath: 'STRING_VALUE'
        },
        S3MachineLearningModelResourceData: {
          DestinationPath: 'STRING_VALUE',
          OwnerSetting: {
            GroupOwner: 'STRING_VALUE', /* required */
            GroupPermission: ro | rw /* required */
          },
          S3Uri: 'STRING_VALUE'
        },
        SageMakerMachineLearningModelResourceData: {
          DestinationPath: 'STRING_VALUE',
          OwnerSetting: {
            GroupOwner: 'STRING_VALUE', /* required */
            GroupPermission: ro | rw /* required */
          },
          SageMakerJobArn: 'STRING_VALUE'
        },
        SecretsManagerSecretResourceData: {
          ARN: 'STRING_VALUE',
          AdditionalStagingLabelsToDownload: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      }
    },
    /* more items */
  ]
};
greengrass.createResourceDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • ResourceDefinitionId — (String) The ID of the resource definition.
    • Resources — (Array<map>) A list of resources.
      • Idrequired — (String) The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
      • Namerequired — (String) The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
      • ResourceDataContainerrequired — (map) A container of data for all resource types.
        • LocalDeviceResourceData — (map) Attributes that define the local device resource.
          • GroupOwnerSetting — (map) Group/owner related settings for local resources.
            • AutoAddGroupOwner — (Boolean) If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
            • GroupOwner — (String) The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
          • SourcePath — (String) The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under ''/dev''.
        • LocalVolumeResourceData — (map) Attributes that define the local volume resource.
          • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
          • GroupOwnerSetting — (map) Allows you to configure additional group privileges for the Lambda process. This field is optional.
            • AutoAddGroupOwner — (Boolean) If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
            • GroupOwner — (String) The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
          • SourcePath — (String) The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with ''/sys''.
        • S3MachineLearningModelResourceData — (map) Attributes that define an Amazon S3 machine learning resource.
          • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
          • OwnerSetting — (map) The owner setting for downloaded machine learning resources.
            • GroupOwnerrequired — (String) The group owner of the resource. This is the name of an existing Linux OS group on the system or a GID. The group's permissions are added to the Lambda process.
            • GroupPermissionrequired — (String) The permissions that the group owner has to the resource. Valid values are ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
              • "ro"
              • "rw"
          • S3Uri — (String) The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.
        • SageMakerMachineLearningModelResourceData — (map) Attributes that define an Amazon SageMaker machine learning resource.
          • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
          • OwnerSetting — (map) The owner setting for downloaded machine learning resources.
            • GroupOwnerrequired — (String) The group owner of the resource. This is the name of an existing Linux OS group on the system or a GID. The group's permissions are added to the Lambda process.
            • GroupPermissionrequired — (String) The permissions that the group owner has to the resource. Valid values are ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
              • "ro"
              • "rw"
          • SageMakerJobArn — (String) The ARN of the Amazon SageMaker training job that represents the source model.
        • SecretsManagerSecretResourceData — (map) Attributes that define a secret resource, which references a secret from AWS Secrets Manager.
          • ARN — (String) The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the ''AWSCURRENT'' staging label) is included by default.
          • AdditionalStagingLabelsToDownload — (Array<String>) Optional. The staging labels whose values you want to make available on the core, in addition to ''AWSCURRENT''.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSoftwareUpdateJob(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createSoftwareUpdateJob operation

var params = {
  S3UrlSignerRole: 'STRING_VALUE', /* required */
  SoftwareToUpdate: core | ota_agent, /* required */
  UpdateTargets: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  UpdateTargetsArchitecture: armv6l | armv7l | x86_64 | aarch64, /* required */
  UpdateTargetsOperatingSystem: ubuntu | raspbian | amazon_linux | openwrt, /* required */
  AmznClientToken: 'STRING_VALUE',
  UpdateAgentLogLevel: NONE | TRACE | DEBUG | VERBOSE | INFO | WARN | ERROR | FATAL
};
greengrass.createSoftwareUpdateJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • S3UrlSignerRole — (String) The IAM Role that Greengrass will use to create pre-signed URLs pointing towards the update artifact.
    • SoftwareToUpdate — (String) The piece of software on the Greengrass core that will be updated. Possible values include:
      • "core"
      • "ota_agent"
    • UpdateAgentLogLevel — (String) The minimum level of log statements that should be logged by the OTA Agent during an update. Possible values include:
      • "NONE"
      • "TRACE"
      • "DEBUG"
      • "VERBOSE"
      • "INFO"
      • "WARN"
      • "ERROR"
      • "FATAL"
    • UpdateTargets — (Array<String>) The ARNs of the targets (IoT things or IoT thing groups) that this update will be applied to.
    • UpdateTargetsArchitecture — (String) The architecture of the cores which are the targets of an update. Possible values include:
      • "armv6l"
      • "armv7l"
      • "x86_64"
      • "aarch64"
    • UpdateTargetsOperatingSystem — (String) The operating system of the cores which are the targets of an update. Possible values include:
      • "ubuntu"
      • "raspbian"
      • "amazon_linux"
      • "openwrt"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • IotJobArn — (String) The IoT Job ARN corresponding to this update.
      • IotJobId — (String) The IoT Job Id corresponding to this update.
      • PlatformSoftwareVersion — (String) The software version installed on the device or devices after the update.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSubscriptionDefinition(params = {}, callback) ⇒ AWS.Request

Creates a subscription definition. You may provide the initial version of the subscription definition now or use ''CreateSubscriptionDefinitionVersion'' at a later time.

Service Reference:

Examples:

Calling the createSubscriptionDefinition operation

var params = {
  AmznClientToken: 'STRING_VALUE',
  InitialVersion: {
    Subscriptions: [
      {
        Id: 'STRING_VALUE', /* required */
        Source: 'STRING_VALUE', /* required */
        Subject: 'STRING_VALUE', /* required */
        Target: 'STRING_VALUE' /* required */
      },
      /* more items */
    ]
  },
  Name: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.createSubscriptionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • InitialVersion — (map) Information about the initial version of the subscription definition.
      • Subscriptions — (Array<map>) A list of subscriptions.
        • Idrequired — (String) A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
        • Sourcerequired — (String) The source of the subscription. Can be a thing ARN, a Lambda function ARN, a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'.
        • Subjectrequired — (String) The MQTT topic used to route the message.
        • Targetrequired — (String) Where the message is sent to. Can be a thing ARN, a Lambda function ARN, a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'.
    • Name — (String) The name of the subscription definition.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSubscriptionDefinitionVersion(params = {}, callback) ⇒ AWS.Request

Creates a version of a subscription definition which has already been defined.

Examples:

Calling the createSubscriptionDefinitionVersion operation

var params = {
  SubscriptionDefinitionId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  Subscriptions: [
    {
      Id: 'STRING_VALUE', /* required */
      Source: 'STRING_VALUE', /* required */
      Subject: 'STRING_VALUE', /* required */
      Target: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
greengrass.createSubscriptionDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • SubscriptionDefinitionId — (String) The ID of the subscription definition.
    • Subscriptions — (Array<map>) A list of subscriptions.
      • Idrequired — (String) A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
      • Sourcerequired — (String) The source of the subscription. Can be a thing ARN, a Lambda function ARN, a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'.
      • Subjectrequired — (String) The MQTT topic used to route the message.
      • Targetrequired — (String) Where the message is sent to. Can be a thing ARN, a Lambda function ARN, a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
      • Id — (String) The ID of the parent definition that the version is associated with.
      • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteConnectorDefinition(params = {}, callback) ⇒ AWS.Request

Deletes a connector definition.

Service Reference:

Examples:

Calling the deleteConnectorDefinition operation

var params = {
  ConnectorDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.deleteConnectorDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConnectorDefinitionId — (String) The ID of the connector definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCoreDefinition(params = {}, callback) ⇒ AWS.Request

Deletes a core definition.

Service Reference:

Examples:

Calling the deleteCoreDefinition operation

var params = {
  CoreDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.deleteCoreDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CoreDefinitionId — (String) The ID of the core definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDeviceDefinition(params = {}, callback) ⇒ AWS.Request

Deletes a device definition.

Service Reference:

Examples:

Calling the deleteDeviceDefinition operation

var params = {
  DeviceDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.deleteDeviceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceDefinitionId — (String) The ID of the device definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteFunctionDefinition(params = {}, callback) ⇒ AWS.Request

Deletes a Lambda function definition.

Service Reference:

Examples:

Calling the deleteFunctionDefinition operation

var params = {
  FunctionDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.deleteFunctionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FunctionDefinitionId — (String) The ID of the Lambda function definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGroup(params = {}, callback) ⇒ AWS.Request

Deletes a group.

Service Reference:

Examples:

Calling the deleteGroup operation

var params = {
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.deleteGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteLoggerDefinition(params = {}, callback) ⇒ AWS.Request

Deletes a logger definition.

Service Reference:

Examples:

Calling the deleteLoggerDefinition operation

var params = {
  LoggerDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.deleteLoggerDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LoggerDefinitionId — (String) The ID of the logger definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteResourceDefinition(params = {}, callback) ⇒ AWS.Request

Deletes a resource definition.

Service Reference:

Examples:

Calling the deleteResourceDefinition operation

var params = {
  ResourceDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.deleteResourceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceDefinitionId — (String) The ID of the resource definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSubscriptionDefinition(params = {}, callback) ⇒ AWS.Request

Deletes a subscription definition.

Service Reference:

Examples:

Calling the deleteSubscriptionDefinition operation

var params = {
  SubscriptionDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.deleteSubscriptionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • SubscriptionDefinitionId — (String) The ID of the subscription definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateRoleFromGroup(params = {}, callback) ⇒ AWS.Request

Disassociates the role from a group.

Service Reference:

Examples:

Calling the disassociateRoleFromGroup operation

var params = {
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.disassociateRoleFromGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DisassociatedAt — (String) The time, in milliseconds since the epoch, when the role was disassociated from the group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateServiceRoleFromAccount(params = {}, callback) ⇒ AWS.Request

Disassociates the service role from your account. Without a service role, deployments will not work.

Examples:

Calling the disassociateServiceRoleFromAccount operation

var params = {
};
greengrass.disassociateServiceRoleFromAccount(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DisassociatedAt — (String) The time when the service role was disassociated from the account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAssociatedRole(params = {}, callback) ⇒ AWS.Request

Retrieves the role associated with a particular group.

Service Reference:

Examples:

Calling the getAssociatedRole operation

var params = {
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.getAssociatedRole(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AssociatedAt — (String) The time when the role was associated with the group.
      • RoleArn — (String) The ARN of the role that is associated with the group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBulkDeploymentStatus(params = {}, callback) ⇒ AWS.Request

Returns the status of a bulk deployment.

Service Reference:

Examples:

Calling the getBulkDeploymentStatus operation

var params = {
  BulkDeploymentId: 'STRING_VALUE' /* required */
};
greengrass.getBulkDeploymentStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BulkDeploymentId — (String) The ID of the bulk deployment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BulkDeploymentMetrics — (map) Relevant metrics on input records processed during bulk deployment.
        • InvalidInputRecords — (Integer) The total number of records that returned a non-retryable error. For example, this can occur if a group record from the input file uses an invalid format or specifies a nonexistent group version, or if the execution role doesn't grant permission to deploy a group or group version.
        • RecordsProcessed — (Integer) The total number of group records from the input file that have been processed so far, or attempted.
        • RetryAttempts — (Integer) The total number of deployment attempts that returned a retryable error. For example, a retry is triggered if the attempt to deploy a group returns a throttling error. ''StartBulkDeployment'' retries a group deployment up to five times.
      • BulkDeploymentStatus — (String) The status of the bulk deployment. Possible values include:
        • "Initializing"
        • "Running"
        • "Completed"
        • "Stopping"
        • "Stopped"
        • "Failed"
      • CreatedAt — (String) The time, in ISO format, when the deployment was created.
      • ErrorDetails — (Array<map>) Error details
        • DetailedErrorCode — (String) A detailed error code.
        • DetailedErrorMessage — (String) A detailed error message.
      • ErrorMessage — (String) Error message
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getConnectivityInfo(params = {}, callback) ⇒ AWS.Request

Retrieves the connectivity information for a core.

Service Reference:

Examples:

Calling the getConnectivityInfo operation

var params = {
  ThingName: 'STRING_VALUE' /* required */
};
greengrass.getConnectivityInfo(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ThingName — (String) The thing name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ConnectivityInfo — (Array<map>) Connectivity info list.
        • HostAddress — (String) The endpoint for the Greengrass core. Can be an IP address or DNS.
        • Id — (String) The ID of the connectivity information.
        • Metadata — (String) Metadata for this endpoint.
        • PortNumber — (Integer) The port of the Greengrass core. Usually 8883.
      • Message — (String) A message about the connectivity info request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getConnectorDefinition(params = {}, callback) ⇒ AWS.Request

Retrieves information about a connector definition.

Service Reference:

Examples:

Calling the getConnectorDefinition operation

var params = {
  ConnectorDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.getConnectorDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConnectorDefinitionId — (String) The ID of the connector definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getConnectorDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getConnectorDefinitionVersion operation

var params = {
  ConnectorDefinitionId: 'STRING_VALUE', /* required */
  ConnectorDefinitionVersionId: 'STRING_VALUE', /* required */
  NextToken: 'STRING_VALUE'
};
greengrass.getConnectorDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConnectorDefinitionId — (String) The ID of the connector definition.
    • ConnectorDefinitionVersionId — (String) The ID of the connector definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListConnectorDefinitionVersions'' requests. If the version is the last one that was associated with a connector definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the connector definition version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the connector definition version was created.
      • Definition — (map) Information about the connector definition version.
        • Connectors — (Array<map>) A list of references to connectors in this version, with their corresponding configuration settings.
          • ConnectorArnrequired — (String) The ARN of the connector.
          • Idrequired — (String) A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Max length is 128 characters with pattern [a-zA-Z0-9:_-]+.
          • Parameters — (map<String>) The parameters or configuration that the connector uses.
      • Id — (String) The ID of the connector definition version.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Version — (String) The version of the connector definition version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCoreDefinition(params = {}, callback) ⇒ AWS.Request

Retrieves information about a core definition version.

Service Reference:

Examples:

Calling the getCoreDefinition operation

var params = {
  CoreDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.getCoreDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CoreDefinitionId — (String) The ID of the core definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCoreDefinitionVersion(params = {}, callback) ⇒ AWS.Request

Retrieves information about a core definition version.

Service Reference:

Examples:

Calling the getCoreDefinitionVersion operation

var params = {
  CoreDefinitionId: 'STRING_VALUE', /* required */
  CoreDefinitionVersionId: 'STRING_VALUE' /* required */
};
greengrass.getCoreDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CoreDefinitionId — (String) The ID of the core definition.
    • CoreDefinitionVersionId — (String) The ID of the core definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListCoreDefinitionVersions'' requests. If the version is the last one that was associated with a core definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the core definition version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the core definition version was created.
      • Definition — (map) Information about the core definition version.
        • Cores — (Array<map>) A list of cores in the core definition version.
          • CertificateArnrequired — (String) The ARN of the certificate associated with the core.
          • Idrequired — (String) A descriptive or arbitrary ID for the core. This value must be unique within the core definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
          • SyncShadow — (Boolean) If true, the core's local shadow is automatically synced with the cloud.
          • ThingArnrequired — (String) The ARN of the thing which is the core.
      • Id — (String) The ID of the core definition version.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Version — (String) The version of the core definition version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeploymentStatus(params = {}, callback) ⇒ AWS.Request

Returns the status of a deployment.

Service Reference:

Examples:

Calling the getDeploymentStatus operation

var params = {
  DeploymentId: 'STRING_VALUE', /* required */
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.getDeploymentStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeploymentId — (String) The ID of the deployment.
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DeploymentStatus — (String) The status of the deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
      • DeploymentType — (String) The type of the deployment. Possible values include:
        • "NewDeployment"
        • "Redeployment"
        • "ResetDeployment"
        • "ForceResetDeployment"
      • ErrorDetails — (Array<map>) Error details
        • DetailedErrorCode — (String) A detailed error code.
        • DetailedErrorMessage — (String) A detailed error message.
      • ErrorMessage — (String) Error message
      • UpdatedAt — (String) The time, in milliseconds since the epoch, when the deployment status was updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeviceDefinition(params = {}, callback) ⇒ AWS.Request

Retrieves information about a device definition.

Service Reference:

Examples:

Calling the getDeviceDefinition operation

var params = {
  DeviceDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.getDeviceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceDefinitionId — (String) The ID of the device definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeviceDefinitionVersion(params = {}, callback) ⇒ AWS.Request

Retrieves information about a device definition version.

Service Reference:

Examples:

Calling the getDeviceDefinitionVersion operation

var params = {
  DeviceDefinitionId: 'STRING_VALUE', /* required */
  DeviceDefinitionVersionId: 'STRING_VALUE', /* required */
  NextToken: 'STRING_VALUE'
};
greengrass.getDeviceDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceDefinitionId — (String) The ID of the device definition.
    • DeviceDefinitionVersionId — (String) The ID of the device definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListDeviceDefinitionVersions'' requests. If the version is the last one that was associated with a device definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the device definition version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the device definition version was created.
      • Definition — (map) Information about the device definition version.
        • Devices — (Array<map>) A list of devices in the definition version.
          • CertificateArnrequired — (String) The ARN of the certificate associated with the device.
          • Idrequired — (String) A descriptive or arbitrary ID for the device. This value must be unique within the device definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
          • SyncShadow — (Boolean) If true, the device's local shadow will be automatically synced with the cloud.
          • ThingArnrequired — (String) The thing ARN of the device.
      • Id — (String) The ID of the device definition version.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Version — (String) The version of the device definition version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFunctionDefinition(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getFunctionDefinition operation

var params = {
  FunctionDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.getFunctionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FunctionDefinitionId — (String) The ID of the Lambda function definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFunctionDefinitionVersion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getFunctionDefinitionVersion operation

var params = {
  FunctionDefinitionId: 'STRING_VALUE', /* required */
  FunctionDefinitionVersionId: 'STRING_VALUE', /* required */
  NextToken: 'STRING_VALUE'
};
greengrass.getFunctionDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FunctionDefinitionId — (String) The ID of the Lambda function definition.
    • FunctionDefinitionVersionId — (String) The ID of the function definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListFunctionDefinitionVersions'' requests. If the version is the last one that was associated with a function definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the function definition version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the function definition version was created.
      • Definition — (map) Information on the definition.
        • DefaultConfig — (map) The default configuration that applies to all Lambda functions in this function definition version. Individual Lambda functions can override these settings.
          • Execution — (map) Configuration information that specifies how a Lambda function runs.
            • IsolationMode — (String) Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group. Possible values include:
              • "GreengrassContainer"
              • "NoContainer"
            • RunAs — (map) Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.
              • Gid — (Integer) The group ID whose permissions are used to run a Lambda function.
              • Uid — (Integer) The user ID whose permissions are used to run a Lambda function.
        • Functions — (Array<map>) A list of Lambda functions in this function definition version.
          • FunctionArn — (String) The ARN of the Lambda function.
          • FunctionConfiguration — (map) The configuration of the Lambda function.
            • EncodingType — (String) The expected encoding type of the input payload for the function. The default is ''json''. Possible values include:
              • "binary"
              • "json"
            • Environment — (map) The environment configuration of the function.
              • AccessSysfs — (Boolean) If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.
              • Execution — (map) Configuration related to executing the Lambda function
                • IsolationMode — (String) Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group. Possible values include:
                  • "GreengrassContainer"
                  • "NoContainer"
                • RunAs — (map) Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.
                  • Gid — (Integer) The group ID whose permissions are used to run a Lambda function.
                  • Uid — (Integer) The user ID whose permissions are used to run a Lambda function.
              • ResourceAccessPolicies — (Array<map>) A list of the resources, with their permissions, to which the Lambda function will be granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass container.
                • Permission — (String) The permissions that the Lambda function has to the resource. Can be one of ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
                  • "ro"
                  • "rw"
                • ResourceIdrequired — (String) The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)
              • Variables — (map<String>) Environment variables for the Lambda function's configuration.
            • ExecArgs — (String) The execution arguments.
            • Executable — (String) The name of the function executable.
            • MemorySize — (Integer) The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.
            • Pinned — (Boolean) True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.
            • Timeout — (Integer) The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.
          • Idrequired — (String) A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
      • Id — (String) The ID of the function definition version.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Version — (String) The version of the function definition version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGroup(params = {}, callback) ⇒ AWS.Request

Retrieves information about a group.

Service Reference:

Examples:

Calling the getGroup operation

var params = {
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.getGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGroupCertificateAuthority(params = {}, callback) ⇒ AWS.Request

Retreives the CA associated with a group. Returns the public key of the CA.

Service Reference:

Examples:

Calling the getGroupCertificateAuthority operation

var params = {
  CertificateAuthorityId: 'STRING_VALUE', /* required */
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.getGroupCertificateAuthority(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CertificateAuthorityId — (String) The ID of the certificate authority.
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GroupCertificateAuthorityArn — (String) The ARN of the certificate authority for the group.
      • GroupCertificateAuthorityId — (String) The ID of the certificate authority for the group.
      • PemEncodedCertificate — (String) The PEM encoded certificate for the group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGroupCertificateConfiguration(params = {}, callback) ⇒ AWS.Request

Retrieves the current configuration for the CA used by the group.

Examples:

Calling the getGroupCertificateConfiguration operation

var params = {
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.getGroupCertificateConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CertificateAuthorityExpiryInMilliseconds — (String) The amount of time remaining before the certificate authority expires, in milliseconds.
      • CertificateExpiryInMilliseconds — (String) The amount of time remaining before the certificate expires, in milliseconds.
      • GroupId — (String) The ID of the group certificate configuration.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGroupVersion(params = {}, callback) ⇒ AWS.Request

Retrieves information about a group version.

Service Reference:

Examples:

Calling the getGroupVersion operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  GroupVersionId: 'STRING_VALUE' /* required */
};
greengrass.getGroupVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.
    • GroupVersionId — (String) The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the group version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the group version was created.
      • Definition — (map) Information about the group version definition.
        • ConnectorDefinitionVersionArn — (String) The ARN of the connector definition version for this group.
        • CoreDefinitionVersionArn — (String) The ARN of the core definition version for this group.
        • DeviceDefinitionVersionArn — (String) The ARN of the device definition version for this group.
        • FunctionDefinitionVersionArn — (String) The ARN of the function definition version for this group.
        • LoggerDefinitionVersionArn — (String) The ARN of the logger definition version for this group.
        • ResourceDefinitionVersionArn — (String) The ARN of the resource definition version for this group.
        • SubscriptionDefinitionVersionArn — (String) The ARN of the subscription definition version for this group.
      • Id — (String) The ID of the group that the version is associated with.
      • Version — (String) The ID of the group version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getLoggerDefinition(params = {}, callback) ⇒ AWS.Request

Retrieves information about a logger definition.

Service Reference:

Examples:

Calling the getLoggerDefinition operation

var params = {
  LoggerDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.getLoggerDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LoggerDefinitionId — (String) The ID of the logger definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getLoggerDefinitionVersion(params = {}, callback) ⇒ AWS.Request

Retrieves information about a logger definition version.

Service Reference:

Examples:

Calling the getLoggerDefinitionVersion operation

var params = {
  LoggerDefinitionId: 'STRING_VALUE', /* required */
  LoggerDefinitionVersionId: 'STRING_VALUE', /* required */
  NextToken: 'STRING_VALUE'
};
greengrass.getLoggerDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LoggerDefinitionId — (String) The ID of the logger definition.
    • LoggerDefinitionVersionId — (String) The ID of the logger definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListLoggerDefinitionVersions'' requests. If the version is the last one that was associated with a logger definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the logger definition version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the logger definition version was created.
      • Definition — (map) Information about the logger definition version.
        • Loggers — (Array<map>) A list of loggers.
          • Componentrequired — (String) The component that will be subject to logging. Possible values include:
            • "GreengrassSystem"
            • "Lambda"
          • Idrequired — (String) A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
          • Levelrequired — (String) The level of the logs. Possible values include:
            • "DEBUG"
            • "INFO"
            • "WARN"
            • "ERROR"
            • "FATAL"
          • Space — (Integer) The amount of file space, in KB, to use if the local file system is used for logging purposes.
          • Typerequired — (String) The type of log output which will be used. Possible values include:
            • "FileSystem"
            • "AWSCloudWatch"
      • Id — (String) The ID of the logger definition version.
      • Version — (String) The version of the logger definition version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getResourceDefinition(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getResourceDefinition operation

var params = {
  ResourceDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.getResourceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceDefinitionId — (String) The ID of the resource definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getResourceDefinitionVersion(params = {}, callback) ⇒ AWS.Request

Retrieves information about a resource definition version, including which resources are included in the version.

Service Reference:

Examples:

Calling the getResourceDefinitionVersion operation

var params = {
  ResourceDefinitionId: 'STRING_VALUE', /* required */
  ResourceDefinitionVersionId: 'STRING_VALUE' /* required */
};
greengrass.getResourceDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceDefinitionId — (String) The ID of the resource definition.
    • ResourceDefinitionVersionId — (String) The ID of the resource definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListResourceDefinitionVersions'' requests. If the version is the last one that was associated with a resource definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) Arn of the resource definition version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the resource definition version was created.
      • Definition — (map) Information about the definition.
        • Resources — (Array<map>) A list of resources.
          • Idrequired — (String) The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
          • Namerequired — (String) The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
          • ResourceDataContainerrequired — (map) A container of data for all resource types.
            • LocalDeviceResourceData — (map) Attributes that define the local device resource.
              • GroupOwnerSetting — (map) Group/owner related settings for local resources.
                • AutoAddGroupOwner — (Boolean) If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
                • GroupOwner — (String) The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
              • SourcePath — (String) The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under ''/dev''.
            • LocalVolumeResourceData — (map) Attributes that define the local volume resource.
              • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
              • GroupOwnerSetting — (map) Allows you to configure additional group privileges for the Lambda process. This field is optional.
                • AutoAddGroupOwner — (Boolean) If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
                • GroupOwner — (String) The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
              • SourcePath — (String) The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with ''/sys''.
            • S3MachineLearningModelResourceData — (map) Attributes that define an Amazon S3 machine learning resource.
              • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
              • OwnerSetting — (map) The owner setting for downloaded machine learning resources.
                • GroupOwnerrequired — (String) The group owner of the resource. This is the name of an existing Linux OS group on the system or a GID. The group's permissions are added to the Lambda process.
                • GroupPermissionrequired — (String) The permissions that the group owner has to the resource. Valid values are ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
                  • "ro"
                  • "rw"
              • S3Uri — (String) The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.
            • SageMakerMachineLearningModelResourceData — (map) Attributes that define an Amazon SageMaker machine learning resource.
              • DestinationPath — (String) The absolute local path of the resource inside the Lambda environment.
              • OwnerSetting — (map) The owner setting for downloaded machine learning resources.
                • GroupOwnerrequired — (String) The group owner of the resource. This is the name of an existing Linux OS group on the system or a GID. The group's permissions are added to the Lambda process.
                • GroupPermissionrequired — (String) The permissions that the group owner has to the resource. Valid values are ''rw'' (read/write) or ''ro'' (read-only). Possible values include:
                  • "ro"
                  • "rw"
              • SageMakerJobArn — (String) The ARN of the Amazon SageMaker training job that represents the source model.
            • SecretsManagerSecretResourceData — (map) Attributes that define a secret resource, which references a secret from AWS Secrets Manager.
              • ARN — (String) The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the ''AWSCURRENT'' staging label) is included by default.
              • AdditionalStagingLabelsToDownload — (Array<String>) Optional. The staging labels whose values you want to make available on the core, in addition to ''AWSCURRENT''.
      • Id — (String) The ID of the resource definition version.
      • Version — (String) The version of the resource definition version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getServiceRoleForAccount(params = {}, callback) ⇒ AWS.Request

Retrieves the service role that is attached to your account.

Service Reference:

Examples:

Calling the getServiceRoleForAccount operation

var params = {
};
greengrass.getServiceRoleForAccount(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AssociatedAt — (String) The time when the service role was associated with the account.
      • RoleArn — (String) The ARN of the role which is associated with the account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSubscriptionDefinition(params = {}, callback) ⇒ AWS.Request

Retrieves information about a subscription definition.

Service Reference:

Examples:

Calling the getSubscriptionDefinition operation

var params = {
  SubscriptionDefinitionId: 'STRING_VALUE' /* required */
};
greengrass.getSubscriptionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • SubscriptionDefinitionId — (String) The ID of the subscription definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the definition.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
      • Id — (String) The ID of the definition.
      • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
      • LatestVersion — (String) The ID of the latest version associated with the definition.
      • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
      • Name — (String) The name of the definition.
      • tags — (map<String>) Tag(s) attached to the resource arn.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSubscriptionDefinitionVersion(params = {}, callback) ⇒ AWS.Request

Retrieves information about a subscription definition version.

Examples:

Calling the getSubscriptionDefinitionVersion operation

var params = {
  SubscriptionDefinitionId: 'STRING_VALUE', /* required */
  SubscriptionDefinitionVersionId: 'STRING_VALUE', /* required */
  NextToken: 'STRING_VALUE'
};
greengrass.getSubscriptionDefinitionVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
    • SubscriptionDefinitionId — (String) The ID of the subscription definition.
    • SubscriptionDefinitionVersionId — (String) The ID of the subscription definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListSubscriptionDefinitionVersions'' requests. If the version is the last one that was associated with a subscription definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String) The ARN of the subscription definition version.
      • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the subscription definition version was created.
      • Definition — (map) Information about the subscription definition version.
        • Subscriptions — (Array<map>) A list of subscriptions.
          • Idrequired — (String) A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
          • Sourcerequired — (String) The source of the subscription. Can be a thing ARN, a Lambda function ARN, a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'.
          • Subjectrequired — (String) The MQTT topic used to route the message.
          • Targetrequired — (String) Where the message is sent to. Can be a thing ARN, a Lambda function ARN, a connector ARN, 'cloud' (which represents the AWS IoT cloud), or 'GGShadowService'.
      • Id — (String) The ID of the subscription definition version.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Version — (String) The version of the subscription definition version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getThingRuntimeConfiguration(params = {}, callback) ⇒ AWS.Request

Get the runtime configuration of a thing.

Service Reference:

Examples:

Calling the getThingRuntimeConfiguration operation

var params = {
  ThingName: 'STRING_VALUE' /* required */
};
greengrass.getThingRuntimeConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ThingName — (String) The thing name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RuntimeConfiguration — (map) Runtime configuration for a thing.
        • TelemetryConfiguration — (map) Configuration for telemetry service.
          • ConfigurationSyncStatus — (String) Synchronization status of the device reported configuration with the desired configuration. Possible values include:
            • "InSync"
            • "OutOfSync"
          • Telemetryrequired — (String) Configure telemetry to be on or off. Possible values include:
            • "On"
            • "Off"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBulkDeploymentDetailedReports(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the listBulkDeploymentDetailedReports operation

var params = {
  BulkDeploymentId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listBulkDeploymentDetailedReports(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BulkDeploymentId — (String) The ID of the bulk deployment.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Deployments — (Array<map>) A list of the individual group deployments in the bulk deployment operation.
        • CreatedAt — (String) The time, in ISO format, when the deployment was created.
        • DeploymentArn — (String) The ARN of the group deployment.
        • DeploymentId — (String) The ID of the group deployment.
        • DeploymentStatus — (String) The current status of the group deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
        • DeploymentType — (String) The type of the deployment. Possible values include:
          • "NewDeployment"
          • "Redeployment"
          • "ResetDeployment"
          • "ForceResetDeployment"
        • ErrorDetails — (Array<map>) Details about the error.
          • DetailedErrorCode — (String) A detailed error code.
          • DetailedErrorMessage — (String) A detailed error message.
        • ErrorMessage — (String) The error message for a failed deployment
        • GroupArn — (String) The ARN of the Greengrass group.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBulkDeployments(params = {}, callback) ⇒ AWS.Request

Returns a list of bulk deployments.

Service Reference:

Examples:

Calling the listBulkDeployments operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listBulkDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BulkDeployments — (Array<map>) A list of bulk deployments.
        • BulkDeploymentArn — (String) The ARN of the bulk deployment.
        • BulkDeploymentId — (String) The ID of the bulk deployment.
        • CreatedAt — (String) The time, in ISO format, when the deployment was created.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listConnectorDefinitions(params = {}, callback) ⇒ AWS.Request

Retrieves a list of connector definitions.

Service Reference:

Examples:

Calling the listConnectorDefinitions operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listConnectorDefinitions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Definitions — (Array<map>) Information about a definition.
        • Arn — (String) The ARN of the definition.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
        • Id — (String) The ID of the definition.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the definition.
        • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
        • Name — (String) The name of the definition.
        • Tags — (map<String>) Tag(s) attached to the resource arn.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listConnectorDefinitionVersions(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the listConnectorDefinitionVersions operation

var params = {
  ConnectorDefinitionId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listConnectorDefinitionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConnectorDefinitionId — (String) The ID of the connector definition.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listCoreDefinitions(params = {}, callback) ⇒ AWS.Request

Retrieves a list of core definitions.

Service Reference:

Examples:

Calling the listCoreDefinitions operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listCoreDefinitions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Definitions — (Array<map>) Information about a definition.
        • Arn — (String) The ARN of the definition.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
        • Id — (String) The ID of the definition.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the definition.
        • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
        • Name — (String) The name of the definition.
        • Tags — (map<String>) Tag(s) attached to the resource arn.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listCoreDefinitionVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of a core definition.

Service Reference:

Examples:

Calling the listCoreDefinitionVersions operation

var params = {
  CoreDefinitionId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listCoreDefinitionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CoreDefinitionId — (String) The ID of the core definition.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeployments(params = {}, callback) ⇒ AWS.Request

Returns a history of deployments for the group.

Service Reference:

Examples:

Calling the listDeployments operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Deployments — (Array<map>) A list of deployments for the requested groups.
        • CreatedAt — (String) The time, in milliseconds since the epoch, when the deployment was created.
        • DeploymentArn — (String) The ARN of the deployment.
        • DeploymentId — (String) The ID of the deployment.
        • DeploymentType — (String) The type of the deployment. Possible values include:
          • "NewDeployment"
          • "Redeployment"
          • "ResetDeployment"
          • "ForceResetDeployment"
        • GroupArn — (String) The ARN of the group for this deployment.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeviceDefinitions(params = {}, callback) ⇒ AWS.Request

Retrieves a list of device definitions.

Service Reference:

Examples:

Calling the listDeviceDefinitions operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listDeviceDefinitions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Definitions — (Array<map>) Information about a definition.
        • Arn — (String) The ARN of the definition.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
        • Id — (String) The ID of the definition.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the definition.
        • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
        • Name — (String) The name of the definition.
        • Tags — (map<String>) Tag(s) attached to the resource arn.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeviceDefinitionVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of a device definition.

Service Reference:

Examples:

Calling the listDeviceDefinitionVersions operation

var params = {
  DeviceDefinitionId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listDeviceDefinitionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceDefinitionId — (String) The ID of the device definition.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listFunctionDefinitions(params = {}, callback) ⇒ AWS.Request

Retrieves a list of Lambda function definitions.

Service Reference:

Examples:

Calling the listFunctionDefinitions operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listFunctionDefinitions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Definitions — (Array<map>) Information about a definition.
        • Arn — (String) The ARN of the definition.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
        • Id — (String) The ID of the definition.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the definition.
        • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
        • Name — (String) The name of the definition.
        • Tags — (map<String>) Tag(s) attached to the resource arn.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listFunctionDefinitionVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of a Lambda function definition.

Service Reference:

Examples:

Calling the listFunctionDefinitionVersions operation

var params = {
  FunctionDefinitionId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listFunctionDefinitionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FunctionDefinitionId — (String) The ID of the Lambda function definition.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGroupCertificateAuthorities(params = {}, callback) ⇒ AWS.Request

Retrieves the current CAs for a group.

Service Reference:

Examples:

Calling the listGroupCertificateAuthorities operation

var params = {
  GroupId: 'STRING_VALUE' /* required */
};
greengrass.listGroupCertificateAuthorities(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GroupCertificateAuthorities — (Array<map>) A list of certificate authorities associated with the group.
        • GroupCertificateAuthorityArn — (String) The ARN of the certificate authority for the group.
        • GroupCertificateAuthorityId — (String) The ID of the certificate authority for the group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGroups(params = {}, callback) ⇒ AWS.Request

Retrieves a list of groups.

Service Reference:

Examples:

Calling the listGroups operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Groups — (Array<map>) Information about a group.
        • Arn — (String) The ARN of the group.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the group was created.
        • Id — (String) The ID of the group.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the group was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the group.
        • LatestVersionArn — (String) The ARN of the latest version associated with the group.
        • Name — (String) The name of the group.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGroupVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of a group.

Service Reference:

Examples:

Calling the listGroupVersions operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listGroupVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listLoggerDefinitions(params = {}, callback) ⇒ AWS.Request

Retrieves a list of logger definitions.

Service Reference:

Examples:

Calling the listLoggerDefinitions operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listLoggerDefinitions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Definitions — (Array<map>) Information about a definition.
        • Arn — (String) The ARN of the definition.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
        • Id — (String) The ID of the definition.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the definition.
        • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
        • Name — (String) The name of the definition.
        • Tags — (map<String>) Tag(s) attached to the resource arn.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listLoggerDefinitionVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of a logger definition.

Service Reference:

Examples:

Calling the listLoggerDefinitionVersions operation

var params = {
  LoggerDefinitionId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listLoggerDefinitionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LoggerDefinitionId — (String) The ID of the logger definition.
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listResourceDefinitions(params = {}, callback) ⇒ AWS.Request

Retrieves a list of resource definitions.

Service Reference:

Examples:

Calling the listResourceDefinitions operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listResourceDefinitions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Definitions — (Array<map>) Information about a definition.
        • Arn — (String) The ARN of the definition.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
        • Id — (String) The ID of the definition.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the definition.
        • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
        • Name — (String) The name of the definition.
        • Tags — (map<String>) Tag(s) attached to the resource arn.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listResourceDefinitionVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of a resource definition.

Service Reference:

Examples:

Calling the listResourceDefinitionVersions operation

var params = {
  ResourceDefinitionId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listResourceDefinitionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
    • ResourceDefinitionId — (String) The ID of the resource definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSubscriptionDefinitions(params = {}, callback) ⇒ AWS.Request

Retrieves a list of subscription definitions.

Service Reference:

Examples:

Calling the listSubscriptionDefinitions operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listSubscriptionDefinitions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Definitions — (Array<map>) Information about a definition.
        • Arn — (String) The ARN of the definition.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the definition was created.
        • Id — (String) The ID of the definition.
        • LastUpdatedTimestamp — (String) The time, in milliseconds since the epoch, when the definition was last updated.
        • LatestVersion — (String) The ID of the latest version associated with the definition.
        • LatestVersionArn — (String) The ARN of the latest version associated with the definition.
        • Name — (String) The name of the definition.
        • Tags — (map<String>) Tag(s) attached to the resource arn.
      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSubscriptionDefinitionVersions(params = {}, callback) ⇒ AWS.Request

Lists the versions of a subscription definition.

Examples:

Calling the listSubscriptionDefinitionVersions operation

var params = {
  SubscriptionDefinitionId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
greengrass.listSubscriptionDefinitionVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String) The maximum number of results to be returned per request.
    • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
    • SubscriptionDefinitionId — (String) The ID of the subscription definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String) The token for the next set of results, or ''null'' if there are no additional results.
      • Versions — (Array<map>) Information about a version.
        • Arn — (String) The ARN of the version.
        • CreationTimestamp — (String) The time, in milliseconds since the epoch, when the version was created.
        • Id — (String) The ID of the parent definition that the version is associated with.
        • Version — (String) The ID of the version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Retrieves a list of resource tags for a resource arn.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
greengrass.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String) The Amazon Resource Name (ARN) of the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (map<String>) The key-value pair for the resource tag.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

resetDeployments(params = {}, callback) ⇒ AWS.Request

Resets a group's deployments.

Service Reference:

Examples:

Calling the resetDeployments operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  Force: true || false
};
greengrass.resetDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • Force — (Boolean) If true, performs a best-effort only core reset.
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DeploymentArn — (String) The ARN of the deployment.
      • DeploymentId — (String) The ID of the deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startBulkDeployment(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the startBulkDeployment operation

var params = {
  ExecutionRoleArn: 'STRING_VALUE', /* required */
  InputFileUri: 'STRING_VALUE', /* required */
  AmznClientToken: 'STRING_VALUE',
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.startBulkDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AmznClientToken — (String) A client token used to correlate requests and responses.
    • ExecutionRoleArn — (String) The ARN of the execution role to associate with the bulk deployment operation. This IAM role must allow the ''greengrass:CreateDeployment'' action for all group versions that are listed in the input file. This IAM role must have access to the S3 bucket containing the input file.
    • InputFileUri — (String) The URI of the input file contained in the S3 bucket. The execution role must have ''getObject'' permissions on this bucket to access the input file. The input file is a JSON-serialized, line delimited file with UTF-8 encoding that provides a list of group and version IDs and the deployment type. This file must be less than 100 MB. Currently, AWS IoT Greengrass supports only ''NewDeployment'' deployment types.
    • tags — (map<String>) Tag(s) to add to the new resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BulkDeploymentArn — (String) The ARN of the bulk deployment.
      • BulkDeploymentId — (String) The ID of the bulk deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopBulkDeployment(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the stopBulkDeployment operation

var params = {
  BulkDeploymentId: 'STRING_VALUE' /* required */
};
greengrass.stopBulkDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BulkDeploymentId — (String) The ID of the bulk deployment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds tags to a Greengrass resource. Valid resources are 'Group', 'ConnectorDefinition', 'CoreDefinition', 'DeviceDefinition', 'FunctionDefinition', 'LoggerDefinition', 'SubscriptionDefinition', 'ResourceDefinition', and 'BulkDeployment'.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
greengrass.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String) The Amazon Resource Name (ARN) of the resource.
    • tags — (map<String>) The key-value pair for the resource tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Remove resource tags from a Greengrass Resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
greengrass.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String) The Amazon Resource Name (ARN) of the resource.
    • TagKeys — (Array<String>) An array of tag keys to delete

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateConnectivityInfo(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateConnectivityInfo operation

var params = {
  ThingName: 'STRING_VALUE', /* required */
  ConnectivityInfo: [
    {
      HostAddress: 'STRING_VALUE',
      Id: 'STRING_VALUE',
      Metadata: 'STRING_VALUE',
      PortNumber: 'NUMBER_VALUE'
    },
    /* more items */
  ]
};
greengrass.updateConnectivityInfo(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConnectivityInfo — (Array<map>) A list of connectivity info.
      • HostAddress — (String) The endpoint for the Greengrass core. Can be an IP address or DNS.
      • Id — (String) The ID of the connectivity information.
      • Metadata — (String) Metadata for this endpoint.
      • PortNumber — (Integer) The port of the Greengrass core. Usually 8883.
    • ThingName — (String) The thing name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Message — (String) A message about the connectivity info update request.
      • Version — (String) The new version of the connectivity info.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateConnectorDefinition(params = {}, callback) ⇒ AWS.Request

Updates a connector definition.

Service Reference:

Examples:

Calling the updateConnectorDefinition operation

var params = {
  ConnectorDefinitionId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateConnectorDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConnectorDefinitionId — (String) The ID of the connector definition.
    • Name — (String) The name of the definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateCoreDefinition(params = {}, callback) ⇒ AWS.Request

Updates a core definition.

Service Reference:

Examples:

Calling the updateCoreDefinition operation

var params = {
  CoreDefinitionId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateCoreDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CoreDefinitionId — (String) The ID of the core definition.
    • Name — (String) The name of the definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDeviceDefinition(params = {}, callback) ⇒ AWS.Request

Updates a device definition.

Service Reference:

Examples:

Calling the updateDeviceDefinition operation

var params = {
  DeviceDefinitionId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateDeviceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceDefinitionId — (String) The ID of the device definition.
    • Name — (String) The name of the definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateFunctionDefinition(params = {}, callback) ⇒ AWS.Request

Updates a Lambda function definition.

Service Reference:

Examples:

Calling the updateFunctionDefinition operation

var params = {
  FunctionDefinitionId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateFunctionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FunctionDefinitionId — (String) The ID of the Lambda function definition.
    • Name — (String) The name of the definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateGroup(params = {}, callback) ⇒ AWS.Request

Updates a group.

Service Reference:

Examples:

Calling the updateGroup operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupId — (String) The ID of the Greengrass group.
    • Name — (String) The name of the definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateGroupCertificateConfiguration(params = {}, callback) ⇒ AWS.Request

Updates the Certificate expiry time for a group.

Examples:

Calling the updateGroupCertificateConfiguration operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  CertificateExpiryInMilliseconds: 'STRING_VALUE'
};
greengrass.updateGroupCertificateConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CertificateExpiryInMilliseconds — (String) The amount of time remaining before the certificate expires, in milliseconds.
    • GroupId — (String) The ID of the Greengrass group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CertificateAuthorityExpiryInMilliseconds — (String) The amount of time remaining before the certificate authority expires, in milliseconds.
      • CertificateExpiryInMilliseconds — (String) The amount of time remaining before the certificate expires, in milliseconds.
      • GroupId — (String) The ID of the group certificate configuration.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateLoggerDefinition(params = {}, callback) ⇒ AWS.Request

Updates a logger definition.

Service Reference:

Examples:

Calling the updateLoggerDefinition operation

var params = {
  LoggerDefinitionId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateLoggerDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LoggerDefinitionId — (String) The ID of the logger definition.
    • Name — (String) The name of the definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateResourceDefinition(params = {}, callback) ⇒ AWS.Request

Updates a resource definition.

Service Reference:

Examples:

Calling the updateResourceDefinition operation

var params = {
  ResourceDefinitionId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateResourceDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String) The name of the definition.
    • ResourceDefinitionId — (String) The ID of the resource definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSubscriptionDefinition(params = {}, callback) ⇒ AWS.Request

Updates a subscription definition.

Service Reference:

Examples:

Calling the updateSubscriptionDefinition operation

var params = {
  SubscriptionDefinitionId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
greengrass.updateSubscriptionDefinition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String) The name of the definition.
    • SubscriptionDefinitionId — (String) The ID of the subscription definition.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateThingRuntimeConfiguration(params = {}, callback) ⇒ AWS.Request

Updates the runtime configuration of a thing.

Service Reference:

Examples:

Calling the updateThingRuntimeConfiguration operation

var params = {
  ThingName: 'STRING_VALUE', /* required */
  TelemetryConfiguration: {
    Telemetry: On | Off /* required */
  }
};
greengrass.updateThingRuntimeConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TelemetryConfiguration — (map) Configuration for telemetry service.
      • Telemetryrequired — (String) Configure telemetry to be on or off. Possible values include:
        • "On"
        • "Off"
    • ThingName — (String) The thing name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.