Class: Aws::IoTThingsGraph::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
ClientStubs
Defined in:
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](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :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::SharedCredentials` - Used for loading static credentials from a shared file, such as `~/.aws/config`.

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

    • ‘Aws::AssumeRoleWebIdentityCredentials` - Used when you need to assume a role after providing credentials via the web.

    • ‘Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an access token generated from `aws login`.

    • ‘Aws::ProcessCredentials` - Used for loading credentials from a process that outputs to stdout.

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

    • ‘Aws::ECSCredentials` - Used for loading credentials from instances running in ECS.

    • ‘Aws::CognitoIdentityCredentials` - Used for loading credentials from the Cognito Identity service.

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

    • Aws.config`

    • The ‘:access_key_id`, `:secret_access_key`, `:session_token`, and `:account_id` options.

    • ENV, ENV, ENV, and ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of ‘Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV to true.

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

  • :access_key_id (String)
  • :account_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.

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

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

    When set to ‘true’ the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the ‘:endpoint` option directly. This is normally constructed from the `:region` option. Configuring `:endpoint` is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :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.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

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

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default ‘:sigv4a_signing_region_set` is searched for in the following locations:

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.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.

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

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses ‘NoOpTelemetryProvider` which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the

    ‘opentelemetry-sdk` gem and then, pass in an instance of a `Aws::Telemetry::OTelProvider` for telemetry provider.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • ‘Aws::StaticTokenProvider` - Used for configuring static, non-refreshing tokens.

    • ‘Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an access token generated from `aws login`.

    When ‘:token_provider` is not configured directly, the `Aws::TokenProviderChain` will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to ‘true`, dualstack enabled endpoints (with `.aws` TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to ‘true`, fips compatible endpoints will be used if available. When a `fips` region is used, the region is normalized and this config is set to `true`.

  • :validate_params (Boolean) — default: true

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

  • :endpoint_provider (Aws::IoTThingsGraph::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to ‘#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::IoTThingsGraph::EndpointParameters`.

  • :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_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_open_timeout (Float) — default: 15

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

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like ‘proxy.com:123’.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. 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`.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a ‘content-length`).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

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

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

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



451
452
453
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 451

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



2036
2037
2038
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2036

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



2039
2040
2041
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2039

def errors_module
  Errors
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.



490
491
492
493
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 490

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

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

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


2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2009

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::IoTThingsGraph')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-iotthingsgraph'
  context[:gem_version] = '1.49.0'
  Seahorse::Client::Request.new(handlers, context)
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:



533
534
535
536
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 533

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:



634
635
636
637
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 634

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:



674
675
676
677
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 674

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.



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

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. This action takes no request parameters.

Examples:

Response structure


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

Parameters:

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

    ({})

Returns:



723
724
725
726
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 723

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.



747
748
749
750
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 747

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.



774
775
776
777
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 774

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

[1]: docs.aws.amazon.com/thingsgraph/latest/ug/iot-tg-greengrass.html

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:



837
838
839
840
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 837

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.



863
864
865
866
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 863

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.



887
888
889
890
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 887

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:



923
924
925
926
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 923

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.



949
950
951
952
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 949

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:



1013
1014
1015
1016
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1013

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:



1054
1055
1056
1057
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1054

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:



1104
1105
1106
1107
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1104

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:



1129
1130
1131
1132
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1129

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:



1178
1179
1180
1181
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1178

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:



1218
1219
1220
1221
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1218

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:



1269
1270
1271
1272
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1269

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:



1309
1310
1311
1312
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1309

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:



1353
1354
1355
1356
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1353

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:



1394
1395
1396
1397
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1394

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:



1462
1463
1464
1465
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1462

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:



1519
1520
1521
1522
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1519

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:



1568
1569
1570
1571
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1568

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:



1625
1626
1627
1628
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1625

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:



1676
1677
1678
1679
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1676

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:



1735
1736
1737
1738
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1735

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.&gt;

Returns:

  • (Struct)

    Returns an empty response.



1765
1766
1767
1768
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1765

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:



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

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

    [1]: docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html#cli-using-param-json

Returns:

  • (Struct)

    Returns an empty response.



1834
1835
1836
1837
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1834

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:



1887
1888
1889
1890
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1887

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:



1936
1937
1938
1939
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 1936

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:



2000
2001
2002
2003
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2000

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

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


2029
2030
2031
# File 'lib/aws-sdk-iotthingsgraph/client.rb', line 2029

def waiter_names
  []
end