Class: AWS.IoTThingsGraph

Inherits:
AWS.Service show all
Identifier:
iotthingsgraph
API Version:
2018-09-06
Defined in:
(unknown)

Overview

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

Service Description

AWS IoT Things Graph provides an integrated set of tools that enable developers to connect devices and services that use different standards, such as units of measure and communication protocols. AWS IoT Things Graph makes it possible to build IoT applications with little to no code by connecting devices and services and defining how they interact at an abstract level.

For more information about how AWS IoT Things Graph works, see the User Guide.

Sending a Request Using IoTThingsGraph

var iotthingsgraph = new AWS.IoTThingsGraph();
iotthingsgraph.associateEntityToThing(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 IoTThingsGraph object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var iotthingsgraph = new AWS.IoTThingsGraph({apiVersion: '2018-09-06'});

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

AWS.config.apiVersions = {
  iotthingsgraph: '2018-09-06',
  // other service API versions
};

var iotthingsgraph = new AWS.IoTThingsGraph();

Version:

  • 2018-09-06

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.IoTThingsGraph(options = {}) ⇒ Object

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

Examples:

Constructing a IoTThingsGraph object

var iotthingsgraph = new AWS.IoTThingsGraph({apiVersion: '2018-09-06'});

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)

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

  • 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.IoTThingsGraph.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.IoTThingsGraph.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.
  • 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)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • 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

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

Associates a device with a concrete thing that is in the user's registry.

A thing can be associated with only one device at a time. If you associate a thing with a new device id, its previous association will be removed.

Service Reference:

Examples:

Calling the associateEntityToThing operation

