You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::IoTSiteWise::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

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

iotsitewise = Aws::IoTSiteWise::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

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

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::IoTSiteWise::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::IoTSiteWise::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

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

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    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. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :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 and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :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. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#associate_assets(options = {}) ⇒ 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 AWS 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",
})

Options Hash (options):

  • :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 AWS IoT SiteWise User Guide.

  • :child_asset_id (required, String)

    The ID of the child asset to be associated.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

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

Associates a group (batch) of assets with an AWS 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

Options Hash (options):

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

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

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

Disassociates a group (batch) of assets from an AWS 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

Options Hash (options):

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

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

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

Sends a list of asset property values to AWS IoT SiteWise. Each value is a timestamp-quality-value (TQV) data point. For more information, see Ingesting data using the API in the AWS 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, AWS IoT SiteWise accepts only TQVs that have a timestamp of no more than 15 minutes in the past and no more than 5 minutes in the future. AWS IoT SiteWise rejects timestamps outside of the inclusive range of [-15, +5] minutes and returns a TimestampOutOfRangeException error.

For each asset property, AWS 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.

AWS IoT SiteWise authorizes access to each BatchPutAssetPropertyValue entry individually. For more information, see BatchPutAssetPropertyValue authorization in the AWS 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

Options Hash (options):

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

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

Creates an access policy that grants the specified identity (AWS SSO user, AWS SSO group, or IAM user) access to the specified AWS 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
    },
  },
  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

Options Hash (options):

  • :access_policy_identity (required, Types::Identity)

    The identity for this access policy. Choose an AWS SSO user, an AWS SSO group, or an IAM user.

  • :access_policy_resource (required, Types::Resource)

    The AWS 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)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

  • :tags (Hash<String,String>)

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

Returns:

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

Creates an asset from an existing asset model. For more information, see Creating assets in the AWS 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

Options Hash (options):

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

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

  • :tags (Hash<String,String>)

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

Returns:

#create_asset_model(options = {}) ⇒ 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 AWS 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
      unit: "PropertyUnit",
      type: { # required
        attribute: {
          default_value: "DefaultValue",
        },
        measurement: {
        },
        transform: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
        },
        metric: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
          window: { # required
            tumbling: {
              interval: "Interval", # required
            },
          },
        },
      },
    },
  ],
  asset_model_hierarchies: [
    {
      name: "Name", # required
      child_asset_model_id: "ID", # required
    },
  ],
  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

Options Hash (options):

  • :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 AWS IoT SiteWise User Guide.

    You can specify up to 200 properties per asset model. For more information, see Quotas in the AWS 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 AWS IoT SiteWise User Guide.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

  • :tags (Hash<String,String>)

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

Returns:

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

Creates a dashboard in an AWS 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

Options Hash (options):

  • :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 AWS IoT SiteWise User Guide.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

  • :tags (Hash<String,String>)

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

Returns:

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

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

Examples:

Request syntax with placeholder values


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

Response structure


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

Options Hash (options):

  • :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 AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide.

Returns:

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

Creates a portal, which can contain projects and dashboards. AWS IoT SiteWise Monitor uses AWS 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 AWS 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
})

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

Options Hash (options):

  • :portal_name (required, String)

    A friendly name for the portal.

  • :portal_description (String)

    A description for the portal.

  • :portal_contact_email (required, String)

    The AWS administrator\'s contact email address.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

  • :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 AWS IoT SiteWise resources on your behalf. For more information, see Using service roles for AWS IoT SiteWise Monitor in the AWS 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 AWS IoT SiteWise resources in the AWS 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 AWS Single Sign-On to authenticate users and manage user permissions. Before you can create a portal that uses AWS SSO, you must enable AWS SSO. For more information, see Enabling AWS SSO in the AWS IoT SiteWise User Guide. This option is only available in AWS Regions other than the China Regions.

    • IAM – The portal uses AWS Identity and Access Management (IAM) to authenticate users and manage user permissions. IAM users must have the iotsitewise:CreatePresignedPortalUrl permission to sign in to the portal. This option is only available in the China Regions.

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

    Default: SSO

Returns:

#create_presigned_portal_url(options = {}) ⇒ Types::CreatePresignedPortalUrlResponse

Creates a pre-signed URL to a portal. Use this operation to create URLs to portals that use AWS Identity and Access Management (IAM) to authenticate users. An IAM user with access to a portal can call this API to get a URL to that portal. The URL contains a session token that lets the IAM user access the portal.

Examples:

Request syntax with placeholder values


resp = client.create_presigned_portal_url({
  portal_id: "ID", # required
  session_duration_seconds: 1,
})

Response structure


resp.presigned_portal_url #=> String

Options Hash (options):

  • :portal_id (required, String)

    The ID of the portal to access.

  • :session_duration_seconds (Integer)

    The duration (in seconds) for which the session at the URL is valid.

    Default: 900 seconds (15 minutes)

Returns:

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

Creates a project in the specified portal.

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

Options Hash (options):

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

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

  • :tags (Hash<String,String>)

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

Returns:

#delete_access_policy(options = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :access_policy_id (required, String)

    The ID of the access policy to be deleted.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

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

Deletes an asset. This action can't be undone. For more information, see Deleting assets and models in the AWS 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

Options Hash (options):

  • :asset_id (required, String)

    The ID of the asset to delete.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

#delete_asset_model(options = {}) ⇒ 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 AWS 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

Options Hash (options):

  • :asset_model_id (required, String)

    The ID of the asset model to delete.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

#delete_dashboard(options = {}) ⇒ Struct

Deletes a dashboard from AWS IoT SiteWise Monitor.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :dashboard_id (required, String)

    The ID of the dashboard to delete.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

#delete_gateway(options = {}) ⇒ Struct

Deletes a gateway from AWS 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
})

Options Hash (options):

  • :gateway_id (required, String)

    The ID of the gateway to delete.

Returns:

  • (Struct)

    Returns an empty response.

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

Deletes a portal from AWS 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

Options Hash (options):

  • :portal_id (required, String)

    The ID of the portal to delete.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

#delete_project(options = {}) ⇒ Struct

Deletes a project from AWS IoT SiteWise Monitor.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :project_id (required, String)

    The ID of the project.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

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

Describes an access policy, which specifies an identity's access to an AWS 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_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

Options Hash (options):

  • :access_policy_id (required, String)

    The ID of the access policy.

Returns:

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

Retrieves information about an asset.

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"
resp.asset_properties[0].unit #=> String
resp.asset_hierarchies #=> Array
resp.asset_hierarchies[0].id #=> String
resp.asset_hierarchies[0].name #=> 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

Options Hash (options):

  • :asset_id (required, String)

    The ID of the asset.

Returns:

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

Retrieves information about an asset model.

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"
resp.asset_model_properties[0].unit #=> String
resp.asset_model_properties[0].type.attribute.default_value #=> String
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.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_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_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

Options Hash (options):

  • :asset_model_id (required, String)

    The ID of the asset model.

Returns:

#describe_asset_property(options = {}) ⇒ 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"
resp.asset_property.unit #=> String
resp.asset_property.type.attribute.default_value #=> String
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.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

Options Hash (options):

  • :asset_id (required, String)

    The ID of the asset.

  • :property_id (required, String)

    The ID of the asset property.

Returns:

#describe_dashboard(options = {}) ⇒ 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

Options Hash (options):

  • :dashboard_id (required, String)

    The ID of the dashboard.

Returns:

#describe_gateway(options = {}) ⇒ 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_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"
resp.creation_date #=> Time
resp.last_update_date #=> Time

Options Hash (options):

  • :gateway_id (required, String)

    The ID of the gateway device.

Returns:

#describe_gateway_capability_configuration(options = {}) ⇒ 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 AWS 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"

Options Hash (options):

  • :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 AWS IoT SiteWise console, your OPC-UA capability configuration has the namespace iotsitewise:opcuacollector:version, where version is a number such as 1.

Returns:

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

Retrieves the current AWS IoT SiteWise logging options.

Examples:

Request syntax with placeholder values


resp = client.describe_logging_options()

Response structure


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

Returns:

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

Retrieves information about a portal.

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"

Options Hash (options):

  • :portal_id (required, String)

    The ID of the portal.

Returns:

#describe_project(options = {}) ⇒ 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

Options Hash (options):

  • :project_id (required, String)

    The ID of the project.

Returns:

#disassociate_assets(options = {}) ⇒ 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",
})

Options Hash (options):

  • :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 AWS IoT SiteWise User Guide.

  • :child_asset_id (required, String)

    The ID of the child asset to disassociate.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

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

Gets aggregated values for an asset property. For more information, see Querying aggregates in the AWS 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_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

Options Hash (options):

  • :asset_id (String)

    The ID of the asset.

  • :property_id (String)

    The ID of the asset property.

  • :property_alias (String)

    The property 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 AWS 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)

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

  • :end_date (required, Time)

    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 be returned per paginated request.

    Default: 100

Returns:

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

Gets an asset property's current value. For more information, see Querying current values in the AWS 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 #=> true/false
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"

Options Hash (options):

  • :asset_id (String)

    The ID of the asset.

  • :property_id (String)

    The ID of the asset property.

  • :property_alias (String)

    The property 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 AWS IoT SiteWise User Guide.

Returns:

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

Gets the history of an asset property's values. For more information, see Querying historical values in the AWS 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_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 #=> true/false
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

Options Hash (options):

  • :asset_id (String)

    The ID of the asset.

  • :property_id (String)

    The ID of the asset property.

  • :property_alias (String)

    The property 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 AWS IoT SiteWise User Guide.

  • :start_date (Time)

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

  • :end_date (Time)

    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 be returned per paginated request.

    Default: 100

Returns:

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

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

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

