Class: Aws::IoTSiteWise::Client

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

Overview

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

client = Aws::IoTSiteWise::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::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[: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/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] 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:

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

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

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom 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)
  • :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.

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

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

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

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



344
345
346
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 344

def initialize(*args)
  super
end

Instance Method Details

#associate_assets(params = {}) ⇒ Struct

Associates a child asset with the given parent asset through a hierarchy defined in the parent asset's model. For more information, see Associating assets in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.associate_assets({
  asset_id: "ID", # required
  hierarchy_id: "ID", # required
  child_asset_id: "ID", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the parent asset.

  • :hierarchy_id (required, String)

    The ID of a hierarchy in the parent asset's model. Hierarchies allow different groupings of assets to be formed that all come from the same asset model. For more information, see Asset hierarchies in the IoT SiteWise User Guide.

  • :child_asset_id (required, String)

    The ID of the child asset to be associated.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



395
396
397
398
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 395

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

#associate_time_series_to_asset_property(params = {}) ⇒ Struct

Associates a time series (data stream) with an asset property.

Examples:

Request syntax with placeholder values


resp = client.associate_time_series_to_asset_property({
  alias: "PropertyAlias", # required
  asset_id: "ID", # required
  property_id: "ID", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :alias (required, String)

    The alias that identifies the time series.

  • :asset_id (required, String)

    The ID of the asset in which the asset property was created.

  • :property_id (required, String)

    The ID of the asset property.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



432
433
434
435
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 432

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

#batch_associate_project_assets(params = {}) ⇒ Types::BatchAssociateProjectAssetsResponse

Associates a group (batch) of assets with an IoT SiteWise Monitor project.

Examples:

Request syntax with placeholder values


resp = client.batch_associate_project_assets({
  project_id: "ID", # required
  asset_ids: ["ID"], # required
  client_token: "ClientToken",
})

Response structure


resp.errors #=> Array
resp.errors[0].asset_id #=> String
resp.errors[0].code #=> String, one of "INTERNAL_FAILURE"
resp.errors[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project to which to associate the assets.

  • :asset_ids (required, Array<String>)

    The IDs of the assets to be associated to the project.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:



475
476
477
478
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 475

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

#batch_disassociate_project_assets(params = {}) ⇒ Types::BatchDisassociateProjectAssetsResponse

Disassociates a group (batch) of assets from an IoT SiteWise Monitor project.

Examples:

Request syntax with placeholder values


resp = client.batch_disassociate_project_assets({
  project_id: "ID", # required
  asset_ids: ["ID"], # required
  client_token: "ClientToken",
})

Response structure


resp.errors #=> Array
resp.errors[0].asset_id #=> String
resp.errors[0].code #=> String, one of "INTERNAL_FAILURE"
resp.errors[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project from which to disassociate the assets.

  • :asset_ids (required, Array<String>)

    The IDs of the assets to be disassociated from the project.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:



518
519
520
521
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 518

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

#batch_put_asset_property_value(params = {}) ⇒ Types::BatchPutAssetPropertyValueResponse

Sends a list of asset property values to IoT SiteWise. Each value is a timestamp-quality-value (TQV) data point. For more information, see Ingesting data using the API in the IoT SiteWise User Guide.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

With respect to Unix epoch time, IoT SiteWise accepts only TQVs that have a timestamp of no more than 7 days in the past and no more than 10 minutes in the future. IoT SiteWise rejects timestamps outside of the inclusive range of [-7 days, +10 minutes] and returns a TimestampOutOfRangeException error.

For each asset property, IoT SiteWise overwrites TQVs with duplicate timestamps unless the newer TQV has a different quality. For example, if you store a TQV \{T1, GOOD, V1\}, then storing \{T1, GOOD, V2\} replaces the existing TQV.

IoT SiteWise authorizes access to each BatchPutAssetPropertyValue entry individually. For more information, see BatchPutAssetPropertyValue authorization in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.batch_put_asset_property_value({
  entries: [ # required
    {
      entry_id: "EntryId", # required
      asset_id: "ID",
      property_id: "ID",
      property_alias: "AssetPropertyAlias",
      property_values: [ # required
        {
          value: { # required
            string_value: "PropertyValueStringValue",
            integer_value: 1,
            double_value: 1.0,
            boolean_value: false,
          },
          timestamp: { # required
            time_in_seconds: 1, # required
            offset_in_nanos: 1,
          },
          quality: "GOOD", # accepts GOOD, BAD, UNCERTAIN
        },
      ],
    },
  ],
})

Response structure


resp.error_entries #=> Array
resp.error_entries[0].entry_id #=> String
resp.error_entries[0].errors #=> Array
resp.error_entries[0].errors[0].error_code #=> String, one of "ResourceNotFoundException", "InvalidRequestException", "InternalFailureException", "ServiceUnavailableException", "ThrottlingException", "LimitExceededException", "ConflictingOperationException", "TimestampOutOfRangeException", "AccessDeniedException"
resp.error_entries[0].errors[0].error_message #=> String
resp.error_entries[0].errors[0].timestamps #=> Array
resp.error_entries[0].errors[0].timestamps[0].time_in_seconds #=> Integer
resp.error_entries[0].errors[0].timestamps[0].offset_in_nanos #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :entries (required, Array<Types::PutAssetPropertyValueEntry>)

    The list of asset property value entries for the batch put request. You can specify up to 10 entries per request.

Returns:



606
607
608
609
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 606

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

#create_access_policy(params = {}) ⇒ Types::CreateAccessPolicyResponse

Creates an access policy that grants the specified identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user) access to the specified IoT SiteWise Monitor portal or project resource.

Examples:

Request syntax with placeholder values


resp = client.create_access_policy({
  access_policy_identity: { # required
    user: {
      id: "IdentityId", # required
    },
    group: {
      id: "IdentityId", # required
    },
    iam_user: {
      arn: "ARN", # required
    },
    iam_role: {
      arn: "ARN", # required
    },
  },
  access_policy_resource: { # required
    portal: {
      id: "ID", # required
    },
    project: {
      id: "ID", # required
    },
  },
  access_policy_permission: "ADMINISTRATOR", # required, accepts ADMINISTRATOR, VIEWER
  client_token: "ClientToken",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.access_policy_id #=> String
resp.access_policy_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :access_policy_identity (required, Types::Identity)

    The identity for this access policy. Choose an Amazon Web Services SSO user, an Amazon Web Services SSO group, or an IAM user.

  • :access_policy_resource (required, Types::Resource)

    The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project.

  • :access_policy_permission (required, String)

    The permission level for this access policy. Note that a project ADMINISTRATOR is also known as a project owner.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :tags (Hash<String,String>)

    A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Returns:



689
690
691
692
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 689

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

#create_asset(params = {}) ⇒ Types::CreateAssetResponse

Creates an asset from an existing asset model. For more information, see Creating assets in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_asset({
  asset_name: "Name", # required
  asset_model_id: "ID", # required
  client_token: "ClientToken",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.asset_id #=> String
resp.asset_arn #=> String
resp.asset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.asset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_status.error.message #=> String
resp.asset_status.error.details #=> Array
resp.asset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_name (required, String)

    A unique, friendly name for the asset.

  • :asset_model_id (required, String)

    The ID of the asset model from which to create the asset.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :tags (Hash<String,String>)

    A list of key-value pairs that contain metadata for the asset. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Returns:



754
755
756
757
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 754

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

#create_asset_model(params = {}) ⇒ Types::CreateAssetModelResponse

Creates an asset model from specified property and hierarchy definitions. You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see Defining asset models in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_asset_model({
  asset_model_name: "Name", # required
  asset_model_description: "Description",
  asset_model_properties: [
    {
      name: "Name", # required
      data_type: "STRING", # required, accepts STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT
      data_type_spec: "Name",
      unit: "PropertyUnit",
      type: { # required
        attribute: {
          default_value: "DefaultValue",
        },
        measurement: {
          processing_config: {
            forwarding_config: { # required
              state: "DISABLED", # required, accepts DISABLED, ENABLED
            },
          },
        },
        transform: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
          processing_config: {
            compute_location: "EDGE", # required, accepts EDGE, CLOUD
            forwarding_config: {
              state: "DISABLED", # required, accepts DISABLED, ENABLED
            },
          },
        },
        metric: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
          window: { # required
            tumbling: {
              interval: "Interval", # required
              offset: "Offset",
            },
          },
          processing_config: {
            compute_location: "EDGE", # required, accepts EDGE, CLOUD
          },
        },
      },
    },
  ],
  asset_model_hierarchies: [
    {
      name: "Name", # required
      child_asset_model_id: "ID", # required
    },
  ],
  asset_model_composite_models: [
    {
      name: "Name", # required
      description: "Description",
      type: "Name", # required
      properties: [
        {
          name: "Name", # required
          data_type: "STRING", # required, accepts STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT
          data_type_spec: "Name",
          unit: "PropertyUnit",
          type: { # required
            attribute: {
              default_value: "DefaultValue",
            },
            measurement: {
              processing_config: {
                forwarding_config: { # required
                  state: "DISABLED", # required, accepts DISABLED, ENABLED
                },
              },
            },
            transform: {
              expression: "Expression", # required
              variables: [ # required
                {
                  name: "VariableName", # required
                  value: { # required
                    property_id: "Macro", # required
                    hierarchy_id: "Macro",
                  },
                },
              ],
              processing_config: {
                compute_location: "EDGE", # required, accepts EDGE, CLOUD
                forwarding_config: {
                  state: "DISABLED", # required, accepts DISABLED, ENABLED
                },
              },
            },
            metric: {
              expression: "Expression", # required
              variables: [ # required
                {
                  name: "VariableName", # required
                  value: { # required
                    property_id: "Macro", # required
                    hierarchy_id: "Macro",
                  },
                },
              ],
              window: { # required
                tumbling: {
                  interval: "Interval", # required
                  offset: "Offset",
                },
              },
              processing_config: {
                compute_location: "EDGE", # required, accepts EDGE, CLOUD
              },
            },
          },
        },
      ],
    },
  ],
  client_token: "ClientToken",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.asset_model_id #=> String
resp.asset_model_arn #=> String
resp.asset_model_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "PROPAGATING", "DELETING", "FAILED"
resp.asset_model_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_model_status.error.message #=> String
resp.asset_model_status.error.details #=> Array
resp.asset_model_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_model_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_model_name (required, String)

    A unique, friendly name for the asset model.

  • :asset_model_description (String)

    A description for the asset model.

  • :asset_model_properties (Array<Types::AssetModelPropertyDefinition>)

    The property definitions of the asset model. For more information, see Asset properties in the IoT SiteWise User Guide.

    You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide.

  • :asset_model_hierarchies (Array<Types::AssetModelHierarchyDefinition>)

    The hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Asset hierarchies in the IoT SiteWise User Guide.

    You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise User Guide.

  • :asset_model_composite_models (Array<Types::AssetModelCompositeModelDefinition>)

    The composite asset models that are part of this asset model. Composite asset models are asset models that contain specific properties. Each composite model has a type that defines the properties that the composite model supports. Use composite asset models to define alarms on this asset model.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :tags (Hash<String,String>)

    A list of key-value pairs that contain metadata for the asset model. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Returns:



987
988
989
990
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 987

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

#create_dashboard(params = {}) ⇒ Types::CreateDashboardResponse

Creates a dashboard in an IoT SiteWise Monitor project.

Examples:

Request syntax with placeholder values


resp = client.create_dashboard({
  project_id: "ID", # required
  dashboard_name: "Name", # required
  dashboard_description: "Description",
  dashboard_definition: "DashboardDefinition", # required
  client_token: "ClientToken",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.dashboard_id #=> String
resp.dashboard_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project in which to create the dashboard.

  • :dashboard_name (required, String)

    A friendly name for the dashboard.

  • :dashboard_description (String)

    A description for the dashboard.

  • :dashboard_definition (required, String)

    The dashboard definition specified in a JSON literal. For detailed information, see Creating dashboards (CLI) in the IoT SiteWise User Guide.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :tags (Hash<String,String>)

    A list of key-value pairs that contain metadata for the dashboard. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Returns:



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

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

#create_gateway(params = {}) ⇒ Types::CreateGatewayResponse

Creates a gateway, which is a virtual or edge device that delivers industrial data streams from local servers to IoT SiteWise. For more information, see Ingesting data using a gateway in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_gateway({
  gateway_name: "Name", # required
  gateway_platform: { # required
    greengrass: {
      group_arn: "ARN", # required
    },
    greengrass_v2: {
      core_device_thing_name: "CoreDeviceThingName", # required
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.gateway_id #=> String
resp.gateway_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :gateway_name (required, String)

    A unique, friendly name for the gateway.

  • :gateway_platform (required, Types::GatewayPlatform)

    The gateway's platform. You can only specify one platform in a gateway.

  • :tags (Hash<String,String>)

    A list of key-value pairs that contain metadata for the gateway. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Returns:



1113
1114
1115
1116
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1113

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

#create_portal(params = {}) ⇒ Types::CreatePortalResponse

Creates a portal, which can contain projects and dashboards. IoT SiteWise Monitor uses Amazon Web Services SSO or IAM to authenticate portal users and manage user permissions.

Before you can sign in to a new portal, you must add at least one identity to that portal. For more information, see Adding or removing portal administrators in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_portal({
  portal_name: "Name", # required
  portal_description: "Description",
  portal_contact_email: "Email", # required
  client_token: "ClientToken",
  portal_logo_image_file: {
    data: "data", # required
    type: "PNG", # required, accepts PNG
  },
  role_arn: "ARN", # required
  tags: {
    "TagKey" => "TagValue",
  },
  portal_auth_mode: "IAM", # accepts IAM, SSO
  notification_sender_email: "Email",
  alarms: {
    alarm_role_arn: "ARN", # required
    notification_lambda_arn: "ARN",
  },
})

Response structure


resp.portal_id #=> String
resp.portal_arn #=> String
resp.portal_start_url #=> String
resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
resp.portal_status.error.message #=> String
resp.sso_application_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :portal_name (required, String)

    A friendly name for the portal.

  • :portal_description (String)

    A description for the portal.

  • :portal_contact_email (required, String)

    The Amazon Web Services administrator's contact email address.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :portal_logo_image_file (Types::ImageFile)

    A logo image to display in the portal. Upload a square, high-resolution image. The image is displayed on a dark background.

  • :role_arn (required, String)

    The ARN of a service role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, see Using service roles for IoT SiteWise Monitor in the IoT SiteWise User Guide.

  • :tags (Hash<String,String>)

    A list of key-value pairs that contain metadata for the portal. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

  • :portal_auth_mode (String)

    The service to use to authenticate users to the portal. Choose from the following options:

    • SSO – The portal uses Amazon Web Services Single Sign On to authenticate users and manage user permissions. Before you can create a portal that uses Amazon Web Services SSO, you must enable Amazon Web Services SSO. For more information, see Enabling Amazon Web Services SSO in the IoT SiteWise User Guide. This option is only available in Amazon Web Services Regions other than the China Regions.

    • IAM – The portal uses Identity and Access Management to authenticate users and manage user permissions.

    You can't change this value after you create a portal.

    Default: SSO

  • :notification_sender_email (String)

    The email address that sends alarm notifications.

    If you use the IoT Events managed Lambda function to manage your emails, you must verify the sender email address in Amazon SES.

  • :alarms (Types::Alarms)

    Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the alarm to monitor an asset property and get notified when the asset property value is outside a specified range. For more information, see Monitoring with alarms in the IoT SiteWise Application Guide.

Returns:



1261
1262
1263
1264
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1261

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

#create_project(params = {}) ⇒ Types::CreateProjectResponse

Creates a project in the specified portal.

Make sure that the project name and description don't contain confidential information.

Examples:

Request syntax with placeholder values


resp = client.create_project({
  portal_id: "ID", # required
  project_name: "Name", # required
  project_description: "Description",
  client_token: "ClientToken",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.project_id #=> String
resp.project_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :portal_id (required, String)

    The ID of the portal in which to create the project.

  • :project_name (required, String)

    A friendly name for the project.

  • :project_description (String)

    A description for the project.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :tags (Hash<String,String>)

    A list of key-value pairs that contain metadata for the project. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Returns:



1323
1324
1325
1326
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1323

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

#delete_access_policy(params = {}) ⇒ Struct

Deletes an access policy that grants the specified identity access to the specified IoT SiteWise Monitor resource. You can use this operation to revoke access to an IoT SiteWise Monitor resource.

Examples:

Request syntax with placeholder values


resp = client.delete_access_policy({
  access_policy_id: "ID", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :access_policy_id (required, String)

    The ID of the access policy to be deleted.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



1354
1355
1356
1357
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1354

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

#delete_asset(params = {}) ⇒ Types::DeleteAssetResponse

Deletes an asset. This action can't be undone. For more information, see Deleting assets and models in the IoT SiteWise User Guide.

You can't delete an asset that's associated to another asset. For more information, see DisassociateAssets.

Examples:

Request syntax with placeholder values


resp = client.delete_asset({
  asset_id: "ID", # required
  client_token: "ClientToken",
})

Response structure


resp.asset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.asset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_status.error.message #=> String
resp.asset_status.error.details #=> Array
resp.asset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the asset to delete.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:



1405
1406
1407
1408
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1405

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

#delete_asset_model(params = {}) ⇒ Types::DeleteAssetModelResponse

Deletes an asset model. This action can't be undone. You must delete all assets created from an asset model before you can delete the model. Also, you can't delete an asset model if a parent asset model exists that contains a property formula expression that depends on the asset model that you want to delete. For more information, see Deleting assets and models in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_asset_model({
  asset_model_id: "ID", # required
  client_token: "ClientToken",
})

Response structure


resp.asset_model_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "PROPAGATING", "DELETING", "FAILED"
resp.asset_model_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_model_status.error.message #=> String
resp.asset_model_status.error.details #=> Array
resp.asset_model_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_model_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_model_id (required, String)

    The ID of the asset model to delete.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:



1454
1455
1456
1457
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1454

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

#delete_dashboard(params = {}) ⇒ Struct

Deletes a dashboard from IoT SiteWise Monitor.

Examples:

Request syntax with placeholder values


resp = client.delete_dashboard({
  dashboard_id: "ID", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :dashboard_id (required, String)

    The ID of the dashboard to delete.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



1483
1484
1485
1486
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1483

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

#delete_gateway(params = {}) ⇒ Struct

Deletes a gateway from IoT SiteWise. When you delete a gateway, some of the gateway's files remain in your gateway's file system.

Examples:

Request syntax with placeholder values


resp = client.delete_gateway({
  gateway_id: "ID", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :gateway_id (required, String)

    The ID of the gateway to delete.

Returns:

  • (Struct)

    Returns an empty response.



1504
1505
1506
1507
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1504

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

#delete_portal(params = {}) ⇒ Types::DeletePortalResponse

Deletes a portal from IoT SiteWise Monitor.

Examples:

Request syntax with placeholder values


resp = client.delete_portal({
  portal_id: "ID", # required
  client_token: "ClientToken",
})

Response structure


resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
resp.portal_status.error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :portal_id (required, String)

    The ID of the portal to delete.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:



1541
1542
1543
1544
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1541

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

#delete_project(params = {}) ⇒ Struct

Deletes a project from IoT SiteWise Monitor.

Examples:

Request syntax with placeholder values


resp = client.delete_project({
  project_id: "ID", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



1570
1571
1572
1573
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1570

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

#delete_time_series(params = {}) ⇒ Struct

Deletes a time series (data stream). If you delete a time series that's associated with an asset property, the asset property still exists, but the time series will no longer be associated with this asset property.

To identify a time series, do one of the following:

  • If the time series isn't associated with an asset property, specify the alias of the time series.

  • If the time series is associated with an asset property, specify one of the following:

    • The alias of the time series.

    • The assetId and propertyId that identifies the asset property.

Examples:

Request syntax with placeholder values


resp = client.delete_time_series({
  alias: "PropertyAlias",
  asset_id: "ID",
  property_id: "ID",
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :alias (String)

    The alias that identifies the time series.

  • :asset_id (String)

    The ID of the asset in which the asset property was created.

  • :property_id (String)

    The ID of the asset property.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



1622
1623
1624
1625
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1622

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

#describe_access_policy(params = {}) ⇒ Types::DescribeAccessPolicyResponse

Describes an access policy, which specifies an identity's access to an IoT SiteWise Monitor portal or project.

Examples:

Request syntax with placeholder values


resp = client.describe_access_policy({
  access_policy_id: "ID", # required
})

Response structure


resp.access_policy_id #=> String
resp.access_policy_arn #=> String
resp.access_policy_identity.user.id #=> String
resp.access_policy_identity.group.id #=> String
resp.access_policy_identity.iam_user.arn #=> String
resp.access_policy_identity.iam_role.arn #=> String
resp.access_policy_resource.portal.id #=> String
resp.access_policy_resource.project.id #=> String
resp.access_policy_permission #=> String, one of "ADMINISTRATOR", "VIEWER"
resp.access_policy_creation_date #=> Time
resp.access_policy_last_update_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :access_policy_id (required, String)

    The ID of the access policy.

Returns:



1665
1666
1667
1668
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1665

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

#describe_asset(params = {}) ⇒ Types::DescribeAssetResponse

Retrieves information about an asset.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • asset_active
  • asset_not_exists

Examples:

Request syntax with placeholder values


resp = client.describe_asset({
  asset_id: "ID", # required
})

Response structure


resp.asset_id #=> String
resp.asset_arn #=> String
resp.asset_name #=> String
resp.asset_model_id #=> String
resp.asset_properties #=> Array
resp.asset_properties[0].id #=> String
resp.asset_properties[0].name #=> String
resp.asset_properties[0].alias #=> String
resp.asset_properties[0].notification.topic #=> String
resp.asset_properties[0].notification.state #=> String, one of "ENABLED", "DISABLED"
resp.asset_properties[0].data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.asset_properties[0].data_type_spec #=> String
resp.asset_properties[0].unit #=> String
resp.asset_hierarchies #=> Array
resp.asset_hierarchies[0].id #=> String
resp.asset_hierarchies[0].name #=> String
resp.asset_composite_models #=> Array
resp.asset_composite_models[0].name #=> String
resp.asset_composite_models[0].description #=> String
resp.asset_composite_models[0].type #=> String
resp.asset_composite_models[0].properties #=> Array
resp.asset_composite_models[0].properties[0].id #=> String
resp.asset_composite_models[0].properties[0].name #=> String
resp.asset_composite_models[0].properties[0].alias #=> String
resp.asset_composite_models[0].properties[0].notification.topic #=> String
resp.asset_composite_models[0].properties[0].notification.state #=> String, one of "ENABLED", "DISABLED"
resp.asset_composite_models[0].properties[0].data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.asset_composite_models[0].properties[0].data_type_spec #=> String
resp.asset_composite_models[0].properties[0].unit #=> String
resp.asset_creation_date #=> Time
resp.asset_last_update_date #=> Time
resp.asset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.asset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_status.error.message #=> String
resp.asset_status.error.details #=> Array
resp.asset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the asset.

Returns:



1742
1743
1744
1745
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1742

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

#describe_asset_model(params = {}) ⇒ Types::DescribeAssetModelResponse

Retrieves information about an asset model.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • asset_model_active
  • asset_model_not_exists

Examples:

Request syntax with placeholder values


resp = client.describe_asset_model({
  asset_model_id: "ID", # required
})

Response structure


resp.asset_model_id #=> String
resp.asset_model_arn #=> String
resp.asset_model_name #=> String
resp.asset_model_description #=> String
resp.asset_model_properties #=> Array
resp.asset_model_properties[0].id #=> String
resp.asset_model_properties[0].name #=> String
resp.asset_model_properties[0].data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.asset_model_properties[0].data_type_spec #=> String
resp.asset_model_properties[0].unit #=> String
resp.asset_model_properties[0].type.attribute.default_value #=> String
resp.asset_model_properties[0].type.measurement.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.asset_model_properties[0].type.transform.expression #=> String
resp.asset_model_properties[0].type.transform.variables #=> Array
resp.asset_model_properties[0].type.transform.variables[0].name #=> String
resp.asset_model_properties[0].type.transform.variables[0].value.property_id #=> String
resp.asset_model_properties[0].type.transform.variables[0].value.hierarchy_id #=> String
resp.asset_model_properties[0].type.transform.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"
resp.asset_model_properties[0].type.transform.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.asset_model_properties[0].type.metric.expression #=> String
resp.asset_model_properties[0].type.metric.variables #=> Array
resp.asset_model_properties[0].type.metric.variables[0].name #=> String
resp.asset_model_properties[0].type.metric.variables[0].value.property_id #=> String
resp.asset_model_properties[0].type.metric.variables[0].value.hierarchy_id #=> String
resp.asset_model_properties[0].type.metric.window.tumbling.interval #=> String
resp.asset_model_properties[0].type.metric.window.tumbling.offset #=> String
resp.asset_model_properties[0].type.metric.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"
resp.asset_model_hierarchies #=> Array
resp.asset_model_hierarchies[0].id #=> String
resp.asset_model_hierarchies[0].name #=> String
resp.asset_model_hierarchies[0].child_asset_model_id #=> String
resp.asset_model_composite_models #=> Array
resp.asset_model_composite_models[0].name #=> String
resp.asset_model_composite_models[0].description #=> String
resp.asset_model_composite_models[0].type #=> String
resp.asset_model_composite_models[0].properties #=> Array
resp.asset_model_composite_models[0].properties[0].id #=> String
resp.asset_model_composite_models[0].properties[0].name #=> String
resp.asset_model_composite_models[0].properties[0].data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.asset_model_composite_models[0].properties[0].data_type_spec #=> String
resp.asset_model_composite_models[0].properties[0].unit #=> String
resp.asset_model_composite_models[0].properties[0].type.attribute.default_value #=> String
resp.asset_model_composite_models[0].properties[0].type.measurement.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.asset_model_composite_models[0].properties[0].type.transform.expression #=> String
resp.asset_model_composite_models[0].properties[0].type.transform.variables #=> Array
resp.asset_model_composite_models[0].properties[0].type.transform.variables[0].name #=> String
resp.asset_model_composite_models[0].properties[0].type.transform.variables[0].value.property_id #=> String
resp.asset_model_composite_models[0].properties[0].type.transform.variables[0].value.hierarchy_id #=> String
resp.asset_model_composite_models[0].properties[0].type.transform.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"
resp.asset_model_composite_models[0].properties[0].type.transform.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.asset_model_composite_models[0].properties[0].type.metric.expression #=> String
resp.asset_model_composite_models[0].properties[0].type.metric.variables #=> Array
resp.asset_model_composite_models[0].properties[0].type.metric.variables[0].name #=> String
resp.asset_model_composite_models[0].properties[0].type.metric.variables[0].value.property_id #=> String
resp.asset_model_composite_models[0].properties[0].type.metric.variables[0].value.hierarchy_id #=> String
resp.asset_model_composite_models[0].properties[0].type.metric.window.tumbling.interval #=> String
resp.asset_model_composite_models[0].properties[0].type.metric.window.tumbling.offset #=> String
resp.asset_model_composite_models[0].properties[0].type.metric.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"
resp.asset_model_creation_date #=> Time
resp.asset_model_last_update_date #=> Time
resp.asset_model_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "PROPAGATING", "DELETING", "FAILED"
resp.asset_model_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_model_status.error.message #=> String
resp.asset_model_status.error.details #=> Array
resp.asset_model_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_model_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_model_id (required, String)

    The ID of the asset model.

Returns:



1848
1849
1850
1851
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1848

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

#describe_asset_property(params = {}) ⇒ Types::DescribeAssetPropertyResponse

Retrieves information about an asset property.

When you call this operation for an attribute property, this response includes the default attribute value that you define in the asset model. If you update the default value in the model, this operation's response includes the new default value.

This operation doesn't return the value of the asset property. To get the value of an asset property, use GetAssetPropertyValue.

Examples:

Request syntax with placeholder values


resp = client.describe_asset_property({
  asset_id: "ID", # required
  property_id: "ID", # required
})

Response structure


resp.asset_id #=> String
resp.asset_name #=> String
resp.asset_model_id #=> String
resp.asset_property.id #=> String
resp.asset_property.name #=> String
resp.asset_property.alias #=> String
resp.asset_property.notification.topic #=> String
resp.asset_property.notification.state #=> String, one of "ENABLED", "DISABLED"
resp.asset_property.data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.asset_property.unit #=> String
resp.asset_property.type.attribute.default_value #=> String
resp.asset_property.type.measurement.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.asset_property.type.transform.expression #=> String
resp.asset_property.type.transform.variables #=> Array
resp.asset_property.type.transform.variables[0].name #=> String
resp.asset_property.type.transform.variables[0].value.property_id #=> String
resp.asset_property.type.transform.variables[0].value.hierarchy_id #=> String
resp.asset_property.type.transform.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"
resp.asset_property.type.transform.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.asset_property.type.metric.expression #=> String
resp.asset_property.type.metric.variables #=> Array
resp.asset_property.type.metric.variables[0].name #=> String
resp.asset_property.type.metric.variables[0].value.property_id #=> String
resp.asset_property.type.metric.variables[0].value.hierarchy_id #=> String
resp.asset_property.type.metric.window.tumbling.interval #=> String
resp.asset_property.type.metric.window.tumbling.offset #=> String
resp.asset_property.type.metric.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"
resp.composite_model.name #=> String
resp.composite_model.type #=> String
resp.composite_model.asset_property.id #=> String
resp.composite_model.asset_property.name #=> String
resp.composite_model.asset_property.alias #=> String
resp.composite_model.asset_property.notification.topic #=> String
resp.composite_model.asset_property.notification.state #=> String, one of "ENABLED", "DISABLED"
resp.composite_model.asset_property.data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.composite_model.asset_property.unit #=> String
resp.composite_model.asset_property.type.attribute.default_value #=> String
resp.composite_model.asset_property.type.measurement.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.composite_model.asset_property.type.transform.expression #=> String
resp.composite_model.asset_property.type.transform.variables #=> Array
resp.composite_model.asset_property.type.transform.variables[0].name #=> String
resp.composite_model.asset_property.type.transform.variables[0].value.property_id #=> String
resp.composite_model.asset_property.type.transform.variables[0].value.hierarchy_id #=> String
resp.composite_model.asset_property.type.transform.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"
resp.composite_model.asset_property.type.transform.processing_config.forwarding_config.state #=> String, one of "DISABLED", "ENABLED"
resp.composite_model.asset_property.type.metric.expression #=> String
resp.composite_model.asset_property.type.metric.variables #=> Array
resp.composite_model.asset_property.type.metric.variables[0].name #=> String
resp.composite_model.asset_property.type.metric.variables[0].value.property_id #=> String
resp.composite_model.asset_property.type.metric.variables[0].value.hierarchy_id #=> String
resp.composite_model.asset_property.type.metric.window.tumbling.interval #=> String
resp.composite_model.asset_property.type.metric.window.tumbling.offset #=> String
resp.composite_model.asset_property.type.metric.processing_config.compute_location #=> String, one of "EDGE", "CLOUD"

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the asset.

  • :property_id (required, String)

    The ID of the asset property.

Returns:



1948
1949
1950
1951
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1948

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

#describe_dashboard(params = {}) ⇒ Types::DescribeDashboardResponse

Retrieves information about a dashboard.

Examples:

Request syntax with placeholder values


resp = client.describe_dashboard({
  dashboard_id: "ID", # required
})

Response structure


resp.dashboard_id #=> String
resp.dashboard_arn #=> String
resp.dashboard_name #=> String
resp.project_id #=> String
resp.dashboard_description #=> String
resp.dashboard_definition #=> String
resp.dashboard_creation_date #=> Time
resp.dashboard_last_update_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :dashboard_id (required, String)

    The ID of the dashboard.

Returns:



1988
1989
1990
1991
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 1988

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

#describe_default_encryption_configuration(params = {}) ⇒ Types::DescribeDefaultEncryptionConfigurationResponse

Retrieves information about the default encryption configuration for the Amazon Web Services account in the default or specified Region. For more information, see Key management in the IoT SiteWise User Guide.

Examples:

Response structure


resp.encryption_type #=> String, one of "SITEWISE_DEFAULT_ENCRYPTION", "KMS_BASED_ENCRYPTION"
resp.kms_key_arn #=> String
resp.configuration_status.state #=> String, one of "ACTIVE", "UPDATE_IN_PROGRESS", "UPDATE_FAILED"
resp.configuration_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.configuration_status.error.message #=> String

Parameters:

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

    ({})

Returns:



2018
2019
2020
2021
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2018

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

#describe_gateway(params = {}) ⇒ Types::DescribeGatewayResponse

Retrieves information about a gateway.

Examples:

Request syntax with placeholder values


resp = client.describe_gateway({
  gateway_id: "ID", # required
})

Response structure


resp.gateway_id #=> String
resp.gateway_name #=> String
resp.gateway_arn #=> String
resp.gateway_platform.greengrass.group_arn #=> String
resp.gateway_platform.greengrass_v2.core_device_thing_name #=> String
resp.gateway_capability_summaries #=> Array
resp.gateway_capability_summaries[0].capability_namespace #=> String
resp.gateway_capability_summaries[0].capability_sync_status #=> String, one of "IN_SYNC", "OUT_OF_SYNC", "SYNC_FAILED", "UNKNOWN"
resp.creation_date #=> Time
resp.last_update_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :gateway_id (required, String)

    The ID of the gateway device.

Returns:



2059
2060
2061
2062
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2059

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

#describe_gateway_capability_configuration(params = {}) ⇒ Types::DescribeGatewayCapabilityConfigurationResponse

Retrieves information about a gateway capability configuration. Each gateway capability defines data sources for a gateway. A capability configuration can contain multiple data source configurations. If you define OPC-UA sources for a gateway in the IoT SiteWise console, all of your OPC-UA sources are stored in one capability configuration. To list all capability configurations for a gateway, use DescribeGateway.

Examples:

Request syntax with placeholder values


resp = client.describe_gateway_capability_configuration({
  gateway_id: "ID", # required
  capability_namespace: "CapabilityNamespace", # required
})

Response structure


resp.gateway_id #=> String
resp.capability_namespace #=> String
resp.capability_configuration #=> String
resp.capability_sync_status #=> String, one of "IN_SYNC", "OUT_OF_SYNC", "SYNC_FAILED", "UNKNOWN"

Parameters:

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

    ({})

Options Hash (params):

  • :gateway_id (required, String)

    The ID of the gateway that defines the capability configuration.

  • :capability_namespace (required, String)

    The namespace of the capability configuration. For example, if you configure OPC-UA sources from the IoT SiteWise console, your OPC-UA capability configuration has the namespace iotsitewise:opcuacollector:version, where version is a number such as 1.

Returns:



2109
2110
2111
2112
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2109

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

#describe_logging_options(params = {}) ⇒ Types::DescribeLoggingOptionsResponse

Retrieves the current IoT SiteWise logging options.

Examples:

Response structure


resp.logging_options.level #=> String, one of "ERROR", "INFO", "OFF"

Parameters:

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

    ({})

Returns:



2126
2127
2128
2129
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2126

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

#describe_portal(params = {}) ⇒ Types::DescribePortalResponse

Retrieves information about a portal.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • portal_active
  • portal_not_exists

Examples:

Request syntax with placeholder values


resp = client.describe_portal({
  portal_id: "ID", # required
})

Response structure


resp.portal_id #=> String
resp.portal_arn #=> String
resp.portal_name #=> String
resp.portal_description #=> String
resp.portal_client_id #=> String
resp.portal_start_url #=> String
resp.portal_contact_email #=> String
resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
resp.portal_status.error.message #=> String
resp.portal_creation_date #=> Time
resp.portal_last_update_date #=> Time
resp.portal_logo_image_location.id #=> String
resp.portal_logo_image_location.url #=> String
resp.role_arn #=> String
resp.portal_auth_mode #=> String, one of "IAM", "SSO"
resp.notification_sender_email #=> String
resp.alarms.alarm_role_arn #=> String
resp.alarms.notification_lambda_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :portal_id (required, String)

    The ID of the portal.

Returns:



2190
2191
2192
2193
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2190

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

#describe_project(params = {}) ⇒ Types::DescribeProjectResponse

Retrieves information about a project.

Examples:

Request syntax with placeholder values


resp = client.describe_project({
  project_id: "ID", # required
})

Response structure


resp.project_id #=> String
resp.project_arn #=> String
resp.project_name #=> String
resp.portal_id #=> String
resp.project_description #=> String
resp.project_creation_date #=> Time
resp.project_last_update_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project.

Returns:



2228
2229
2230
2231
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2228

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

#describe_storage_configuration(params = {}) ⇒ Types::DescribeStorageConfigurationResponse

Retrieves information about the storage configuration for IoT SiteWise.

Examples:

Response structure


resp.storage_type #=> String, one of "SITEWISE_DEFAULT_STORAGE", "MULTI_LAYER_STORAGE"
resp.multi_layer_storage.customer_managed_s3_storage.s3_resource_arn #=> String
resp.multi_layer_storage.customer_managed_s3_storage.role_arn #=> String
resp.disassociated_data_storage #=> String, one of "ENABLED", "DISABLED"
resp.retention_period.number_of_days #=> Integer
resp.retention_period.unlimited #=> Boolean
resp.configuration_status.state #=> String, one of "ACTIVE", "UPDATE_IN_PROGRESS", "UPDATE_FAILED"
resp.configuration_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.configuration_status.error.message #=> String
resp.last_update_date #=> Time

Parameters:

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

    ({})

Returns:



2260
2261
2262
2263
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2260

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

#describe_time_series(params = {}) ⇒ Types::DescribeTimeSeriesResponse

Retrieves information about a time series (data stream).

To identify a time series, do one of the following:

  • If the time series isn't associated with an asset property, specify the alias of the time series.

  • If the time series is associated with an asset property, specify one of the following:

    • The alias of the time series.

    • The assetId and propertyId that identifies the asset property.

Examples:

Request syntax with placeholder values


resp = client.describe_time_series({
  alias: "PropertyAlias",
  asset_id: "ID",
  property_id: "ID",
})

Response structure


resp.asset_id #=> String
resp.property_id #=> String
resp.alias #=> String
resp.time_series_id #=> String
resp.data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.data_type_spec #=> String
resp.time_series_creation_date #=> Time
resp.time_series_last_update_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :alias (String)

    The alias that identifies the time series.

  • :asset_id (String)

    The ID of the asset in which the asset property was created.

  • :property_id (String)

    The ID of the asset property.

Returns:



2320
2321
2322
2323
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2320

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

#disassociate_assets(params = {}) ⇒ Struct

Disassociates a child asset from the given parent asset through a hierarchy defined in the parent asset's model.

Examples:

Request syntax with placeholder values


resp = client.disassociate_assets({
  asset_id: "ID", # required
  hierarchy_id: "ID", # required
  child_asset_id: "ID", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the parent asset from which to disassociate the child asset.

  • :hierarchy_id (required, String)

    The ID of a hierarchy in the parent asset's model. Hierarchies allow different groupings of assets to be formed that all come from the same asset model. You can use the hierarchy ID to identify the correct asset to disassociate. For more information, see Asset hierarchies in the IoT SiteWise User Guide.

  • :child_asset_id (required, String)

    The ID of the child asset to disassociate.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



2366
2367
2368
2369
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2366

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

#disassociate_time_series_from_asset_property(params = {}) ⇒ Struct

Disassociates a time series (data stream) from an asset property.

Examples:

Request syntax with placeholder values


resp = client.disassociate_time_series_from_asset_property({
  alias: "PropertyAlias", # required
  asset_id: "ID", # required
  property_id: "ID", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :alias (required, String)

    The alias that identifies the time series.

  • :asset_id (required, String)

    The ID of the asset in which the asset property was created.

  • :property_id (required, String)

    The ID of the asset property.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



2403
2404
2405
2406
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2403

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

#get_asset_property_aggregates(params = {}) ⇒ Types::GetAssetPropertyAggregatesResponse

Gets aggregated values for an asset property. For more information, see Querying aggregates in the IoT SiteWise User Guide.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

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_asset_property_aggregates({
  asset_id: "ID",
  property_id: "ID",
  property_alias: "AssetPropertyAlias",
  aggregate_types: ["AVERAGE"], # required, accepts AVERAGE, COUNT, MAXIMUM, MINIMUM, SUM, STANDARD_DEVIATION
  resolution: "Resolution", # required
  qualities: ["GOOD"], # accepts GOOD, BAD, UNCERTAIN
  start_date: Time.now, # required
  end_date: Time.now, # required
  time_ordering: "ASCENDING", # accepts ASCENDING, DESCENDING
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.aggregated_values #=> Array
resp.aggregated_values[0].timestamp #=> Time
resp.aggregated_values[0].quality #=> String, one of "GOOD", "BAD", "UNCERTAIN"
resp.aggregated_values[0].value.average #=> Float
resp.aggregated_values[0].value.count #=> Float
resp.aggregated_values[0].value.maximum #=> Float
resp.aggregated_values[0].value.minimum #=> Float
resp.aggregated_values[0].value.sum #=> Float
resp.aggregated_values[0].value.standard_deviation #=> Float
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (String)

    The ID of the asset.

  • :property_id (String)

    The ID of the asset property.

  • :property_alias (String)

    The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.

  • :aggregate_types (required, Array<String>)

    The data aggregating function.

  • :resolution (required, String)

    The time interval over which to aggregate data.

  • :qualities (Array<String>)

    The quality by which to filter asset data.

  • :start_date (required, Time, DateTime, Date, Integer, String)

    The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time.

  • :end_date (required, Time, DateTime, Date, Integer, String)

    The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time.

  • :time_ordering (String)

    The chronological sorting order of the requested information.

    Default: ASCENDING

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 100

Returns:



2509
2510
2511
2512
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2509

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

#get_asset_property_value(params = {}) ⇒ Types::GetAssetPropertyValueResponse

Gets an asset property's current value. For more information, see Querying current values in the IoT SiteWise User Guide.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

Examples:

Request syntax with placeholder values


resp = client.get_asset_property_value({
  asset_id: "ID",
  property_id: "ID",
  property_alias: "AssetPropertyAlias",
})

Response structure


resp.property_value.value.string_value #=> String
resp.property_value.value.integer_value #=> Integer
resp.property_value.value.double_value #=> Float
resp.property_value.value.boolean_value #=> Boolean
resp.property_value.timestamp.time_in_seconds #=> Integer
resp.property_value.timestamp.offset_in_nanos #=> Integer
resp.property_value.quality #=> String, one of "GOOD", "BAD", "UNCERTAIN"

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (String)

    The ID of the asset.

  • :property_id (String)

    The ID of the asset property.

  • :property_alias (String)

    The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.

Returns:



2571
2572
2573
2574
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2571

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

#get_asset_property_value_history(params = {}) ⇒ Types::GetAssetPropertyValueHistoryResponse

Gets the history of an asset property's values. For more information, see Querying historical values in the IoT SiteWise User Guide.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

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_asset_property_value_history({
  asset_id: "ID",
  property_id: "ID",
  property_alias: "AssetPropertyAlias",
  start_date: Time.now,
  end_date: Time.now,
  qualities: ["GOOD"], # accepts GOOD, BAD, UNCERTAIN
  time_ordering: "ASCENDING", # accepts ASCENDING, DESCENDING
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.asset_property_value_history #=> Array
resp.asset_property_value_history[0].value.string_value #=> String
resp.asset_property_value_history[0].value.integer_value #=> Integer
resp.asset_property_value_history[0].value.double_value #=> Float
resp.asset_property_value_history[0].value.boolean_value #=> Boolean
resp.asset_property_value_history[0].timestamp.time_in_seconds #=> Integer
resp.asset_property_value_history[0].timestamp.offset_in_nanos #=> Integer
resp.asset_property_value_history[0].quality #=> String, one of "GOOD", "BAD", "UNCERTAIN"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (String)

    The ID of the asset.

  • :property_id (String)

    The ID of the asset property.

  • :property_alias (String)

    The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.

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

    The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time.

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

    The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time.

  • :qualities (Array<String>)

    The quality by which to filter asset data.

  • :time_ordering (String)

    The chronological sorting order of the requested information.

    Default: ASCENDING

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 100

Returns:



2668
2669
2670
2671
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2668

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

#get_interpolated_asset_property_values(params = {}) ⇒ Types::GetInterpolatedAssetPropertyValuesResponse

Get interpolated values for an asset property for a specified time interval, during a period of time. If your time series is missing data points during the specified time interval, you can use interpolation to estimate the missing data.

For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days.

To identify an asset property, you must specify one of the following:

  • The assetId and propertyId of an asset property.

  • A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

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_interpolated_asset_property_values({
  asset_id: "ID",
  property_id: "ID",
  property_alias: "AssetPropertyAlias",
  start_time_in_seconds: 1, # required
  start_time_offset_in_nanos: 1,
  end_time_in_seconds: 1, # required
  end_time_offset_in_nanos: 1,
  quality: "GOOD", # required, accepts GOOD, BAD, UNCERTAIN
  interval_in_seconds: 1, # required
  next_token: "NextToken",
  max_results: 1,
  type: "InterpolationType", # required
  interval_window_in_seconds: 1,
})

Response structure


resp.interpolated_asset_property_values #=> Array
resp.interpolated_asset_property_values[0].timestamp.time_in_seconds #=> Integer
resp.interpolated_asset_property_values[0].timestamp.offset_in_nanos #=> Integer
resp.interpolated_asset_property_values[0].value.string_value #=> String
resp.interpolated_asset_property_values[0].value.integer_value #=> Integer
resp.interpolated_asset_property_values[0].value.double_value #=> Float
resp.interpolated_asset_property_values[0].value.boolean_value #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (String)

    The ID of the asset.

  • :property_id (String)

    The ID of the asset property.

  • :property_alias (String)

    The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.

  • :start_time_in_seconds (required, Integer)

    The exclusive start of the range from which to interpolate data, expressed in seconds in Unix epoch time.

  • :start_time_offset_in_nanos (Integer)

    The nanosecond offset converted from startTimeInSeconds.

  • :end_time_in_seconds (required, Integer)

    The inclusive end of the range from which to interpolate data, expressed in seconds in Unix epoch time.

  • :end_time_offset_in_nanos (Integer)

    The nanosecond offset converted from endTimeInSeconds.

  • :quality (required, String)

    The quality of the asset property value. You can use this parameter as a filter to choose only the asset property values that have a specific quality.

  • :interval_in_seconds (required, Integer)

    The time interval in seconds over which to interpolate data. Each interval starts when the previous one ends.

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request. If not specified, the default value is 10.

  • :type (required, String)

    The interpolation type.

    Valid values: LINEAR_INTERPOLATION | LOCF_INTERPOLATION

    • LINEAR_INTERPOLATION – Estimates missing data using linear interpolation.

      For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT SiteWise returns the first interpolated value on July 2, 2021, at 9 AM, the second interpolated value on July 3, 2021, at 9 AM, and so on.

    • LOCF_INTERPOLATION – Estimates missing data using last observation carried forward interpolation

      If no data point is found for an interval, IoT SiteWise returns the last observed data point for the previous interval and carries forward this interpolated value until a new data point is found.

      For example, you can get the state of an on-off valve every 24 hours over a duration of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT SiteWise returns the last observed data point between July 1, 2021, at 9 AM and July 2, 2021, at 9 AM as the first interpolated value. If a data point isn't found after 9 AM on July 2, 2021, IoT SiteWise uses the same interpolated value for the rest of the days.

  • :interval_window_in_seconds (Integer)

    The query interval for the window, in seconds. IoT SiteWise computes each interpolated value by using data points from the timestamp of each interval, minus the window to the timestamp of each interval plus the window. If not specified, the window ranges between the start time minus the interval and the end time plus the interval.

    * If you specify a value for the intervalWindowInSeconds parameter, the value for the type parameter must be LINEAR_INTERPOLATION.

    • If a data point isn't found during the specified query window, IoT SiteWise won't return an interpolated value for the interval. This indicates that there's a gap in the ingested data points.

    For example, you can get the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. If the interpolation starts on July 1, 2021, at 9 AM with a window of 2 hours, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 2, 2021 to compute the first interpolated value. Next, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 3, 2021 to compute the second interpolated value, and so on.

Returns:



2838
2839
2840
2841
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2838

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

#list_access_policies(params = {}) ⇒ Types::ListAccessPoliciesResponse

Retrieves a paginated list of access policies for an identity (an Amazon Web Services SSO user, an Amazon Web Services SSO group, or an IAM user) or an IoT SiteWise Monitor resource (a portal or project).

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_access_policies({
  identity_type: "USER", # accepts USER, GROUP, IAM
  identity_id: "IdentityId",
  resource_type: "PORTAL", # accepts PORTAL, PROJECT
  resource_id: "ID",
  iam_arn: "ARN",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.access_policy_summaries #=> Array
resp.access_policy_summaries[0].id #=> String
resp.access_policy_summaries[0].identity.user.id #=> String
resp.access_policy_summaries[0].identity.group.id #=> String
resp.access_policy_summaries[0].identity.iam_user.arn #=> String
resp.access_policy_summaries[0].identity.iam_role.arn #=> String
resp.access_policy_summaries[0].resource.portal.id #=> String
resp.access_policy_summaries[0].resource.project.id #=> String
resp.access_policy_summaries[0].permission #=> String, one of "ADMINISTRATOR", "VIEWER"
resp.access_policy_summaries[0].creation_date #=> Time
resp.access_policy_summaries[0].last_update_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :identity_type (String)

    The type of identity (Amazon Web Services SSO user, Amazon Web Services SSO group, or IAM user). This parameter is required if you specify identityId.

  • :identity_id (String)

    The ID of the identity. This parameter is required if you specify USER or GROUP for identityType.

  • :resource_type (String)

    The type of resource (portal or project). This parameter is required if you specify resourceId.

  • :resource_id (String)

    The ID of the resource. This parameter is required if you specify resourceType.

  • :iam_arn (String)

    The ARN of the IAM user. For more information, see IAM ARNs in the IAM User Guide. This parameter is required if you specify IAM for identityType.

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



2917
2918
2919
2920
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2917

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

#list_asset_models(params = {}) ⇒ Types::ListAssetModelsResponse

Retrieves a paginated list of summaries of all asset models.

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_asset_models({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.asset_model_summaries #=> Array
resp.asset_model_summaries[0].id #=> String
resp.asset_model_summaries[0].arn #=> String
resp.asset_model_summaries[0].name #=> String
resp.asset_model_summaries[0].description #=> String
resp.asset_model_summaries[0].creation_date #=> Time
resp.asset_model_summaries[0].last_update_date #=> Time
resp.asset_model_summaries[0].status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "PROPAGATING", "DELETING", "FAILED"
resp.asset_model_summaries[0].status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_model_summaries[0].status.error.message #=> String
resp.asset_model_summaries[0].status.error.details #=> Array
resp.asset_model_summaries[0].status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_model_summaries[0].status.error.details[0].message #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



2965
2966
2967
2968
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 2965

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

#list_asset_relationships(params = {}) ⇒ Types::ListAssetRelationshipsResponse

Retrieves a paginated list of asset relationships for an asset. You can use this operation to identify an asset's root asset and all associated assets between that asset and its root.

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_asset_relationships({
  asset_id: "ID", # required
  traversal_type: "PATH_TO_ROOT", # required, accepts PATH_TO_ROOT
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.asset_relationship_summaries #=> Array
resp.asset_relationship_summaries[0].hierarchy_info.parent_asset_id #=> String
resp.asset_relationship_summaries[0].hierarchy_info.child_asset_id #=> String
resp.asset_relationship_summaries[0].relationship_type #=> String, one of "HIERARCHY"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the asset.

  • :traversal_type (required, String)

    The type of traversal to use to identify asset relationships. Choose the following option:

    • PATH_TO_ROOT – Identify the asset's parent assets up to the root asset. The asset that you specify in assetId is the first result in the list of assetRelationshipSummaries, and the root asset is the last result.

    ^

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

Returns:



3020
3021
3022
3023
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3020

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

#list_assets(params = {}) ⇒ Types::ListAssetsResponse

Retrieves a paginated list of asset summaries.

You can use this operation to do the following:

  • List assets based on a specific asset model.

  • List top-level assets.

You can't use this operation to list all assets. To retrieve summaries for all of your assets, use ListAssetModels to get all of your asset model IDs. Then, use ListAssets to get all assets for each asset model.

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_assets({
  next_token: "NextToken",
  max_results: 1,
  asset_model_id: "ID",
  filter: "ALL", # accepts ALL, TOP_LEVEL
})

Response structure


resp.asset_summaries #=> Array
resp.asset_summaries[0].id #=> String
resp.asset_summaries[0].arn #=> String
resp.asset_summaries[0].name #=> String
resp.asset_summaries[0].asset_model_id #=> String
resp.asset_summaries[0].creation_date #=> Time
resp.asset_summaries[0].last_update_date #=> Time
resp.asset_summaries[0].status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.asset_summaries[0].status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_summaries[0].status.error.message #=> String
resp.asset_summaries[0].status.error.details #=> Array
resp.asset_summaries[0].status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_summaries[0].status.error.details[0].message #=> String
resp.asset_summaries[0].hierarchies #=> Array
resp.asset_summaries[0].hierarchies[0].id #=> String
resp.asset_summaries[0].hierarchies[0].name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

  • :asset_model_id (String)

    The ID of the asset model by which to filter the list of assets. This parameter is required if you choose ALL for filter.

  • :filter (String)

    The filter for the requested list of assets. Choose one of the following options:

    • ALL – The list includes all assets for a given asset model ID. The assetModelId parameter is required if you filter by ALL.

    • TOP_LEVEL – The list includes only top-level assets in the asset hierarchy tree.

    Default: ALL

Returns:



3104
3105
3106
3107
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3104

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

#list_associated_assets(params = {}) ⇒ Types::ListAssociatedAssetsResponse

Retrieves a paginated list of associated assets.

You can use this operation to do the following:

  • List child assets associated to a parent asset by a hierarchy that you specify.

  • List an asset's parent asset.

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_associated_assets({
  asset_id: "ID", # required
  hierarchy_id: "ID",
  traversal_direction: "PARENT", # accepts PARENT, CHILD
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.asset_summaries #=> Array
resp.asset_summaries[0].id #=> String
resp.asset_summaries[0].arn #=> String
resp.asset_summaries[0].name #=> String
resp.asset_summaries[0].asset_model_id #=> String
resp.asset_summaries[0].creation_date #=> Time
resp.asset_summaries[0].last_update_date #=> Time
resp.asset_summaries[0].status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.asset_summaries[0].status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_summaries[0].status.error.message #=> String
resp.asset_summaries[0].status.error.details #=> Array
resp.asset_summaries[0].status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_summaries[0].status.error.details[0].message #=> String
resp.asset_summaries[0].hierarchies #=> Array
resp.asset_summaries[0].hierarchies[0].id #=> String
resp.asset_summaries[0].hierarchies[0].name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the asset to query.

  • :hierarchy_id (String)

    The ID of the hierarchy by which child assets are associated to the asset. To find a hierarchy ID, use the DescribeAsset or DescribeAssetModel operations. This parameter is required if you choose CHILD for traversalDirection.

    For more information, see Asset hierarchies in the IoT SiteWise User Guide.

  • :traversal_direction (String)

    The direction to list associated assets. Choose one of the following options:

    • CHILD – The list includes all child assets associated to the asset. The hierarchyId parameter is required if you choose CHILD.

    • PARENT – The list includes the asset's parent asset.

    Default: CHILD

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



3195
3196
3197
3198
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3195

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

#list_dashboards(params = {}) ⇒ Types::ListDashboardsResponse

Retrieves a paginated list of dashboards for an IoT SiteWise Monitor project.

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_dashboards({
  project_id: "ID", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.dashboard_summaries #=> Array
resp.dashboard_summaries[0].id #=> String
resp.dashboard_summaries[0].name #=> String
resp.dashboard_summaries[0].description #=> String
resp.dashboard_summaries[0].creation_date #=> Time
resp.dashboard_summaries[0].last_update_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project.

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



3241
3242
3243
3244
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3241

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

#list_gateways(params = {}) ⇒ Types::ListGatewaysResponse

Retrieves a paginated list of gateways.

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_gateways({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.gateway_summaries #=> Array
resp.gateway_summaries[0].gateway_id #=> String
resp.gateway_summaries[0].gateway_name #=> String
resp.gateway_summaries[0].gateway_platform.greengrass.group_arn #=> String
resp.gateway_summaries[0].gateway_platform.greengrass_v2.core_device_thing_name #=> String
resp.gateway_summaries[0].gateway_capability_summaries #=> Array
resp.gateway_summaries[0].gateway_capability_summaries[0].capability_namespace #=> String
resp.gateway_summaries[0].gateway_capability_summaries[0].capability_sync_status #=> String, one of "IN_SYNC", "OUT_OF_SYNC", "SYNC_FAILED", "UNKNOWN"
resp.gateway_summaries[0].creation_date #=> Time
resp.gateway_summaries[0].last_update_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



3286
3287
3288
3289
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3286

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

#list_portals(params = {}) ⇒ Types::ListPortalsResponse

Retrieves a paginated list of IoT SiteWise Monitor portals.

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_portals({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.portal_summaries #=> Array
resp.portal_summaries[0].id #=> String
resp.portal_summaries[0].name #=> String
resp.portal_summaries[0].description #=> String
resp.portal_summaries[0].start_url #=> String
resp.portal_summaries[0].creation_date #=> Time
resp.portal_summaries[0].last_update_date #=> Time
resp.portal_summaries[0].role_arn #=> String
resp.portal_summaries[0].status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
resp.portal_summaries[0].status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
resp.portal_summaries[0].status.error.message #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



3332
3333
3334
3335
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3332

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

#list_project_assets(params = {}) ⇒ Types::ListProjectAssetsResponse

Retrieves a paginated list of assets associated with an IoT SiteWise Monitor project.

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_project_assets({
  project_id: "ID", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.asset_ids #=> Array
resp.asset_ids[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project.

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



3374
3375
3376
3377
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3374

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

#list_projects(params = {}) ⇒ Types::ListProjectsResponse

Retrieves a paginated list of projects for an IoT SiteWise Monitor portal.

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_projects({
  portal_id: "ID", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.project_summaries #=> Array
resp.project_summaries[0].id #=> String
resp.project_summaries[0].name #=> String
resp.project_summaries[0].description #=> String
resp.project_summaries[0].creation_date #=> Time
resp.project_summaries[0].last_update_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :portal_id (required, String)

    The ID of the portal.

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

    Default: 50

Returns:



3420
3421
3422
3423
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3420

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

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

Retrieves the list of tags for an IoT SiteWise resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "AmazonResourceName", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource.

Returns:



3451
3452
3453
3454
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3451

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

#list_time_series(params = {}) ⇒ Types::ListTimeSeriesResponse

Retrieves a paginated list of time series (data streams).

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_time_series({
  next_token: "NextToken",
  max_results: 1,
  asset_id: "ID",
  alias_prefix: "PropertyAlias",
  time_series_type: "ASSOCIATED", # accepts ASSOCIATED, DISASSOCIATED
})

Response structure


resp.time_series_summaries #=> Array
resp.time_series_summaries[0].asset_id #=> String
resp.time_series_summaries[0].property_id #=> String
resp.time_series_summaries[0].alias #=> String
resp.time_series_summaries[0].time_series_id #=> String
resp.time_series_summaries[0].data_type #=> String, one of "STRING", "INTEGER", "DOUBLE", "BOOLEAN", "STRUCT"
resp.time_series_summaries[0].data_type_spec #=> String
resp.time_series_summaries[0].time_series_creation_date #=> Time
resp.time_series_summaries[0].time_series_last_update_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token to be used for the next set of paginated results.

  • :max_results (Integer)

    The maximum number of results to return for each paginated request.

  • :asset_id (String)

    The ID of the asset in which the asset property was created.

  • :alias_prefix (String)

    The alias prefix of the time series.

  • :time_series_type (String)

    The type of the time series. The time series type can be one of the following values:

    • ASSOCIATED – The time series is associated with an asset property.

    • DISASSOCIATED – The time series isn't associated with any asset property.

Returns:



3511
3512
3513
3514
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3511

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

#put_default_encryption_configuration(params = {}) ⇒ Types::PutDefaultEncryptionConfigurationResponse

Sets the default encryption configuration for the Amazon Web Services account. For more information, see Key management in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.put_default_encryption_configuration({
  encryption_type: "SITEWISE_DEFAULT_ENCRYPTION", # required, accepts SITEWISE_DEFAULT_ENCRYPTION, KMS_BASED_ENCRYPTION
  kms_key_id: "KmsKeyId",
})

Response structure


resp.encryption_type #=> String, one of "SITEWISE_DEFAULT_ENCRYPTION", "KMS_BASED_ENCRYPTION"
resp.kms_key_arn #=> String
resp.configuration_status.state #=> String, one of "ACTIVE", "UPDATE_IN_PROGRESS", "UPDATE_FAILED"
resp.configuration_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.configuration_status.error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :encryption_type (required, String)

    The type of encryption used for the encryption configuration.

  • :kms_key_id (String)

    The Key ID of the customer managed key used for KMS encryption. This is required if you use KMS_BASED_ENCRYPTION.

Returns:



3554
3555
3556
3557
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3554

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

#put_logging_options(params = {}) ⇒ Struct

Sets logging options for IoT SiteWise.

Examples:

Request syntax with placeholder values


resp = client.put_logging_options({
  logging_options: { # required
    level: "ERROR", # required, accepts ERROR, INFO, OFF
  },
})

Parameters:

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

    ({})

Options Hash (params):

Returns:

  • (Struct)

    Returns an empty response.



3576
3577
3578
3579
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3576

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

#put_storage_configuration(params = {}) ⇒ Types::PutStorageConfigurationResponse

Configures storage settings for IoT SiteWise.

Examples:

Request syntax with placeholder values


resp = client.put_storage_configuration({
  storage_type: "SITEWISE_DEFAULT_STORAGE", # required, accepts SITEWISE_DEFAULT_STORAGE, MULTI_LAYER_STORAGE
  multi_layer_storage: {
    customer_managed_s3_storage: { # required
      s3_resource_arn: "ARN", # required
      role_arn: "ARN", # required
    },
  },
  disassociated_data_storage: "ENABLED", # accepts ENABLED, DISABLED
  retention_period: {
    number_of_days: 1,
    unlimited: false,
  },
})

Response structure


resp.storage_type #=> String, one of "SITEWISE_DEFAULT_STORAGE", "MULTI_LAYER_STORAGE"
resp.multi_layer_storage.customer_managed_s3_storage.s3_resource_arn #=> String
resp.multi_layer_storage.customer_managed_s3_storage.role_arn #=> String
resp.disassociated_data_storage #=> String, one of "ENABLED", "DISABLED"
resp.retention_period.number_of_days #=> Integer
resp.retention_period.unlimited #=> Boolean
resp.configuration_status.state #=> String, one of "ACTIVE", "UPDATE_IN_PROGRESS", "UPDATE_FAILED"
resp.configuration_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.configuration_status.error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :storage_type (required, String)

    The storage tier that you specified for your data. The storageType parameter can be one of the following values:

    • SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves your data into the hot tier. The hot tier is a service-managed database.

    • MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the cold tier. The cold tier is a customer-managed Amazon S3 bucket.

  • :multi_layer_storage (Types::MultiLayerStorage)

    Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the storage type, you must specify a MultiLayerStorage object.

  • :disassociated_data_storage (String)

    Contains the storage configuration for time series (data streams) that aren't associated with asset properties. The disassociatedDataStorage can be one of the following values:

    • ENABLED – IoT SiteWise accepts time series that aren't associated with asset properties.

      After the disassociatedDataStorage is enabled, you can't disable it.

    • DISABLED – IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.

    For more information, see Data streams in the IoT SiteWise User Guide.

  • :retention_period (Types::RetentionPeriod)

    How many days your data is kept in the hot tier. By default, your data is kept indefinitely in the hot tier.

Returns:



3663
3664
3665
3666
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3663

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

#tag_resource(params = {}) ⇒ Struct

Adds tags to an IoT SiteWise resource. If a tag already exists for the resource, this operation updates the tag's value.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource to tag.

  • :tags (required, Hash<String,String>)

    A list of key-value pairs that contain metadata for the resource. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Returns:

  • (Struct)

    Returns an empty response.



3700
3701
3702
3703
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3700

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

#untag_resource(params = {}) ⇒ Struct

Removes a tag from an IoT SiteWise resource.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource to untag.

  • :tag_keys (required, Array<String>)

    A list of keys for tags to remove from the resource.

Returns:

  • (Struct)

    Returns an empty response.



3728
3729
3730
3731
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3728

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

#update_access_policy(params = {}) ⇒ Struct

Updates an existing access policy that specifies an identity's access to an IoT SiteWise Monitor portal or project resource.

Examples:

Request syntax with placeholder values


resp = client.update_access_policy({
  access_policy_id: "ID", # required
  access_policy_identity: { # required
    user: {
      id: "IdentityId", # required
    },
    group: {
      id: "IdentityId", # required
    },
    iam_user: {
      arn: "ARN", # required
    },
    iam_role: {
      arn: "ARN", # required
    },
  },
  access_policy_resource: { # required
    portal: {
      id: "ID", # required
    },
    project: {
      id: "ID", # required
    },
  },
  access_policy_permission: "ADMINISTRATOR", # required, accepts ADMINISTRATOR, VIEWER
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :access_policy_id (required, String)

    The ID of the access policy.

  • :access_policy_identity (required, Types::Identity)

    The identity for this access policy. Choose an Amazon Web Services SSO user, an Amazon Web Services SSO group, or an IAM user.

  • :access_policy_resource (required, Types::Resource)

    The IoT SiteWise Monitor resource for this access policy. Choose either a portal or a project.

  • :access_policy_permission (required, String)

    The permission level for this access policy. Note that a project ADMINISTRATOR is also known as a project owner.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



3793
3794
3795
3796
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3793

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

#update_asset(params = {}) ⇒ Types::UpdateAssetResponse

Updates an asset's name. For more information, see Updating assets and models in the IoT SiteWise User Guide.

Examples:

Request syntax with placeholder values


resp = client.update_asset({
  asset_id: "ID", # required
  asset_name: "Name", # required
  client_token: "ClientToken",
})

Response structure


resp.asset_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"
resp.asset_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_status.error.message #=> String
resp.asset_status.error.details #=> Array
resp.asset_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the asset to update.

  • :asset_name (required, String)

    A unique, friendly name for the asset.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:



3842
3843
3844
3845
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 3842

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

#update_asset_model(params = {}) ⇒ Types::UpdateAssetModelResponse

Updates an asset model and all of the assets that were created from the model. Each asset created from the model inherits the updated asset model's property and hierarchy definitions. For more information, see Updating assets and models in the IoT SiteWise User Guide.

This operation overwrites the existing model with the provided model. To avoid deleting your asset model's properties or hierarchies, you must include their IDs and definitions in the updated asset model payload. For more information, see DescribeAssetModel.

If you remove a property from an asset model, IoT SiteWise deletes all previous data for that property. If you remove a hierarchy definition from an asset model, IoT SiteWise disassociates every asset associated with that hierarchy. You can't change the type or data type of an existing property.

Examples:

Request syntax with placeholder values


resp = client.update_asset_model({
  asset_model_id: "ID", # required
  asset_model_name: "Name", # required
  asset_model_description: "Description",
  asset_model_properties: [
    {
      id: "ID",
      name: "Name", # required
      data_type: "STRING", # required, accepts STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT
      data_type_spec: "Name",
      unit: "PropertyUnit",
      type: { # required
        attribute: {
          default_value: "DefaultValue",
        },
        measurement: {
          processing_config: {
            forwarding_config: { # required
              state: "DISABLED", # required, accepts DISABLED, ENABLED
            },
          },
        },
        transform: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
          processing_config: {
            compute_location: "EDGE", # required, accepts EDGE, CLOUD
            forwarding_config: {
              state: "DISABLED", # required, accepts DISABLED, ENABLED
            },
          },
        },
        metric: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
          window: { # required
            tumbling: {
              interval: "Interval", # required
              offset: "Offset",
            },
          },
          processing_config: {
            compute_location: "EDGE", # required, accepts EDGE, CLOUD
          },
        },
      },
    },
  ],
  asset_model_hierarchies: [
    {
      id: "ID",
      name: "Name", # required
      child_asset_model_id: "ID", # required
    },
  ],
  asset_model_composite_models: [
    {
      name: "Name", # required
      description: "Description",
      type: "Name", # required
      properties: [
        {
          id: "ID",
          name: "Name", # required
          data_type: "STRING", # required, accepts STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT
          data_type_spec: "Name",
          unit: "PropertyUnit",
          type: { # required
            attribute: {
              default_value: "DefaultValue",
            },
            measurement: {
              processing_config: {
                forwarding_config: { # required
                  state: "DISABLED", # required, accepts DISABLED, ENABLED
                },
              },
            },
            transform: {
              expression: "Expression", # required
              variables: [ # required
                {
                  name: "VariableName", # required
                  value: { # required
                    property_id: "Macro", # required
                    hierarchy_id: "Macro",
                  },
                },
              ],
              processing_config: {
                compute_location: "EDGE", # required, accepts EDGE, CLOUD
                forwarding_config: {
                  state: "DISABLED", # required, accepts DISABLED, ENABLED
                },
              },
            },
            metric: {
              expression: "Expression", # required
              variables: [ # required
                {
                  name: "VariableName", # required
                  value: { # required
                    property_id: "Macro", # required
                    hierarchy_id: "Macro",
                  },
                },
              ],
              window: { # required
                tumbling: {
                  interval: "Interval", # required
                  offset: "Offset",
                },
              },
              processing_config: {
                compute_location: "EDGE", # required, accepts EDGE, CLOUD
              },
            },
          },
        },
      ],
    },
  ],
  client_token: "ClientToken",
})

Response structure


resp.asset_model_status.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "PROPAGATING", "DELETING", "FAILED"
resp.asset_model_status.error.code #=> String, one of "VALIDATION_ERROR", "INTERNAL_FAILURE"
resp.asset_model_status.error.message #=> String
resp.asset_model_status.error.details #=> Array
resp.asset_model_status.error.details[0].code #=> String, one of "INCOMPATIBLE_COMPUTE_LOCATION", "INCOMPATIBLE_FORWARDING_CONFIGURATION"
resp.asset_model_status.error.details[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :asset_model_id (required, String)

    The ID of the asset model to update.

  • :asset_model_name (required, String)

    A unique, friendly name for the asset model.

  • :asset_model_description (String)

    A description for the asset model.

  • :asset_model_properties (Array<Types::AssetModelProperty>)

    The updated property definitions of the asset model. For more information, see Asset properties in the IoT SiteWise User Guide.

    You can specify up to 200 properties per asset model. For more information, see Quotas in the IoT SiteWise User Guide.

  • :asset_model_hierarchies (Array<Types::AssetModelHierarchy>)

    The updated hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Asset hierarchies in the IoT SiteWise User Guide.

    You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the IoT SiteWise User Guide.

  • :asset_model_composite_models (Array<Types::AssetModelCompositeModel>)

    The composite asset models that are part of this asset model. Composite asset models are asset models that contain specific properties. Each composite model has a type that defines the properties that the composite model supports. Use composite asset models to define alarms on this asset model.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:



4079
4080
4081
4082
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4079

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

#update_asset_property(params = {}) ⇒ Struct

Updates an asset property's alias and notification state.

This operation overwrites the property's existing alias and notification state. To keep your existing property's alias or notification state, you must include the existing values in the UpdateAssetProperty request. For more information, see DescribeAssetProperty.

Examples:

Request syntax with placeholder values


resp = client.update_asset_property({
  asset_id: "ID", # required
  property_id: "ID", # required
  property_alias: "PropertyAlias",
  property_notification_state: "ENABLED", # accepts ENABLED, DISABLED
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :asset_id (required, String)

    The ID of the asset to be updated.

  • :property_id (required, String)

    The ID of the asset property to be updated.

  • :property_alias (String)

    The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.

    If you omit this parameter, the alias is removed from the property.

  • :property_notification_state (String)

    The MQTT notification state (enabled or disabled) for this asset property. When the notification state is enabled, IoT SiteWise publishes property value updates to a unique MQTT topic. For more information, see Interacting with other services in the IoT SiteWise User Guide.

    If you omit this parameter, the notification state is set to DISABLED.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



4151
4152
4153
4154
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4151

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

#update_dashboard(params = {}) ⇒ Struct

Updates an IoT SiteWise Monitor dashboard.

Examples:

Request syntax with placeholder values


resp = client.update_dashboard({
  dashboard_id: "ID", # required
  dashboard_name: "Name", # required
  dashboard_description: "Description",
  dashboard_definition: "DashboardDefinition", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :dashboard_id (required, String)

    The ID of the dashboard to update.

  • :dashboard_name (required, String)

    A new friendly name for the dashboard.

  • :dashboard_description (String)

    A new description for the dashboard.

  • :dashboard_definition (required, String)

    The new dashboard definition, as specified in a JSON literal. For detailed information, see Creating dashboards (CLI) in the IoT SiteWise User Guide.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



4198
4199
4200
4201
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4198

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

#update_gateway(params = {}) ⇒ Struct

Updates a gateway's name.

Examples:

Request syntax with placeholder values


resp = client.update_gateway({
  gateway_id: "ID", # required
  gateway_name: "Name", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :gateway_id (required, String)

    The ID of the gateway to update.

  • :gateway_name (required, String)

    A unique, friendly name for the gateway.

Returns:

  • (Struct)

    Returns an empty response.



4222
4223
4224
4225
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4222

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

#update_gateway_capability_configuration(params = {}) ⇒ Types::UpdateGatewayCapabilityConfigurationResponse

Updates a gateway capability configuration or defines a new capability configuration. Each gateway capability defines data sources for a gateway. A capability configuration can contain multiple data source configurations. If you define OPC-UA sources for a gateway in the IoT SiteWise console, all of your OPC-UA sources are stored in one capability configuration. To list all capability configurations for a gateway, use DescribeGateway.

Examples:

Request syntax with placeholder values


resp = client.update_gateway_capability_configuration({
  gateway_id: "ID", # required
  capability_namespace: "CapabilityNamespace", # required
  capability_configuration: "CapabilityConfiguration", # required
})

Response structure


resp.capability_namespace #=> String
resp.capability_sync_status #=> String, one of "IN_SYNC", "OUT_OF_SYNC", "SYNC_FAILED", "UNKNOWN"

Parameters:

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

    ({})

Options Hash (params):

  • :gateway_id (required, String)

    The ID of the gateway to be updated.

  • :capability_namespace (required, String)

    The namespace of the gateway capability configuration to be updated. For example, if you configure OPC-UA sources from the IoT SiteWise console, your OPC-UA capability configuration has the namespace iotsitewise:opcuacollector:version, where version is a number such as 1.

  • :capability_configuration (required, String)

    The JSON document that defines the configuration for the gateway capability. For more information, see Configuring data sources (CLI) in the IoT SiteWise User Guide.

Returns:



4278
4279
4280
4281
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4278

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

#update_portal(params = {}) ⇒ Types::UpdatePortalResponse

Updates an IoT SiteWise Monitor portal.

Examples:

Request syntax with placeholder values


resp = client.update_portal({
  portal_id: "ID", # required
  portal_name: "Name", # required
  portal_description: "Description",
  portal_contact_email: "Email", # required
  portal_logo_image: {
    id: "ID",
    file: {
      data: "data", # required
      type: "PNG", # required, accepts PNG
    },
  },
  role_arn: "ARN", # required
  client_token: "ClientToken",
  notification_sender_email: "Email",
  alarms: {
    alarm_role_arn: "ARN", # required
    notification_lambda_arn: "ARN",
  },
})

Response structure


resp.portal_status.state #=> String, one of "CREATING", "UPDATING", "DELETING", "ACTIVE", "FAILED"
resp.portal_status.error.code #=> String, one of "INTERNAL_FAILURE", "VALIDATION_ERROR", "LIMIT_EXCEEDED"
resp.portal_status.error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :portal_id (required, String)

    The ID of the portal to update.

  • :portal_name (required, String)

    A new friendly name for the portal.

  • :portal_description (String)

    A new description for the portal.

  • :portal_contact_email (required, String)

    The Amazon Web Services administrator's contact email address.

  • :portal_logo_image (Types::Image)

    Contains an image that is one of the following:

    • An image file. Choose this option to upload a new image.

    • The ID of an existing image. Choose this option to keep an existing image.

  • :role_arn (required, String)

    The ARN of a service role that allows the portal's users to access your IoT SiteWise resources on your behalf. For more information, see Using service roles for IoT SiteWise Monitor in the IoT SiteWise User Guide.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :notification_sender_email (String)

    The email address that sends alarm notifications.

  • :alarms (Types::Alarms)

    Contains the configuration information of an alarm created in an IoT SiteWise Monitor portal. You can use the alarm to monitor an asset property and get notified when the asset property value is outside a specified range. For more information, see Monitoring with alarms in the IoT SiteWise Application Guide.

Returns:



4373
4374
4375
4376
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4373

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

#update_project(params = {}) ⇒ Struct

Updates an IoT SiteWise Monitor project.

Examples:

Request syntax with placeholder values


resp = client.update_project({
  project_id: "ID", # required
  project_name: "Name", # required
  project_description: "Description",
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :project_id (required, String)

    The ID of the project to update.

  • :project_name (required, String)

    A new friendly name for the project.

  • :project_description (String)

    A new description for the project.

  • :client_token (String)

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

  • (Struct)

    Returns an empty response.



4410
4411
4412
4413
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4410

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

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

  • It is successful
  • It enters a terminal state
  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
asset_active #describe_asset 3 20
asset_model_active #describe_asset_model 3 20
asset_model_not_exists #describe_asset_model 3 20
asset_not_exists #describe_asset 3 20
portal_active #describe_portal 3 20
portal_not_exists #describe_portal 3 20

Parameters:

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

    ({})

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

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.



4525
4526
4527
4528
4529
# File 'gems/aws-sdk-iotsitewise/lib/aws-sdk-iotsitewise/client.rb', line 4525

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end