var params = {
  entityId: 'STRING_VALUE', /* required */
  thingName: 'STRING_VALUE', /* required */
  namespaceVersion: 'NUMBER_VALUE'
};
iotthingsgraph.associateEntityToThing(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 name of the thing to which the entity is to be associated.

    • entityId — (String)

      The ID of the device to be associated with the thing.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME

    • namespaceVersion — (Integer)

      The version of the user's namespace. Defaults to the latest version of the user's namespace.

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.

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

Creates a workflow template. Workflows can be created only in the user's namespace. (The public namespace contains only entities.) The workflow can contain only entities in the specified namespace. The workflow is validated against the entities in the latest version of the user's namespace unless another namespace version is specified in the request.

Service Reference:

Examples:

Calling the createFlowTemplate operation

var params = {
  definition: { /* required */
    language: GRAPHQL, /* required */
    text: 'STRING_VALUE' /* required */
  },
  compatibleNamespaceVersion: 'NUMBER_VALUE'
};
iotthingsgraph.createFlowTemplate(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: {})
    • definition — (map)

      The workflow DefinitionDocument.

      • languagerequired — (String)

        The language used to define the entity. GRAPHQL is the only valid value.

        Possible values include:
        • "GRAPHQL"
      • textrequired — (String)

        The GraphQL text that defines the entity.

    • compatibleNamespaceVersion — (Integer)

      The namespace version in which the workflow is to be created.

      If no value is specified, the latest version is used by default.

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:

      • summary — (map)

        The summary object that describes the created workflow.

        • id — (String)

          The ID of the workflow.

        • arn — (String)

          The ARN of the workflow.

        • revisionNumber — (Integer)

          The revision number of the workflow.

        • createdAt — (Date)

          The date when the workflow was created.

Returns:

  • (AWS.Request)

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

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

Creates a system instance.

This action validates the system instance, prepares the deployment-related resources. For Greengrass deployments, it updates the Greengrass group that is specified by the greengrassGroupName parameter. It also adds a file to the S3 bucket specified by the s3BucketName parameter. You need to call DeploySystemInstance after running this action.

For Greengrass deployments, since this action modifies and adds resources to a Greengrass group and an S3 bucket on the caller's behalf, the calling identity must have write permissions to both the specified Greengrass group and S3 bucket. Otherwise, the call will fail with an authorization error.

For cloud deployments, this action requires a flowActionsRoleArn value. This is an IAM role that has permissions to access AWS services, such as AWS Lambda and AWS IoT, that the flow uses when it executes.

If the definition document doesn't specify a version of the user's namespace, the latest version will be used by default.

Service Reference:

Examples:

Calling the createSystemInstance operation

var params = {
  definition: { /* required */
    language: GRAPHQL, /* required */
    text: 'STRING_VALUE' /* required */
  },
  target: GREENGRASS | CLOUD, /* required */
  flowActionsRoleArn: 'STRING_VALUE',
  greengrassGroupName: 'STRING_VALUE',
  metricsConfiguration: {
    cloudMetricEnabled: true || false,
    metricRuleRoleArn: 'STRING_VALUE'
  },
  s3BucketName: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotthingsgraph.createSystemInstance(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: {})
    • tags — (Array<map>)

      Metadata, consisting of key-value pairs, that can be used to categorize your system instances.

      • keyrequired — (String)

        The required name of the tag. The string value can be from 1 to 128 Unicode characters in length.

      • valuerequired — (String)

        The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length.

    • definition — (map)

      A document that defines an entity.

      • languagerequired — (String)

        The language used to define the entity. GRAPHQL is the only valid value.

        Possible values include:
        • "GRAPHQL"
      • textrequired — (String)

        The GraphQL text that defines the entity.

    • target — (String)

      The target type of the deployment. Valid values are GREENGRASS and CLOUD.

      Possible values include:
      • "GREENGRASS"
      • "CLOUD"
    • greengrassGroupName — (String)

      The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the target parameter is GREENGRASS.

    • s3BucketName — (String)

      The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the target parameter is GREENGRASS.

    • metricsConfiguration — (map)

      An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.

      • cloudMetricEnabled — (Boolean)

        A Boolean that specifies whether cloud metrics are collected.

      • metricRuleRoleArn — (String)

        The ARN of the role that is used to collect cloud metrics.

    • flowActionsRoleArn — (String)

      The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the target parameter is CLOUD.

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:

      • summary — (map)

        The summary object that describes the new system instance.

        • id — (String)

          The ID of the system instance.

        • arn — (String)

          The ARN of the system instance.

        • status — (String)

          The status of the system instance.

          Possible values include:
          • "NOT_DEPLOYED"
          • "BOOTSTRAP"
          • "DEPLOY_IN_PROGRESS"
          • "DEPLOYED_IN_TARGET"
          • "UNDEPLOY_IN_PROGRESS"
          • "FAILED"
          • "PENDING_DELETE"
          • "DELETED_IN_TARGET"
        • target — (String)

          The target of the system instance.

          Possible values include:
          • "GREENGRASS"
          • "CLOUD"
        • greengrassGroupName — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • createdAt — (Date)

          The date when the system instance was created.

        • updatedAt — (Date)

          The date and time when the system instance was last updated.

        • greengrassGroupId — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • greengrassGroupVersionId — (String)

          The version of the Greengrass group where the system instance is deployed.

Returns:

  • (AWS.Request)

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

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

Creates a system. The system is validated against the entities in the latest version of the user's namespace unless another namespace version is specified in the request.

Service Reference:

Examples:

Calling the createSystemTemplate operation

var params = {
  definition: { /* required */
    language: GRAPHQL, /* required */
    text: 'STRING_VALUE' /* required */
  },
  compatibleNamespaceVersion: 'NUMBER_VALUE'
};
iotthingsgraph.createSystemTemplate(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: {})
    • definition — (map)

      The DefinitionDocument used to create the system.

      • languagerequired — (String)

        The language used to define the entity. GRAPHQL is the only valid value.

        Possible values include:
        • "GRAPHQL"
      • textrequired — (String)

        The GraphQL text that defines the entity.

    • compatibleNamespaceVersion — (Integer)

      The namespace version in which the system is to be created.

      If no value is specified, the latest version is used by default.

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:

      • summary — (map)

        The summary object that describes the created system.

        • id — (String)

          The ID of the system.

        • arn — (String)

          The ARN of the system.

        • revisionNumber — (Integer)

          The revision number of the system.

        • createdAt — (Date)

          The date when the system was created.

Returns:

  • (AWS.Request)

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

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

Deletes a workflow. Any new system or deployment that contains this workflow will fail to update or deploy. Existing deployments that contain the workflow will continue to run (since they use a snapshot of the workflow taken at the time of deployment).

Service Reference:

Examples:

Calling the deleteFlowTemplate operation

var params = {
  id: 'STRING_VALUE' /* required */
};
iotthingsgraph.deleteFlowTemplate(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: {})
    • id — (String)

      The ID of the workflow to be deleted.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME

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.

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

Deletes the specified namespace. This action deletes all of the entities in the namespace. Delete the systems and flows that use entities in the namespace before performing this action.

Service Reference:

Examples:

Calling the deleteNamespace operation

var params = {
};
iotthingsgraph.deleteNamespace(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:

      • namespaceArn — (String)

        The ARN of the namespace to be deleted.

      • namespaceName — (String)

        The name of the namespace to be deleted.

Returns:

  • (AWS.Request)

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

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

Deletes a system instance. Only system instances that have never been deployed, or that have been undeployed can be deleted.

Users can create a new system instance that has the same ID as a deleted system instance.

Service Reference:

Examples:

Calling the deleteSystemInstance operation

var params = {
  id: 'STRING_VALUE'
};
iotthingsgraph.deleteSystemInstance(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: {})
    • id — (String)

      The ID of the system instance to be deleted.

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.

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

Deletes a system. New deployments can't contain the system after its deletion. Existing deployments that contain the system will continue to work because they use a snapshot of the system that is taken when it is deployed.

Service Reference:

Examples:

Calling the deleteSystemTemplate operation

var params = {
  id: 'STRING_VALUE' /* required */
};
iotthingsgraph.deleteSystemTemplate(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: {})
    • id — (String)

      The ID of the system to be deleted.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME

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.

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

Greengrass and Cloud Deployments

Deploys the system instance to the target specified in CreateSystemInstance.

Greengrass Deployments

If the system or any workflows and entities have been updated before this action is called, then the deployment will create a new Amazon Simple Storage Service resource file and then deploy it.

Since this action creates a Greengrass deployment on the caller's behalf, the calling identity must have write permissions to the specified Greengrass group. Otherwise, the call will fail with an authorization error.

For information about the artifacts that get added to your Greengrass core device when you use this API, see AWS IoT Things Graph and AWS IoT Greengrass.

Service Reference:

Examples:

Calling the deploySystemInstance operation

var params = {
  id: 'STRING_VALUE'
};
iotthingsgraph.deploySystemInstance(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: {})
    • id — (String)

      The ID of the system instance. This value is returned by the CreateSystemInstance action.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:deployment:DEPLOYMENTNAME

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:

      • summary — (map)

        An object that contains summary information about a system instance that was deployed.

        • id — (String)

          The ID of the system instance.

        • arn — (String)

          The ARN of the system instance.

        • status — (String)

          The status of the system instance.

          Possible values include:
          • "NOT_DEPLOYED"
          • "BOOTSTRAP"
          • "DEPLOY_IN_PROGRESS"
          • "DEPLOYED_IN_TARGET"
          • "UNDEPLOY_IN_PROGRESS"
          • "FAILED"
          • "PENDING_DELETE"
          • "DELETED_IN_TARGET"
        • target — (String)

          The target of the system instance.

          Possible values include:
          • "GREENGRASS"
          • "CLOUD"
        • greengrassGroupName — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • createdAt — (Date)

          The date when the system instance was created.

        • updatedAt — (Date)

          The date and time when the system instance was last updated.

        • greengrassGroupId — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • greengrassGroupVersionId — (String)

          The version of the Greengrass group where the system instance is deployed.

      • greengrassDeploymentId — (String)

        The ID of the Greengrass deployment used to deploy the system instance.

Returns:

  • (AWS.Request)

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

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

Deprecates the specified workflow. This action marks the workflow for deletion. Deprecated flows can't be deployed, but existing deployments will continue to run.

Service Reference:

Examples:

Calling the deprecateFlowTemplate operation

var params = {
  id: 'STRING_VALUE' /* required */
};
iotthingsgraph.deprecateFlowTemplate(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: {})
    • id — (String)

      The ID of the workflow to be deleted.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME

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.

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

Deprecates the specified system.

Service Reference:

Examples:

Calling the deprecateSystemTemplate operation

var params = {
  id: 'STRING_VALUE' /* required */
};
iotthingsgraph.deprecateSystemTemplate(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: {})
    • id — (String)

      The ID of the system to delete.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME

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.

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

Gets the latest version of the user's namespace and the public version that it is tracking.

Service Reference:

Examples:

Calling the describeNamespace operation

var params = {
  namespaceName: 'STRING_VALUE'
};
iotthingsgraph.describeNamespace(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: {})
    • namespaceName — (String)

      The name of the user's namespace. Set this to aws to get the public namespace.

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:

      • namespaceArn — (String)

        The ARN of the namespace.

      • namespaceName — (String)

        The name of the namespace.

      • trackingNamespaceName — (String)

        The name of the public namespace that the latest namespace version is tracking.

      • trackingNamespaceVersion — (Integer)

        The version of the public namespace that the latest version is tracking.

      • namespaceVersion — (Integer)

        The version of the user's namespace to describe.

Returns:

  • (AWS.Request)

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

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

Dissociates a device entity from a concrete thing. The action takes only the type of the entity that you need to dissociate because only one entity of a particular type can be associated with a thing.

Service Reference:

Examples:

Calling the dissociateEntityFromThing operation

var params = {
  entityType: DEVICE | SERVICE | DEVICE_MODEL | CAPABILITY | STATE | ACTION | EVENT | PROPERTY | MAPPING | ENUM, /* required */
  thingName: 'STRING_VALUE' /* required */
};
iotthingsgraph.dissociateEntityFromThing(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 name of the thing to disassociate.

    • entityType — (String)

      The entity type from which to disassociate the thing.

      Possible values include:
      • "DEVICE"
      • "SERVICE"
      • "DEVICE_MODEL"
      • "CAPABILITY"
      • "STATE"
      • "ACTION"
      • "EVENT"
      • "PROPERTY"
      • "MAPPING"
      • "ENUM"

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.

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

Gets definitions of the specified entities. Uses the latest version of the user's namespace by default. This API returns the following TDM entities.

  • Properties

  • States

  • Events

  • Actions

  • Capabilities

  • Mappings

  • Devices

  • Device Models

  • Services

This action doesn't return definitions for systems, flows, and deployments.

Service Reference:

Examples:

Calling the getEntities operation

var params = {
  ids: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  namespaceVersion: 'NUMBER_VALUE'
};
iotthingsgraph.getEntities(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: {})
    • ids — (Array<String>)

      An array of entity IDs.

      The IDs should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME

    • namespaceVersion — (Integer)

      The version of the user's namespace. Defaults to the latest version of the user's namespace.

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:

      • descriptions — (Array<map>)

        An array of descriptions for the specified entities.

        • id — (String)

          The entity ID.

        • arn — (String)

          The entity ARN.

        • type — (String)

          The entity type.

          Possible values include:
          • "DEVICE"
          • "SERVICE"
          • "DEVICE_MODEL"
          • "CAPABILITY"
          • "STATE"
          • "ACTION"
          • "EVENT"
          • "PROPERTY"
          • "MAPPING"
          • "ENUM"
        • createdAt — (Date)

          The time at which the entity was created.

        • definition — (map)

          The definition document of the entity.

          • languagerequired — (String)

            The language used to define the entity. GRAPHQL is the only valid value.

            Possible values include:
            • "GRAPHQL"
          • textrequired — (String)

            The GraphQL text that defines the entity.

Returns:

  • (AWS.Request)

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

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

Gets the latest version of the DefinitionDocument and FlowTemplateSummary for the specified workflow.

Service Reference:

Examples:

Calling the getFlowTemplate operation

var params = {
  id: 'STRING_VALUE', /* required */
  revisionNumber: 'NUMBER_VALUE'
};
iotthingsgraph.getFlowTemplate(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: {})
    • id — (String)

      The ID of the workflow.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME

    • revisionNumber — (Integer)

      The number of the workflow revision to retrieve.

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:

      • description — (map)

        The object that describes the specified workflow.

        • summary — (map)

          An object that contains summary information about a workflow.

          • id — (String)

            The ID of the workflow.

          • arn — (String)

            The ARN of the workflow.

          • revisionNumber — (Integer)

            The revision number of the workflow.

          • createdAt — (Date)

            The date when the workflow was created.

        • definition — (map)

          A workflow's definition document.

          • languagerequired — (String)

            The language used to define the entity. GRAPHQL is the only valid value.

            Possible values include:
            • "GRAPHQL"
          • textrequired — (String)

            The GraphQL text that defines the entity.

        • validatedNamespaceVersion — (Integer)

          The version of the user's namespace against which the workflow was validated. Use this value in your system instance.

Returns:

  • (AWS.Request)

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

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

Gets revisions of the specified workflow. Only the last 100 revisions are stored. If the workflow has been deprecated, this action will return revisions that occurred before the deprecation. This action won't work for workflows that have been deleted.

Service Reference:

Examples:

Calling the getFlowTemplateRevisions operation

var params = {
  id: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.getFlowTemplateRevisions(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: {})
    • id — (String)

      The ID of the workflow.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

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:

      • summaries — (Array<map>)

        An array of objects that provide summary data about each revision.

        • id — (String)

          The ID of the workflow.

        • arn — (String)

          The ARN of the workflow.

        • revisionNumber — (Integer)

          The revision number of the workflow.

        • createdAt — (Date)

          The date when the workflow was created.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Gets the status of a namespace deletion task.

Service Reference:

Examples:

Calling the getNamespaceDeletionStatus operation

var params = {
};
iotthingsgraph.getNamespaceDeletionStatus(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:

      • namespaceArn — (String)

        The ARN of the namespace that is being deleted.

      • namespaceName — (String)

        The name of the namespace that is being deleted.

      • status — (String)

        The status of the deletion request.

        Possible values include:
        • "IN_PROGRESS"
        • "SUCCEEDED"
        • "FAILED"
      • errorCode — (String)

        An error code returned by the namespace deletion task.

        Possible values include:
        • "VALIDATION_FAILED"
      • errorMessage — (String)

        An error code returned by the namespace deletion task.

Returns:

  • (AWS.Request)

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

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

Gets a system instance.

Service Reference:

Examples:

Calling the getSystemInstance operation

var params = {
  id: 'STRING_VALUE' /* required */
};
iotthingsgraph.getSystemInstance(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: {})
    • id — (String)

      The ID of the system deployment instance. This value is returned by CreateSystemInstance.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:deployment:DEPLOYMENTNAME

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:

      • description — (map)

        An object that describes the system instance.

        • summary — (map)

          An object that contains summary information about a system instance.

          • id — (String)

            The ID of the system instance.

          • arn — (String)

            The ARN of the system instance.

          • status — (String)

            The status of the system instance.

            Possible values include:
            • "NOT_DEPLOYED"
            • "BOOTSTRAP"
            • "DEPLOY_IN_PROGRESS"
            • "DEPLOYED_IN_TARGET"
            • "UNDEPLOY_IN_PROGRESS"
            • "FAILED"
            • "PENDING_DELETE"
            • "DELETED_IN_TARGET"
          • target — (String)

            The target of the system instance.

            Possible values include:
            • "GREENGRASS"
            • "CLOUD"
          • greengrassGroupName — (String)

            The ID of the Greengrass group where the system instance is deployed.

          • createdAt — (Date)

            The date when the system instance was created.

          • updatedAt — (Date)

            The date and time when the system instance was last updated.

          • greengrassGroupId — (String)

            The ID of the Greengrass group where the system instance is deployed.

          • greengrassGroupVersionId — (String)

            The version of the Greengrass group where the system instance is deployed.

        • definition — (map)

          A document that defines an entity.

          • languagerequired — (String)

            The language used to define the entity. GRAPHQL is the only valid value.

            Possible values include:
            • "GRAPHQL"
          • textrequired — (String)

            The GraphQL text that defines the entity.

        • s3BucketName — (String)

          The Amazon Simple Storage Service bucket where information about a system instance is stored.

        • metricsConfiguration — (map)

          An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.

          • cloudMetricEnabled — (Boolean)

            A Boolean that specifies whether cloud metrics are collected.

          • metricRuleRoleArn — (String)

            The ARN of the role that is used to collect cloud metrics.

        • validatedNamespaceVersion — (Integer)

          The version of the user's namespace against which the system instance was validated.

        • validatedDependencyRevisions — (Array<map>)

          A list of objects that contain all of the IDs and revision numbers of workflows and systems that are used in a system instance.

          • id — (String)

            The ID of the workflow or system.

          • revisionNumber — (Integer)

            The revision number of the workflow or system.

        • flowActionsRoleArn — (String)

          The AWS Identity and Access Management (IAM) role that AWS IoT Things Graph assumes during flow execution in a cloud deployment. This role must have read and write permissionss to AWS Lambda and AWS IoT and to any other AWS services that the flow uses.

Returns:

  • (AWS.Request)

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

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

Gets a system.

Service Reference:

Examples:

Calling the getSystemTemplate operation

var params = {
  id: 'STRING_VALUE', /* required */
  revisionNumber: 'NUMBER_VALUE'
};
iotthingsgraph.getSystemTemplate(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: {})
    • id — (String)

      The ID of the system to get. This ID must be in the user's namespace.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME

    • revisionNumber — (Integer)

      The number that specifies the revision of the system to get.

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:

      • description — (map)

        An object that contains summary data about the system.

        • summary — (map)

          An object that contains summary information about a system.

          • id — (String)

            The ID of the system.

          • arn — (String)

            The ARN of the system.

          • revisionNumber — (Integer)

            The revision number of the system.

          • createdAt — (Date)

            The date when the system was created.

        • definition — (map)

          The definition document of a system.

          • languagerequired — (String)

            The language used to define the entity. GRAPHQL is the only valid value.

            Possible values include:
            • "GRAPHQL"
          • textrequired — (String)

            The GraphQL text that defines the entity.

        • validatedNamespaceVersion — (Integer)

          The namespace version against which the system was validated. Use this value in your system instance.

Returns:

  • (AWS.Request)

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

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

Gets revisions made to the specified system template. Only the previous 100 revisions are stored. If the system has been deprecated, this action will return the revisions that occurred before its deprecation. This action won't work with systems that have been deleted.

Service Reference:

Examples:

Calling the getSystemTemplateRevisions operation

var params = {
  id: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.getSystemTemplateRevisions(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: {})
    • id — (String)

      The ID of the system template.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

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:

      • summaries — (Array<map>)

        An array of objects that contain summary data about the system template revisions.

        • id — (String)

          The ID of the system.

        • arn — (String)

          The ARN of the system.

        • revisionNumber — (Integer)

          The revision number of the system.

        • createdAt — (Date)

          The date when the system was created.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Gets the status of the specified upload.

Service Reference:

Examples:

Calling the getUploadStatus operation

var params = {
  uploadId: 'STRING_VALUE' /* required */
};
iotthingsgraph.getUploadStatus(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: {})
    • uploadId — (String)

      The ID of the upload. This value is returned by the UploadEntityDefinitions action.

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:

      • uploadId — (String)

        The ID of the upload.

      • uploadStatus — (String)

        The status of the upload. The initial status is IN_PROGRESS. The response show all validation failures if the upload fails.

        Possible values include:
        • "IN_PROGRESS"
        • "SUCCEEDED"
        • "FAILED"
      • namespaceArn — (String)

        The ARN of the upload.

      • namespaceName — (String)

        The name of the upload's namespace.

      • namespaceVersion — (Integer)

        The version of the user's namespace. Defaults to the latest version of the user's namespace.

      • failureReason — (Array<String>)

        The reason for an upload failure.

      • createdDate — (Date)

        The date at which the upload was created.

Returns:

  • (AWS.Request)

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

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

Returns a list of objects that contain information about events in a flow execution.

Service Reference:

Examples:

Calling the listFlowExecutionMessages operation

var params = {
  flowExecutionId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.listFlowExecutionMessages(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: {})
    • flowExecutionId — (String)

      The ID of the flow execution.

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

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:

      • messages — (Array<map>)

        A list of objects that contain information about events in the specified flow execution.

        • messageId — (String)

          The unique identifier of the message.

        • eventType — (String)

          The type of flow event .

          Possible values include:
          • "EXECUTION_STARTED"
          • "EXECUTION_FAILED"
          • "EXECUTION_ABORTED"
          • "EXECUTION_SUCCEEDED"
          • "STEP_STARTED"
          • "STEP_FAILED"
          • "STEP_SUCCEEDED"
          • "ACTIVITY_SCHEDULED"
          • "ACTIVITY_STARTED"
          • "ACTIVITY_FAILED"
          • "ACTIVITY_SUCCEEDED"
          • "START_FLOW_EXECUTION_TASK"
          • "SCHEDULE_NEXT_READY_STEPS_TASK"
          • "THING_ACTION_TASK"
          • "THING_ACTION_TASK_FAILED"
          • "THING_ACTION_TASK_SUCCEEDED"
          • "ACKNOWLEDGE_TASK_MESSAGE"
        • timestamp — (Date)

          The date and time when the message was last updated.

        • payload — (String)

          A string containing information about the flow event.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Lists all tags on an AWS IoT Things Graph resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.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: {})
    • maxResults — (Integer)

      The maximum number of tags to return.

    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the resource whose tags are to be returned.

    • nextToken — (String)

      The token that specifies the next page of results to return.

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 — (Array<map>)

        List of tags returned by the ListTagsForResource operation.

        • keyrequired — (String)

          The required name of the tag. The string value can be from 1 to 128 Unicode characters in length.

        • valuerequired — (String)

          The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length.

      • nextToken — (String)

        The token that specifies the next page of results to return.

Returns:

  • (AWS.Request)

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

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

Searches for entities of the specified type. You can search for entities in your namespace and the public namespace that you're tracking.

Service Reference:

Examples:

Calling the searchEntities operation

var params = {
  entityTypes: [ /* required */
    DEVICE | SERVICE | DEVICE_MODEL | CAPABILITY | STATE | ACTION | EVENT | PROPERTY | MAPPING | ENUM,
    /* more items */
  ],
  filters: [
    {
      name: NAME | NAMESPACE | SEMANTIC_TYPE_PATH | REFERENCED_ENTITY_ID,
      value: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  maxResults: 'NUMBER_VALUE',
  namespaceVersion: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.searchEntities(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: {})
    • entityTypes — (Array<String>)

      The entity types for which to search.

    • filters — (Array<map>)

      Optional filter to apply to the search. Valid filters are NAME NAMESPACE, SEMANTIC_TYPE_PATH and REFERENCED_ENTITY_ID. REFERENCED_ENTITY_ID filters on entities that are used by the entity in the result set. For example, you can filter on the ID of a property that is used in a state.

      Multiple filters function as OR criteria in the query. Multiple values passed inside the filter function as AND criteria.

      • name — (String)

        The name of the entity search filter field. REFERENCED_ENTITY_ID filters on entities that are used by the entity in the result set. For example, you can filter on the ID of a property that is used in a state.

        Possible values include:
        • "NAME"
        • "NAMESPACE"
        • "SEMANTIC_TYPE_PATH"
        • "REFERENCED_ENTITY_ID"
      • value — (Array<String>)

        An array of string values for the search filter field. Multiple values function as AND criteria in the search.

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

    • namespaceVersion — (Integer)

      The version of the user's namespace. Defaults to the latest version of the user's namespace.

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:

      • descriptions — (Array<map>)

        An array of descriptions for each entity returned in the search result.

        • id — (String)

          The entity ID.

        • arn — (String)

          The entity ARN.

        • type — (String)

          The entity type.

          Possible values include:
          • "DEVICE"
          • "SERVICE"
          • "DEVICE_MODEL"
          • "CAPABILITY"
          • "STATE"
          • "ACTION"
          • "EVENT"
          • "PROPERTY"
          • "MAPPING"
          • "ENUM"
        • createdAt — (Date)

          The time at which the entity was created.

        • definition — (map)

          The definition document of the entity.

          • languagerequired — (String)

            The language used to define the entity. GRAPHQL is the only valid value.

            Possible values include:
            • "GRAPHQL"
          • textrequired — (String)

            The GraphQL text that defines the entity.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Searches for AWS IoT Things Graph workflow execution instances.

Service Reference:

Examples:

Calling the searchFlowExecutions operation

var params = {
  systemInstanceId: 'STRING_VALUE', /* required */
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  flowExecutionId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
iotthingsgraph.searchFlowExecutions(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: {})
    • systemInstanceId — (String)

      The ID of the system instance that contains the flow.

    • flowExecutionId — (String)

      The ID of a flow execution.

    • startTime — (Date)

      The date and time of the earliest flow execution to return.

    • endTime — (Date)

      The date and time of the latest flow execution to return.

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

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:

      • summaries — (Array<map>)

        An array of objects that contain summary information about each workflow execution in the result set.

        • flowExecutionId — (String)

          The ID of the flow execution.

        • status — (String)

          The current status of the flow execution.

          Possible values include:
          • "RUNNING"
          • "ABORTED"
          • "SUCCEEDED"
          • "FAILED"
        • systemInstanceId — (String)

          The ID of the system instance that contains the flow.

        • flowTemplateId — (String)

          The ID of the flow.

        • createdAt — (Date)

          The date and time when the flow execution summary was created.

        • updatedAt — (Date)

          The date and time when the flow execution summary was last updated.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Searches for summary information about workflows.

Service Reference:

Examples:

Calling the searchFlowTemplates operation

var params = {
  filters: [
    {
      name: DEVICE_MODEL_ID, /* required */
      value: [ /* required */
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.searchFlowTemplates(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: {})
    • filters — (Array<map>)

      An array of objects that limit the result set. The only valid filter is DEVICE_MODEL_ID.

      • namerequired — (String)

        The name of the search filter field.

        Possible values include:
        • "DEVICE_MODEL_ID"
      • valuerequired — (Array<String>)

        An array of string values for the search filter field. Multiple values function as AND criteria in the search.

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

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:

      • summaries — (Array<map>)

        An array of objects that contain summary information about each workflow in the result set.

        • id — (String)

          The ID of the workflow.

        • arn — (String)

          The ARN of the workflow.

        • revisionNumber — (Integer)

          The revision number of the workflow.

        • createdAt — (Date)

          The date when the workflow was created.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Searches for system instances in the user's account.

Service Reference:

Examples:

Calling the searchSystemInstances operation

var params = {
  filters: [
    {
      name: SYSTEM_TEMPLATE_ID | STATUS | GREENGRASS_GROUP_NAME,
      value: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.searchSystemInstances(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: {})
    • filters — (Array<map>)

      Optional filter to apply to the search. Valid filters are SYSTEM_TEMPLATE_ID, STATUS, and GREENGRASS_GROUP_NAME.

      Multiple filters function as OR criteria in the query. Multiple values passed inside the filter function as AND criteria.

      • name — (String)

        The name of the search filter field.

        Possible values include:
        • "SYSTEM_TEMPLATE_ID"
        • "STATUS"
        • "GREENGRASS_GROUP_NAME"
      • value — (Array<String>)

        An array of string values for the search filter field. Multiple values function as AND criteria in the search.

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

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:

      • summaries — (Array<map>)

        An array of objects that contain summary data abour the system instances in the result set.

        • id — (String)

          The ID of the system instance.

        • arn — (String)

          The ARN of the system instance.

        • status — (String)

          The status of the system instance.

          Possible values include:
          • "NOT_DEPLOYED"
          • "BOOTSTRAP"
          • "DEPLOY_IN_PROGRESS"
          • "DEPLOYED_IN_TARGET"
          • "UNDEPLOY_IN_PROGRESS"
          • "FAILED"
          • "PENDING_DELETE"
          • "DELETED_IN_TARGET"
        • target — (String)

          The target of the system instance.

          Possible values include:
          • "GREENGRASS"
          • "CLOUD"
        • greengrassGroupName — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • createdAt — (Date)

          The date when the system instance was created.

        • updatedAt — (Date)

          The date and time when the system instance was last updated.

        • greengrassGroupId — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • greengrassGroupVersionId — (String)

          The version of the Greengrass group where the system instance is deployed.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Searches for summary information about systems in the user's account. You can filter by the ID of a workflow to return only systems that use the specified workflow.

Service Reference:

Examples:

Calling the searchSystemTemplates operation

var params = {
  filters: [
    {
      name: FLOW_TEMPLATE_ID, /* required */
      value: [ /* required */
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.searchSystemTemplates(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: {})
    • filters — (Array<map>)

      An array of filters that limit the result set. The only valid filter is FLOW_TEMPLATE_ID.

      • namerequired — (String)

        The name of the system search filter field.

        Possible values include:
        • "FLOW_TEMPLATE_ID"
      • valuerequired — (Array<String>)

        An array of string values for the search filter field. Multiple values function as AND criteria in the search.

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

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:

      • summaries — (Array<map>)

        An array of objects that contain summary information about each system deployment in the result set.

        • id — (String)

          The ID of the system.

        • arn — (String)

          The ARN of the system.

        • revisionNumber — (Integer)

          The revision number of the system.

        • createdAt — (Date)

          The date when the system was created.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Searches for things associated with the specified entity. You can search by both device and device model.

For example, if two different devices, camera1 and camera2, implement the camera device model, the user can associate thing1 to camera1 and thing2 to camera2. SearchThings(camera2) will return only thing2, but SearchThings(camera) will return both thing1 and thing2.

This action searches for exact matches and doesn't perform partial text matching.

Service Reference:

Examples:

Calling the searchThings operation

var params = {
  entityId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  namespaceVersion: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotthingsgraph.searchThings(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: {})
    • entityId — (String)

      The ID of the entity to which the things are associated.

      The IDs should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME

    • nextToken — (String)

      The string that specifies the next page of results. Use this when you're paginating results.

    • maxResults — (Integer)

      The maximum number of results to return in the response.

    • namespaceVersion — (Integer)

      The version of the user's namespace. Defaults to the latest version of the user's namespace.

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:

      • things — (Array<map>)

        An array of things in the result set.

        • thingArn — (String)

          The ARN of the thing.

        • thingName — (String)

          The name of the thing.

      • nextToken — (String)

        The string to specify as nextToken when you request the next page of results.

Returns:

  • (AWS.Request)

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

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

Creates a tag for the specified resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotthingsgraph.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 whose tags are returned.

    • tags — (Array<map>)

      A list of tags to add to the resource.>

      • keyrequired — (String)

        The required name of the tag. The string value can be from 1 to 128 Unicode characters in length.

      • valuerequired — (String)

        The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length.

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.

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

Removes a system instance from its target (Cloud or Greengrass).

Service Reference:

Examples:

Calling the undeploySystemInstance operation

var params = {
  id: 'STRING_VALUE'
};
iotthingsgraph.undeploySystemInstance(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: {})
    • id — (String)

      The ID of the system instance to remove from its target.

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:

      • summary — (map)

        An object that contains summary information about the system instance that was removed from its target.

        • id — (String)

          The ID of the system instance.

        • arn — (String)

          The ARN of the system instance.

        • status — (String)

          The status of the system instance.

          Possible values include:
          • "NOT_DEPLOYED"
          • "BOOTSTRAP"
          • "DEPLOY_IN_PROGRESS"
          • "DEPLOYED_IN_TARGET"
          • "UNDEPLOY_IN_PROGRESS"
          • "FAILED"
          • "PENDING_DELETE"
          • "DELETED_IN_TARGET"
        • target — (String)

          The target of the system instance.

          Possible values include:
          • "GREENGRASS"
          • "CLOUD"
        • greengrassGroupName — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • createdAt — (Date)

          The date when the system instance was created.

        • updatedAt — (Date)

          The date and time when the system instance was last updated.

        • greengrassGroupId — (String)

          The ID of the Greengrass group where the system instance is deployed.

        • greengrassGroupVersionId — (String)

          The version of the Greengrass group where the system instance is deployed.

Returns:

  • (AWS.Request)

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

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

Removes a tag from the specified resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
iotthingsgraph.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 whose tags are to be removed.

    • tagKeys — (Array<String>)

      A list of tag key names to remove from the resource. You don't specify the value. Both the key and its associated value are removed.

      This parameter to the API requires a JSON text string argument. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the AWS CLI User Guide.

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.

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

Updates the specified workflow. All deployed systems and system instances that use the workflow will see the changes in the flow when it is redeployed. If you don't want this behavior, copy the workflow (creating a new workflow with a different ID), and update the copy. The workflow can contain only entities in the specified namespace.

Service Reference:

Examples:

Calling the updateFlowTemplate operation

var params = {
  definition: { /* required */
    language: GRAPHQL, /* required */
    text: 'STRING_VALUE' /* required */
  },
  id: 'STRING_VALUE', /* required */
  compatibleNamespaceVersion: 'NUMBER_VALUE'
};
iotthingsgraph.updateFlowTemplate(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: {})
    • id — (String)

      The ID of the workflow to be updated.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME

    • definition — (map)

      The DefinitionDocument that contains the updated workflow definition.

      • languagerequired — (String)

        The language used to define the entity. GRAPHQL is the only valid value.

        Possible values include:
        • "GRAPHQL"
      • textrequired — (String)

        The GraphQL text that defines the entity.

    • compatibleNamespaceVersion — (Integer)

      The version of the user's namespace.

      If no value is specified, the latest version is used by default. Use the GetFlowTemplateRevisions if you want to find earlier revisions of the flow to update.

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:

      • summary — (map)

        An object containing summary information about the updated workflow.

        • id — (String)

          The ID of the workflow.

        • arn — (String)

          The ARN of the workflow.

        • revisionNumber — (Integer)

          The revision number of the workflow.

        • createdAt — (Date)

          The date when the workflow was created.

Returns:

  • (AWS.Request)

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

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

Updates the specified system. You don't need to run this action after updating a workflow. Any deployment that uses the system will see the changes in the system when it is redeployed.

Service Reference:

Examples:

Calling the updateSystemTemplate operation

var params = {
  definition: { /* required */
    language: GRAPHQL, /* required */
    text: 'STRING_VALUE' /* required */
  },
  id: 'STRING_VALUE', /* required */
  compatibleNamespaceVersion: 'NUMBER_VALUE'
};
iotthingsgraph.updateSystemTemplate(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: {})
    • id — (String)

      The ID of the system to be updated.

      The ID should be in the following format.

      urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME

    • definition — (map)

      The DefinitionDocument that contains the updated system definition.

      • languagerequired — (String)

        The language used to define the entity. GRAPHQL is the only valid value.

        Possible values include:
        • "GRAPHQL"
      • textrequired — (String)

        The GraphQL text that defines the entity.

    • compatibleNamespaceVersion — (Integer)

      The version of the user's namespace. Defaults to the latest version of the user's namespace.

      If no value is specified, the latest version is used by default.

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:

      • summary — (map)

        An object containing summary information about the updated system.

        • id — (String)

          The ID of the system.

        • arn — (String)

          The ARN of the system.

        • revisionNumber — (Integer)

          The revision number of the system.

        • createdAt — (Date)

          The date when the system was created.

Returns:

  • (AWS.Request)

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

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

Asynchronously uploads one or more entity definitions to the user's namespace. The document parameter is required if syncWithPublicNamespace and deleteExistingEntites are false. If the syncWithPublicNamespace parameter is set to true, the user's namespace will synchronize with the latest version of the public namespace. If deprecateExistingEntities is set to true, all entities in the latest version will be deleted before the new DefinitionDocument is uploaded.

When a user uploads entity definitions for the first time, the service creates a new namespace for the user. The new namespace tracks the public namespace. Currently users can have only one namespace. The namespace version increments whenever a user uploads entity definitions that are backwards-incompatible and whenever a user sets the syncWithPublicNamespace parameter or the deprecateExistingEntities parameter to true.

The IDs for all of the entities should be in URN format. Each entity must be in the user's namespace. Users can't create entities in the public namespace, but entity definitions can refer to entities in the public namespace.

Valid entities are Device, DeviceModel, Service, Capability, State, Action, Event, Property, Mapping, Enum.

Service Reference:

Examples:

Calling the uploadEntityDefinitions operation

var params = {
  deprecateExistingEntities: true || false,
  document: {
    language: GRAPHQL, /* required */
    text: 'STRING_VALUE' /* required */
  },
  syncWithPublicNamespace: true || false
};
iotthingsgraph.uploadEntityDefinitions(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: {})
    • document — (map)

      The DefinitionDocument that defines the updated entities.

      • languagerequired — (String)

        The language used to define the entity. GRAPHQL is the only valid value.

        Possible values include:
        • "GRAPHQL"
      • textrequired — (String)

        The GraphQL text that defines the entity.

    • syncWithPublicNamespace — (Boolean)

      A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to true, the upload will create a new namespace version.

    • deprecateExistingEntities — (Boolean)

      A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new DefinitionDocument. If set to true, the upload will create a new namespace version.

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:

      • uploadId — (String)

        The ID that specifies the upload action. You can use this to track the status of the upload.

Returns:

  • (AWS.Request)

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