Options Hash (options):

  • :identity_type (String)

    The type of identity (AWS SSO user, AWS 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 be returned per paginated request.

    Default: 50

Returns:

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

Retrieves a paginated list of summaries of all asset models.

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.next_token #=> String

Options Hash (options):

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to be returned per paginated request.

    Default: 50

Returns:

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

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].hierarchies #=> Array
resp.asset_summaries[0].hierarchies[0].id #=> String
resp.asset_summaries[0].hierarchies[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to be returned per 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:

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

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].hierarchies #=> Array
resp.asset_summaries[0].hierarchies[0].id #=> String
resp.asset_summaries[0].hierarchies[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :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 AWS 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 be returned per paginated request.

    Default: 50

Returns:

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

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

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

Options Hash (options):

  • :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 be returned per paginated request.

    Default: 50

Returns:

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

Retrieves a paginated list of gateways.

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_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"
resp.gateway_summaries[0].creation_date #=> Time
resp.gateway_summaries[0].last_update_date #=> Time
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to be returned per paginated request.

    Default: 50

Returns:

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

Retrieves a paginated list of AWS IoT SiteWise Monitor portals.

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

Options Hash (options):

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of results to be returned per paginated request.

    Default: 50

Returns:

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

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

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

Options Hash (options):

  • :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 be returned per paginated request.

    Default: 50

Returns:

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

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

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

Options Hash (options):

  • :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 be returned per paginated request.

    Default: 50

Returns:

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

Retrieves the list of tags for an AWS 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

Options Hash (options):

  • :resource_arn (required, String)

    The ARN of the resource.

Returns:

#put_logging_options(options = {}) ⇒ Struct

Sets logging options for AWS IoT SiteWise.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

Returns:

  • (Struct)

    Returns an empty response.

#tag_resource(options = {}) ⇒ Struct

Adds tags to an AWS 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",
  },
})

Options Hash (options):

  • :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 AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide.

Returns:

  • (Struct)

    Returns an empty response.

#untag_resource(options = {}) ⇒ Struct

Removes a tag from an AWS IoT SiteWise resource.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

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

#update_access_policy(options = {}) ⇒ Struct

Updates an existing access policy that specifies an identity's access to an AWS 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
    },
  },
  access_policy_resource: { # required
    portal: {
      id: "ID", # required
    },
    project: {
      id: "ID", # required
    },
  },
  access_policy_permission: "ADMINISTRATOR", # required, accepts ADMINISTRATOR, VIEWER
  client_token: "ClientToken",
})

Options Hash (options):

  • :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 AWS SSO user, an AWS SSO group, or an IAM user.

  • :access_policy_resource (required, Types::Resource)

    The AWS 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)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

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

Updates an asset's name. For more information, see Updating assets and models in the AWS 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

Options Hash (options):

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

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

#update_asset_model(options = {}) ⇒ 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 AWS 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, AWS IoT SiteWise deletes all previous data for that property. If you remove a hierarchy definition from an asset model, AWS 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
      unit: "PropertyUnit",
      type: { # required
        attribute: {
          default_value: "DefaultValue",
        },
        measurement: {
        },
        transform: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
        },
        metric: {
          expression: "Expression", # required
          variables: [ # required
            {
              name: "VariableName", # required
              value: { # required
                property_id: "Macro", # required
                hierarchy_id: "Macro",
              },
            },
          ],
          window: { # required
            tumbling: {
              interval: "Interval", # required
            },
          },
        },
      },
    },
  ],
  asset_model_hierarchies: [
    {
      id: "ID",
      name: "Name", # required
      child_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

Options Hash (options):

  • :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 AWS IoT SiteWise User Guide.

    You can specify up to 200 properties per asset model. For more information, see Quotas in the AWS 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 AWS IoT SiteWise User Guide.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

#update_asset_property(options = {}) ⇒ 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",
})

Options Hash (options):

  • :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 property 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 AWS 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, AWS IoT SiteWise publishes property value updates to a unique MQTT topic. For more information, see Interacting with other services in the AWS IoT SiteWise User Guide.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

#update_dashboard(options = {}) ⇒ Struct

Updates an AWS 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",
})

Options Hash (options):

  • :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 AWS IoT SiteWise User Guide.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

#update_gateway(options = {}) ⇒ Struct

Updates a gateway's name.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

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

#update_gateway_capability_configuration(options = {}) ⇒ 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 AWS 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"

Options Hash (options):

  • :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 AWS 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 AWS IoT SiteWise User Guide.

Returns:

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

Updates an AWS 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",
})

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

Options Hash (options):

  • :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 AWS 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 AWS IoT SiteWise resources on your behalf. For more information, see Using service roles for AWS IoT SiteWise Monitor in the AWS IoT SiteWise User Guide.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

#update_project(options = {}) ⇒ Struct

Updates an AWS 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",
})

Options Hash (options):

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

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. 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.

Returns:

  • (Struct)

    Returns an empty response.

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

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

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

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

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(...) do |w|

  # disable max attempts
  w.max_attempts = nil

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

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

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

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

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

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

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.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:
:asset_active#describe_asset320
:asset_model_active#describe_asset_model320
:asset_model_not_exists#describe_asset_model320
:asset_not_exists#describe_asset320
:portal_active#describe_portal320
:portal_not_exists#describe_portal320

Returns:

  • (Array<Symbol>)

    the list of supported waiters.