Class: Aws::IoTThingsGraph::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb

Overview

An API client for IoTThingsGraph. To construct a client, you need to configure a :region and :credentials.

client = Aws::IoTThingsGraph::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::SharedCredentials - Used for loading credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



315
316
317
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 315

def initialize(*args)
  super
end

Instance Method Details

#associate_entity_to_thing(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.associate_entity_to_thing({
  thing_name: "ThingName", # required
  entity_id: "Urn", # required
  namespace_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing to which the entity is to be associated.

  • :entity_id (required, 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

  • :namespace_version (Integer)

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

Returns:

  • (Struct)

    Returns an empty response.



354
355
356
357
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 354

def associate_entity_to_thing(params = {}, options = {})
  req = build_request(:associate_entity_to_thing, params)
  req.send_request(options)
end

#create_flow_template(params = {}) ⇒ Types::CreateFlowTemplateResponse

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.

Examples:

Request syntax with placeholder values


resp = client.create_flow_template({
  definition: { # required
    language: "GRAPHQL", # required, accepts GRAPHQL
    text: "DefinitionText", # required
  },
  compatible_namespace_version: 1,
})

Response structure


resp.summary.id #=> String
resp.summary.arn #=> String
resp.summary.revision_number #=> Integer
resp.summary.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :definition (required, Types::DefinitionDocument)

    The workflow DefinitionDocument.

  • :compatible_namespace_version (Integer)

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

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

Returns:



397
398
399
400
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 397

def create_flow_template(params = {}, options = {})
  req = build_request(:create_flow_template, params)
  req.send_request(options)
end

#create_system_instance(params = {}) ⇒ Types::CreateSystemInstanceResponse

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.

Examples:

Request syntax with placeholder values


resp = client.create_system_instance({
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  definition: { # required
    language: "GRAPHQL", # required, accepts GRAPHQL
    text: "DefinitionText", # required
  },
  target: "GREENGRASS", # required, accepts GREENGRASS, CLOUD
  greengrass_group_name: "GroupName",
  s3_bucket_name: "S3BucketName",
  metrics_configuration: {
    cloud_metric_enabled: false,
    metric_rule_role_arn: "RoleArn",
  },
  flow_actions_role_arn: "RoleArn",
})

Response structure


resp.summary.id #=> String
resp.summary.arn #=> String
resp.summary.status #=> String, one of "NOT_DEPLOYED", "BOOTSTRAP", "DEPLOY_IN_PROGRESS", "DEPLOYED_IN_TARGET", "UNDEPLOY_IN_PROGRESS", "FAILED", "PENDING_DELETE", "DELETED_IN_TARGET"
resp.summary.target #=> String, one of "GREENGRASS", "CLOUD"
resp.summary.greengrass_group_name #=> String
resp.summary.created_at #=> Time
resp.summary.updated_at #=> Time
resp.summary.greengrass_group_id #=> String
resp.summary.greengrass_group_version_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tags (Array<Types::Tag>)

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

  • :definition (required, Types::DefinitionDocument)

    A document that defines an entity.

  • :target (required, String)

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

  • :greengrass_group_name (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.

  • :s3_bucket_name (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.

  • :metrics_configuration (Types::MetricsConfiguration)

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

  • :flow_actions_role_arn (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.

Returns:



498
499
500
501
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 498

def create_system_instance(params = {}, options = {})
  req = build_request(:create_system_instance, params)
  req.send_request(options)
end

#create_system_template(params = {}) ⇒ Types::CreateSystemTemplateResponse

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.

Examples:

Request syntax with placeholder values


resp = client.create_system_template({
  definition: { # required
    language: "GRAPHQL", # required, accepts GRAPHQL
    text: "DefinitionText", # required
  },
  compatible_namespace_version: 1,
})

Response structure


resp.summary.id #=> String
resp.summary.arn #=> String
resp.summary.revision_number #=> Integer
resp.summary.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :definition (required, Types::DefinitionDocument)

    The DefinitionDocument used to create the system.

  • :compatible_namespace_version (Integer)

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

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

Returns:



538
539
540
541
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 538

def create_system_template(params = {}, options = {})
  req = build_request(:create_system_template, params)
  req.send_request(options)
end

#delete_flow_template(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.delete_flow_template({
  id: "Urn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, 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

Returns:

  • (Struct)

    Returns an empty response.



565
566
567
568
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 565

def delete_flow_template(params = {}, options = {})
  req = build_request(:delete_flow_template, params)
  req.send_request(options)
end

#delete_namespace(params = {}) ⇒ Types::DeleteNamespaceResponse

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.

Examples:

Response structure


resp.namespace_arn #=> String
resp.namespace_name #=> String

Parameters:

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

    ({})

Returns:



586
587
588
589
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 586

def delete_namespace(params = {}, options = {})
  req = build_request(:delete_namespace, params)
  req.send_request(options)
end

#delete_system_instance(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.delete_system_instance({
  id: "Urn",
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (String)

    The ID of the system instance to be deleted.

Returns:

  • (Struct)

    Returns an empty response.



610
611
612
613
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 610

def delete_system_instance(params = {}, options = {})
  req = build_request(:delete_system_instance, params)
  req.send_request(options)
end

#delete_system_template(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.delete_system_template({
  id: "Urn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, 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

Returns:

  • (Struct)

    Returns an empty response.



637
638
639
640
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 637

def delete_system_template(params = {}, options = {})
  req = build_request(:delete_system_template, params)
  req.send_request(options)
end

#deploy_system_instance(params = {}) ⇒ Types::DeploySystemInstanceResponse

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.

Examples:

Request syntax with placeholder values


resp = client.deploy_system_instance({
  id: "Urn",
})

Response structure


resp.summary.id #=> String
resp.summary.arn #=> String
resp.summary.status #=> String, one of "NOT_DEPLOYED", "BOOTSTRAP", "DEPLOY_IN_PROGRESS", "DEPLOYED_IN_TARGET", "UNDEPLOY_IN_PROGRESS", "FAILED", "PENDING_DELETE", "DELETED_IN_TARGET"
resp.summary.target #=> String, one of "GREENGRASS", "CLOUD"
resp.summary.greengrass_group_name #=> String
resp.summary.created_at #=> Time
resp.summary.updated_at #=> Time
resp.summary.greengrass_group_id #=> String
resp.summary.greengrass_group_version_id #=> String
resp.greengrass_deployment_id #=> String

Parameters:

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

    ({})

Options Hash (params):

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

Returns:



700
701
702
703
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 700

def deploy_system_instance(params = {}, options = {})
  req = build_request(:deploy_system_instance, params)
  req.send_request(options)
end

#deprecate_flow_template(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.deprecate_flow_template({
  id: "Urn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, 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

Returns:

  • (Struct)

    Returns an empty response.



726
727
728
729
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 726

def deprecate_flow_template(params = {}, options = {})
  req = build_request(:deprecate_flow_template, params)
  req.send_request(options)
end

#deprecate_system_template(params = {}) ⇒ Struct

Deprecates the specified system.

Examples:

Request syntax with placeholder values


resp = client.deprecate_system_template({
  id: "Urn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the system to delete.

    The ID should be in the following format.

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

Returns:

  • (Struct)

    Returns an empty response.



750
751
752
753
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 750

def deprecate_system_template(params = {}, options = {})
  req = build_request(:deprecate_system_template, params)
  req.send_request(options)
end

#describe_namespace(params = {}) ⇒ Types::DescribeNamespaceResponse

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

Examples:

Request syntax with placeholder values


resp = client.describe_namespace({
  namespace_name: "NamespaceName",
})

Response structure


resp.namespace_arn #=> String
resp.namespace_name #=> String
resp.tracking_namespace_name #=> String
resp.tracking_namespace_version #=> Integer
resp.namespace_version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :namespace_name (String)

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

Returns:



786
787
788
789
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 786

def describe_namespace(params = {}, options = {})
  req = build_request(:describe_namespace, params)
  req.send_request(options)
end

#dissociate_entity_from_thing(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.dissociate_entity_from_thing({
  thing_name: "ThingName", # required
  entity_type: "DEVICE", # required, accepts DEVICE, SERVICE, DEVICE_MODEL, CAPABILITY, STATE, ACTION, EVENT, PROPERTY, MAPPING, ENUM
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing to disassociate.

  • :entity_type (required, String)

    The entity type from which to disassociate the thing.

Returns:

  • (Struct)

    Returns an empty response.



812
813
814
815
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 812

def dissociate_entity_from_thing(params = {}, options = {})
  req = build_request(:dissociate_entity_from_thing, params)
  req.send_request(options)
end

#get_entities(params = {}) ⇒ Types::GetEntitiesResponse

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.

Examples:

Request syntax with placeholder values


resp = client.get_entities({
  ids: ["Urn"], # required
  namespace_version: 1,
})

Response structure


resp.descriptions #=> Array
resp.descriptions[0].id #=> String
resp.descriptions[0].arn #=> String
resp.descriptions[0].type #=> String, one of "DEVICE", "SERVICE", "DEVICE_MODEL", "CAPABILITY", "STATE", "ACTION", "EVENT", "PROPERTY", "MAPPING", "ENUM"
resp.descriptions[0].created_at #=> Time
resp.descriptions[0].definition.language #=> String, one of "GRAPHQL"
resp.descriptions[0].definition.text #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :ids (required, Array<String>)

    An array of entity IDs.

    The IDs should be in the following format.

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

  • :namespace_version (Integer)

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

Returns:



876
877
878
879
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 876

def get_entities(params = {}, options = {})
  req = build_request(:get_entities, params)
  req.send_request(options)
end

#get_flow_template(params = {}) ⇒ Types::GetFlowTemplateResponse

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

Examples:

Request syntax with placeholder values


resp = client.get_flow_template({
  id: "Urn", # required
  revision_number: 1,
})

Response structure


resp.description.summary.id #=> String
resp.description.summary.arn #=> String
resp.description.summary.revision_number #=> Integer
resp.description.summary.created_at #=> Time
resp.description.definition.language #=> String, one of "GRAPHQL"
resp.description.definition.text #=> String
resp.description.validated_namespace_version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the workflow.

    The ID should be in the following format.

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

  • :revision_number (Integer)

    The number of the workflow revision to retrieve.

Returns:



917
918
919
920
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 917

def get_flow_template(params = {}, options = {})
  req = build_request(:get_flow_template, params)
  req.send_request(options)
end

#get_flow_template_revisions(params = {}) ⇒ Types::GetFlowTemplateRevisionsResponse

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_flow_template_revisions({
  id: "Urn", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.summaries #=> Array
resp.summaries[0].id #=> String
resp.summaries[0].arn #=> String
resp.summaries[0].revision_number #=> Integer
resp.summaries[0].created_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the workflow.

    The ID should be in the following format.

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

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

Returns:



967
968
969
970
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 967

def get_flow_template_revisions(params = {}, options = {})
  req = build_request(:get_flow_template_revisions, params)
  req.send_request(options)
end

#get_namespace_deletion_status(params = {}) ⇒ Types::GetNamespaceDeletionStatusResponse

Gets the status of a namespace deletion task.

Examples:

Response structure


resp.namespace_arn #=> String
resp.namespace_name #=> String
resp.status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED"
resp.error_code #=> String, one of "VALIDATION_FAILED"
resp.error_message #=> String

Parameters:

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

    ({})

Returns:



992
993
994
995
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 992

def get_namespace_deletion_status(params = {}, options = {})
  req = build_request(:get_namespace_deletion_status, params)
  req.send_request(options)
end

#get_system_instance(params = {}) ⇒ Types::GetSystemInstanceResponse

Gets a system instance.

Examples:

Request syntax with placeholder values


resp = client.get_system_instance({
  id: "Urn", # required
})

Response structure


resp.description.summary.id #=> String
resp.description.summary.arn #=> String
resp.description.summary.status #=> String, one of "NOT_DEPLOYED", "BOOTSTRAP", "DEPLOY_IN_PROGRESS", "DEPLOYED_IN_TARGET", "UNDEPLOY_IN_PROGRESS", "FAILED", "PENDING_DELETE", "DELETED_IN_TARGET"
resp.description.summary.target #=> String, one of "GREENGRASS", "CLOUD"
resp.description.summary.greengrass_group_name #=> String
resp.description.summary.created_at #=> Time
resp.description.summary.updated_at #=> Time
resp.description.summary.greengrass_group_id #=> String
resp.description.summary.greengrass_group_version_id #=> String
resp.description.definition.language #=> String, one of "GRAPHQL"
resp.description.definition.text #=> String
resp.description.s3_bucket_name #=> String
resp.description.metrics_configuration.cloud_metric_enabled #=> Boolean
resp.description.metrics_configuration.metric_rule_role_arn #=> String
resp.description.validated_namespace_version #=> Integer
resp.description.validated_dependency_revisions #=> Array
resp.description.validated_dependency_revisions[0].id #=> String
resp.description.validated_dependency_revisions[0].revision_number #=> Integer
resp.description.flow_actions_role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, 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

Returns:



1041
1042
1043
1044
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1041

def get_system_instance(params = {}, options = {})
  req = build_request(:get_system_instance, params)
  req.send_request(options)
end

#get_system_template(params = {}) ⇒ Types::GetSystemTemplateResponse

Gets a system.

Examples:

Request syntax with placeholder values


resp = client.get_system_template({
  id: "Urn", # required
  revision_number: 1,
})

Response structure


resp.description.summary.id #=> String
resp.description.summary.arn #=> String
resp.description.summary.revision_number #=> Integer
resp.description.summary.created_at #=> Time
resp.description.definition.language #=> String, one of "GRAPHQL"
resp.description.definition.text #=> String
resp.description.validated_namespace_version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, 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

  • :revision_number (Integer)

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

Returns:



1081
1082
1083
1084
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1081

def get_system_template(params = {}, options = {})
  req = build_request(:get_system_template, params)
  req.send_request(options)
end

#get_system_template_revisions(params = {}) ⇒ Types::GetSystemTemplateRevisionsResponse

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_system_template_revisions({
  id: "Urn", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.summaries #=> Array
resp.summaries[0].id #=> String
resp.summaries[0].arn #=> String
resp.summaries[0].revision_number #=> Integer
resp.summaries[0].created_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the system template.

    The ID should be in the following format.

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

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

Returns:



1132
1133
1134
1135
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1132

def get_system_template_revisions(params = {}, options = {})
  req = build_request(:get_system_template_revisions, params)
  req.send_request(options)
end

#get_upload_status(params = {}) ⇒ Types::GetUploadStatusResponse

Gets the status of the specified upload.

Examples:

Request syntax with placeholder values


resp = client.get_upload_status({
  upload_id: "UploadId", # required
})

Response structure


resp.upload_id #=> String
resp.upload_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED"
resp.namespace_arn #=> String
resp.namespace_name #=> String
resp.namespace_version #=> Integer
resp.failure_reason #=> Array
resp.failure_reason[0] #=> String
resp.created_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :upload_id (required, String)

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

Returns:



1172
1173
1174
1175
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1172

def get_upload_status(params = {}, options = {})
  req = build_request(:get_upload_status, params)
  req.send_request(options)
end

#list_flow_execution_messages(params = {}) ⇒ Types::ListFlowExecutionMessagesResponse

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_flow_execution_messages({
  flow_execution_id: "FlowExecutionId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.messages #=> Array
resp.messages[0].message_id #=> String
resp.messages[0].event_type #=> String, one of "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"
resp.messages[0].timestamp #=> Time
resp.messages[0].payload #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :flow_execution_id (required, String)

    The ID of the flow execution.

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

Returns:



1216
1217
1218
1219
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1216

def list_flow_execution_messages(params = {}, options = {})
  req = build_request(:list_flow_execution_messages, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists all tags on an AWS IoT Things Graph resource.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  max_results: 1,
  resource_arn: "ResourceArn", # required
  next_token: "NextToken",
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of tags to return.

  • :resource_arn (required, String)

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

  • :next_token (String)

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

Returns:



1257
1258
1259
1260
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1257

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#search_entities(params = {}) ⇒ Types::SearchEntitiesResponse

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_entities({
  entity_types: ["DEVICE"], # required, accepts DEVICE, SERVICE, DEVICE_MODEL, CAPABILITY, STATE, ACTION, EVENT, PROPERTY, MAPPING, ENUM
  filters: [
    {
      name: "NAME", # accepts NAME, NAMESPACE, SEMANTIC_TYPE_PATH, REFERENCED_ENTITY_ID
      value: ["EntityFilterValue"],
    },
  ],
  next_token: "NextToken",
  max_results: 1,
  namespace_version: 1,
})

Response structure


resp.descriptions #=> Array
resp.descriptions[0].id #=> String
resp.descriptions[0].arn #=> String
resp.descriptions[0].type #=> String, one of "DEVICE", "SERVICE", "DEVICE_MODEL", "CAPABILITY", "STATE", "ACTION", "EVENT", "PROPERTY", "MAPPING", "ENUM"
resp.descriptions[0].created_at #=> Time
resp.descriptions[0].definition.language #=> String, one of "GRAPHQL"
resp.descriptions[0].definition.text #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :entity_types (required, Array<String>)

    The entity types for which to search.

  • :filters (Array<Types::EntityFilter>)

    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.

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :namespace_version (Integer)

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

Returns:



1325
1326
1327
1328
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1325

def search_entities(params = {}, options = {})
  req = build_request(:search_entities, params)
  req.send_request(options)
end

#search_flow_executions(params = {}) ⇒ Types::SearchFlowExecutionsResponse

Searches for AWS IoT Things Graph workflow execution instances.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_flow_executions({
  system_instance_id: "Urn", # required
  flow_execution_id: "FlowExecutionId",
  start_time: Time.now,
  end_time: Time.now,
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.summaries #=> Array
resp.summaries[0].flow_execution_id #=> String
resp.summaries[0].status #=> String, one of "RUNNING", "ABORTED", "SUCCEEDED", "FAILED"
resp.summaries[0].system_instance_id #=> String
resp.summaries[0].flow_template_id #=> String
resp.summaries[0].created_at #=> Time
resp.summaries[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :system_instance_id (required, String)

    The ID of the system instance that contains the flow.

  • :flow_execution_id (String)

    The ID of a flow execution.

  • :start_time (Time, DateTime, Date, Integer, String)

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

  • :end_time (Time, DateTime, Date, Integer, String)

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

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

Returns:



1382
1383
1384
1385
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1382

def search_flow_executions(params = {}, options = {})
  req = build_request(:search_flow_executions, params)
  req.send_request(options)
end

#search_flow_templates(params = {}) ⇒ Types::SearchFlowTemplatesResponse

Searches for summary information about workflows.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_flow_templates({
  filters: [
    {
      name: "DEVICE_MODEL_ID", # required, accepts DEVICE_MODEL_ID
      value: ["FlowTemplateFilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.summaries #=> Array
resp.summaries[0].id #=> String
resp.summaries[0].arn #=> String
resp.summaries[0].revision_number #=> Integer
resp.summaries[0].created_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filters (Array<Types::FlowTemplateFilter>)

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

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

Returns:



1431
1432
1433
1434
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1431

def search_flow_templates(params = {}, options = {})
  req = build_request(:search_flow_templates, params)
  req.send_request(options)
end

#search_system_instances(params = {}) ⇒ Types::SearchSystemInstancesResponse

Searches for system instances in the user's account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_system_instances({
  filters: [
    {
      name: "SYSTEM_TEMPLATE_ID", # accepts SYSTEM_TEMPLATE_ID, STATUS, GREENGRASS_GROUP_NAME
      value: ["SystemInstanceFilterValue"],
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.summaries #=> Array
resp.summaries[0].id #=> String
resp.summaries[0].arn #=> String
resp.summaries[0].status #=> String, one of "NOT_DEPLOYED", "BOOTSTRAP", "DEPLOY_IN_PROGRESS", "DEPLOYED_IN_TARGET", "UNDEPLOY_IN_PROGRESS", "FAILED", "PENDING_DELETE", "DELETED_IN_TARGET"
resp.summaries[0].target #=> String, one of "GREENGRASS", "CLOUD"
resp.summaries[0].greengrass_group_name #=> String
resp.summaries[0].created_at #=> Time
resp.summaries[0].updated_at #=> Time
resp.summaries[0].greengrass_group_id #=> String
resp.summaries[0].greengrass_group_version_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filters (Array<Types::SystemInstanceFilter>)

    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.

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

Returns:



1488
1489
1490
1491
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1488

def search_system_instances(params = {}, options = {})
  req = build_request(:search_system_instances, params)
  req.send_request(options)
end

#search_system_templates(params = {}) ⇒ Types::SearchSystemTemplatesResponse

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_system_templates({
  filters: [
    {
      name: "FLOW_TEMPLATE_ID", # required, accepts FLOW_TEMPLATE_ID
      value: ["SystemTemplateFilterValue"], # required
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.summaries #=> Array
resp.summaries[0].id #=> String
resp.summaries[0].arn #=> String
resp.summaries[0].revision_number #=> Integer
resp.summaries[0].created_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filters (Array<Types::SystemTemplateFilter>)

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

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

Returns:



1539
1540
1541
1542
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1539

def search_system_templates(params = {}, options = {})
  req = build_request(:search_system_templates, params)
  req.send_request(options)
end

#search_things(params = {}) ⇒ Types::SearchThingsResponse

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_things({
  entity_id: "Urn", # required
  next_token: "NextToken",
  max_results: 1,
  namespace_version: 1,
})

Response structure


resp.things #=> Array
resp.things[0].thing_arn #=> String
resp.things[0].thing_name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :entity_id (required, 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

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :namespace_version (Integer)

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

Returns:



1598
1599
1600
1601
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1598

def search_things(params = {}, options = {})
  req = build_request(:search_things, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Creates a tag for the specified resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :tags (required, Array<Types::Tag>)

    A list of tags to add to the resource.>

Returns:

  • (Struct)

    Returns an empty response.



1628
1629
1630
1631
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1628

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#undeploy_system_instance(params = {}) ⇒ Types::UndeploySystemInstanceResponse

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

Examples:

Request syntax with placeholder values


resp = client.undeploy_system_instance({
  id: "Urn",
})

Response structure


resp.summary.id #=> String
resp.summary.arn #=> String
resp.summary.status #=> String, one of "NOT_DEPLOYED", "BOOTSTRAP", "DEPLOY_IN_PROGRESS", "DEPLOYED_IN_TARGET", "UNDEPLOY_IN_PROGRESS", "FAILED", "PENDING_DELETE", "DELETED_IN_TARGET"
resp.summary.target #=> String, one of "GREENGRASS", "CLOUD"
resp.summary.greengrass_group_name #=> String
resp.summary.created_at #=> Time
resp.summary.updated_at #=> Time
resp.summary.greengrass_group_id #=> String
resp.summary.greengrass_group_version_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (String)

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

Returns:



1662
1663
1664
1665
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1662

def undeploy_system_instance(params = {}, options = {})
  req = build_request(:undeploy_system_instance, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes a tag from the specified resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :tag_keys (required, 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.

Returns:

  • (Struct)

    Returns an empty response.



1697
1698
1699
1700
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1697

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_flow_template(params = {}) ⇒ Types::UpdateFlowTemplateResponse

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.

Examples:

Request syntax with placeholder values


resp = client.update_flow_template({
  id: "Urn", # required
  definition: { # required
    language: "GRAPHQL", # required, accepts GRAPHQL
    text: "DefinitionText", # required
  },
  compatible_namespace_version: 1,
})

Response structure


resp.summary.id #=> String
resp.summary.arn #=> String
resp.summary.revision_number #=> Integer
resp.summary.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, 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 (required, Types::DefinitionDocument)

    The DefinitionDocument that contains the updated workflow definition.

  • :compatible_namespace_version (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.

Returns:



1750
1751
1752
1753
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1750

def update_flow_template(params = {}, options = {})
  req = build_request(:update_flow_template, params)
  req.send_request(options)
end

#update_system_template(params = {}) ⇒ Types::UpdateSystemTemplateResponse

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.

Examples:

Request syntax with placeholder values


resp = client.update_system_template({
  id: "Urn", # required
  definition: { # required
    language: "GRAPHQL", # required, accepts GRAPHQL
    text: "DefinitionText", # required
  },
  compatible_namespace_version: 1,
})

Response structure


resp.summary.id #=> String
resp.summary.arn #=> String
resp.summary.revision_number #=> Integer
resp.summary.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, 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 (required, Types::DefinitionDocument)

    The DefinitionDocument that contains the updated system definition.

  • :compatible_namespace_version (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.

Returns:



1799
1800
1801
1802
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1799

def update_system_template(params = {}, options = {})
  req = build_request(:update_system_template, params)
  req.send_request(options)
end

#upload_entity_definitions(params = {}) ⇒ Types::UploadEntityDefinitionsResponse

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.

Examples:

Request syntax with placeholder values


resp = client.upload_entity_definitions({
  document: {
    language: "GRAPHQL", # required, accepts GRAPHQL
    text: "DefinitionText", # required
  },
  sync_with_public_namespace: false,
  deprecate_existing_entities: false,
})

Response structure


resp.upload_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :document (Types::DefinitionDocument)

    The DefinitionDocument that defines the updated entities.

  • :sync_with_public_namespace (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.

  • :deprecate_existing_entities (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.

Returns:



1863
1864
1865
1866
# File 'gems/aws-sdk-iotthingsgraph/lib/aws-sdk-iotthingsgraph/client.rb', line 1863

def upload_entity_definitions(params = {}, options = {})
  req = build_request(:upload_entity_definitions, params)
  req.send_request(options)
end