Class: Aws::IoT::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
ClientStubs
Defined in:
lib/aws-sdk-iot/client.rb

Overview

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

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

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

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

  • :credentials (required, Aws::CredentialProvider)

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

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

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

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

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

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

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

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

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

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

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

    • Aws.config`

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

    • ENV, ENV, ENV, and ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

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

  • :region (required, String)

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

  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

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

  • :client_side_monitoring (Boolean) — default: false

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

  • :client_side_monitoring_client_id (String) — default: ""

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

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

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

  • :client_side_monitoring_port (Integer) — default: 31000

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

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

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

  • :convert_params (Boolean) — default: true

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

  • :correct_clock_skew (Boolean) — default: true

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

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

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

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

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

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

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

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

  • :ignore_configured_endpoint_urls (Boolean)

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

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

    The log formatter.

  • :log_level (Symbol) — default: :info

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

  • :logger (Logger)

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

  • :max_attempts (Integer) — default: 3

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

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

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

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

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

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

  • :retry_limit (Integer) — default: 3

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

  • :retry_max_delay (Integer) — default: 0

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

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

    Specifies which retry algorithm to use. Values are:

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

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

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

  • :sdk_ua_app_id (String)

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

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

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

  • :stub_responses (Boolean) — default: false

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

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

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

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

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

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

  • :token_provider (Aws::TokenProvider)

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

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

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

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

  • :use_dualstack_endpoint (Boolean)

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

  • :use_fips_endpoint (Boolean)

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

  • :validate_params (Boolean) — default: true

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

  • :endpoint_provider (Aws::IoT::EndpointProvider)

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

  • :http_continue_timeout (Float) — default: 1

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

  • :http_idle_timeout (Float) — default: 5

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

  • :http_open_timeout (Float) — default: 15

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_read_timeout (Float) — default: 60

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

  • :http_wire_trace (Boolean) — default: false

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

  • :on_chunk_received (Proc)

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

  • :on_chunk_sent (Proc)

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

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

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

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

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



444
445
446
# File 'lib/aws-sdk-iot/client.rb', line 444

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

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



16352
16353
16354
# File 'lib/aws-sdk-iot/client.rb', line 16352

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

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



16355
16356
16357
# File 'lib/aws-sdk-iot/client.rb', line 16355

def errors_module
  Errors
end

Instance Method Details

#accept_certificate_transfer(params = {}) ⇒ Struct

Accepts a pending certificate transfer. The default state of the certificate is INACTIVE.

To check for pending certificate transfers, call ListCertificates to enumerate your certificates.

Requires permission to access the [AcceptCertificateTransfer] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.accept_certificate_transfer({
  certificate_id: "CertificateId", # required
  set_as_active: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

  • :set_as_active (Boolean)

    Specifies whether the certificate is active.

Returns:

  • (Struct)

    Returns an empty response.



481
482
483
484
# File 'lib/aws-sdk-iot/client.rb', line 481

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

#add_thing_to_billing_group(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.add_thing_to_billing_group({
  billing_group_name: "BillingGroupName",
  billing_group_arn: "BillingGroupArn",
  thing_name: "ThingName",
  thing_arn: "ThingArn",
})

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (String)

    The name of the billing group.

    <note markdown=“1”> This call is asynchronous. It might take several seconds for the detachment to propagate.

    </note>
    
  • :billing_group_arn (String)

    The ARN of the billing group.

  • :thing_name (String)

    The name of the thing to be added to the billing group.

  • :thing_arn (String)

    The ARN of the thing to be added to the billing group.

Returns:

  • (Struct)

    Returns an empty response.



524
525
526
527
# File 'lib/aws-sdk-iot/client.rb', line 524

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

#add_thing_to_thing_group(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.add_thing_to_thing_group({
  thing_group_name: "ThingGroupName",
  thing_group_arn: "ThingGroupArn",
  thing_name: "ThingName",
  thing_arn: "ThingArn",
  override_dynamic_groups: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (String)

    The name of the group to which you are adding a thing.

  • :thing_group_arn (String)

    The ARN of the group to which you are adding a thing.

  • :thing_name (String)

    The name of the thing to add to a group.

  • :thing_arn (String)

    The ARN of the thing to add to a group.

  • :override_dynamic_groups (Boolean)

    Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

Returns:

  • (Struct)

    Returns an empty response.



569
570
571
572
# File 'lib/aws-sdk-iot/client.rb', line 569

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

#associate_sbom_with_package_version(params = {}) ⇒ Types::AssociateSbomWithPackageVersionResponse

Associates the selected software bill of materials (SBOM) with a specific software package version.

Requires permission to access the [AssociateSbomWithPackageVersion] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.associate_sbom_with_package_version({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
  sbom: { # required
    s3_location: {
      bucket: "S3Bucket",
      key: "S3Key",
      version: "S3Version",
    },
  },
  client_token: "ClientToken",
})

Response structure


resp.package_name #=> String
resp.version_name #=> String
resp.sbom.s3_location.bucket #=> String
resp.sbom.s3_location.key #=> String
resp.sbom.s3_location.version #=> String
resp.sbom_validation_status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the new software package.

  • :version_name (required, String)

    The name of the new package version.

  • :sbom (required, Types::Sbom)

    A specific software bill of matrerials associated with a software package version.

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



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

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

#associate_targets_with_job(params = {}) ⇒ Types::AssociateTargetsWithJobResponse

Associates a group with a continuous job. The following criteria must be met:

  • The job must have been created with the ‘targetSelection` field set to “CONTINUOUS”.

  • The job status must currently be “IN_PROGRESS”.

  • The total number of targets associated with a job must not exceed 100.

Requires permission to access the [AssociateTargetsWithJob] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.associate_targets_with_job({
  targets: ["TargetArn"], # required
  job_id: "JobId", # required
  comment: "Comment",
  namespace_id: "NamespaceId",
})

Response structure


resp.job_arn #=> String
resp.job_id #=> String
resp.description #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :targets (required, Array<String>)

    A list of thing group ARNs that define the targets of the job.

  • :job_id (required, String)

    The unique identifier you assigned to this job when it was created.

  • :comment (String)

    An optional comment string describing why the job was associated with the targets.

  • :namespace_id (String)

    The namespace used to indicate that a job is a customer-managed job.

    When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

    ‘$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/`

    <note markdown=“1”> The ‘namespaceId` feature is only supported by IoT Greengrass at this time. For more information, see [Setting up IoT Greengrass core devices.]

    </note>
    

    [1]: docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html

Returns:



709
710
711
712
# File 'lib/aws-sdk-iot/client.rb', line 709

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

#attach_policy(params = {}) ⇒ Struct

Attaches the specified policy to the specified principal (certificate or other credential).

Requires permission to access the [AttachPolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.attach_policy({
  policy_name: "PolicyName", # required
  target: "PolicyTarget", # required
})

Parameters:

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

    ({})

Options Hash (params):

Returns:

  • (Struct)

    Returns an empty response.



745
746
747
748
# File 'lib/aws-sdk-iot/client.rb', line 745

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

#attach_principal_policy(params = {}) ⇒ Struct

Attaches the specified policy to the specified principal (certificate or other credential).

Note: This action is deprecated and works as expected for backward compatibility, but we won’t add enhancements. Use AttachPolicy instead.

Requires permission to access the [AttachPrincipalPolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.attach_principal_policy({
  policy_name: "PolicyName", # required
  principal: "Principal", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

  • :principal (required, String)

    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.

Returns:

  • (Struct)

    Returns an empty response.



781
782
783
784
# File 'lib/aws-sdk-iot/client.rb', line 781

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

#attach_security_profile(params = {}) ⇒ Struct

Associates a Device Defender security profile with a thing group or this account. Each thing group or account can have up to five security profiles associated with it.

Requires permission to access the [AttachSecurityProfile] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.attach_security_profile({
  security_profile_name: "SecurityProfileName", # required
  security_profile_target_arn: "SecurityProfileTargetArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The security profile that is attached.

  • :security_profile_target_arn (required, String)

    The ARN of the target (thing group) to which the security profile is attached.

Returns:

  • (Struct)

    Returns an empty response.



814
815
816
817
# File 'lib/aws-sdk-iot/client.rb', line 814

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

#attach_thing_principal(params = {}) ⇒ Struct

Attaches the specified principal to the specified thing. A principal can be X.509 certificates, Amazon Cognito identities or federated identities.

Requires permission to access the [AttachThingPrincipal] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.attach_thing_principal({
  thing_name: "ThingName", # required
  principal: "Principal", # required
  thing_principal_type: "EXCLUSIVE_THING", # accepts EXCLUSIVE_THING, NON_EXCLUSIVE_THING
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing.

  • :principal (required, String)

    The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.

  • :thing_principal_type (String)

    The type of the relation you want to specify when you attach a principal to a thing.

    • ‘EXCLUSIVE_THING` - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.

    ^ ^

    • ‘NON_EXCLUSIVE_THING` - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.

    ^

Returns:

  • (Struct)

    Returns an empty response.



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

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

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

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

Parameters:

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


16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
# File 'lib/aws-sdk-iot/client.rb', line 16325

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::IoT')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-iot'
  context[:gem_version] = '1.140.0'
  Seahorse::Client::Request.new(handlers, context)
end

#cancel_audit_mitigation_actions_task(params = {}) ⇒ Struct

Cancels a mitigation action task that is in progress. If the task is not in progress, an InvalidRequestException occurs.

Requires permission to access the

CancelAuditMitigationActionsTask][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.cancel_audit_mitigation_actions_task({
  task_id: "MitigationActionsTaskId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier for the task that you want to cancel.

Returns:

  • (Struct)

    Returns an empty response.



892
893
894
895
# File 'lib/aws-sdk-iot/client.rb', line 892

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

#cancel_audit_task(params = {}) ⇒ Struct

Cancels an audit that is in progress. The audit can be either scheduled or on demand. If the audit isn’t in progress, an “InvalidRequestException” occurs.

Requires permission to access the [CancelAuditTask] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.cancel_audit_task({
  task_id: "AuditTaskId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The ID of the audit you want to cancel. You can only cancel an audit that is “IN_PROGRESS”.

Returns:

  • (Struct)

    Returns an empty response.



921
922
923
924
# File 'lib/aws-sdk-iot/client.rb', line 921

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

#cancel_certificate_transfer(params = {}) ⇒ Struct

Cancels a pending transfer for the specified certificate.

Note Only the transfer source account can use this operation to cancel a transfer. (Transfer destinations can use RejectCertificateTransfer instead.) After transfer, IoT returns the certificate to the source account in the INACTIVE state. After the destination account has accepted the transfer, the transfer cannot be cancelled.

After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.

Requires permission to access the [CancelCertificateTransfer] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.cancel_certificate_transfer({
  certificate_id: "CertificateId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

Returns:

  • (Struct)

    Returns an empty response.



959
960
961
962
# File 'lib/aws-sdk-iot/client.rb', line 959

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

#cancel_detect_mitigation_actions_task(params = {}) ⇒ Struct

Cancels a Device Defender ML Detect mitigation action.

Requires permission to access the

CancelDetectMitigationActionsTask][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.cancel_detect_mitigation_actions_task({
  task_id: "MitigationActionsTaskId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier of the task.

Returns:

  • (Struct)

    Returns an empty response.



986
987
988
989
# File 'lib/aws-sdk-iot/client.rb', line 986

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

#cancel_job(params = {}) ⇒ Types::CancelJobResponse

Examples:

Request syntax with placeholder values


resp = client.cancel_job({
  job_id: "JobId", # required
  reason_code: "ReasonCode",
  comment: "Comment",
  force: false,
})

Response structure


resp.job_arn #=> String
resp.job_id #=> String
resp.description #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The unique identifier you assigned to this job when it was created.

  • :reason_code (String) — default: Optional

    A reason code string that explains why the job was canceled.

  • :comment (String)

    An optional comment string describing why the job was canceled.

  • :force (Boolean) — default: Optional

    If ‘true` job executions with status “IN_PROGRESS” and “QUEUED” are canceled, otherwise only job executions with status “QUEUED” are canceled. The default is `false`.

    Canceling a job which is “IN_PROGRESS”, will cause a device which is executing the job to be unable to update the job execution status. Use caution and ensure that each device executing a job which is canceled is able to recover to a valid state.

Returns:



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

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

#cancel_job_execution(params = {}) ⇒ Struct

Cancels the execution of a job for a given thing.

Requires permission to access the [CancelJobExecution] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.cancel_job_execution({
  job_id: "JobId", # required
  thing_name: "ThingName", # required
  force: false,
  expected_version: 1,
  status_details: {
    "DetailsKey" => "DetailsValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The ID of the job to be canceled.

  • :thing_name (required, String)

    The name of the thing whose execution of the job will be canceled.

  • :force (Boolean) — default: Optional

    If ‘true` the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set `force` to `true`, then an `InvalidStateTransitionException` will be thrown. The default is `false`.

    Canceling a job execution which is “IN_PROGRESS”, will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

  • :expected_version (Integer) — default: Optional

    The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)

  • :status_details (Hash<String,String>)

    A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.

Returns:

  • (Struct)

    Returns an empty response.



1102
1103
1104
1105
# File 'lib/aws-sdk-iot/client.rb', line 1102

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

#clear_default_authorizer(params = {}) ⇒ Struct

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.



1119
1120
1121
1122
# File 'lib/aws-sdk-iot/client.rb', line 1119

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

#confirm_topic_rule_destination(params = {}) ⇒ Struct

Confirms a topic rule destination. When you create a rule requiring a destination, IoT sends a confirmation message to the endpoint or base address you specify. The message includes a token which you pass back when calling ‘ConfirmTopicRuleDestination` to confirm that you own or have access to the endpoint.

Requires permission to access the [ConfirmTopicRuleDestination] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.confirm_topic_rule_destination({
  confirmation_token: "ConfirmationToken", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :confirmation_token (required, String)

    The token used to confirm ownership or access to the topic rule confirmation URL.

Returns:

  • (Struct)

    Returns an empty response.



1151
1152
1153
1154
# File 'lib/aws-sdk-iot/client.rb', line 1151

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

#create_audit_suppression(params = {}) ⇒ Struct

Creates a Device Defender audit suppression.

Requires permission to access the [CreateAuditSuppression] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_audit_suppression({
  check_name: "AuditCheckName", # required
  resource_identifier: { # required
    device_certificate_id: "CertificateId",
    ca_certificate_id: "CertificateId",
    cognito_identity_pool_id: "CognitoIdentityPoolId",
    client_id: "ClientId",
    policy_version_identifier: {
      policy_name: "PolicyName",
      policy_version_id: "PolicyVersionId",
    },
    account: "AwsAccountId",
    iam_role_arn: "RoleArn",
    role_alias_arn: "RoleAliasArn",
    issuer_certificate_identifier: {
      issuer_certificate_subject: "IssuerCertificateSubject",
      issuer_id: "IssuerId",
      issuer_certificate_serial_number: "IssuerCertificateSerialNumber",
    },
    device_certificate_arn: "CertificateArn",
  },
  expiration_date: Time.now,
  suppress_indefinitely: false,
  description: "AuditDescription",
  client_request_token: "ClientRequestToken", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (required, String)

    An audit check name. Checks must be enabled for your account. (Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)

  • :resource_identifier (required, Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

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

    The epoch timestamp in seconds at which this suppression expires.

  • :suppress_indefinitely (Boolean)

    Indicates whether a suppression should exist indefinitely or not.

  • :description (String)

    The description of the audit suppression.

  • :client_request_token (required, String)

    Each audit supression must have a unique client request token. If you try to create a new audit suppression with the same token as one that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

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

Returns:

  • (Struct)

    Returns an empty response.



1224
1225
1226
1227
# File 'lib/aws-sdk-iot/client.rb', line 1224

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

#create_authorizer(params = {}) ⇒ Types::CreateAuthorizerResponse

Examples:

Request syntax with placeholder values


resp = client.create_authorizer({
  authorizer_name: "AuthorizerName", # required
  authorizer_function_arn: "AuthorizerFunctionArn", # required
  token_key_name: "TokenKeyName",
  token_signing_public_keys: {
    "KeyName" => "KeyValue",
  },
  status: "ACTIVE", # accepts ACTIVE, INACTIVE
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  signing_disabled: false,
  enable_caching_for_http: false,
})

Response structure


resp.authorizer_name #=> String
resp.authorizer_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The authorizer name.

  • :authorizer_function_arn (required, String)

    The ARN of the authorizer’s Lambda function.

  • :token_key_name (String)

    The name of the token key used to extract the token from the HTTP headers.

  • :token_signing_public_keys (Hash<String,String>)

    The public keys used to verify the digital signature returned by your custom authentication service.

  • :status (String)

    The status of the create authorizer request.

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

    Metadata which can be used to manage the custom authorizer.

    <note markdown=“1”> For URI Request parameters use format: …key1=value1&amp;key2=value2…

    For the CLI command-line parameter use format: &amp;&amp;tags
    

    “key1=value1&amp;key2=value2…”

    For the cli-input-json file use format: "tags":
    

    “key1=value1&amp;key2=value2…”

    </note>
    
  • :signing_disabled (Boolean)

    Specifies whether IoT validates the token signature in an authorization request.

  • :enable_caching_for_http (Boolean)

    When ‘true`, the result from the authorizer’s Lambda function is cached for clients that use persistent HTTP connections. The results are cached for the time specified by the Lambda function in `refreshAfterInSeconds`. This value does not affect authorization of clients that use MQTT connections.

    The default value is ‘false`.

Returns:



1313
1314
1315
1316
# File 'lib/aws-sdk-iot/client.rb', line 1313

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

#create_billing_group(params = {}) ⇒ Types::CreateBillingGroupResponse

Creates a billing group. If this call is made multiple times using the same billing group name and configuration, the call will succeed. If this call is made with the same billing group name but different configuration a ‘ResourceAlreadyExistsException` is thrown.

Requires permission to access the [CreateBillingGroup] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_billing_group({
  billing_group_name: "BillingGroupName", # required
  billing_group_properties: {
    billing_group_description: "BillingGroupDescription",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.billing_group_name #=> String
resp.billing_group_arn #=> String
resp.billing_group_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name you wish to give to the billing group.

  • :billing_group_properties (Types::BillingGroupProperties)

    The properties of the billing group.

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

    Metadata which can be used to manage the billing group.

Returns:



1367
1368
1369
1370
# File 'lib/aws-sdk-iot/client.rb', line 1367

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

#create_certificate_from_csr(params = {}) ⇒ Types::CreateCertificateFromCsrResponse

Creates an X.509 certificate using the specified certificate signing request.

Requires permission to access the [CreateCertificateFromCsr] action.

<note markdown=“1”> The CSR must include a public key that is either an RSA key with a length of at least 2048 bits or an ECC key from NIST P-256, NIST P-384, or NIST P-521 curves. For supported certificates, consult [ Certificate signing algorithms supported by IoT].

</note>

<note markdown=“1”> Reusing the same certificate signing request (CSR) results in a distinct certificate.

</note>

You can create multiple certificates in a batch by creating a directory, copying multiple ‘.csr` files into that directory, and then specifying that directory on the command line. The following commands show how to create a batch of certificates given a batch of CSRs. In the following commands, we assume that a set of CSRs are located inside of the directory my-csr-directory:

On Linux and OS X, the command is:

‘$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr –certificate-signing-request file://my-csr-directory/{}`

This command lists all of the CSRs in my-csr-directory and pipes each CSR file name to the ‘aws iot create-certificate-from-csr` Amazon Web Services CLI command to create a certificate for the corresponding CSR.

You can also run the ‘aws iot create-certificate-from-csr` part of the command in parallel to speed up the certificate creation process:

‘$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr –certificate-signing-request file://my-csr-directory/{} `

On Windows PowerShell, the command to create certificates for all CSRs in my-csr-directory is:

‘> ls -Name my-csr-directory | %iot create-certificate-from-csr –certificate-signing-request file://my-csr-directory/$_ `

On a Windows command prompt, the command to create certificates for all CSRs in my-csr-directory is:

‘> forfiles /p my-csr-directory /c “cmd /c aws iot create-certificate-from-csr –certificate-signing-request file://@path” `

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-cert-algorithms

Examples:

Request syntax with placeholder values


resp = client.create_certificate_from_csr({
  certificate_signing_request: "CertificateSigningRequest", # required
  set_as_active: false,
})

Response structure


resp.certificate_arn #=> String
resp.certificate_id #=> String
resp.certificate_pem #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_signing_request (required, String)

    The certificate signing request (CSR).

  • :set_as_active (Boolean)

    Specifies whether the certificate is active.

Returns:



1460
1461
1462
1463
# File 'lib/aws-sdk-iot/client.rb', line 1460

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

#create_certificate_provider(params = {}) ⇒ Types::CreateCertificateProviderResponse

Creates an Amazon Web Services IoT Core certificate provider. You can use Amazon Web Services IoT Core certificate provider to customize how to sign a certificate signing request (CSR) in IoT fleet provisioning. For more information, see [Customizing certificate signing using Amazon Web Services IoT Core certificate provider] from *Amazon Web Services IoT Core Developer Guide*.

Requires permission to access the [CreateCertificateProvider] action.

After you create a certificate provider, the behavior of [ ‘CreateCertificateFromCsr` API for fleet provisioning] will change and all API calls to `CreateCertificateFromCsr` will invoke the certificate provider to create the certificates. It can take up to a few minutes for this behavior to change after a certificate provider is created.

[1]: docs.aws.amazon.com/iot/latest/developerguide/provisioning-cert-provider.html [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [3]: docs.aws.amazon.com/iot/latest/developerguide/fleet-provision-api.html#create-cert-csr

Examples:

Request syntax with placeholder values


resp = client.create_certificate_provider({
  certificate_provider_name: "CertificateProviderName", # required
  lambda_function_arn: "CertificateProviderFunctionArn", # required
  account_default_for_operations: ["CreateCertificateFromCsr"], # required, accepts CreateCertificateFromCsr
  client_token: "ClientToken",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.certificate_provider_name #=> String
resp.certificate_provider_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_provider_name (required, String)

    The name of the certificate provider.

  • :lambda_function_arn (required, String)

    The ARN of the Lambda function that defines the authentication logic.

  • :account_default_for_operations (required, Array<String>)

    A list of the operations that the certificate provider will use to generate certificates. Valid value: ‘CreateCertificateFromCsr`.

  • :client_token (String)

    A string that you can optionally pass in the ‘CreateCertificateProvider` request to make sure the request is idempotent.

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

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

    Metadata which can be used to manage the certificate provider.

Returns:



1536
1537
1538
1539
# File 'lib/aws-sdk-iot/client.rb', line 1536

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

#create_command(params = {}) ⇒ Types::CreateCommandResponse

Creates a command. A command contains reusable configurations that can be applied before they are sent to the devices.

Examples:

Request syntax with placeholder values


resp = client.create_command({
  command_id: "CommandId", # required
  namespace: "AWS-IoT", # accepts AWS-IoT, AWS-IoT-FleetWise
  display_name: "DisplayName",
  description: "CommandDescription",
  payload: {
    content: "data",
    content_type: "MimeType",
  },
  mandatory_parameters: [
    {
      name: "CommandParameterName", # required
      value: {
        s: "StringParameterValue",
        b: false,
        i: 1,
        l: 1,
        d: 1.0,
        bin: "data",
        ul: "UnsignedLongParameterValue",
      },
      default_value: {
        s: "StringParameterValue",
        b: false,
        i: 1,
        l: 1,
        d: 1.0,
        bin: "data",
        ul: "UnsignedLongParameterValue",
      },
      description: "CommandParameterDescription",
    },
  ],
  role_arn: "RoleArn",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.command_id #=> String
resp.command_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :command_id (required, String)

    A unique identifier for the command. We recommend using UUID. Alpha-numeric characters, hyphens, and underscores are valid for use here.

  • :namespace (String)

    The namespace of the command. The MQTT reserved topics and validations will be used for command executions according to the namespace setting.

  • :display_name (String)

    The user-friendly name in the console for the command. This name doesn’t have to be unique. You can update the user-friendly name after you define it.

  • :description (String)

    A short text decription of the command.

  • :payload (Types::CommandPayload)

    The payload object for the command. You must specify this information when using the ‘AWS-IoT` namespace.

    You can upload a static payload file from your local storage that contains the instructions for the device to process. The payload file can use any format. To make sure that the device correctly interprets the payload, we recommend you to specify the payload content type.

  • :mandatory_parameters (Array<Types::CommandParameter>)

    A list of parameters that are required by the ‘StartCommandExecution` API. These parameters need to be specified only when using the `AWS-IoT-FleetWise` namespace. You can either specify them here or when running the command using the `StartCommandExecution` API.

  • :role_arn (String)

    The IAM role that allows access to create the command.

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

    Name-value pairs that are used as metadata to manage a command.

Returns:



1639
1640
1641
1642
# File 'lib/aws-sdk-iot/client.rb', line 1639

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

#create_custom_metric(params = {}) ⇒ Types::CreateCustomMetricResponse

Use this API to define a Custom Metric published by your devices to Device Defender.

Requires permission to access the [CreateCustomMetric] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_custom_metric({
  metric_name: "MetricName", # required
  display_name: "CustomMetricDisplayName",
  metric_type: "string-list", # required, accepts string-list, ip-address-list, number-list, number
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  client_request_token: "ClientRequestToken", # required
})

Response structure


resp.metric_name #=> String
resp.metric_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the custom metric. This will be used in the metric report submitted from the device/thing. The name can’t begin with ‘aws:`. You can’t change the name after you define it.

  • :display_name (String)

    The friendly name in the console for the custom metric. This name doesn’t have to be unique. Don’t use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.

  • :metric_type (required, String)

    The type of the custom metric.

    The type ‘number` only takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.

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

    Metadata that can be used to manage the custom metric.

  • :client_request_token (required, String)

    Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

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

Returns:



1710
1711
1712
1713
# File 'lib/aws-sdk-iot/client.rb', line 1710

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

#create_dimension(params = {}) ⇒ Types::CreateDimensionResponse

Create a dimension that you can use to limit the scope of a metric used in a security profile for IoT Device Defender. For example, using a ‘TOPIC_FILTER` dimension, you can narrow down the scope of the metric only to MQTT topics whose name match the pattern specified in the dimension.

Requires permission to access the [CreateDimension] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_dimension({
  name: "DimensionName", # required
  type: "TOPIC_FILTER", # required, accepts TOPIC_FILTER
  string_values: ["DimensionStringValue"], # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  client_request_token: "ClientRequestToken", # required
})

Response structure


resp.name #=> String
resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.

  • :type (required, String)

    Specifies the type of dimension. Supported types: ‘TOPIC_FILTER.`

  • :string_values (required, Array<String>)

    Specifies the value or list of values for the dimension. For ‘TOPIC_FILTER` dimensions, this is a pattern used to match the MQTT topic (for example, “admin/#”).

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

    Metadata that can be used to manage the dimension.

  • :client_request_token (required, String)

    Each dimension must have a unique client request token. If you try to create a new dimension with the same token as a dimension that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

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

Returns:



1778
1779
1780
1781
# File 'lib/aws-sdk-iot/client.rb', line 1778

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

#create_domain_configuration(params = {}) ⇒ Types::CreateDomainConfigurationResponse

Examples:

Request syntax with placeholder values


resp = client.create_domain_configuration({
  domain_configuration_name: "DomainConfigurationName", # required
  domain_name: "DomainName",
  server_certificate_arns: ["AcmCertificateArn"],
  validation_certificate_arn: "AcmCertificateArn",
  authorizer_config: {
    default_authorizer_name: "AuthorizerName",
    allow_authorizer_override: false,
  },
  service_type: "DATA", # accepts DATA, CREDENTIAL_PROVIDER, JOBS
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  tls_config: {
    security_policy: "SecurityPolicy",
  },
  server_certificate_config: {
    enable_ocsp_check: false,
    ocsp_lambda_arn: "OCSPLambdaArn",
    ocsp_authorized_responder_arn: "AcmCertificateArn",
  },
  authentication_type: "CUSTOM_AUTH_X509", # accepts CUSTOM_AUTH_X509, CUSTOM_AUTH, AWS_X509, AWS_SIGV4, DEFAULT
  application_protocol: "SECURE_MQTT", # accepts SECURE_MQTT, MQTT_WSS, HTTPS, DEFAULT
  client_certificate_config: {
    client_certificate_callback_arn: "ClientCertificateCallbackArn",
  },
})

Response structure


resp.domain_configuration_name #=> String
resp.domain_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_configuration_name (required, String)

    The name of the domain configuration. This value must be unique to a region.

  • :domain_name (String)

    The name of the domain.

  • :server_certificate_arns (Array<String>)

    The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains.

  • :validation_certificate_arn (String)

    The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.

  • :authorizer_config (Types::AuthorizerConfig)

    An object that specifies the authorization service for a domain.

  • :service_type (String)

    The type of service delivered by the endpoint.

    <note markdown=“1”> Amazon Web Services IoT Core currently supports only the ‘DATA` service type.

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

    Metadata which can be used to manage the domain configuration.

    <note markdown=“1”> For URI Request parameters use format: …key1=value1&amp;key2=value2…

    For the CLI command-line parameter use format: &amp;&amp;tags
    

    “key1=value1&amp;key2=value2…”

    For the cli-input-json file use format: "tags":
    

    “key1=value1&amp;key2=value2…”

    </note>
    
  • :tls_config (Types::TlsConfig)

    An object that specifies the TLS configuration for a domain.

  • :server_certificate_config (Types::ServerCertificateConfig)

    The server certificate configuration.

  • :authentication_type (String)

    An enumerated string that specifies the authentication type.

    • ‘CUSTOM_AUTH_X509` - Use custom authentication and authorization with additional details from the X.509 client certificate.

    ^ ^

    • ‘CUSTOM_AUTH` - Use custom authentication and authorization. For more information, see [Custom authentication and authorization].

    ^ ^

    • ‘AWS_X509` - Use X.509 client certificates without custom authentication and authorization. For more information, see [X.509 client certificates].

    ^ ^

    • ‘AWS_SIGV4` - Use Amazon Web Services Signature Version 4. For more information, see [IAM users, groups, and roles].

    ^ ^

    • ‘DEFAULT` - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see [Device communication protocols].

    ^

    [1]: docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html [2]: docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html [3]: docs.aws.amazon.com/iot/latest/developerguide/protocols.html

  • :application_protocol (String)

    An enumerated string that specifies the application-layer protocol.

    • ‘SECURE_MQTT` - MQTT over TLS.

    ^ ^

    • ‘MQTT_WSS` - MQTT over WebSocket.

    ^ ^

    • ‘HTTPS` - HTTP over TLS.

    ^ ^

    • ‘DEFAULT` - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol. For more information, see [Device communication protocols].

    ^

    [1]: docs.aws.amazon.com/iot/latest/developerguide/protocols.html

  • :client_certificate_config (Types::ClientCertificateConfig)

    An object that specifies the client certificate configuration for a domain.

Returns:



1958
1959
1960
1961
# File 'lib/aws-sdk-iot/client.rb', line 1958

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

#create_dynamic_thing_group(params = {}) ⇒ Types::CreateDynamicThingGroupResponse

Examples:

Request syntax with placeholder values


resp = client.create_dynamic_thing_group({
  thing_group_name: "ThingGroupName", # required
  thing_group_properties: {
    thing_group_description: "ThingGroupDescription",
    attribute_payload: {
      attributes: {
        "AttributeName" => "AttributeValue",
      },
      merge: false,
    },
  },
  index_name: "IndexName",
  query_string: "QueryString", # required
  query_version: "QueryVersion",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.thing_group_name #=> String
resp.thing_group_arn #=> String
resp.thing_group_id #=> String
resp.index_name #=> String
resp.query_string #=> String
resp.query_version #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The dynamic thing group name to create.

  • :thing_group_properties (Types::ThingGroupProperties)

    The dynamic thing group properties.

  • :index_name (String)

    The dynamic thing group index name.

    <note markdown=“1”> Currently one index is supported: ‘AWS_Things`.

    </note>
    
  • :query_string (required, String)

    The dynamic thing group search query string.

    See [Query Syntax] for information about query string syntax.

    [1]: docs.aws.amazon.com/iot/latest/developerguide/query-syntax.html

  • :query_version (String)

    The dynamic thing group query version.

    <note markdown=“1”> Currently one query version is supported: “2017-09-30”. If not specified, the query version defaults to this value.

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

    Metadata which can be used to manage the dynamic thing group.

Returns:



2048
2049
2050
2051
# File 'lib/aws-sdk-iot/client.rb', line 2048

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

#create_fleet_metric(params = {}) ⇒ Types::CreateFleetMetricResponse

Examples:

Request syntax with placeholder values


resp = client.create_fleet_metric({
  metric_name: "FleetMetricName", # required
  query_string: "QueryString", # required
  aggregation_type: { # required
    name: "Statistics", # required, accepts Statistics, Percentiles, Cardinality
    values: ["AggregationTypeValue"],
  },
  period: 1, # required
  aggregation_field: "AggregationField", # required
  description: "FleetMetricDescription",
  query_version: "QueryVersion",
  index_name: "IndexName",
  unit: "Seconds", # accepts Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.metric_name #=> String
resp.metric_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the fleet metric to create.

  • :query_string (required, String)

    The search query string.

  • :aggregation_type (required, Types::AggregationType)

    The type of the aggregation query.

  • :period (required, Integer)

    The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.

  • :aggregation_field (required, String)

    The field to aggregate.

  • :description (String)

    The fleet metric description.

  • :query_version (String)

    The query version.

  • :index_name (String)

    The name of the index to search.

  • :unit (String)

    Used to support unit transformation such as milliseconds to seconds. The unit must be supported by [CW metric]. Default to null.

    [1]: docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html

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

    Metadata, which can be used to manage the fleet metric.

Returns:



2132
2133
2134
2135
# File 'lib/aws-sdk-iot/client.rb', line 2132

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

#create_job(params = {}) ⇒ Types::CreateJobResponse

Examples:

Request syntax with placeholder values


resp = client.create_job({
  job_id: "JobId", # required
  targets: ["TargetArn"], # required
  document_source: "JobDocumentSource",
  document: "JobDocument",
  description: "JobDescription",
  presigned_url_config: {
    role_arn: "RoleArn",
    expires_in_sec: 1,
  },
  target_selection: "CONTINUOUS", # accepts CONTINUOUS, SNAPSHOT
  job_executions_rollout_config: {
    maximum_per_minute: 1,
    exponential_rate: {
      base_rate_per_minute: 1, # required
      increment_factor: 1.0, # required
      rate_increase_criteria: { # required
        number_of_notified_things: 1,
        number_of_succeeded_things: 1,
      },
    },
  },
  abort_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, REJECTED, TIMED_OUT, ALL
        action: "CANCEL", # required, accepts CANCEL
        threshold_percentage: 1.0, # required
        min_number_of_executed_things: 1, # required
      },
    ],
  },
  timeout_config: {
    in_progress_timeout_in_minutes: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  namespace_id: "NamespaceId",
  job_template_arn: "JobTemplateArn",
  job_executions_retry_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, TIMED_OUT, ALL
        number_of_retries: 1, # required
      },
    ],
  },
  document_parameters: {
    "ParameterKey" => "ParameterValue",
  },
  scheduling_config: {
    start_time: "StringDateTime",
    end_time: "StringDateTime",
    end_behavior: "STOP_ROLLOUT", # accepts STOP_ROLLOUT, CANCEL, FORCE_CANCEL
    maintenance_windows: [
      {
        start_time: "CronExpression", # required
        duration_in_minutes: 1, # required
      },
    ],
  },
  destination_package_versions: ["PackageVersionArn"],
})

Response structure


resp.job_arn #=> String
resp.job_id #=> String
resp.description #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    A job identifier which must be unique for your account. We recommend using a UUID. Alpha-numeric characters, “-” and “_” are valid for use here.

  • :targets (required, Array<String>)

    A list of things and thing groups to which the job should be sent.

  • :document_source (String)

    An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don’t specify a value for ‘document`.

    For example, ‘–document-source s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0`

    For more information, see [Methods for accessing a bucket].

    [1]: docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html

  • :document (String)

    The job document. Required if you don’t specify a value for ‘documentSource`.

  • :description (String)

    A short text description of the job.

  • :presigned_url_config (Types::PresignedUrlConfig)

    Configuration information for pre-signed S3 URLs.

  • :target_selection (String)

    Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

    <note markdown=“1”> We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.

    </note>
    
  • :job_executions_rollout_config (Types::JobExecutionsRolloutConfig)

    Allows you to create a staged rollout of the job.

  • :abort_config (Types::AbortConfig)

    Allows you to create the criteria to abort a job.

  • :timeout_config (Types::TimeoutConfig)

    Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to ‘IN_PROGRESS`. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to `TIMED_OUT`.

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

    Metadata which can be used to manage the job.

  • :namespace_id (String)

    The namespace used to indicate that a job is a customer-managed job.

    When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

    ‘$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/`

    <note markdown=“1”> The ‘namespaceId` feature is only supported by IoT Greengrass at this time. For more information, see [Setting up IoT Greengrass core devices.]

    </note>
    

    [1]: docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html

  • :job_template_arn (String)

    The ARN of the job template used to create the job.

  • :job_executions_retry_config (Types::JobExecutionsRetryConfig)

    Allows you to create the criteria to retry a job.

  • :document_parameters (Hash<String,String>)

    Parameters of an Amazon Web Services managed template that you can specify to create the job document.

    <note markdown=“1”> ‘documentParameters` can only be used when creating jobs from Amazon Web Services managed templates. This parameter can’t be used with custom job templates or to create jobs from them.

    </note>
    
  • :scheduling_config (Types::SchedulingConfig)

    The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.

  • :destination_package_versions (Array<String>)

    The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see [Package version lifecycle].

    **Note:**The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.

    [1]: docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle

Returns:



2345
2346
2347
2348
# File 'lib/aws-sdk-iot/client.rb', line 2345

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

#create_job_template(params = {}) ⇒ Types::CreateJobTemplateResponse

Examples:

Request syntax with placeholder values


resp = client.create_job_template({
  job_template_id: "JobTemplateId", # required
  job_arn: "JobArn",
  document_source: "JobDocumentSource",
  document: "JobDocument",
  description: "JobDescription", # required
  presigned_url_config: {
    role_arn: "RoleArn",
    expires_in_sec: 1,
  },
  job_executions_rollout_config: {
    maximum_per_minute: 1,
    exponential_rate: {
      base_rate_per_minute: 1, # required
      increment_factor: 1.0, # required
      rate_increase_criteria: { # required
        number_of_notified_things: 1,
        number_of_succeeded_things: 1,
      },
    },
  },
  abort_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, REJECTED, TIMED_OUT, ALL
        action: "CANCEL", # required, accepts CANCEL
        threshold_percentage: 1.0, # required
        min_number_of_executed_things: 1, # required
      },
    ],
  },
  timeout_config: {
    in_progress_timeout_in_minutes: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  job_executions_retry_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, TIMED_OUT, ALL
        number_of_retries: 1, # required
      },
    ],
  },
  maintenance_windows: [
    {
      start_time: "CronExpression", # required
      duration_in_minutes: 1, # required
    },
  ],
  destination_package_versions: ["PackageVersionArn"],
})

Response structure


resp.job_template_arn #=> String
resp.job_template_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_template_id (required, String)

    A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, “-”, and “_” are valid for use here.

  • :job_arn (String)

    The ARN of the job to use as the basis for the job template.

  • :document_source (String)

    An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don’t specify a value for ‘document`.

    For example, ‘–document-source s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0`

    For more information, see [Methods for accessing a bucket].

    [1]: docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html

  • :document (String)

    The job document. Required if you don’t specify a value for ‘documentSource`.

  • :description (required, String)

    A description of the job document.

  • :presigned_url_config (Types::PresignedUrlConfig)

    Configuration for pre-signed S3 URLs.

  • :job_executions_rollout_config (Types::JobExecutionsRolloutConfig)

    Allows you to create a staged rollout of a job.

  • :abort_config (Types::AbortConfig)

    The criteria that determine when and how a job abort takes place.

  • :timeout_config (Types::TimeoutConfig)

    Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to ‘IN_PROGRESS`. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to `TIMED_OUT`.

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

    Metadata that can be used to manage the job template.

  • :job_executions_retry_config (Types::JobExecutionsRetryConfig)

    Allows you to create the criteria to retry a job.

  • :maintenance_windows (Array<Types::MaintenanceWindow>)

    Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.

  • :destination_package_versions (Array<String>)

    The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see [Package version lifecycle].

    **Note:**The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.

    [1]: docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle

Returns:



2496
2497
2498
2499
# File 'lib/aws-sdk-iot/client.rb', line 2496

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

#create_keys_and_certificate(params = {}) ⇒ Types::CreateKeysAndCertificateResponse

Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key. You can also call ‘CreateKeysAndCertificate` over MQTT from a device, for more information, see [Provisioning MQTT API].

Note This is the only time IoT issues the private key for this certificate, so it is important to keep it in a secure location.

Requires permission to access the [CreateKeysAndCertificate] action.

[1]: docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#provision-mqtt-api [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_keys_and_certificate({
  set_as_active: false,
})

Response structure


resp.certificate_arn #=> String
resp.certificate_id #=> String
resp.certificate_pem #=> String
resp.key_pair.public_key #=> String
resp.key_pair.private_key #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :set_as_active (Boolean)

    Specifies whether the certificate is active.

Returns:



2543
2544
2545
2546
# File 'lib/aws-sdk-iot/client.rb', line 2543

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

#create_mitigation_action(params = {}) ⇒ Types::CreateMitigationActionResponse

Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain types of mitigation actions can be applied to specific check names. For more information, see [Mitigation actions]. Each mitigation action can apply only one type of change.

Requires permission to access the [CreateMitigationAction] action.

[1]: docs.aws.amazon.com/iot/latest/developerguide/device-defender-mitigation-actions.html [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_mitigation_action({
  action_name: "MitigationActionName", # required
  role_arn: "RoleArn", # required
  action_params: { # required
    update_device_certificate_params: {
      action: "DEACTIVATE", # required, accepts DEACTIVATE
    },
    update_ca_certificate_params: {
      action: "DEACTIVATE", # required, accepts DEACTIVATE
    },
    add_things_to_thing_group_params: {
      thing_group_names: ["ThingGroupName"], # required
      override_dynamic_groups: false,
    },
    replace_default_policy_version_params: {
      template_name: "BLANK_POLICY", # required, accepts BLANK_POLICY
    },
    enable_io_t_logging_params: {
      role_arn_for_logging: "RoleArn", # required
      log_level: "DEBUG", # required, accepts DEBUG, INFO, ERROR, WARN, DISABLED
    },
    publish_finding_to_sns_params: {
      topic_arn: "SnsTopicArn", # required
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.action_arn #=> String
resp.action_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :action_name (required, String)

    A friendly name for the action. Choose a friendly name that accurately describes the action (for example, ‘EnableLoggingAction`).

  • :role_arn (required, String)

    The ARN of the IAM role that is used to apply the mitigation action.

  • :action_params (required, Types::MitigationActionParams)

    Defines the type of action and the parameters for that action.

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

    Metadata that can be used to manage the mitigation action.

Returns:



2621
2622
2623
2624
# File 'lib/aws-sdk-iot/client.rb', line 2621

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

#create_ota_update(params = {}) ⇒ Types::CreateOTAUpdateResponse

Creates an IoT OTA update on a target group of things or groups.

Requires permission to access the [CreateOTAUpdate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_ota_update({
  ota_update_id: "OTAUpdateId", # required
  description: "OTAUpdateDescription",
  targets: ["Target"], # required
  protocols: ["MQTT"], # accepts MQTT, HTTP
  target_selection: "CONTINUOUS", # accepts CONTINUOUS, SNAPSHOT
  aws_job_executions_rollout_config: {
    maximum_per_minute: 1,
    exponential_rate: {
      base_rate_per_minute: 1, # required
      increment_factor: 1.0, # required
      rate_increase_criteria: { # required
        number_of_notified_things: 1,
        number_of_succeeded_things: 1,
      },
    },
  },
  aws_job_presigned_url_config: {
    expires_in_sec: 1,
  },
  aws_job_abort_config: {
    abort_criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, REJECTED, TIMED_OUT, ALL
        action: "CANCEL", # required, accepts CANCEL
        threshold_percentage: 1.0, # required
        min_number_of_executed_things: 1, # required
      },
    ],
  },
  aws_job_timeout_config: {
    in_progress_timeout_in_minutes: 1,
  },
  files: [ # required
    {
      file_name: "FileName",
      file_type: 1,
      file_version: "OTAUpdateFileVersion",
      file_location: {
        stream: {
          stream_id: "StreamId",
          file_id: 1,
        },
        s3_location: {
          bucket: "S3Bucket",
          key: "S3Key",
          version: "S3Version",
        },
      },
      code_signing: {
        aws_signer_job_id: "SigningJobId",
        start_signing_job_parameter: {
          signing_profile_parameter: {
            certificate_arn: "CertificateArn",
            platform: "Platform",
            certificate_path_on_device: "CertificatePathOnDevice",
          },
          signing_profile_name: "SigningProfileName",
          destination: {
            s3_destination: {
              bucket: "S3Bucket",
              prefix: "Prefix",
            },
          },
        },
        custom_code_signing: {
          signature: {
            inline_document: "data",
          },
          certificate_chain: {
            certificate_name: "CertificateName",
            inline_document: "InlineDocument",
          },
          hash_algorithm: "HashAlgorithm",
          signature_algorithm: "SignatureAlgorithm",
        },
      },
      attributes: {
        "AttributeKey" => "Value",
      },
    },
  ],
  role_arn: "RoleArn", # required
  additional_parameters: {
    "AttributeKey" => "Value",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.ota_update_id #=> String
resp.aws_iot_job_id #=> String
resp.ota_update_arn #=> String
resp.aws_iot_job_arn #=> String
resp.ota_update_status #=> String, one of "CREATE_PENDING", "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "CREATE_FAILED", "DELETE_IN_PROGRESS", "DELETE_FAILED"

Parameters:

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

    ({})

Options Hash (params):

  • :ota_update_id (required, String)

    The ID of the OTA update to be created.

  • :description (String)

    The description of the OTA update.

  • :targets (required, Array<String>)

    The devices targeted to receive OTA updates.

  • :protocols (Array<String>)

    The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified, the target device can choose the protocol.

  • :target_selection (String)

    Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing when a change is detected in a target. For example, an update will run on a thing when the thing is added to a target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS | SNAPSHOT.

  • :aws_job_executions_rollout_config (Types::AwsJobExecutionsRolloutConfig)

    Configuration for the rollout of OTA updates.

  • :aws_job_presigned_url_config (Types::AwsJobPresignedUrlConfig)

    Configuration information for pre-signed URLs.

  • :aws_job_abort_config (Types::AwsJobAbortConfig)

    The criteria that determine when and how a job abort takes place.

  • :aws_job_timeout_config (Types::AwsJobTimeoutConfig)

    Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to ‘IN_PROGRESS`. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to `TIMED_OUT`.

  • :files (required, Array<Types::OTAUpdateFile>)

    The files to be streamed by the OTA update.

  • :role_arn (required, String)

    The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services Code Signing resources to create an OTA update job.

  • :additional_parameters (Hash<String,String>)

    A list of additional OTA update parameters, which are name-value pairs. They won’t be sent to devices as a part of the Job document.

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

    Metadata which can be used to manage updates.

Returns:



2802
2803
2804
2805
# File 'lib/aws-sdk-iot/client.rb', line 2802

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

#create_package(params = {}) ⇒ Types::CreatePackageResponse

Creates an IoT software package that can be deployed to your fleet.

Requires permission to access the [CreatePackage] and

GetIndexingConfiguration][1

actions.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_package({
  package_name: "PackageName", # required
  description: "ResourceDescription",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.package_name #=> String
resp.package_arn #=> String
resp.description #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the new software package.

  • :description (String)

    A summary of the package being created. This can be used to outline the package’s contents or purpose.

  • :tags (Hash<String,String>)

    Metadata that can be used to manage the package.

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



2859
2860
2861
2862
# File 'lib/aws-sdk-iot/client.rb', line 2859

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

#create_package_version(params = {}) ⇒ Types::CreatePackageVersionResponse

Creates a new version for an existing IoT software package.

Requires permission to access the [CreatePackageVersion] and

GetIndexingConfiguration][1

actions.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_package_version({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
  description: "ResourceDescription",
  attributes: {
    "ResourceAttributeKey" => "ResourceAttributeValue",
  },
  artifact: {
    s3_location: {
      bucket: "S3Bucket",
      key: "S3Key",
      version: "S3Version",
    },
  },
  recipe: "PackageVersionRecipe",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.package_version_arn #=> String
resp.package_name #=> String
resp.version_name #=> String
resp.description #=> String
resp.attributes #=> Hash
resp.attributes["ResourceAttributeKey"] #=> String
resp.status #=> String, one of "DRAFT", "PUBLISHED", "DEPRECATED"
resp.error_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the associated software package.

  • :version_name (required, String)

    The name of the new package version.

  • :description (String)

    A summary of the package version being created. This can be used to outline the package’s contents or purpose.

  • :attributes (Hash<String,String>)

    Metadata that can be used to define a package version’s configuration. For example, the S3 file location, configuration options that are being sent to the device or fleet.

    The combined size of all the attributes on a package version is limited to 3KB.

  • :artifact (Types::PackageVersionArtifact)

    The various build components created during the build process such as libraries and configuration files that make up a software package version.

  • :recipe (String)

    The inline job document associated with a software package version used for a quick job deployment.

  • :tags (Hash<String,String>)

    Metadata that can be used to manage the package version.

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



2957
2958
2959
2960
# File 'lib/aws-sdk-iot/client.rb', line 2957

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

#create_policy(params = {}) ⇒ Types::CreatePolicyResponse

Creates an IoT policy.

The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy’s default version.

Requires permission to access the [CreatePolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_policy({
  policy_name: "PolicyName", # required
  policy_document: "PolicyDocument", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.policy_name #=> String
resp.policy_arn #=> String
resp.policy_document #=> String
resp.policy_version_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

  • :policy_document (required, String)

    The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.

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

    Metadata which can be used to manage the policy.

    <note markdown=“1”> For URI Request parameters use format: …key1=value1&amp;key2=value2…

    For the CLI command-line parameter use format: &amp;&amp;tags
    

    “key1=value1&amp;key2=value2…”

    For the cli-input-json file use format: "tags":
    

    “key1=value1&amp;key2=value2…”

    </note>
    

Returns:



3025
3026
3027
3028
# File 'lib/aws-sdk-iot/client.rb', line 3025

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

#create_policy_version(params = {}) ⇒ Types::CreatePolicyVersionResponse

Creates a new version of the specified IoT policy. To update a policy, create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to delete an existing version before you create a new one.

Optionally, you can set the new version as the policy’s default version. The default version is the operative version (that is, the version that is in effect for the certificates to which the policy is attached).

Requires permission to access the [CreatePolicyVersion] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_policy_version({
  policy_name: "PolicyName", # required
  policy_document: "PolicyDocument", # required
  set_as_default: false,
})

Response structure


resp.policy_arn #=> String
resp.policy_document #=> String
resp.policy_version_id #=> String
resp.is_default_version #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

  • :policy_document (required, String)

    The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.

  • :set_as_default (Boolean)

    Specifies whether the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).

Returns:



3084
3085
3086
3087
# File 'lib/aws-sdk-iot/client.rb', line 3084

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

#create_provisioning_claim(params = {}) ⇒ Types::CreateProvisioningClaimResponse

Examples:

Request syntax with placeholder values


resp = client.create_provisioning_claim({
  template_name: "TemplateName", # required
})

Response structure


resp.certificate_id #=> String
resp.certificate_pem #=> String
resp.key_pair.public_key #=> String
resp.key_pair.private_key #=> String
resp.expiration #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template to use.

Returns:



3123
3124
3125
3126
# File 'lib/aws-sdk-iot/client.rb', line 3123

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

#create_provisioning_template(params = {}) ⇒ Types::CreateProvisioningTemplateResponse

Examples:

Request syntax with placeholder values


resp = client.create_provisioning_template({
  template_name: "TemplateName", # required
  description: "TemplateDescription",
  template_body: "TemplateBody", # required
  enabled: false,
  provisioning_role_arn: "RoleArn", # required
  pre_provisioning_hook: {
    payload_version: "PayloadVersion",
    target_arn: "TargetArn", # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  type: "FLEET_PROVISIONING", # accepts FLEET_PROVISIONING, JITP
})

Response structure


resp.template_arn #=> String
resp.template_name #=> String
resp.default_version_id #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template.

  • :description (String)

    The description of the provisioning template.

  • :template_body (required, String)

    The JSON formatted contents of the provisioning template.

  • :enabled (Boolean)

    True to enable the provisioning template, otherwise false.

  • :provisioning_role_arn (required, String)

    The role ARN for the role associated with the provisioning template. This IoT role grants permission to provision a device.

  • :pre_provisioning_hook (Types::ProvisioningHook)

    Creates a pre-provisioning hook template. Only supports template of type ‘FLEET_PROVISIONING`. For more information about provisioning template types, see [type].

    [1]: docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type

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

    Metadata which can be used to manage the provisioning template.

    <note markdown=“1”> For URI Request parameters use format: …key1=value1&amp;key2=value2…

    For the CLI command-line parameter use format: &amp;&amp;tags
    

    “key1=value1&amp;key2=value2…”

    For the cli-input-json file use format: "tags":
    

    “key1=value1&amp;key2=value2…”

    </note>
    
  • :type (String)

    The type you define in a provisioning template. You can create a template with only one type. You can’t change the template type after its creation. The default value is ‘FLEET_PROVISIONING`. For more information about provisioning template, see: [Provisioning template].

    [1]: docs.aws.amazon.com/iot/latest/developerguide/provision-template.html

Returns:



3222
3223
3224
3225
# File 'lib/aws-sdk-iot/client.rb', line 3222

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

#create_provisioning_template_version(params = {}) ⇒ Types::CreateProvisioningTemplateVersionResponse

Creates a new version of a provisioning template.

Requires permission to access the

CreateProvisioningTemplateVersion][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_provisioning_template_version({
  template_name: "TemplateName", # required
  template_body: "TemplateBody", # required
  set_as_default: false,
})

Response structure


resp.template_arn #=> String
resp.template_name #=> String
resp.version_id #=> Integer
resp.is_default_version #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template.

  • :template_body (required, String)

    The JSON formatted contents of the provisioning template.

  • :set_as_default (Boolean)

    Sets a fleet provision template version as the default version.

Returns:



3269
3270
3271
3272
# File 'lib/aws-sdk-iot/client.rb', line 3269

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

#create_role_alias(params = {}) ⇒ Types::CreateRoleAliasResponse

Creates a role alias.

Requires permission to access the [CreateRoleAlias] action.

The value of [ ‘credentialDurationSeconds` ][2] must be less than or equal to the maximum session duration of the IAM role that the role alias references. For more information, see [ Modifying a role maximum session duration (Amazon Web Services API)] from the Amazon Web Services Identity and Access Management User Guide.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/apireference/API_CreateRoleAlias.html#iot-CreateRoleAlias-request-credentialDurationSeconds [3]: docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-api.html#roles-modify_max-session-duration-api

Examples:

Request syntax with placeholder values


resp = client.create_role_alias({
  role_alias: "RoleAlias", # required
  role_arn: "RoleArn", # required
  credential_duration_seconds: 1,
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.role_alias #=> String
resp.role_alias_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :role_alias (required, String)

    The role alias that points to a role ARN. This allows you to change the role without having to update the device.

  • :role_arn (required, String)

    The role ARN.

  • :credential_duration_seconds (Integer)

    How long (in seconds) the credentials will be valid. The default value is 3,600 seconds.

    This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.

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

    Metadata which can be used to manage the role alias.

    <note markdown=“1”> For URI Request parameters use format: …key1=value1&amp;key2=value2…

    For the CLI command-line parameter use format: &amp;&amp;tags
    

    “key1=value1&amp;key2=value2…”

    For the cli-input-json file use format: "tags":
    

    “key1=value1&amp;key2=value2…”

    </note>
    

Returns:



3344
3345
3346
3347
# File 'lib/aws-sdk-iot/client.rb', line 3344

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

#create_scheduled_audit(params = {}) ⇒ Types::CreateScheduledAuditResponse

Creates a scheduled audit that is run at a specified time interval.

Requires permission to access the [CreateScheduledAudit] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_scheduled_audit({
  frequency: "DAILY", # required, accepts DAILY, WEEKLY, BIWEEKLY, MONTHLY
  day_of_month: "DayOfMonth",
  day_of_week: "SUN", # accepts SUN, MON, TUE, WED, THU, FRI, SAT
  target_check_names: ["AuditCheckName"], # required
  scheduled_audit_name: "ScheduledAuditName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.scheduled_audit_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :frequency (required, String)

    How often the scheduled audit takes place, either ‘DAILY`, `WEEKLY`, `BIWEEKLY` or `MONTHLY`. The start time of each audit is determined by the system.

  • :day_of_month (String)

    The day of the month on which the scheduled audit takes place. This can be “1” through “31” or “LAST”. This field is required if the “frequency” parameter is set to ‘MONTHLY`. If days 29 to 31 are specified, and the month doesn’t have that many days, the audit takes place on the ‘LAST` day of the month.

  • :day_of_week (String)

    The day of the week on which the scheduled audit takes place, either ‘SUN`, `MON`, `TUE`, `WED`, `THU`, `FRI`, or `SAT`. This field is required if the `frequency` parameter is set to `WEEKLY` or `BIWEEKLY`.

  • :target_check_names (required, Array<String>)

    Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)

  • :scheduled_audit_name (required, String)

    The name you want to give to the scheduled audit. (Max. 128 chars)

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

    Metadata that can be used to manage the scheduled audit.

Returns:



3413
3414
3415
3416
# File 'lib/aws-sdk-iot/client.rb', line 3413

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

#create_security_profile(params = {}) ⇒ Types::CreateSecurityProfileResponse

Creates a Device Defender security profile.

Requires permission to access the [CreateSecurityProfile] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_security_profile({
  security_profile_name: "SecurityProfileName", # required
  security_profile_description: "SecurityProfileDescription",
  behaviors: [
    {
      name: "BehaviorName", # required
      metric: "BehaviorMetric",
      metric_dimension: {
        dimension_name: "DimensionName", # required
        operator: "IN", # accepts IN, NOT_IN
      },
      criteria: {
        comparison_operator: "less-than", # accepts less-than, less-than-equals, greater-than, greater-than-equals, in-cidr-set, not-in-cidr-set, in-port-set, not-in-port-set, in-set, not-in-set
        value: {
          count: 1,
          cidrs: ["Cidr"],
          ports: [1],
          number: 1.0,
          numbers: [1.0],
          strings: ["stringValue"],
        },
        duration_seconds: 1,
        consecutive_datapoints_to_alarm: 1,
        consecutive_datapoints_to_clear: 1,
        statistical_threshold: {
          statistic: "EvaluationStatistic",
        },
        ml_detection_config: {
          confidence_level: "LOW", # required, accepts LOW, MEDIUM, HIGH
        },
      },
      suppress_alerts: false,
      export_metric: false,
    },
  ],
  alert_targets: {
    "SNS" => {
      alert_target_arn: "AlertTargetArn", # required
      role_arn: "RoleArn", # required
    },
  },
  additional_metrics_to_retain: ["BehaviorMetric"],
  additional_metrics_to_retain_v2: [
    {
      metric: "BehaviorMetric", # required
      metric_dimension: {
        dimension_name: "DimensionName", # required
        operator: "IN", # accepts IN, NOT_IN
      },
      export_metric: false,
    },
  ],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  metrics_export_config: {
    mqtt_topic: "MqttTopic", # required
    role_arn: "RoleArn", # required
  },
})

Response structure


resp.security_profile_name #=> String
resp.security_profile_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The name you are giving to the security profile.

  • :security_profile_description (String)

    A description of the security profile.

  • :behaviors (Array<Types::Behavior>)

    Specifies the behaviors that, when violated by a device (thing), cause an alert.

  • :alert_targets (Hash<String,Types::AlertTarget>)

    Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.

  • :additional_metrics_to_retain (Array<String>)

    *Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2 instead.*

    A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile’s ‘behaviors`, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.

  • :additional_metrics_to_retain_v2 (Array<Types::MetricToRetain>)

    A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile’s ‘behaviors`, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.

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

    Metadata that can be used to manage the security profile.

  • :metrics_export_config (Types::MetricsExportConfig)

    Specifies the MQTT topic and role ARN required for metric export.

Returns:



3540
3541
3542
3543
# File 'lib/aws-sdk-iot/client.rb', line 3540

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

#create_stream(params = {}) ⇒ Types::CreateStreamResponse

Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with a stream.

Requires permission to access the [CreateStream] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_stream({
  stream_id: "StreamId", # required
  description: "StreamDescription",
  files: [ # required
    {
      file_id: 1,
      s3_location: {
        bucket: "S3Bucket",
        key: "S3Key",
        version: "S3Version",
      },
    },
  ],
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.stream_id #=> String
resp.stream_arn #=> String
resp.description #=> String
resp.stream_version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :stream_id (required, String)

    The stream ID.

  • :description (String)

    A description of the stream.

  • :files (required, Array<Types::StreamFile>)

    The files to stream.

  • :role_arn (required, String)

    An IAM role that allows the IoT service principal to access your S3 files.

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

    Metadata which can be used to manage streams.

Returns:



3612
3613
3614
3615
# File 'lib/aws-sdk-iot/client.rb', line 3612

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

#create_thing(params = {}) ⇒ Types::CreateThingResponse

Creates a thing record in the registry. If this call is made multiple times using the same thing name and configuration, the call will succeed. If this call is made with the same thing name but different configuration a ‘ResourceAlreadyExistsException` is thrown.

<note markdown=“1”> This is a control plane operation. See [Authorization] for information about authorizing control plane actions.

</note>

Requires permission to access the [CreateThing] action.

[1]: docs.aws.amazon.com/iot/latest/developerguide/iot-authorization.html [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_thing({
  thing_name: "ThingName", # required
  thing_type_name: "ThingTypeName",
  attribute_payload: {
    attributes: {
      "AttributeName" => "AttributeValue",
    },
    merge: false,
  },
  billing_group_name: "BillingGroupName",
})

Response structure


resp.thing_name #=> String
resp.thing_arn #=> String
resp.thing_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing to create.

    You can’t change a thing’s name after you create it. To change a thing’s name, you must create a new thing, give it the new name, and then delete the old thing.

  • :thing_type_name (String)

    The name of the thing type associated with the new thing.

  • :attribute_payload (Types::AttributePayload)

    The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:

    ‘“attributes”:{“string1”:“string2”}`

  • :billing_group_name (String)

    The name of the billing group the thing will be added to.

Returns:



3681
3682
3683
3684
# File 'lib/aws-sdk-iot/client.rb', line 3681

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

#create_thing_group(params = {}) ⇒ Types::CreateThingGroupResponse

Create a thing group.

<note markdown=“1”> This is a control plane operation. See [Authorization] for information about authorizing control plane actions.

If the `ThingGroup` that you create has the exact same attributes as

an existing ‘ThingGroup`, you will get a 200 success response.

</note>

Requires permission to access the [CreateThingGroup] action.

[1]: docs.aws.amazon.com/iot/latest/developerguide/iot-authorization.html [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_thing_group({
  thing_group_name: "ThingGroupName", # required
  parent_group_name: "ThingGroupName",
  thing_group_properties: {
    thing_group_description: "ThingGroupDescription",
    attribute_payload: {
      attributes: {
        "AttributeName" => "AttributeValue",
      },
      merge: false,
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.thing_group_name #=> String
resp.thing_group_arn #=> String
resp.thing_group_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The thing group name to create.

  • :parent_group_name (String)

    The name of the parent thing group.

  • :thing_group_properties (Types::ThingGroupProperties)

    The thing group properties.

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

    Metadata which can be used to manage the thing group.

Returns:



3751
3752
3753
3754
# File 'lib/aws-sdk-iot/client.rb', line 3751

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

#create_thing_type(params = {}) ⇒ Types::CreateThingTypeResponse

Creates a new thing type. If this call is made multiple times using the same thing type name and configuration, the call will succeed. If this call is made with the same thing type name but different configuration a ‘ResourceAlreadyExistsException` is thrown.

Requires permission to access the [CreateThingType] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_thing_type({
  thing_type_name: "ThingTypeName", # required
  thing_type_properties: {
    thing_type_description: "ThingTypeDescription",
    searchable_attributes: ["AttributeName"],
    mqtt5_configuration: {
      propagating_attributes: [
        {
          user_property_key: "UserPropertyKeyName",
          thing_attribute: "AttributeName",
          connection_attribute: "ConnectionAttributeName",
        },
      ],
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.thing_type_name #=> String
resp.thing_type_arn #=> String
resp.thing_type_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_type_name (required, String)

    The name of the thing type.

  • :thing_type_properties (Types::ThingTypeProperties)

    The ThingTypeProperties for the thing type to create. It contains information about the new thing type including a description, and a list of searchable thing attribute names.

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

    Metadata which can be used to manage the thing type.

Returns:



3817
3818
3819
3820
# File 'lib/aws-sdk-iot/client.rb', line 3817

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

#create_topic_rule(params = {}) ⇒ Struct

Creates a rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.

Requires permission to access the [CreateTopicRule] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_topic_rule({
  rule_name: "RuleName", # required
  topic_rule_payload: { # required
    sql: "SQL", # required
    description: "Description",
    actions: [ # required
      {
        dynamo_db: {
          table_name: "TableName", # required
          role_arn: "AwsArn", # required
          operation: "DynamoOperation",
          hash_key_field: "HashKeyField", # required
          hash_key_value: "HashKeyValue", # required
          hash_key_type: "STRING", # accepts STRING, NUMBER
          range_key_field: "RangeKeyField",
          range_key_value: "RangeKeyValue",
          range_key_type: "STRING", # accepts STRING, NUMBER
          payload_field: "PayloadField",
        },
        dynamo_d_bv_2: {
          role_arn: "AwsArn", # required
          put_item: { # required
            table_name: "TableName", # required
          },
        },
        lambda: {
          function_arn: "FunctionArn", # required
        },
        sns: {
          target_arn: "AwsArn", # required
          role_arn: "AwsArn", # required
          message_format: "RAW", # accepts RAW, JSON
        },
        sqs: {
          role_arn: "AwsArn", # required
          queue_url: "QueueUrl", # required
          use_base_64: false,
        },
        kinesis: {
          role_arn: "AwsArn", # required
          stream_name: "StreamName", # required
          partition_key: "PartitionKey",
        },
        republish: {
          role_arn: "AwsArn", # required
          topic: "TopicPattern", # required
          qos: 1,
          headers: {
            payload_format_indicator: "PayloadFormatIndicator",
            content_type: "ContentType",
            response_topic: "ResponseTopic",
            correlation_data: "CorrelationData",
            message_expiry: "MessageExpiry",
            user_properties: [
              {
                key: "UserPropertyKey", # required
                value: "UserPropertyValue", # required
              },
            ],
          },
        },
        s3: {
          role_arn: "AwsArn", # required
          bucket_name: "BucketName", # required
          key: "Key", # required
          canned_acl: "private", # accepts private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write
        },
        firehose: {
          role_arn: "AwsArn", # required
          delivery_stream_name: "DeliveryStreamName", # required
          separator: "FirehoseSeparator",
          batch_mode: false,
        },
        cloudwatch_metric: {
          role_arn: "AwsArn", # required
          metric_namespace: "String", # required
          metric_name: "String", # required
          metric_value: "String", # required
          metric_unit: "String", # required
          metric_timestamp: "String",
        },
        cloudwatch_alarm: {
          role_arn: "AwsArn", # required
          alarm_name: "AlarmName", # required
          state_reason: "StateReason", # required
          state_value: "StateValue", # required
        },
        cloudwatch_logs: {
          role_arn: "AwsArn", # required
          log_group_name: "LogGroupName", # required
          batch_mode: false,
        },
        elasticsearch: {
          role_arn: "AwsArn", # required
          endpoint: "ElasticsearchEndpoint", # required
          index: "ElasticsearchIndex", # required
          type: "ElasticsearchType", # required
          id: "ElasticsearchId", # required
        },
        salesforce: {
          token: "SalesforceToken", # required
          url: "SalesforceEndpoint", # required
        },
        iot_analytics: {
          channel_arn: "AwsArn",
          channel_name: "ChannelName",
          batch_mode: false,
          role_arn: "AwsArn",
        },
        iot_events: {
          input_name: "InputName", # required
          message_id: "MessageId",
          batch_mode: false,
          role_arn: "AwsArn", # required
        },
        iot_site_wise: {
          put_asset_property_value_entries: [ # required
            {
              entry_id: "AssetPropertyEntryId",
              asset_id: "AssetId",
              property_id: "AssetPropertyId",
              property_alias: "AssetPropertyAlias",
              property_values: [ # required
                {
                  value: { # required
                    string_value: "AssetPropertyStringValue",
                    integer_value: "AssetPropertyIntegerValue",
                    double_value: "AssetPropertyDoubleValue",
                    boolean_value: "AssetPropertyBooleanValue",
                  },
                  timestamp: { # required
                    time_in_seconds: "AssetPropertyTimeInSeconds", # required
                    offset_in_nanos: "AssetPropertyOffsetInNanos",
                  },
                  quality: "AssetPropertyQuality",
                },
              ],
            },
          ],
          role_arn: "AwsArn", # required
        },
        step_functions: {
          execution_name_prefix: "ExecutionNamePrefix",
          state_machine_name: "StateMachineName", # required
          role_arn: "AwsArn", # required
        },
        timestream: {
          role_arn: "AwsArn", # required
          database_name: "TimestreamDatabaseName", # required
          table_name: "TimestreamTableName", # required
          dimensions: [ # required
            {
              name: "TimestreamDimensionName", # required
              value: "TimestreamDimensionValue", # required
            },
          ],
          timestamp: {
            value: "TimestreamTimestampValue", # required
            unit: "TimestreamTimestampUnit", # required
          },
        },
        http: {
          url: "Url", # required
          confirmation_url: "Url",
          headers: [
            {
              key: "HeaderKey", # required
              value: "HeaderValue", # required
            },
          ],
          auth: {
            sigv4: {
              signing_region: "SigningRegion", # required
              service_name: "ServiceName", # required
              role_arn: "AwsArn", # required
            },
          },
        },
        kafka: {
          destination_arn: "AwsArn", # required
          topic: "String", # required
          key: "String",
          partition: "String",
          client_properties: { # required
            "String" => "String",
          },
          headers: [
            {
              key: "KafkaHeaderKey", # required
              value: "KafkaHeaderValue", # required
            },
          ],
        },
        open_search: {
          role_arn: "AwsArn", # required
          endpoint: "ElasticsearchEndpoint", # required
          index: "ElasticsearchIndex", # required
          type: "ElasticsearchType", # required
          id: "ElasticsearchId", # required
        },
        location: {
          role_arn: "AwsArn", # required
          tracker_name: "String", # required
          device_id: "String", # required
          timestamp: {
            value: "String", # required
            unit: "String",
          },
          latitude: "String", # required
          longitude: "String", # required
        },
      },
    ],
    rule_disabled: false,
    aws_iot_sql_version: "AwsIotSqlVersion",
    error_action: {
      dynamo_db: {
        table_name: "TableName", # required
        role_arn: "AwsArn", # required
        operation: "DynamoOperation",
        hash_key_field: "HashKeyField", # required
        hash_key_value: "HashKeyValue", # required
        hash_key_type: "STRING", # accepts STRING, NUMBER
        range_key_field: "RangeKeyField",
        range_key_value: "RangeKeyValue",
        range_key_type: "STRING", # accepts STRING, NUMBER
        payload_field: "PayloadField",
      },
      dynamo_d_bv_2: {
        role_arn: "AwsArn", # required
        put_item: { # required
          table_name: "TableName", # required
        },
      },
      lambda: {
        function_arn: "FunctionArn", # required
      },
      sns: {
        target_arn: "AwsArn", # required
        role_arn: "AwsArn", # required
        message_format: "RAW", # accepts RAW, JSON
      },
      sqs: {
        role_arn: "AwsArn", # required
        queue_url: "QueueUrl", # required
        use_base_64: false,
      },
      kinesis: {
        role_arn: "AwsArn", # required
        stream_name: "StreamName", # required
        partition_key: "PartitionKey",
      },
      republish: {
        role_arn: "AwsArn", # required
        topic: "TopicPattern", # required
        qos: 1,
        headers: {
          payload_format_indicator: "PayloadFormatIndicator",
          content_type: "ContentType",
          response_topic: "ResponseTopic",
          correlation_data: "CorrelationData",
          message_expiry: "MessageExpiry",
          user_properties: [
            {
              key: "UserPropertyKey", # required
              value: "UserPropertyValue", # required
            },
          ],
        },
      },
      s3: {
        role_arn: "AwsArn", # required
        bucket_name: "BucketName", # required
        key: "Key", # required
        canned_acl: "private", # accepts private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write
      },
      firehose: {
        role_arn: "AwsArn", # required
        delivery_stream_name: "DeliveryStreamName", # required
        separator: "FirehoseSeparator",
        batch_mode: false,
      },
      cloudwatch_metric: {
        role_arn: "AwsArn", # required
        metric_namespace: "String", # required
        metric_name: "String", # required
        metric_value: "String", # required
        metric_unit: "String", # required
        metric_timestamp: "String",
      },
      cloudwatch_alarm: {
        role_arn: "AwsArn", # required
        alarm_name: "AlarmName", # required
        state_reason: "StateReason", # required
        state_value: "StateValue", # required
      },
      cloudwatch_logs: {
        role_arn: "AwsArn", # required
        log_group_name: "LogGroupName", # required
        batch_mode: false,
      },
      elasticsearch: {
        role_arn: "AwsArn", # required
        endpoint: "ElasticsearchEndpoint", # required
        index: "ElasticsearchIndex", # required
        type: "ElasticsearchType", # required
        id: "ElasticsearchId", # required
      },
      salesforce: {
        token: "SalesforceToken", # required
        url: "SalesforceEndpoint", # required
      },
      iot_analytics: {
        channel_arn: "AwsArn",
        channel_name: "ChannelName",
        batch_mode: false,
        role_arn: "AwsArn",
      },
      iot_events: {
        input_name: "InputName", # required
        message_id: "MessageId",
        batch_mode: false,
        role_arn: "AwsArn", # required
      },
      iot_site_wise: {
        put_asset_property_value_entries: [ # required
          {
            entry_id: "AssetPropertyEntryId",
            asset_id: "AssetId",
            property_id: "AssetPropertyId",
            property_alias: "AssetPropertyAlias",
            property_values: [ # required
              {
                value: { # required
                  string_value: "AssetPropertyStringValue",
                  integer_value: "AssetPropertyIntegerValue",
                  double_value: "AssetPropertyDoubleValue",
                  boolean_value: "AssetPropertyBooleanValue",
                },
                timestamp: { # required
                  time_in_seconds: "AssetPropertyTimeInSeconds", # required
                  offset_in_nanos: "AssetPropertyOffsetInNanos",
                },
                quality: "AssetPropertyQuality",
              },
            ],
          },
        ],
        role_arn: "AwsArn", # required
      },
      step_functions: {
        execution_name_prefix: "ExecutionNamePrefix",
        state_machine_name: "StateMachineName", # required
        role_arn: "AwsArn", # required
      },
      timestream: {
        role_arn: "AwsArn", # required
        database_name: "TimestreamDatabaseName", # required
        table_name: "TimestreamTableName", # required
        dimensions: [ # required
          {
            name: "TimestreamDimensionName", # required
            value: "TimestreamDimensionValue", # required
          },
        ],
        timestamp: {
          value: "TimestreamTimestampValue", # required
          unit: "TimestreamTimestampUnit", # required
        },
      },
      http: {
        url: "Url", # required
        confirmation_url: "Url",
        headers: [
          {
            key: "HeaderKey", # required
            value: "HeaderValue", # required
          },
        ],
        auth: {
          sigv4: {
            signing_region: "SigningRegion", # required
            service_name: "ServiceName", # required
            role_arn: "AwsArn", # required
          },
        },
      },
      kafka: {
        destination_arn: "AwsArn", # required
        topic: "String", # required
        key: "String",
        partition: "String",
        client_properties: { # required
          "String" => "String",
        },
        headers: [
          {
            key: "KafkaHeaderKey", # required
            value: "KafkaHeaderValue", # required
          },
        ],
      },
      open_search: {
        role_arn: "AwsArn", # required
        endpoint: "ElasticsearchEndpoint", # required
        index: "ElasticsearchIndex", # required
        type: "ElasticsearchType", # required
        id: "ElasticsearchId", # required
      },
      location: {
        role_arn: "AwsArn", # required
        tracker_name: "String", # required
        device_id: "String", # required
        timestamp: {
          value: "String", # required
          unit: "String",
        },
        latitude: "String", # required
        longitude: "String", # required
      },
    },
  },
  tags: "String",
})

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the rule.

  • :topic_rule_payload (required, Types::TopicRulePayload)

    The rule payload.

  • :tags (String)

    Metadata which can be used to manage the topic rule.

    <note markdown=“1”> For URI Request parameters use format: …key1=value1&amp;key2=value2…

    For the CLI command-line parameter use format: --tags
    

    “key1=value1&amp;key2=value2…”

    For the cli-input-json file use format: "tags":
    

    “key1=value1&amp;key2=value2…”

    </note>
    

Returns:

  • (Struct)

    Returns an empty response.



4283
4284
4285
4286
# File 'lib/aws-sdk-iot/client.rb', line 4283

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

#create_topic_rule_destination(params = {}) ⇒ Types::CreateTopicRuleDestinationResponse

Creates a topic rule destination. The destination must be confirmed prior to use.

Requires permission to access the [CreateTopicRuleDestination] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.create_topic_rule_destination({
  destination_configuration: { # required
    http_url_configuration: {
      confirmation_url: "Url", # required
    },
    vpc_configuration: {
      subnet_ids: ["SubnetId"], # required
      security_groups: ["SecurityGroupId"],
      vpc_id: "VpcId", # required
      role_arn: "AwsArn", # required
    },
  },
})

Response structure


resp.topic_rule_destination.arn #=> String
resp.topic_rule_destination.status #=> String, one of "ENABLED", "IN_PROGRESS", "DISABLED", "ERROR", "DELETING"
resp.topic_rule_destination.created_at #=> Time
resp.topic_rule_destination.last_updated_at #=> Time
resp.topic_rule_destination.status_reason #=> String
resp.topic_rule_destination.http_url_properties.confirmation_url #=> String
resp.topic_rule_destination.vpc_properties.subnet_ids #=> Array
resp.topic_rule_destination.vpc_properties.subnet_ids[0] #=> String
resp.topic_rule_destination.vpc_properties.security_groups #=> Array
resp.topic_rule_destination.vpc_properties.security_groups[0] #=> String
resp.topic_rule_destination.vpc_properties.vpc_id #=> String
resp.topic_rule_destination.vpc_properties.role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:



4338
4339
4340
4341
# File 'lib/aws-sdk-iot/client.rb', line 4338

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

#delete_account_audit_configuration(params = {}) ⇒ Struct

Restores the default settings for Device Defender audits for this account. Any configuration data you entered is deleted and all audit checks are reset to disabled.

Requires permission to access the [DeleteAccountAuditConfiguration] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.({
  delete_scheduled_audits: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :delete_scheduled_audits (Boolean)

    If true, all scheduled audits are deleted.

Returns:

  • (Struct)

    Returns an empty response.



4367
4368
4369
4370
# File 'lib/aws-sdk-iot/client.rb', line 4367

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

#delete_audit_suppression(params = {}) ⇒ Struct

Deletes a Device Defender audit suppression.

Requires permission to access the [DeleteAuditSuppression] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_audit_suppression({
  check_name: "AuditCheckName", # required
  resource_identifier: { # required
    device_certificate_id: "CertificateId",
    ca_certificate_id: "CertificateId",
    cognito_identity_pool_id: "CognitoIdentityPoolId",
    client_id: "ClientId",
    policy_version_identifier: {
      policy_name: "PolicyName",
      policy_version_id: "PolicyVersionId",
    },
    account: "AwsAccountId",
    iam_role_arn: "RoleArn",
    role_alias_arn: "RoleAliasArn",
    issuer_certificate_identifier: {
      issuer_certificate_subject: "IssuerCertificateSubject",
      issuer_id: "IssuerId",
      issuer_certificate_serial_number: "IssuerCertificateSerialNumber",
    },
    device_certificate_arn: "CertificateArn",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (required, String)

    An audit check name. Checks must be enabled for your account. (Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)

  • :resource_identifier (required, Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

Returns:

  • (Struct)

    Returns an empty response.



4418
4419
4420
4421
# File 'lib/aws-sdk-iot/client.rb', line 4418

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

#delete_authorizer(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_authorizer({
  authorizer_name: "AuthorizerName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The name of the authorizer to delete.

Returns:

  • (Struct)

    Returns an empty response.



4444
4445
4446
4447
# File 'lib/aws-sdk-iot/client.rb', line 4444

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

#delete_billing_group(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_billing_group({
  billing_group_name: "BillingGroupName", # required
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name of the billing group.

  • :expected_version (Integer)

    The expected version of the billing group. If the version of the billing group does not match the expected version specified in the request, the ‘DeleteBillingGroup` request is rejected with a `VersionConflictException`.

Returns:

  • (Struct)

    Returns an empty response.



4477
4478
4479
4480
# File 'lib/aws-sdk-iot/client.rb', line 4477

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

#delete_ca_certificate(params = {}) ⇒ Struct

Deletes a registered CA certificate.

Requires permission to access the [DeleteCACertificate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_ca_certificate({
  certificate_id: "CertificateId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate to delete. (The last part of the certificate ARN contains the certificate ID.)

Returns:

  • (Struct)

    Returns an empty response.



4504
4505
4506
4507
# File 'lib/aws-sdk-iot/client.rb', line 4504

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

#delete_certificate(params = {}) ⇒ Struct

Deletes the specified certificate.

A certificate cannot be deleted if it has a policy or IoT thing attached to it or if its status is set to ACTIVE. To delete a certificate, first use the DetachPolicy action to detach all policies. Next, use the UpdateCertificate action to set the certificate to the INACTIVE status.

Requires permission to access the [DeleteCertificate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_certificate({
  certificate_id: "CertificateId", # required
  force_delete: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

  • :force_delete (Boolean)

    Forces the deletion of a certificate if it is inactive and is not attached to an IoT thing.

Returns:

  • (Struct)

    Returns an empty response.



4542
4543
4544
4545
# File 'lib/aws-sdk-iot/client.rb', line 4542

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

#delete_certificate_provider(params = {}) ⇒ Struct

Deletes a certificate provider.

Requires permission to access the [DeleteCertificateProvider] action.

If you delete the certificate provider resource, the behavior of ‘CreateCertificateFromCsr` will resume, and IoT will create certificates signed by IoT from a certificate signing request (CSR).

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_certificate_provider({
  certificate_provider_name: "CertificateProviderName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_provider_name (required, String)

    The name of the certificate provider.

Returns:

  • (Struct)

    Returns an empty response.



4573
4574
4575
4576
# File 'lib/aws-sdk-iot/client.rb', line 4573

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

#delete_command(params = {}) ⇒ Types::DeleteCommandResponse

Delete a command resource.

Examples:

Request syntax with placeholder values


resp = client.delete_command({
  command_id: "CommandId", # required
})

Response structure


resp.status_code #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :command_id (required, String)

    The unique identifier of the command to be deleted.

Returns:



4599
4600
4601
4602
# File 'lib/aws-sdk-iot/client.rb', line 4599

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

#delete_command_execution(params = {}) ⇒ Struct

Delete a command execution.

<note markdown=“1”> Only command executions that enter a terminal state can be deleted from your account.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_command_execution({
  execution_id: "CommandExecutionId", # required
  target_arn: "TargetArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :execution_id (required, String)

    The unique identifier of the command execution that you want to delete from your account.

  • :target_arn (required, String)

    The Amazon Resource Number (ARN) of the target device for which you want to delete command executions.

Returns:

  • (Struct)

    Returns an empty response.



4630
4631
4632
4633
# File 'lib/aws-sdk-iot/client.rb', line 4630

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

#delete_custom_metric(params = {}) ⇒ Struct

Deletes a Device Defender detect custom metric.

Requires permission to access the [DeleteCustomMetric] action.

<note markdown=“1”> Before you can delete a custom metric, you must first remove the custom metric from all security profiles it’s a part of. The security profile associated with the custom metric can be found using the

ListSecurityProfiles][2

API with ‘metricName` set to your custom

metric name.

</note>

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/apireference/API_ListSecurityProfiles.html

Examples:

Request syntax with placeholder values


resp = client.delete_custom_metric({
  metric_name: "MetricName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the custom metric.

Returns:

  • (Struct)

    Returns an empty response.



4665
4666
4667
4668
# File 'lib/aws-sdk-iot/client.rb', line 4665

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

#delete_dimension(params = {}) ⇒ Struct

Removes the specified dimension from your Amazon Web Services accounts.

Requires permission to access the [DeleteDimension] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_dimension({
  name: "DimensionName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The unique identifier for the dimension that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.



4692
4693
4694
4695
# File 'lib/aws-sdk-iot/client.rb', line 4692

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

#delete_domain_configuration(params = {}) ⇒ Struct

Deletes the specified domain configuration.

Requires permission to access the [DeleteDomainConfiguration] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_domain_configuration({
  domain_configuration_name: "DomainConfigurationName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :domain_configuration_name (required, String)

    The name of the domain configuration to be deleted.

Returns:

  • (Struct)

    Returns an empty response.



4719
4720
4721
4722
# File 'lib/aws-sdk-iot/client.rb', line 4719

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

#delete_dynamic_thing_group(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_dynamic_thing_group({
  thing_group_name: "ThingGroupName", # required
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The name of the dynamic thing group to delete.

  • :expected_version (Integer)

    The expected version of the dynamic thing group to delete.

Returns:

  • (Struct)

    Returns an empty response.



4749
4750
4751
4752
# File 'lib/aws-sdk-iot/client.rb', line 4749

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

#delete_fleet_metric(params = {}) ⇒ Struct

Deletes the specified fleet metric. Returns successfully with no error if the deletion is successful or you specify a fleet metric that doesn’t exist.

Requires permission to access the [DeleteFleetMetric] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_fleet_metric({
  metric_name: "FleetMetricName", # required
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the fleet metric to delete.

  • :expected_version (Integer)

    The expected version of the fleet metric to delete.

Returns:

  • (Struct)

    Returns an empty response.



4781
4782
4783
4784
# File 'lib/aws-sdk-iot/client.rb', line 4781

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

#delete_job(params = {}) ⇒ Struct

Deletes a job and its related job executions.

Deleting a job may take time, depending on the number of job executions created for the job and various other factors. While the job is being deleted, the status of the job will be shown as “DELETION_IN_PROGRESS”. Attempting to delete or cancel a job whose status is already “DELETION_IN_PROGRESS” will result in an error.

Only 10 jobs may have status “DELETION_IN_PROGRESS” at the same time, or a LimitExceededException will occur.

Requires permission to access the [DeleteJob] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_job({
  job_id: "JobId", # required
  force: false,
  namespace_id: "NamespaceId",
})

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The ID of the job to be deleted.

    After a job deletion is completed, you may reuse this jobId when you create a new job. However, this is not recommended, and you must ensure that your devices are not using the jobId to refer to the deleted job.

  • :force (Boolean) — default: Optional

    When true, you can delete a job which is “IN_PROGRESS”. Otherwise, you can only delete a job which is in a terminal state (“COMPLETED” or “CANCELED”) or an exception will occur. The default is false.

    <note markdown=“1”> Deleting a job which is “IN_PROGRESS”, will cause a device which is executing the job to be unable to access job information or update the job execution status. Use caution and ensure that each device executing a job which is deleted is able to recover to a valid state.

    </note>
    
  • :namespace_id (String)

    The namespace used to indicate that a job is a customer-managed job.

    When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

    ‘$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/`

    <note markdown=“1”> The ‘namespaceId` feature is only supported by IoT Greengrass at this time. For more information, see [Setting up IoT Greengrass core devices.]

    </note>
    

    [1]: docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html

Returns:

  • (Struct)

    Returns an empty response.



4855
4856
4857
4858
# File 'lib/aws-sdk-iot/client.rb', line 4855

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

#delete_job_execution(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_job_execution({
  job_id: "JobId", # required
  thing_name: "ThingName", # required
  execution_number: 1, # required
  force: false,
  namespace_id: "NamespaceId",
})

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The ID of the job whose execution on a particular device will be deleted.

  • :thing_name (required, String)

    The name of the thing whose job execution will be deleted.

  • :execution_number (required, Integer)

    The ID of the job execution to be deleted. The ‘executionNumber` refers to the execution of a particular job on a particular device.

    Note that once a job execution is deleted, the ‘executionNumber` may be reused by IoT, so be sure you get and use the correct value here.

  • :force (Boolean) — default: Optional

    When true, you can delete a job execution which is “IN_PROGRESS”. Otherwise, you can only delete a job execution which is in a terminal state (“SUCCEEDED”, “FAILED”, “REJECTED”, “REMOVED” or “CANCELED”) or an exception will occur. The default is false.

    <note markdown=“1”> Deleting a job execution which is “IN_PROGRESS”, will cause the device to be unable to access job information or update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

    </note>
    
  • :namespace_id (String)

    The namespace used to indicate that a job is a customer-managed job.

    When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

    ‘$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/`

    <note markdown=“1”> The ‘namespaceId` feature is only supported by IoT Greengrass at this time. For more information, see [Setting up IoT Greengrass core devices.]

    </note>
    

    [1]: docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html

Returns:

  • (Struct)

    Returns an empty response.



4929
4930
4931
4932
# File 'lib/aws-sdk-iot/client.rb', line 4929

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

#delete_job_template(params = {}) ⇒ Struct

Deletes the specified job template.

Examples:

Request syntax with placeholder values


resp = client.delete_job_template({
  job_template_id: "JobTemplateId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :job_template_id (required, String)

    The unique identifier of the job template to delete.

Returns:

  • (Struct)

    Returns an empty response.



4949
4950
4951
4952
# File 'lib/aws-sdk-iot/client.rb', line 4949

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

#delete_mitigation_action(params = {}) ⇒ Struct

Deletes a defined mitigation action from your Amazon Web Services accounts.

Requires permission to access the [DeleteMitigationAction] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_mitigation_action({
  action_name: "MitigationActionName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :action_name (required, String)

    The name of the mitigation action that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.



4976
4977
4978
4979
# File 'lib/aws-sdk-iot/client.rb', line 4976

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

#delete_ota_update(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_ota_update({
  ota_update_id: "OTAUpdateId", # required
  delete_stream: false,
  force_delete_aws_job: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :ota_update_id (required, String)

    The ID of the OTA update to delete.

  • :delete_stream (Boolean)

    When true, the stream created by the OTAUpdate process is deleted when the OTA update is deleted. Ignored if the stream specified in the OTAUpdate is supplied by the user.

  • :force_delete_aws_job (Boolean)

    When true, deletes the IoT job created by the OTAUpdate process even if it is “IN_PROGRESS”. Otherwise, if the job is not in a terminal state (“COMPLETED” or “CANCELED”) an exception will occur. The default is false.

Returns:

  • (Struct)

    Returns an empty response.



5015
5016
5017
5018
# File 'lib/aws-sdk-iot/client.rb', line 5015

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

#delete_package(params = {}) ⇒ Struct

Deletes a specific version from a software package.

Note: All package versions must be deleted before deleting the software package.

Requires permission to access the [DeletePackageVersion] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_package({
  package_name: "PackageName", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the target software package.

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



5053
5054
5055
5056
# File 'lib/aws-sdk-iot/client.rb', line 5053

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

#delete_package_version(params = {}) ⇒ Struct

Deletes a specific version from a software package.

Note: If a package version is designated as default, you must remove the designation from the software package using the UpdatePackage action.

Examples:

Request syntax with placeholder values


resp = client.delete_package_version({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the associated software package.

  • :version_name (required, String)

    The name of the target package version.

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



5090
5091
5092
5093
# File 'lib/aws-sdk-iot/client.rb', line 5090

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

#delete_policy(params = {}) ⇒ Struct

Deletes the specified policy.

A policy cannot be deleted if it has non-default versions or it is attached to any certificate.

To delete a policy, use the DeletePolicyVersion action to delete all non-default versions of the policy; use the DetachPolicy action to detach the policy from any certificate; and then use the DeletePolicy action to delete the policy.

When a policy is deleted using DeletePolicy, its default version is deleted with it.

<note markdown=“1”> Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before it’s ready to be deleted.

</note>

Requires permission to access the [DeletePolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_policy({
  policy_name: "PolicyName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The name of the policy to delete.

Returns:

  • (Struct)

    Returns an empty response.



5133
5134
5135
5136
# File 'lib/aws-sdk-iot/client.rb', line 5133

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

#delete_policy_version(params = {}) ⇒ Struct

Deletes the specified version of the specified policy. You cannot delete the default version of a policy using this action. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.

Requires permission to access the [DeletePolicyVersion] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_policy_version({
  policy_name: "PolicyName", # required
  policy_version_id: "PolicyVersionId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The name of the policy.

  • :policy_version_id (required, String)

    The policy version ID.

Returns:

  • (Struct)

    Returns an empty response.



5167
5168
5169
5170
# File 'lib/aws-sdk-iot/client.rb', line 5167

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

#delete_provisioning_template(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_provisioning_template({
  template_name: "TemplateName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the fleet provision template to delete.

Returns:

  • (Struct)

    Returns an empty response.



5194
5195
5196
5197
# File 'lib/aws-sdk-iot/client.rb', line 5194

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

#delete_provisioning_template_version(params = {}) ⇒ Struct

Deletes a provisioning template version.

Requires permission to access the

DeleteProvisioningTemplateVersion][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_provisioning_template_version({
  template_name: "TemplateName", # required
  version_id: 1, # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template version to delete.

  • :version_id (required, Integer)

    The provisioning template version ID to delete.

Returns:

  • (Struct)

    Returns an empty response.



5225
5226
5227
5228
# File 'lib/aws-sdk-iot/client.rb', line 5225

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

#delete_registration_code(params = {}) ⇒ Struct

Deletes a CA certificate registration code.

Requires permission to access the [DeleteRegistrationCode] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.



5242
5243
5244
5245
# File 'lib/aws-sdk-iot/client.rb', line 5242

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

#delete_role_alias(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_role_alias({
  role_alias: "RoleAlias", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :role_alias (required, String)

    The role alias to delete.

Returns:

  • (Struct)

    Returns an empty response.



5268
5269
5270
5271
# File 'lib/aws-sdk-iot/client.rb', line 5268

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

#delete_scheduled_audit(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_scheduled_audit({
  scheduled_audit_name: "ScheduledAuditName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :scheduled_audit_name (required, String)

    The name of the scheduled audit you want to delete.

Returns:

  • (Struct)

    Returns an empty response.



5294
5295
5296
5297
# File 'lib/aws-sdk-iot/client.rb', line 5294

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

#delete_security_profile(params = {}) ⇒ Struct

Deletes a Device Defender security profile.

Requires permission to access the [DeleteSecurityProfile] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_security_profile({
  security_profile_name: "SecurityProfileName", # required
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The name of the security profile to be deleted.

  • :expected_version (Integer)

    The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a ‘VersionConflictException` is thrown.

Returns:

  • (Struct)

    Returns an empty response.



5327
5328
5329
5330
# File 'lib/aws-sdk-iot/client.rb', line 5327

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

#delete_stream(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_stream({
  stream_id: "StreamId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :stream_id (required, String)

    The stream ID.

Returns:

  • (Struct)

    Returns an empty response.



5353
5354
5355
5356
# File 'lib/aws-sdk-iot/client.rb', line 5353

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

#delete_thing(params = {}) ⇒ Struct

Deletes the specified thing. Returns successfully with no error if the deletion is successful or you specify a thing that doesn’t exist.

Requires permission to access the [DeleteThing] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_thing({
  thing_name: "ThingName", # required
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing to delete.

  • :expected_version (Integer)

    The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the ‘DeleteThing` request is rejected with a `VersionConflictException`.

Returns:

  • (Struct)

    Returns an empty response.



5387
5388
5389
5390
# File 'lib/aws-sdk-iot/client.rb', line 5387

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

#delete_thing_group(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_thing_group({
  thing_group_name: "ThingGroupName", # required
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The name of the thing group to delete.

  • :expected_version (Integer)

    The expected version of the thing group to delete.

Returns:

  • (Struct)

    Returns an empty response.



5417
5418
5419
5420
# File 'lib/aws-sdk-iot/client.rb', line 5417

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

#delete_thing_type(params = {}) ⇒ Struct

Deletes the specified thing type. You cannot delete a thing type if it has things associated with it. To delete a thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things by calling UpdateThing to change the thing type on any associated thing, and finally use DeleteThingType to delete the thing type.

Requires permission to access the [DeleteThingType] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.delete_thing_type({
  thing_type_name: "ThingTypeName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_type_name (required, String)

    The name of the thing type.

Returns:

  • (Struct)

    Returns an empty response.



5448
5449
5450
5451
# File 'lib/aws-sdk-iot/client.rb', line 5448

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

#delete_topic_rule(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_topic_rule({
  rule_name: "RuleName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the rule.

Returns:

  • (Struct)

    Returns an empty response.



5474
5475
5476
5477
# File 'lib/aws-sdk-iot/client.rb', line 5474

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

#delete_topic_rule_destination(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_topic_rule_destination({
  arn: "AwsArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The ARN of the topic rule destination to delete.

Returns:

  • (Struct)

    Returns an empty response.



5501
5502
5503
5504
# File 'lib/aws-sdk-iot/client.rb', line 5501

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

#delete_v2_logging_level(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.delete_v2_logging_level({
  target_type: "DEFAULT", # required, accepts DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP, PRINCIPAL_ID
  target_name: "LogTargetName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :target_type (required, String)

    The type of resource for which you are configuring logging. Must be ‘THING_Group`.

  • :target_name (required, String)

    The name of the resource for which you are configuring logging.

Returns:

  • (Struct)

    Returns an empty response.



5532
5533
5534
5535
# File 'lib/aws-sdk-iot/client.rb', line 5532

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

#deprecate_thing_type(params = {}) ⇒ Struct

Deprecates a thing type. You can not associate new things with deprecated thing type.

Requires permission to access the [DeprecateThingType] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.deprecate_thing_type({
  thing_type_name: "ThingTypeName", # required
  undo_deprecate: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_type_name (required, String)

    The name of the thing type to deprecate.

  • :undo_deprecate (Boolean)

    Whether to undeprecate a deprecated thing type. If true, the thing type will not be deprecated anymore and you can associate it with things.

Returns:

  • (Struct)

    Returns an empty response.



5565
5566
5567
5568
# File 'lib/aws-sdk-iot/client.rb', line 5565

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

#describe_account_audit_configuration(params = {}) ⇒ Types::DescribeAccountAuditConfigurationResponse

Gets information about the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.

Requires permission to access the

DescribeAccountAuditConfiguration][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Response structure


resp.role_arn #=> String
resp.audit_notification_target_configurations #=> Hash
resp.audit_notification_target_configurations["AuditNotificationType"].target_arn #=> String
resp.audit_notification_target_configurations["AuditNotificationType"].role_arn #=> String
resp.audit_notification_target_configurations["AuditNotificationType"].enabled #=> Boolean
resp.audit_check_configurations #=> Hash
resp.audit_check_configurations["AuditCheckName"].enabled #=> Boolean

Parameters:

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

    ({})

Returns:



5599
5600
5601
5602
# File 'lib/aws-sdk-iot/client.rb', line 5599

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

#describe_audit_finding(params = {}) ⇒ Types::DescribeAuditFindingResponse

Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of the issue, and the start time when the audit that returned the finding.

Requires permission to access the [DescribeAuditFinding] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_audit_finding({
  finding_id: "FindingId", # required
})

Response structure


resp.finding.finding_id #=> String
resp.finding.task_id #=> String
resp.finding.check_name #=> String
resp.finding.task_start_time #=> Time
resp.finding.finding_time #=> Time
resp.finding.severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW"
resp.finding.non_compliant_resource.resource_type #=> String, one of "DEVICE_CERTIFICATE", "CA_CERTIFICATE", "IOT_POLICY", "COGNITO_IDENTITY_POOL", "CLIENT_ID", "ACCOUNT_SETTINGS", "ROLE_ALIAS", "IAM_ROLE", "ISSUER_CERTIFICATE"
resp.finding.non_compliant_resource.resource_identifier.device_certificate_id #=> String
resp.finding.non_compliant_resource.resource_identifier.ca_certificate_id #=> String
resp.finding.non_compliant_resource.resource_identifier.cognito_identity_pool_id #=> String
resp.finding.non_compliant_resource.resource_identifier.client_id #=> String
resp.finding.non_compliant_resource.resource_identifier.policy_version_identifier.policy_name #=> String
resp.finding.non_compliant_resource.resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.finding.non_compliant_resource.resource_identifier. #=> String
resp.finding.non_compliant_resource.resource_identifier.iam_role_arn #=> String
resp.finding.non_compliant_resource.resource_identifier.role_alias_arn #=> String
resp.finding.non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.finding.non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.finding.non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.finding.non_compliant_resource.resource_identifier.device_certificate_arn #=> String
resp.finding.non_compliant_resource.additional_info #=> Hash
resp.finding.non_compliant_resource.additional_info["String"] #=> String
resp.finding.related_resources #=> Array
resp.finding.related_resources[0].resource_type #=> String, one of "DEVICE_CERTIFICATE", "CA_CERTIFICATE", "IOT_POLICY", "COGNITO_IDENTITY_POOL", "CLIENT_ID", "ACCOUNT_SETTINGS", "ROLE_ALIAS", "IAM_ROLE", "ISSUER_CERTIFICATE"
resp.finding.related_resources[0].resource_identifier.device_certificate_id #=> String
resp.finding.related_resources[0].resource_identifier.ca_certificate_id #=> String
resp.finding.related_resources[0].resource_identifier.cognito_identity_pool_id #=> String
resp.finding.related_resources[0].resource_identifier.client_id #=> String
resp.finding.related_resources[0].resource_identifier.policy_version_identifier.policy_name #=> String
resp.finding.related_resources[0].resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.finding.related_resources[0].resource_identifier. #=> String
resp.finding.related_resources[0].resource_identifier.iam_role_arn #=> String
resp.finding.related_resources[0].resource_identifier.role_alias_arn #=> String
resp.finding.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.finding.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.finding.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.finding.related_resources[0].resource_identifier.device_certificate_arn #=> String
resp.finding.related_resources[0].additional_info #=> Hash
resp.finding.related_resources[0].additional_info["String"] #=> String
resp.finding.reason_for_non_compliance #=> String
resp.finding.reason_for_non_compliance_code #=> String
resp.finding.is_suppressed #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :finding_id (required, String)

    A unique identifier for a single audit finding. You can use this identifier to apply mitigation actions to the finding.

Returns:



5675
5676
5677
5678
# File 'lib/aws-sdk-iot/client.rb', line 5675

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

#describe_audit_mitigation_actions_task(params = {}) ⇒ Types::DescribeAuditMitigationActionsTaskResponse

Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit findings. Properties include the actions being applied, the audit checks to which they’re being applied, the task status, and aggregated task statistics.

Examples:

Request syntax with placeholder values


resp = client.describe_audit_mitigation_actions_task({
  task_id: "MitigationActionsTaskId", # required
})

Response structure


resp.task_status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELED"
resp.start_time #=> Time
resp.end_time #=> Time
resp.task_statistics #=> Hash
resp.task_statistics["AuditCheckName"].total_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].failed_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].succeeded_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].skipped_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].canceled_findings_count #=> Integer
resp.target.audit_task_id #=> String
resp.target.finding_ids #=> Array
resp.target.finding_ids[0] #=> String
resp.target.audit_check_to_reason_code_filter #=> Hash
resp.target.audit_check_to_reason_code_filter["AuditCheckName"] #=> Array
resp.target.audit_check_to_reason_code_filter["AuditCheckName"][0] #=> String
resp.audit_check_to_actions_mapping #=> Hash
resp.audit_check_to_actions_mapping["AuditCheckName"] #=> Array
resp.audit_check_to_actions_mapping["AuditCheckName"][0] #=> String
resp.actions_definition #=> Array
resp.actions_definition[0].name #=> String
resp.actions_definition[0].id #=> String
resp.actions_definition[0].role_arn #=> String
resp.actions_definition[0].action_params.update_device_certificate_params.action #=> String, one of "DEACTIVATE"
resp.actions_definition[0].action_params.update_ca_certificate_params.action #=> String, one of "DEACTIVATE"
resp.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names #=> Array
resp.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names[0] #=> String
resp.actions_definition[0].action_params.add_things_to_thing_group_params.override_dynamic_groups #=> Boolean
resp.actions_definition[0].action_params.replace_default_policy_version_params.template_name #=> String, one of "BLANK_POLICY"
resp.actions_definition[0].action_params.enable_io_t_logging_params.role_arn_for_logging #=> String
resp.actions_definition[0].action_params.enable_io_t_logging_params.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.actions_definition[0].action_params.publish_finding_to_sns_params.topic_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier for the audit mitigation task.

Returns:



5740
5741
5742
5743
# File 'lib/aws-sdk-iot/client.rb', line 5740

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

#describe_audit_suppression(params = {}) ⇒ Types::DescribeAuditSuppressionResponse

Gets information about a Device Defender audit suppression.

Examples:

Request syntax with placeholder values


resp = client.describe_audit_suppression({
  check_name: "AuditCheckName", # required
  resource_identifier: { # required
    device_certificate_id: "CertificateId",
    ca_certificate_id: "CertificateId",
    cognito_identity_pool_id: "CognitoIdentityPoolId",
    client_id: "ClientId",
    policy_version_identifier: {
      policy_name: "PolicyName",
      policy_version_id: "PolicyVersionId",
    },
    account: "AwsAccountId",
    iam_role_arn: "RoleArn",
    role_alias_arn: "RoleAliasArn",
    issuer_certificate_identifier: {
      issuer_certificate_subject: "IssuerCertificateSubject",
      issuer_id: "IssuerId",
      issuer_certificate_serial_number: "IssuerCertificateSerialNumber",
    },
    device_certificate_arn: "CertificateArn",
  },
})

Response structure


resp.check_name #=> String
resp.resource_identifier.device_certificate_id #=> String
resp.resource_identifier.ca_certificate_id #=> String
resp.resource_identifier.cognito_identity_pool_id #=> String
resp.resource_identifier.client_id #=> String
resp.resource_identifier.policy_version_identifier.policy_name #=> String
resp.resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.resource_identifier. #=> String
resp.resource_identifier.iam_role_arn #=> String
resp.resource_identifier.role_alias_arn #=> String
resp.resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.resource_identifier.device_certificate_arn #=> String
resp.expiration_date #=> Time
resp.suppress_indefinitely #=> Boolean
resp.description #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (required, String)

    An audit check name. Checks must be enabled for your account. (Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)

  • :resource_identifier (required, Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

Returns:



5811
5812
5813
5814
# File 'lib/aws-sdk-iot/client.rb', line 5811

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

#describe_audit_task(params = {}) ⇒ Types::DescribeAuditTaskResponse

Gets information about a Device Defender audit.

Requires permission to access the [DescribeAuditTask] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_audit_task({
  task_id: "AuditTaskId", # required
})

Response structure


resp.task_status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELED"
resp.task_type #=> String, one of "ON_DEMAND_AUDIT_TASK", "SCHEDULED_AUDIT_TASK"
resp.task_start_time #=> Time
resp.task_statistics.total_checks #=> Integer
resp.task_statistics.in_progress_checks #=> Integer
resp.task_statistics.waiting_for_data_collection_checks #=> Integer
resp.task_statistics.compliant_checks #=> Integer
resp.task_statistics.non_compliant_checks #=> Integer
resp.task_statistics.failed_checks #=> Integer
resp.task_statistics.canceled_checks #=> Integer
resp.scheduled_audit_name #=> String
resp.audit_details #=> Hash
resp.audit_details["AuditCheckName"].check_run_status #=> String, one of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", "FAILED"
resp.audit_details["AuditCheckName"].check_compliant #=> Boolean
resp.audit_details["AuditCheckName"].total_resources_count #=> Integer
resp.audit_details["AuditCheckName"].non_compliant_resources_count #=> Integer
resp.audit_details["AuditCheckName"].suppressed_non_compliant_resources_count #=> Integer
resp.audit_details["AuditCheckName"].error_code #=> String
resp.audit_details["AuditCheckName"].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The ID of the audit whose information you want to get.

Returns:



5866
5867
5868
5869
# File 'lib/aws-sdk-iot/client.rb', line 5866

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

#describe_authorizer(params = {}) ⇒ Types::DescribeAuthorizerResponse

Examples:

Request syntax with placeholder values


resp = client.describe_authorizer({
  authorizer_name: "AuthorizerName", # required
})

Response structure


resp.authorizer_description.authorizer_name #=> String
resp.authorizer_description.authorizer_arn #=> String
resp.authorizer_description.authorizer_function_arn #=> String
resp.authorizer_description.token_key_name #=> String
resp.authorizer_description.token_signing_public_keys #=> Hash
resp.authorizer_description.token_signing_public_keys["KeyName"] #=> String
resp.authorizer_description.status #=> String, one of "ACTIVE", "INACTIVE"
resp.authorizer_description.creation_date #=> Time
resp.authorizer_description.last_modified_date #=> Time
resp.authorizer_description.signing_disabled #=> Boolean
resp.authorizer_description.enable_caching_for_http #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The name of the authorizer to describe.

Returns:



5908
5909
5910
5911
# File 'lib/aws-sdk-iot/client.rb', line 5908

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

#describe_billing_group(params = {}) ⇒ Types::DescribeBillingGroupResponse

Returns information about a billing group.

Requires permission to access the [DescribeBillingGroup] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_billing_group({
  billing_group_name: "BillingGroupName", # required
})

Response structure


resp.billing_group_name #=> String
resp.billing_group_id #=> String
resp.billing_group_arn #=> String
resp.version #=> Integer
resp.billing_group_properties.billing_group_description #=> String
resp..creation_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name of the billing group.

Returns:



5950
5951
5952
5953
# File 'lib/aws-sdk-iot/client.rb', line 5950

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

#describe_ca_certificate(params = {}) ⇒ Types::DescribeCACertificateResponse

Describes a registered CA certificate.

Requires permission to access the [DescribeCACertificate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_ca_certificate({
  certificate_id: "CertificateId", # required
})

Response structure


resp.certificate_description.certificate_arn #=> String
resp.certificate_description.certificate_id #=> String
resp.certificate_description.status #=> String, one of "ACTIVE", "INACTIVE"
resp.certificate_description.certificate_pem #=> String
resp.certificate_description.owned_by #=> String
resp.certificate_description.creation_date #=> Time
resp.certificate_description.auto_registration_status #=> String, one of "ENABLE", "DISABLE"
resp.certificate_description.last_modified_date #=> Time
resp.certificate_description.customer_version #=> Integer
resp.certificate_description.generation_id #=> String
resp.certificate_description.validity.not_before #=> Time
resp.certificate_description.validity.not_after #=> Time
resp.certificate_description.certificate_mode #=> String, one of "DEFAULT", "SNI_ONLY"
resp.registration_config.template_body #=> String
resp.registration_config.role_arn #=> String
resp.registration_config.template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The CA certificate identifier.

Returns:



5998
5999
6000
6001
# File 'lib/aws-sdk-iot/client.rb', line 5998

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

#describe_certificate(params = {}) ⇒ Types::DescribeCertificateResponse

Gets information about the specified certificate.

Requires permission to access the [DescribeCertificate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_certificate({
  certificate_id: "CertificateId", # required
})

Response structure


resp.certificate_description.certificate_arn #=> String
resp.certificate_description.certificate_id #=> String
resp.certificate_description.ca_certificate_id #=> String
resp.certificate_description.status #=> String, one of "ACTIVE", "INACTIVE", "REVOKED", "PENDING_TRANSFER", "REGISTER_INACTIVE", "PENDING_ACTIVATION"
resp.certificate_description.certificate_pem #=> String
resp.certificate_description.owned_by #=> String
resp.certificate_description.previous_owned_by #=> String
resp.certificate_description.creation_date #=> Time
resp.certificate_description.last_modified_date #=> Time
resp.certificate_description.customer_version #=> Integer
resp.certificate_description.transfer_data.transfer_message #=> String
resp.certificate_description.transfer_data.reject_reason #=> String
resp.certificate_description.transfer_data.transfer_date #=> Time
resp.certificate_description.transfer_data.accept_date #=> Time
resp.certificate_description.transfer_data.reject_date #=> Time
resp.certificate_description.generation_id #=> String
resp.certificate_description.validity.not_before #=> Time
resp.certificate_description.validity.not_after #=> Time
resp.certificate_description.certificate_mode #=> String, one of "DEFAULT", "SNI_ONLY"

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

Returns:



6049
6050
6051
6052
# File 'lib/aws-sdk-iot/client.rb', line 6049

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

#describe_certificate_provider(params = {}) ⇒ Types::DescribeCertificateProviderResponse

Examples:

Request syntax with placeholder values


resp = client.describe_certificate_provider({
  certificate_provider_name: "CertificateProviderName", # required
})

Response structure


resp.certificate_provider_name #=> String
resp.certificate_provider_arn #=> String
resp.lambda_function_arn #=> String
resp. #=> Array
resp.[0] #=> String, one of "CreateCertificateFromCsr"
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_provider_name (required, String)

    The name of the certificate provider.

Returns:



6093
6094
6095
6096
# File 'lib/aws-sdk-iot/client.rb', line 6093

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

#describe_custom_metric(params = {}) ⇒ Types::DescribeCustomMetricResponse

Gets information about a Device Defender detect custom metric.

Requires permission to access the [DescribeCustomMetric] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_custom_metric({
  metric_name: "MetricName", # required
})

Response structure


resp.metric_name #=> String
resp.metric_arn #=> String
resp.metric_type #=> String, one of "string-list", "ip-address-list", "number-list", "number"
resp.display_name #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the custom metric.

Returns:



6135
6136
6137
6138
# File 'lib/aws-sdk-iot/client.rb', line 6135

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

#describe_default_authorizer(params = {}) ⇒ Types::DescribeDefaultAuthorizerResponse

Examples:

Response structure


resp.authorizer_description.authorizer_name #=> String
resp.authorizer_description.authorizer_arn #=> String
resp.authorizer_description.authorizer_function_arn #=> String
resp.authorizer_description.token_key_name #=> String
resp.authorizer_description.token_signing_public_keys #=> Hash
resp.authorizer_description.token_signing_public_keys["KeyName"] #=> String
resp.authorizer_description.status #=> String, one of "ACTIVE", "INACTIVE"
resp.authorizer_description.creation_date #=> Time
resp.authorizer_description.last_modified_date #=> Time
resp.authorizer_description.signing_disabled #=> Boolean
resp.authorizer_description.enable_caching_for_http #=> Boolean

Parameters:

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

    ({})

Returns:



6169
6170
6171
6172
# File 'lib/aws-sdk-iot/client.rb', line 6169

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

#describe_detect_mitigation_actions_task(params = {}) ⇒ Types::DescribeDetectMitigationActionsTaskResponse

Gets information about a Device Defender ML Detect mitigation action.

Requires permission to access the

DescribeDetectMitigationActionsTask][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_detect_mitigation_actions_task({
  task_id: "MitigationActionsTaskId", # required
})

Response structure


resp.task_summary.task_id #=> String
resp.task_summary.task_status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED", "CANCELED"
resp.task_summary.task_start_time #=> Time
resp.task_summary.task_end_time #=> Time
resp.task_summary.target.violation_ids #=> Array
resp.task_summary.target.violation_ids[0] #=> String
resp.task_summary.target.security_profile_name #=> String
resp.task_summary.target.behavior_name #=> String
resp.task_summary.violation_event_occurrence_range.start_time #=> Time
resp.task_summary.violation_event_occurrence_range.end_time #=> Time
resp.task_summary.only_active_violations_included #=> Boolean
resp.task_summary.suppressed_alerts_included #=> Boolean
resp.task_summary.actions_definition #=> Array
resp.task_summary.actions_definition[0].name #=> String
resp.task_summary.actions_definition[0].id #=> String
resp.task_summary.actions_definition[0].role_arn #=> String
resp.task_summary.actions_definition[0].action_params.update_device_certificate_params.action #=> String, one of "DEACTIVATE"
resp.task_summary.actions_definition[0].action_params.update_ca_certificate_params.action #=> String, one of "DEACTIVATE"
resp.task_summary.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names #=> Array
resp.task_summary.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names[0] #=> String
resp.task_summary.actions_definition[0].action_params.add_things_to_thing_group_params.override_dynamic_groups #=> Boolean
resp.task_summary.actions_definition[0].action_params.replace_default_policy_version_params.template_name #=> String, one of "BLANK_POLICY"
resp.task_summary.actions_definition[0].action_params.enable_io_t_logging_params.role_arn_for_logging #=> String
resp.task_summary.actions_definition[0].action_params.enable_io_t_logging_params.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.task_summary.actions_definition[0].action_params.publish_finding_to_sns_params.topic_arn #=> String
resp.task_summary.task_statistics.actions_executed #=> Integer
resp.task_summary.task_statistics.actions_skipped #=> Integer
resp.task_summary.task_statistics.actions_failed #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier of the task.

Returns:



6229
6230
6231
6232
# File 'lib/aws-sdk-iot/client.rb', line 6229

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

#describe_dimension(params = {}) ⇒ Types::DescribeDimensionResponse

Provides details about a dimension that is defined in your Amazon Web Services accounts.

Requires permission to access the [DescribeDimension] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_dimension({
  name: "DimensionName", # required
})

Response structure


resp.name #=> String
resp.arn #=> String
resp.type #=> String, one of "TOPIC_FILTER"
resp.string_values #=> Array
resp.string_values[0] #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The unique identifier for the dimension.

Returns:



6273
6274
6275
6276
# File 'lib/aws-sdk-iot/client.rb', line 6273

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

#describe_domain_configuration(params = {}) ⇒ Types::DescribeDomainConfigurationResponse

Gets summary information about a domain configuration.

Requires permission to access the [DescribeDomainConfiguration] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_domain_configuration({
  domain_configuration_name: "ReservedDomainConfigurationName", # required
})

Response structure


resp.domain_configuration_name #=> String
resp.domain_configuration_arn #=> String
resp.domain_name #=> String
resp.server_certificates #=> Array
resp.server_certificates[0].server_certificate_arn #=> String
resp.server_certificates[0].server_certificate_status #=> String, one of "INVALID", "VALID"
resp.server_certificates[0].server_certificate_status_detail #=> String
resp.authorizer_config.default_authorizer_name #=> String
resp.authorizer_config.allow_authorizer_override #=> Boolean
resp.domain_configuration_status #=> String, one of "ENABLED", "DISABLED"
resp.service_type #=> String, one of "DATA", "CREDENTIAL_PROVIDER", "JOBS"
resp.domain_type #=> String, one of "ENDPOINT", "AWS_MANAGED", "CUSTOMER_MANAGED"
resp.last_status_change_date #=> Time
resp.tls_config.security_policy #=> String
resp.server_certificate_config.enable_ocsp_check #=> Boolean
resp.server_certificate_config.ocsp_lambda_arn #=> String
resp.server_certificate_config.ocsp_authorized_responder_arn #=> String
resp.authentication_type #=> String, one of "CUSTOM_AUTH_X509", "CUSTOM_AUTH", "AWS_X509", "AWS_SIGV4", "DEFAULT"
resp.application_protocol #=> String, one of "SECURE_MQTT", "MQTT_WSS", "HTTPS", "DEFAULT"
resp.client_certificate_config.client_certificate_callback_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_configuration_name (required, String)

    The name of the domain configuration.

Returns:



6338
6339
6340
6341
# File 'lib/aws-sdk-iot/client.rb', line 6338

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

#describe_endpoint(params = {}) ⇒ Types::DescribeEndpointResponse

Returns or creates a unique endpoint specific to the Amazon Web Services account making the call.

<note markdown=“1”> The first time ‘DescribeEndpoint` is called, an endpoint is created. All subsequent calls to `DescribeEndpoint` return the same endpoint.

</note>

Requires permission to access the [DescribeEndpoint] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_endpoint({
  endpoint_type: "EndpointType",
})

Response structure


resp.endpoint_address #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :endpoint_type (String)

    The endpoint type. Valid endpoint types include:

    • ‘iot:Data` - Returns a VeriSign signed data endpoint.

    ^ ^

    • ‘iot:Data-ATS` - Returns an ATS signed data endpoint.

    ^ ^

    • ‘iot:CredentialProvider` - Returns an IoT credentials provider API endpoint.

    ^ ^

    • ‘iot:Jobs` - Returns an IoT device management Jobs API endpoint.

    ^

    We strongly recommend that customers use the newer ‘iot:Data-ATS` endpoint type to avoid issues related to the widespread distrust of Symantec certificate authorities. ATS Signed Certificates are more secure and are trusted by most popular browsers.

Returns:



6401
6402
6403
6404
# File 'lib/aws-sdk-iot/client.rb', line 6401

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

#describe_event_configurations(params = {}) ⇒ Types::DescribeEventConfigurationsResponse

Examples:

Response structure


resp.event_configurations #=> Hash
resp.event_configurations["EventType"].enabled #=> Boolean
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Returns:



6430
6431
6432
6433
# File 'lib/aws-sdk-iot/client.rb', line 6430

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

#describe_fleet_metric(params = {}) ⇒ Types::DescribeFleetMetricResponse

Gets information about the specified fleet metric.

Requires permission to access the [DescribeFleetMetric] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_fleet_metric({
  metric_name: "FleetMetricName", # required
})

Response structure


resp.metric_name #=> String
resp.query_string #=> String
resp.aggregation_type.name #=> String, one of "Statistics", "Percentiles", "Cardinality"
resp.aggregation_type.values #=> Array
resp.aggregation_type.values[0] #=> String
resp.period #=> Integer
resp.aggregation_field #=> String
resp.description #=> String
resp.query_version #=> String
resp.index_name #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.unit #=> String, one of "Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None"
resp.version #=> Integer
resp.metric_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the fleet metric to describe.

Returns:



6488
6489
6490
6491
# File 'lib/aws-sdk-iot/client.rb', line 6488

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

#describe_index(params = {}) ⇒ Types::DescribeIndexResponse

Examples:

Request syntax with placeholder values


resp = client.describe_index({
  index_name: "IndexName", # required
})

Response structure


resp.index_name #=> String
resp.index_status #=> String, one of "ACTIVE", "BUILDING", "REBUILDING"
resp.schema #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The index name.

Returns:



6524
6525
6526
6527
# File 'lib/aws-sdk-iot/client.rb', line 6524

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

#describe_job(params = {}) ⇒ Types::DescribeJobResponse

Examples:

Request syntax with placeholder values


resp = client.describe_job({
  job_id: "JobId", # required
  before_substitution: false,
})

Response structure


resp.document_source #=> String
resp.job.job_arn #=> String
resp.job.job_id #=> String
resp.job.target_selection #=> String, one of "CONTINUOUS", "SNAPSHOT"
resp.job.status #=> String, one of "IN_PROGRESS", "CANCELED", "COMPLETED", "DELETION_IN_PROGRESS", "SCHEDULED"
resp.job.force_canceled #=> Boolean
resp.job.reason_code #=> String
resp.job.comment #=> String
resp.job.targets #=> Array
resp.job.targets[0] #=> String
resp.job.description #=> String
resp.job.presigned_url_config.role_arn #=> String
resp.job.presigned_url_config.expires_in_sec #=> Integer
resp.job.job_executions_rollout_config.maximum_per_minute #=> Integer
resp.job.job_executions_rollout_config.exponential_rate.base_rate_per_minute #=> Integer
resp.job.job_executions_rollout_config.exponential_rate.increment_factor #=> Float
resp.job.job_executions_rollout_config.exponential_rate.rate_increase_criteria.number_of_notified_things #=> Integer
resp.job.job_executions_rollout_config.exponential_rate.rate_increase_criteria.number_of_succeeded_things #=> Integer
resp.job.abort_config.criteria_list #=> Array
resp.job.abort_config.criteria_list[0].failure_type #=> String, one of "FAILED", "REJECTED", "TIMED_OUT", "ALL"
resp.job.abort_config.criteria_list[0].action #=> String, one of "CANCEL"
resp.job.abort_config.criteria_list[0].threshold_percentage #=> Float
resp.job.abort_config.criteria_list[0].min_number_of_executed_things #=> Integer
resp.job.created_at #=> Time
resp.job.last_updated_at #=> Time
resp.job.completed_at #=> Time
resp.job.job_process_details.processing_targets #=> Array
resp.job.job_process_details.processing_targets[0] #=> String
resp.job.job_process_details.number_of_canceled_things #=> Integer
resp.job.job_process_details.number_of_succeeded_things #=> Integer
resp.job.job_process_details.number_of_failed_things #=> Integer
resp.job.job_process_details.number_of_rejected_things #=> Integer
resp.job.job_process_details.number_of_queued_things #=> Integer
resp.job.job_process_details.number_of_in_progress_things #=> Integer
resp.job.job_process_details.number_of_removed_things #=> Integer
resp.job.job_process_details.number_of_timed_out_things #=> Integer
resp.job.timeout_config.in_progress_timeout_in_minutes #=> Integer
resp.job.namespace_id #=> String
resp.job.job_template_arn #=> String
resp.job.job_executions_retry_config.criteria_list #=> Array
resp.job.job_executions_retry_config.criteria_list[0].failure_type #=> String, one of "FAILED", "TIMED_OUT", "ALL"
resp.job.job_executions_retry_config.criteria_list[0].number_of_retries #=> Integer
resp.job.document_parameters #=> Hash
resp.job.document_parameters["ParameterKey"] #=> String
resp.job.is_concurrent #=> Boolean
resp.job.scheduling_config.start_time #=> String
resp.job.scheduling_config.end_time #=> String
resp.job.scheduling_config.end_behavior #=> String, one of "STOP_ROLLOUT", "CANCEL", "FORCE_CANCEL"
resp.job.scheduling_config.maintenance_windows #=> Array
resp.job.scheduling_config.maintenance_windows[0].start_time #=> String
resp.job.scheduling_config.maintenance_windows[0].duration_in_minutes #=> Integer
resp.job.scheduled_job_rollouts #=> Array
resp.job.scheduled_job_rollouts[0].start_time #=> String
resp.job.destination_package_versions #=> Array
resp.job.destination_package_versions[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The unique identifier you assigned to this job when it was created.

  • :before_substitution (Boolean)

    Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.

Returns:



6616
6617
6618
6619
# File 'lib/aws-sdk-iot/client.rb', line 6616

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

#describe_job_execution(params = {}) ⇒ Types::DescribeJobExecutionResponse

Examples:

Request syntax with placeholder values


resp = client.describe_job_execution({
  job_id: "JobId", # required
  thing_name: "ThingName", # required
  execution_number: 1,
})

Response structure


resp.execution.job_id #=> String
resp.execution.status #=> String, one of "QUEUED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "TIMED_OUT", "REJECTED", "REMOVED", "CANCELED"
resp.execution.force_canceled #=> Boolean
resp.execution.status_details.details_map #=> Hash
resp.execution.status_details.details_map["DetailsKey"] #=> String
resp.execution.thing_arn #=> String
resp.execution.queued_at #=> Time
resp.execution.started_at #=> Time
resp.execution.last_updated_at #=> Time
resp.execution.execution_number #=> Integer
resp.execution.version_number #=> Integer
resp.execution.approximate_seconds_before_timed_out #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The unique identifier you assigned to this job when it was created.

  • :thing_name (required, String)

    The name of the thing on which the job execution is running.

  • :execution_number (Integer)

    A string (consisting of the digits “0” through “9” which is used to specify a particular job execution on a particular device.

Returns:



6668
6669
6670
6671
# File 'lib/aws-sdk-iot/client.rb', line 6668

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

#describe_job_template(params = {}) ⇒ Types::DescribeJobTemplateResponse

Returns information about a job template.

Examples:

Request syntax with placeholder values


resp = client.describe_job_template({
  job_template_id: "JobTemplateId", # required
})

Response structure


resp.job_template_arn #=> String
resp.job_template_id #=> String
resp.description #=> String
resp.document_source #=> String
resp.document #=> String
resp.created_at #=> Time
resp.presigned_url_config.role_arn #=> String
resp.presigned_url_config.expires_in_sec #=> Integer
resp.job_executions_rollout_config.maximum_per_minute #=> Integer
resp.job_executions_rollout_config.exponential_rate.base_rate_per_minute #=> Integer
resp.job_executions_rollout_config.exponential_rate.increment_factor #=> Float
resp.job_executions_rollout_config.exponential_rate.rate_increase_criteria.number_of_notified_things #=> Integer
resp.job_executions_rollout_config.exponential_rate.rate_increase_criteria.number_of_succeeded_things #=> Integer
resp.abort_config.criteria_list #=> Array
resp.abort_config.criteria_list[0].failure_type #=> String, one of "FAILED", "REJECTED", "TIMED_OUT", "ALL"
resp.abort_config.criteria_list[0].action #=> String, one of "CANCEL"
resp.abort_config.criteria_list[0].threshold_percentage #=> Float
resp.abort_config.criteria_list[0].min_number_of_executed_things #=> Integer
resp.timeout_config.in_progress_timeout_in_minutes #=> Integer
resp.job_executions_retry_config.criteria_list #=> Array
resp.job_executions_retry_config.criteria_list[0].failure_type #=> String, one of "FAILED", "TIMED_OUT", "ALL"
resp.job_executions_retry_config.criteria_list[0].number_of_retries #=> Integer
resp.maintenance_windows #=> Array
resp.maintenance_windows[0].start_time #=> String
resp.maintenance_windows[0].duration_in_minutes #=> Integer
resp.destination_package_versions #=> Array
resp.destination_package_versions[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_template_id (required, String)

    The unique identifier of the job template.

Returns:



6732
6733
6734
6735
# File 'lib/aws-sdk-iot/client.rb', line 6732

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

#describe_managed_job_template(params = {}) ⇒ Types::DescribeManagedJobTemplateResponse

View details of a managed job template.

Examples:

Request syntax with placeholder values


resp = client.describe_managed_job_template({
  template_name: "ManagedJobTemplateName", # required
  template_version: "ManagedTemplateVersion",
})

Response structure


resp.template_name #=> String
resp.template_arn #=> String
resp.description #=> String
resp.template_version #=> String
resp.environments #=> Array
resp.environments[0] #=> String
resp.document_parameters #=> Array
resp.document_parameters[0].key #=> String
resp.document_parameters[0].description #=> String
resp.document_parameters[0].regex #=> String
resp.document_parameters[0].example #=> String
resp.document_parameters[0].optional #=> Boolean
resp.document #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The unique name of a managed job template, which is required.

  • :template_version (String)

    An optional parameter to specify version of a managed template. If not specified, the pre-defined default version is returned.

Returns:



6781
6782
6783
6784
# File 'lib/aws-sdk-iot/client.rb', line 6781

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

#describe_mitigation_action(params = {}) ⇒ Types::DescribeMitigationActionResponse

Gets information about a mitigation action.

Requires permission to access the [DescribeMitigationAction] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_mitigation_action({
  action_name: "MitigationActionName", # required
})

Response structure


resp.action_name #=> String
resp.action_type #=> String, one of "UPDATE_DEVICE_CERTIFICATE", "UPDATE_CA_CERTIFICATE", "ADD_THINGS_TO_THING_GROUP", "REPLACE_DEFAULT_POLICY_VERSION", "ENABLE_IOT_LOGGING", "PUBLISH_FINDING_TO_SNS"
resp.action_arn #=> String
resp.action_id #=> String
resp.role_arn #=> String
resp.action_params.update_device_certificate_params.action #=> String, one of "DEACTIVATE"
resp.action_params.update_ca_certificate_params.action #=> String, one of "DEACTIVATE"
resp.action_params.add_things_to_thing_group_params.thing_group_names #=> Array
resp.action_params.add_things_to_thing_group_params.thing_group_names[0] #=> String
resp.action_params.add_things_to_thing_group_params.override_dynamic_groups #=> Boolean
resp.action_params.replace_default_policy_version_params.template_name #=> String, one of "BLANK_POLICY"
resp.action_params.enable_io_t_logging_params.role_arn_for_logging #=> String
resp.action_params.enable_io_t_logging_params.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.action_params.publish_finding_to_sns_params.topic_arn #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :action_name (required, String)

    The friendly name that uniquely identifies the mitigation action.

Returns:



6836
6837
6838
6839
# File 'lib/aws-sdk-iot/client.rb', line 6836

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

#describe_provisioning_template(params = {}) ⇒ Types::DescribeProvisioningTemplateResponse

Returns information about a provisioning template.

Requires permission to access the [DescribeProvisioningTemplate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_provisioning_template({
  template_name: "TemplateName", # required
})

Response structure


resp.template_arn #=> String
resp.template_name #=> String
resp.description #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.default_version_id #=> Integer
resp.template_body #=> String
resp.enabled #=> Boolean
resp.provisioning_role_arn #=> String
resp.pre_provisioning_hook.payload_version #=> String
resp.pre_provisioning_hook.target_arn #=> String
resp.type #=> String, one of "FLEET_PROVISIONING", "JITP"

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template.

Returns:



6890
6891
6892
6893
# File 'lib/aws-sdk-iot/client.rb', line 6890

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

#describe_provisioning_template_version(params = {}) ⇒ Types::DescribeProvisioningTemplateVersionResponse

Returns information about a provisioning template version.

Requires permission to access the

DescribeProvisioningTemplateVersion][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_provisioning_template_version({
  template_name: "TemplateName", # required
  version_id: 1, # required
})

Response structure


resp.version_id #=> Integer
resp.creation_date #=> Time
resp.template_body #=> String
resp.is_default_version #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The template name.

  • :version_id (required, Integer)

    The provisioning template version ID.

Returns:



6933
6934
6935
6936
# File 'lib/aws-sdk-iot/client.rb', line 6933

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

#describe_role_alias(params = {}) ⇒ Types::DescribeRoleAliasResponse

Examples:

Request syntax with placeholder values


resp = client.describe_role_alias({
  role_alias: "RoleAlias", # required
})

Response structure


resp.role_alias_description.role_alias #=> String
resp.role_alias_description.role_alias_arn #=> String
resp.role_alias_description.role_arn #=> String
resp.role_alias_description.owner #=> String
resp.role_alias_description.credential_duration_seconds #=> Integer
resp.role_alias_description.creation_date #=> Time
resp.role_alias_description.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :role_alias (required, String)

    The role alias to describe.

Returns:



6971
6972
6973
6974
# File 'lib/aws-sdk-iot/client.rb', line 6971

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

#describe_scheduled_audit(params = {}) ⇒ Types::DescribeScheduledAuditResponse

Gets information about a scheduled audit.

Requires permission to access the [DescribeScheduledAudit] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_scheduled_audit({
  scheduled_audit_name: "ScheduledAuditName", # required
})

Response structure


resp.frequency #=> String, one of "DAILY", "WEEKLY", "BIWEEKLY", "MONTHLY"
resp.day_of_month #=> String
resp.day_of_week #=> String, one of "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"
resp.target_check_names #=> Array
resp.target_check_names[0] #=> String
resp.scheduled_audit_name #=> String
resp.scheduled_audit_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scheduled_audit_name (required, String)

    The name of the scheduled audit whose information you want to get.

Returns:



7014
7015
7016
7017
# File 'lib/aws-sdk-iot/client.rb', line 7014

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

#describe_security_profile(params = {}) ⇒ Types::DescribeSecurityProfileResponse

Gets information about a Device Defender security profile.

Requires permission to access the [DescribeSecurityProfile] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_security_profile({
  security_profile_name: "SecurityProfileName", # required
})

Response structure


resp.security_profile_name #=> String
resp.security_profile_arn #=> String
resp.security_profile_description #=> String
resp.behaviors #=> Array
resp.behaviors[0].name #=> String
resp.behaviors[0].metric #=> String
resp.behaviors[0].metric_dimension.dimension_name #=> String
resp.behaviors[0].metric_dimension.operator #=> String, one of "IN", "NOT_IN"
resp.behaviors[0].criteria.comparison_operator #=> String, one of "less-than", "less-than-equals", "greater-than", "greater-than-equals", "in-cidr-set", "not-in-cidr-set", "in-port-set", "not-in-port-set", "in-set", "not-in-set"
resp.behaviors[0].criteria.value.count #=> Integer
resp.behaviors[0].criteria.value.cidrs #=> Array
resp.behaviors[0].criteria.value.cidrs[0] #=> String
resp.behaviors[0].criteria.value.ports #=> Array
resp.behaviors[0].criteria.value.ports[0] #=> Integer
resp.behaviors[0].criteria.value.number #=> Float
resp.behaviors[0].criteria.value.numbers #=> Array
resp.behaviors[0].criteria.value.numbers[0] #=> Float
resp.behaviors[0].criteria.value.strings #=> Array
resp.behaviors[0].criteria.value.strings[0] #=> String
resp.behaviors[0].criteria.duration_seconds #=> Integer
resp.behaviors[0].criteria.consecutive_datapoints_to_alarm #=> Integer
resp.behaviors[0].criteria.consecutive_datapoints_to_clear #=> Integer
resp.behaviors[0].criteria.statistical_threshold.statistic #=> String
resp.behaviors[0].criteria.ml_detection_config.confidence_level #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.behaviors[0].suppress_alerts #=> Boolean
resp.behaviors[0].export_metric #=> Boolean
resp.alert_targets #=> Hash
resp.alert_targets["AlertTargetType"].alert_target_arn #=> String
resp.alert_targets["AlertTargetType"].role_arn #=> String
resp.additional_metrics_to_retain #=> Array
resp.additional_metrics_to_retain[0] #=> String
resp.additional_metrics_to_retain_v2 #=> Array
resp.additional_metrics_to_retain_v2[0].metric #=> String
resp.additional_metrics_to_retain_v2[0].metric_dimension.dimension_name #=> String
resp.additional_metrics_to_retain_v2[0].metric_dimension.operator #=> String, one of "IN", "NOT_IN"
resp.additional_metrics_to_retain_v2[0].export_metric #=> Boolean
resp.version #=> Integer
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.metrics_export_config.mqtt_topic #=> String
resp.metrics_export_config.role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The name of the security profile whose information you want to get.

Returns:



7096
7097
7098
7099
# File 'lib/aws-sdk-iot/client.rb', line 7096

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

#describe_stream(params = {}) ⇒ Types::DescribeStreamResponse

Gets information about a stream.

Requires permission to access the [DescribeStream] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_stream({
  stream_id: "StreamId", # required
})

Response structure


resp.stream_info.stream_id #=> String
resp.stream_info.stream_arn #=> String
resp.stream_info.stream_version #=> Integer
resp.stream_info.description #=> String
resp.stream_info.files #=> Array
resp.stream_info.files[0].file_id #=> Integer
resp.stream_info.files[0].s3_location.bucket #=> String
resp.stream_info.files[0].s3_location.key #=> String
resp.stream_info.files[0].s3_location.version #=> String
resp.stream_info.created_at #=> Time
resp.stream_info.last_updated_at #=> Time
resp.stream_info.role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :stream_id (required, String)

    The stream ID.

Returns:



7139
7140
7141
7142
# File 'lib/aws-sdk-iot/client.rb', line 7139

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

#describe_thing(params = {}) ⇒ Types::DescribeThingResponse

Gets information about the specified thing.

Requires permission to access the [DescribeThing] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_thing({
  thing_name: "ThingName", # required
})

Response structure


resp.default_client_id #=> String
resp.thing_name #=> String
resp.thing_id #=> String
resp.thing_arn #=> String
resp.thing_type_name #=> String
resp.attributes #=> Hash
resp.attributes["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.version #=> Integer
resp.billing_group_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing.

Returns:



7186
7187
7188
7189
# File 'lib/aws-sdk-iot/client.rb', line 7186

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

#describe_thing_group(params = {}) ⇒ Types::DescribeThingGroupResponse

Examples:

Request syntax with placeholder values


resp = client.describe_thing_group({
  thing_group_name: "ThingGroupName", # required
})

Response structure


resp.thing_group_name #=> String
resp.thing_group_id #=> String
resp.thing_group_arn #=> String
resp.version #=> Integer
resp.thing_group_properties.thing_group_description #=> String
resp.thing_group_properties.attribute_payload.attributes #=> Hash
resp.thing_group_properties.attribute_payload.attributes["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.thing_group_properties.attribute_payload.merge #=> Boolean
resp..parent_group_name #=> String
resp..root_to_parent_thing_groups #=> Array
resp..root_to_parent_thing_groups[0].group_name #=> String
resp..root_to_parent_thing_groups[0].group_arn #=> String
resp..creation_date #=> Time
resp.index_name #=> String
resp.query_string #=> String
resp.query_version #=> String
resp.status #=> String, one of "ACTIVE", "BUILDING", "REBUILDING"

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The name of the thing group.

Returns:



7243
7244
7245
7246
# File 'lib/aws-sdk-iot/client.rb', line 7243

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

#describe_thing_registration_task(params = {}) ⇒ Types::DescribeThingRegistrationTaskResponse

Describes a bulk thing provisioning task.

Requires permission to access the [DescribeThingRegistrationTask] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_thing_registration_task({
  task_id: "TaskId", # required
})

Response structure


resp.task_id #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.template_body #=> String
resp.input_file_bucket #=> String
resp.input_file_key #=> String
resp.role_arn #=> String
resp.status #=> String, one of "InProgress", "Completed", "Failed", "Cancelled", "Cancelling"
resp.message #=> String
resp.success_count #=> Integer
resp.failure_count #=> Integer
resp.percentage_progress #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The task ID.

Returns:



7298
7299
7300
7301
# File 'lib/aws-sdk-iot/client.rb', line 7298

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

#describe_thing_type(params = {}) ⇒ Types::DescribeThingTypeResponse

Gets information about the specified thing type.

Requires permission to access the [DescribeThingType] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.describe_thing_type({
  thing_type_name: "ThingTypeName", # required
})

Response structure


resp.thing_type_name #=> String
resp.thing_type_id #=> String
resp.thing_type_arn #=> String
resp.thing_type_properties.thing_type_description #=> String
resp.thing_type_properties.searchable_attributes #=> Array
resp.thing_type_properties.searchable_attributes[0] #=> String
resp.thing_type_properties.mqtt5_configuration.propagating_attributes #=> Array
resp.thing_type_properties.mqtt5_configuration.propagating_attributes[0].user_property_key #=> String
resp.thing_type_properties.mqtt5_configuration.propagating_attributes[0].thing_attribute #=> String
resp.thing_type_properties.mqtt5_configuration.propagating_attributes[0].connection_attribute #=> String
resp..deprecated #=> Boolean
resp..deprecation_date #=> Time
resp..creation_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :thing_type_name (required, String)

    The name of the thing type.

Returns:



7346
7347
7348
7349
# File 'lib/aws-sdk-iot/client.rb', line 7346

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

#detach_policy(params = {}) ⇒ Struct

Detaches a policy from the specified target.

<note markdown=“1”> Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before it’s ready to be deleted.

</note>

Requires permission to access the [DetachPolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.detach_policy({
  policy_name: "PolicyName", # required
  target: "PolicyTarget", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy to detach.

  • :target (required, String)

    The target from which the policy will be detached.

Returns:

  • (Struct)

    Returns an empty response.



7382
7383
7384
7385
# File 'lib/aws-sdk-iot/client.rb', line 7382

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

#detach_principal_policy(params = {}) ⇒ Struct

Removes the specified policy from the specified certificate.

Note: This action is deprecated and works as expected for backward compatibility, but we won’t add enhancements. Use DetachPolicy instead.

Requires permission to access the [DetachPrincipalPolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.detach_principal_policy({
  policy_name: "PolicyName", # required
  principal: "Principal", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The name of the policy to detach.

  • :principal (required, String)

    The principal.

    Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).

Returns:

  • (Struct)

    Returns an empty response.



7421
7422
7423
7424
# File 'lib/aws-sdk-iot/client.rb', line 7421

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

#detach_security_profile(params = {}) ⇒ Struct

Disassociates a Device Defender security profile from a thing group or from this account.

Requires permission to access the [DetachSecurityProfile] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.detach_security_profile({
  security_profile_name: "SecurityProfileName", # required
  security_profile_target_arn: "SecurityProfileTargetArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The security profile that is detached.

  • :security_profile_target_arn (required, String)

    The ARN of the thing group from which the security profile is detached.

Returns:

  • (Struct)

    Returns an empty response.



7453
7454
7455
7456
# File 'lib/aws-sdk-iot/client.rb', line 7453

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

#detach_thing_principal(params = {}) ⇒ Struct

Detaches the specified principal from the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

<note markdown=“1”> This call is asynchronous. It might take several seconds for the detachment to propagate.

</note>

Requires permission to access the [DetachThingPrincipal] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.detach_thing_principal({
  thing_name: "ThingName", # required
  principal: "Principal", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing.

  • :principal (required, String)

    If the principal is a certificate, this value must be ARN of the certificate. If the principal is an Amazon Cognito identity, this value must be the ID of the Amazon Cognito identity.

Returns:

  • (Struct)

    Returns an empty response.



7492
7493
7494
7495
# File 'lib/aws-sdk-iot/client.rb', line 7492

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

#disable_topic_rule(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.disable_topic_rule({
  rule_name: "RuleName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the rule to disable.

Returns:

  • (Struct)

    Returns an empty response.



7518
7519
7520
7521
# File 'lib/aws-sdk-iot/client.rb', line 7518

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

#disassociate_sbom_from_package_version(params = {}) ⇒ Struct

Disassociates the selected software bill of materials (SBOM) from a specific software package version.

Requires permission to access the

DisassociateSbomWithPackageVersion][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.disassociate_sbom_from_package_version({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the new software package.

  • :version_name (required, String)

    The name of the new package version.

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



7559
7560
7561
7562
# File 'lib/aws-sdk-iot/client.rb', line 7559

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

#enable_topic_rule(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.enable_topic_rule({
  rule_name: "RuleName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the topic rule to enable.

Returns:

  • (Struct)

    Returns an empty response.



7585
7586
7587
7588
# File 'lib/aws-sdk-iot/client.rb', line 7585

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

#get_behavior_model_training_summaries(params = {}) ⇒ Types::GetBehaviorModelTrainingSummariesResponse

Returns a Device Defender’s ML Detect Security Profile training model’s status.

Requires permission to access the

GetBehaviorModelTrainingSummaries][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.summaries #=> Array
resp.summaries[0].security_profile_name #=> String
resp.summaries[0].behavior_name #=> String
resp.summaries[0].training_data_collection_start_date #=> Time
resp.summaries[0].model_status #=> String, one of "PENDING_BUILD", "ACTIVE", "EXPIRED"
resp.summaries[0].datapoints_collection_percentage #=> Float
resp.summaries[0].last_model_refresh_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (String)

    The name of the security profile.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 10.

  • :next_token (String)

    The token for the next set of results.

Returns:



7638
7639
7640
7641
# File 'lib/aws-sdk-iot/client.rb', line 7638

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

#get_buckets_aggregation(params = {}) ⇒ Types::GetBucketsAggregationResponse

Aggregates on indexed data with search queries pertaining to particular fields.

Requires permission to access the [GetBucketsAggregation] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_buckets_aggregation({
  index_name: "IndexName",
  query_string: "QueryString", # required
  aggregation_field: "AggregationField", # required
  query_version: "QueryVersion",
  buckets_aggregation_type: { # required
    terms_aggregation: {
      max_buckets: 1,
    },
  },
})

Response structure


resp.total_count #=> Integer
resp.buckets #=> Array
resp.buckets[0].key_value #=> String
resp.buckets[0].count #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (String)

    The name of the index to search.

  • :query_string (required, String)

    The search query string.

  • :aggregation_field (required, String)

    The aggregation field.

  • :query_version (String)

    The version of the query.

  • :buckets_aggregation_type (required, Types::BucketsAggregationType)

    The basic control of the response shape and the bucket aggregation type to perform.

Returns:



7696
7697
7698
7699
# File 'lib/aws-sdk-iot/client.rb', line 7696

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

#get_cardinality(params = {}) ⇒ Types::GetCardinalityResponse

Returns the approximate count of unique values that match the query.

Requires permission to access the [GetCardinality] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_cardinality({
  index_name: "IndexName",
  query_string: "QueryString", # required
  aggregation_field: "AggregationField",
  query_version: "QueryVersion",
})

Response structure


resp.cardinality #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (String)

    The name of the index to search.

  • :query_string (required, String)

    The search query string.

  • :aggregation_field (String)

    The field to aggregate.

  • :query_version (String)

    The query version.

Returns:



7740
7741
7742
7743
# File 'lib/aws-sdk-iot/client.rb', line 7740

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

#get_command(params = {}) ⇒ Types::GetCommandResponse

Gets information about the specified command.

Examples:

Request syntax with placeholder values


resp = client.get_command({
  command_id: "CommandId", # required
})

Response structure


resp.command_id #=> String
resp.command_arn #=> String
resp.namespace #=> String, one of "AWS-IoT", "AWS-IoT-FleetWise"
resp.display_name #=> String
resp.description #=> String
resp.mandatory_parameters #=> Array
resp.mandatory_parameters[0].name #=> String
resp.mandatory_parameters[0].value.s #=> String
resp.mandatory_parameters[0].value.b #=> Boolean
resp.mandatory_parameters[0].value.i #=> Integer
resp.mandatory_parameters[0].value.l #=> Integer
resp.mandatory_parameters[0].value.d #=> Float
resp.mandatory_parameters[0].value.bin #=> String
resp.mandatory_parameters[0].value.ul #=> String
resp.mandatory_parameters[0].default_value.s #=> String
resp.mandatory_parameters[0].default_value.b #=> Boolean
resp.mandatory_parameters[0].default_value.i #=> Integer
resp.mandatory_parameters[0].default_value.l #=> Integer
resp.mandatory_parameters[0].default_value.d #=> Float
resp.mandatory_parameters[0].default_value.bin #=> String
resp.mandatory_parameters[0].default_value.ul #=> String
resp.mandatory_parameters[0].description #=> String
resp.payload.content #=> String
resp.payload.content_type #=> String
resp.role_arn #=> String
resp.created_at #=> Time
resp.last_updated_at #=> Time
resp.deprecated #=> Boolean
resp.pending_deletion #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :command_id (required, String)

    The unique identifier of the command for which you want to retrieve information.

Returns:



7806
7807
7808
7809
# File 'lib/aws-sdk-iot/client.rb', line 7806

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

#get_command_execution(params = {}) ⇒ Types::GetCommandExecutionResponse

Gets information about the specific command execution on a single device.

Examples:

Request syntax with placeholder values


resp = client.get_command_execution({
  execution_id: "CommandExecutionId", # required
  target_arn: "TargetArn", # required
  include_result: false,
})

Response structure


resp.execution_id #=> String
resp.command_arn #=> String
resp.target_arn #=> String
resp.status #=> String, one of "CREATED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "REJECTED", "TIMED_OUT"
resp.status_reason.reason_code #=> String
resp.status_reason.reason_description #=> String
resp.result #=> Hash
resp.result["CommandExecutionResultName"].s #=> String
resp.result["CommandExecutionResultName"].b #=> Boolean
resp.result["CommandExecutionResultName"].bin #=> String
resp.parameters #=> Hash
resp.parameters["CommandParameterName"].s #=> String
resp.parameters["CommandParameterName"].b #=> Boolean
resp.parameters["CommandParameterName"].i #=> Integer
resp.parameters["CommandParameterName"].l #=> Integer
resp.parameters["CommandParameterName"].d #=> Float
resp.parameters["CommandParameterName"].bin #=> String
resp.parameters["CommandParameterName"].ul #=> String
resp.execution_timeout_seconds #=> Integer
resp.created_at #=> Time
resp.last_updated_at #=> Time
resp.started_at #=> Time
resp.completed_at #=> Time
resp.time_to_live #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :execution_id (required, String)

    The unique identifier for the command execution. This information is returned as a response of the ‘StartCommandExecution` API request.

  • :target_arn (required, String)

    The Amazon Resource Number (ARN) of the device on which the command execution is being performed.

  • :include_result (Boolean)

    Can be used to specify whether to include the result of the command execution in the ‘GetCommandExecution` API response. Your device can use this field to provide additional information about the command execution. You only need to specify this field when using the `AWS-IoT` namespace.

Returns:



7882
7883
7884
7885
# File 'lib/aws-sdk-iot/client.rb', line 7882

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

#get_effective_policies(params = {}) ⇒ Types::GetEffectivePoliciesResponse

Gets a list of the policies that have an effect on the authorization behavior of the specified device when it connects to the IoT device gateway.

Requires permission to access the [GetEffectivePolicies] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_effective_policies({
  principal: "Principal",
  cognito_identity_pool_id: "CognitoIdentityPoolId",
  thing_name: "ThingName",
})

Response structure


resp.effective_policies #=> Array
resp.effective_policies[0].policy_name #=> String
resp.effective_policies[0].policy_arn #=> String
resp.effective_policies[0].policy_document #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :principal (String)

    The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).

  • :cognito_identity_pool_id (String)

    The Cognito identity pool ID.

  • :thing_name (String)

    The thing name.

Returns:



7930
7931
7932
7933
# File 'lib/aws-sdk-iot/client.rb', line 7930

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

#get_indexing_configuration(params = {}) ⇒ Types::GetIndexingConfigurationResponse

Examples:

Response structure


resp.thing_indexing_configuration.thing_indexing_mode #=> String, one of "OFF", "REGISTRY", "REGISTRY_AND_SHADOW"
resp.thing_indexing_configuration.thing_connectivity_indexing_mode #=> String, one of "OFF", "STATUS"
resp.thing_indexing_configuration.device_defender_indexing_mode #=> String, one of "OFF", "VIOLATIONS"
resp.thing_indexing_configuration.named_shadow_indexing_mode #=> String, one of "OFF", "ON"
resp.thing_indexing_configuration.managed_fields #=> Array
resp.thing_indexing_configuration.managed_fields[0].name #=> String
resp.thing_indexing_configuration.managed_fields[0].type #=> String, one of "Number", "String", "Boolean"
resp.thing_indexing_configuration.custom_fields #=> Array
resp.thing_indexing_configuration.custom_fields[0].name #=> String
resp.thing_indexing_configuration.custom_fields[0].type #=> String, one of "Number", "String", "Boolean"
resp.thing_indexing_configuration.filter.named_shadow_names #=> Array
resp.thing_indexing_configuration.filter.named_shadow_names[0] #=> String
resp.thing_indexing_configuration.filter.geo_locations #=> Array
resp.thing_indexing_configuration.filter.geo_locations[0].name #=> String
resp.thing_indexing_configuration.filter.geo_locations[0].order #=> String, one of "LatLon", "LonLat"
resp.thing_group_indexing_configuration.thing_group_indexing_mode #=> String, one of "OFF", "ON"
resp.thing_group_indexing_configuration.managed_fields #=> Array
resp.thing_group_indexing_configuration.managed_fields[0].name #=> String
resp.thing_group_indexing_configuration.managed_fields[0].type #=> String, one of "Number", "String", "Boolean"
resp.thing_group_indexing_configuration.custom_fields #=> Array
resp.thing_group_indexing_configuration.custom_fields[0].name #=> String
resp.thing_group_indexing_configuration.custom_fields[0].type #=> String, one of "Number", "String", "Boolean"

Parameters:

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

    ({})

Returns:



7976
7977
7978
7979
# File 'lib/aws-sdk-iot/client.rb', line 7976

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

#get_job_document(params = {}) ⇒ Types::GetJobDocumentResponse

Examples:

Request syntax with placeholder values


resp = client.get_job_document({
  job_id: "JobId", # required
  before_substitution: false,
})

Response structure


resp.document #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The unique identifier you assigned to this job when it was created.

  • :before_substitution (Boolean)

    Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.

Returns:



8013
8014
8015
8016
# File 'lib/aws-sdk-iot/client.rb', line 8013

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

#get_logging_options(params = {}) ⇒ Types::GetLoggingOptionsResponse

Gets the logging options.

NOTE: use of this command is not recommended. Use ‘GetV2LoggingOptions` instead.

Requires permission to access the [GetLoggingOptions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Response structure


resp.role_arn #=> String
resp.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"

Parameters:

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

    ({})

Returns:



8041
8042
8043
8044
# File 'lib/aws-sdk-iot/client.rb', line 8041

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

#get_ota_update(params = {}) ⇒ Types::GetOTAUpdateResponse

Examples:

Request syntax with placeholder values


resp = client.get_ota_update({
  ota_update_id: "OTAUpdateId", # required
})

Response structure


resp.ota_update_info.ota_update_id #=> String
resp.ota_update_info.ota_update_arn #=> String
resp.ota_update_info.creation_date #=> Time
resp.ota_update_info.last_modified_date #=> Time
resp.ota_update_info.description #=> String
resp.ota_update_info.targets #=> Array
resp.ota_update_info.targets[0] #=> String
resp.ota_update_info.protocols #=> Array
resp.ota_update_info.protocols[0] #=> String, one of "MQTT", "HTTP"
resp.ota_update_info.aws_job_executions_rollout_config.maximum_per_minute #=> Integer
resp.ota_update_info.aws_job_executions_rollout_config.exponential_rate.base_rate_per_minute #=> Integer
resp.ota_update_info.aws_job_executions_rollout_config.exponential_rate.increment_factor #=> Float
resp.ota_update_info.aws_job_executions_rollout_config.exponential_rate.rate_increase_criteria.number_of_notified_things #=> Integer
resp.ota_update_info.aws_job_executions_rollout_config.exponential_rate.rate_increase_criteria.number_of_succeeded_things #=> Integer
resp.ota_update_info.aws_job_presigned_url_config.expires_in_sec #=> Integer
resp.ota_update_info.target_selection #=> String, one of "CONTINUOUS", "SNAPSHOT"
resp.ota_update_info.ota_update_files #=> Array
resp.ota_update_info.ota_update_files[0].file_name #=> String
resp.ota_update_info.ota_update_files[0].file_type #=> Integer
resp.ota_update_info.ota_update_files[0].file_version #=> String
resp.ota_update_info.ota_update_files[0].file_location.stream.stream_id #=> String
resp.ota_update_info.ota_update_files[0].file_location.stream.file_id #=> Integer
resp.ota_update_info.ota_update_files[0].file_location.s3_location.bucket #=> String
resp.ota_update_info.ota_update_files[0].file_location.s3_location.key #=> String
resp.ota_update_info.ota_update_files[0].file_location.s3_location.version #=> String
resp.ota_update_info.ota_update_files[0].code_signing.aws_signer_job_id #=> String
resp.ota_update_info.ota_update_files[0].code_signing.start_signing_job_parameter.signing_profile_parameter.certificate_arn #=> String
resp.ota_update_info.ota_update_files[0].code_signing.start_signing_job_parameter.signing_profile_parameter.platform #=> String
resp.ota_update_info.ota_update_files[0].code_signing.start_signing_job_parameter.signing_profile_parameter.certificate_path_on_device #=> String
resp.ota_update_info.ota_update_files[0].code_signing.start_signing_job_parameter.signing_profile_name #=> String
resp.ota_update_info.ota_update_files[0].code_signing.start_signing_job_parameter.destination.s3_destination.bucket #=> String
resp.ota_update_info.ota_update_files[0].code_signing.start_signing_job_parameter.destination.s3_destination.prefix #=> String
resp.ota_update_info.ota_update_files[0].code_signing.custom_code_signing.signature.inline_document #=> String
resp.ota_update_info.ota_update_files[0].code_signing.custom_code_signing.certificate_chain.certificate_name #=> String
resp.ota_update_info.ota_update_files[0].code_signing.custom_code_signing.certificate_chain.inline_document #=> String
resp.ota_update_info.ota_update_files[0].code_signing.custom_code_signing.hash_algorithm #=> String
resp.ota_update_info.ota_update_files[0].code_signing.custom_code_signing.signature_algorithm #=> String
resp.ota_update_info.ota_update_files[0].attributes #=> Hash
resp.ota_update_info.ota_update_files[0].attributes["AttributeKey"] #=> String
resp.ota_update_info.ota_update_status #=> String, one of "CREATE_PENDING", "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "CREATE_FAILED", "DELETE_IN_PROGRESS", "DELETE_FAILED"
resp.ota_update_info.aws_iot_job_id #=> String
resp.ota_update_info.aws_iot_job_arn #=> String
resp.ota_update_info.error_info.code #=> String
resp.ota_update_info.error_info.message #=> String
resp.ota_update_info.additional_parameters #=> Hash
resp.ota_update_info.additional_parameters["AttributeKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :ota_update_id (required, String)

    The OTA update ID.

Returns:



8118
8119
8120
8121
# File 'lib/aws-sdk-iot/client.rb', line 8118

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

#get_package(params = {}) ⇒ Types::GetPackageResponse

Gets information about the specified software package.

Requires permission to access the [GetPackage] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_package({
  package_name: "PackageName", # required
})

Response structure


resp.package_name #=> String
resp.package_arn #=> String
resp.description #=> String
resp.default_version_name #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the target software package.

Returns:



8160
8161
8162
8163
# File 'lib/aws-sdk-iot/client.rb', line 8160

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

#get_package_configuration(params = {}) ⇒ Types::GetPackageConfigurationResponse

Gets information about the specified software package’s configuration.

Requires permission to access the [GetPackageConfiguration] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Response structure


resp.version_update_by_jobs_config.enabled #=> Boolean
resp.version_update_by_jobs_config.role_arn #=> String

Parameters:

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

    ({})

Returns:



8185
8186
8187
8188
# File 'lib/aws-sdk-iot/client.rb', line 8185

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

#get_package_version(params = {}) ⇒ Types::GetPackageVersionResponse

Gets information about the specified package version.

Requires permission to access the [GetPackageVersion] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_package_version({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
})

Response structure


resp.package_version_arn #=> String
resp.package_name #=> String
resp.version_name #=> String
resp.description #=> String
resp.attributes #=> Hash
resp.attributes["ResourceAttributeKey"] #=> String
resp.artifact.s3_location.bucket #=> String
resp.artifact.s3_location.key #=> String
resp.artifact.s3_location.version #=> String
resp.status #=> String, one of "DRAFT", "PUBLISHED", "DEPRECATED"
resp.error_reason #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.sbom.s3_location.bucket #=> String
resp.sbom.s3_location.key #=> String
resp.sbom.s3_location.version #=> String
resp.sbom_validation_status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp.recipe #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the associated package.

  • :version_name (required, String)

    The name of the target package version.

Returns:



8250
8251
8252
8253
# File 'lib/aws-sdk-iot/client.rb', line 8250

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

#get_percentiles(params = {}) ⇒ Types::GetPercentilesResponse

Groups the aggregated values that match the query into percentile groupings. The default percentile groupings are: 1,5,25,50,75,95,99, although you can specify your own when you call ‘GetPercentiles`. This function returns a value for each percentile group specified (or the default percentile groupings). The percentile group “1” contains the aggregated field value that occurs in approximately one percent of the values that match the query. The percentile group “5” contains the aggregated field value that occurs in approximately five percent of the values that match the query, and so on. The result is an approximation, the more values that match the query, the more accurate the percentile values.

Requires permission to access the [GetPercentiles] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_percentiles({
  index_name: "IndexName",
  query_string: "QueryString", # required
  aggregation_field: "AggregationField",
  query_version: "QueryVersion",
  percents: [1.0],
})

Response structure


resp.percentiles #=> Array
resp.percentiles[0].percent #=> Float
resp.percentiles[0].value #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (String)

    The name of the index to search.

  • :query_string (required, String)

    The search query string.

  • :aggregation_field (String)

    The field to aggregate.

  • :query_version (String)

    The query version.

  • :percents (Array<Float>)

    The percentile groups returned.

Returns:



8310
8311
8312
8313
# File 'lib/aws-sdk-iot/client.rb', line 8310

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

#get_policy(params = {}) ⇒ Types::GetPolicyResponse

Gets information about the specified policy with the policy document of the default version.

Requires permission to access the [GetPolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_policy({
  policy_name: "PolicyName", # required
})

Response structure


resp.policy_name #=> String
resp.policy_arn #=> String
resp.policy_document #=> String
resp.default_version_id #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.generation_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The name of the policy.

Returns:



8355
8356
8357
8358
# File 'lib/aws-sdk-iot/client.rb', line 8355

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

#get_policy_version(params = {}) ⇒ Types::GetPolicyVersionResponse

Gets information about the specified policy version.

Requires permission to access the [GetPolicyVersion] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_policy_version({
  policy_name: "PolicyName", # required
  policy_version_id: "PolicyVersionId", # required
})

Response structure


resp.policy_arn #=> String
resp.policy_name #=> String
resp.policy_document #=> String
resp.policy_version_id #=> String
resp.is_default_version #=> Boolean
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.generation_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The name of the policy.

  • :policy_version_id (required, String)

    The policy version ID.

Returns:



8405
8406
8407
8408
# File 'lib/aws-sdk-iot/client.rb', line 8405

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

#get_registration_code(params = {}) ⇒ Types::GetRegistrationCodeResponse

Gets a registration code used to register a CA certificate with IoT.

IoT will create a registration code as part of this API call if the registration code doesn’t exist or has been deleted. If you already have a registration code, this API call will return the same registration code.

Requires permission to access the [GetRegistrationCode] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Response structure


resp.registration_code #=> String

Parameters:

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

    ({})

Returns:



8433
8434
8435
8436
# File 'lib/aws-sdk-iot/client.rb', line 8433

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

#get_statistics(params = {}) ⇒ Types::GetStatisticsResponse

Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. If the aggregation field is of type ‘String`, only the count statistic is returned.

Requires permission to access the [GetStatistics] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_statistics({
  index_name: "IndexName",
  query_string: "QueryString", # required
  aggregation_field: "AggregationField",
  query_version: "QueryVersion",
})

Response structure


resp.statistics.count #=> Integer
resp.statistics.average #=> Float
resp.statistics.sum #=> Float
resp.statistics.minimum #=> Float
resp.statistics.maximum #=> Float
resp.statistics.sum_of_squares #=> Float
resp.statistics.variance #=> Float
resp.statistics.std_deviation #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (String)

    The name of the index to search. The default value is ‘AWS_Things`.

  • :query_string (required, String)

    The query used to search. You can specify “*” for the query string to get the count of all indexed things in your Amazon Web Services account.

  • :aggregation_field (String)

    The aggregation field name.

  • :query_version (String)

    The version of the query used to search.

Returns:



8489
8490
8491
8492
# File 'lib/aws-sdk-iot/client.rb', line 8489

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

#get_topic_rule(params = {}) ⇒ Types::GetTopicRuleResponse

Gets information about the rule.

Requires permission to access the [GetTopicRule] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_topic_rule({
  rule_name: "RuleName", # required
})

Response structure


resp.rule_arn #=> String
resp.rule.rule_name #=> String
resp.rule.sql #=> String
resp.rule.description #=> String
resp.rule.created_at #=> Time
resp.rule.actions #=> Array
resp.rule.actions[0].dynamo_db.table_name #=> String
resp.rule.actions[0].dynamo_db.role_arn #=> String
resp.rule.actions[0].dynamo_db.operation #=> String
resp.rule.actions[0].dynamo_db.hash_key_field #=> String
resp.rule.actions[0].dynamo_db.hash_key_value #=> String
resp.rule.actions[0].dynamo_db.hash_key_type #=> String, one of "STRING", "NUMBER"
resp.rule.actions[0].dynamo_db.range_key_field #=> String
resp.rule.actions[0].dynamo_db.range_key_value #=> String
resp.rule.actions[0].dynamo_db.range_key_type #=> String, one of "STRING", "NUMBER"
resp.rule.actions[0].dynamo_db.payload_field #=> String
resp.rule.actions[0].dynamo_d_bv_2.role_arn #=> String
resp.rule.actions[0].dynamo_d_bv_2.put_item.table_name #=> String
resp.rule.actions[0].lambda.function_arn #=> String
resp.rule.actions[0].sns.target_arn #=> String
resp.rule.actions[0].sns.role_arn #=> String
resp.rule.actions[0].sns.message_format #=> String, one of "RAW", "JSON"
resp.rule.actions[0].sqs.role_arn #=> String
resp.rule.actions[0].sqs.queue_url #=> String
resp.rule.actions[0].sqs.use_base_64 #=> Boolean
resp.rule.actions[0].kinesis.role_arn #=> String
resp.rule.actions[0].kinesis.stream_name #=> String
resp.rule.actions[0].kinesis.partition_key #=> String
resp.rule.actions[0].republish.role_arn #=> String
resp.rule.actions[0].republish.topic #=> String
resp.rule.actions[0].republish.qos #=> Integer
resp.rule.actions[0].republish.headers.payload_format_indicator #=> String
resp.rule.actions[0].republish.headers.content_type #=> String
resp.rule.actions[0].republish.headers.response_topic #=> String
resp.rule.actions[0].republish.headers.correlation_data #=> String
resp.rule.actions[0].republish.headers.message_expiry #=> String
resp.rule.actions[0].republish.headers.user_properties #=> Array
resp.rule.actions[0].republish.headers.user_properties[0].key #=> String
resp.rule.actions[0].republish.headers.user_properties[0].value #=> String
resp.rule.actions[0].s3.role_arn #=> String
resp.rule.actions[0].s3.bucket_name #=> String
resp.rule.actions[0].s3.key #=> String
resp.rule.actions[0].s3.canned_acl #=> String, one of "private", "public-read", "public-read-write", "aws-exec-read", "authenticated-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write"
resp.rule.actions[0].firehose.role_arn #=> String
resp.rule.actions[0].firehose.delivery_stream_name #=> String
resp.rule.actions[0].firehose.separator #=> String
resp.rule.actions[0].firehose.batch_mode #=> Boolean
resp.rule.actions[0].cloudwatch_metric.role_arn #=> String
resp.rule.actions[0].cloudwatch_metric.metric_namespace #=> String
resp.rule.actions[0].cloudwatch_metric.metric_name #=> String
resp.rule.actions[0].cloudwatch_metric.metric_value #=> String
resp.rule.actions[0].cloudwatch_metric.metric_unit #=> String
resp.rule.actions[0].cloudwatch_metric.metric_timestamp #=> String
resp.rule.actions[0].cloudwatch_alarm.role_arn #=> String
resp.rule.actions[0].cloudwatch_alarm.alarm_name #=> String
resp.rule.actions[0].cloudwatch_alarm.state_reason #=> String
resp.rule.actions[0].cloudwatch_alarm.state_value #=> String
resp.rule.actions[0].cloudwatch_logs.role_arn #=> String
resp.rule.actions[0].cloudwatch_logs.log_group_name #=> String
resp.rule.actions[0].cloudwatch_logs.batch_mode #=> Boolean
resp.rule.actions[0].elasticsearch.role_arn #=> String
resp.rule.actions[0].elasticsearch.endpoint #=> String
resp.rule.actions[0].elasticsearch.index #=> String
resp.rule.actions[0].elasticsearch.type #=> String
resp.rule.actions[0].elasticsearch.id #=> String
resp.rule.actions[0].salesforce.token #=> String
resp.rule.actions[0].salesforce.url #=> String
resp.rule.actions[0].iot_analytics.channel_arn #=> String
resp.rule.actions[0].iot_analytics.channel_name #=> String
resp.rule.actions[0].iot_analytics.batch_mode #=> Boolean
resp.rule.actions[0].iot_analytics.role_arn #=> String
resp.rule.actions[0].iot_events.input_name #=> String
resp.rule.actions[0].iot_events.message_id #=> String
resp.rule.actions[0].iot_events.batch_mode #=> Boolean
resp.rule.actions[0].iot_events.role_arn #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries #=> Array
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].entry_id #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].asset_id #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_id #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_alias #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values #=> Array
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.string_value #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.integer_value #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.double_value #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.boolean_value #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values[0].timestamp.time_in_seconds #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values[0].timestamp.offset_in_nanos #=> String
resp.rule.actions[0].iot_site_wise.put_asset_property_value_entries[0].property_values[0].quality #=> String
resp.rule.actions[0].iot_site_wise.role_arn #=> String
resp.rule.actions[0].step_functions.execution_name_prefix #=> String
resp.rule.actions[0].step_functions.state_machine_name #=> String
resp.rule.actions[0].step_functions.role_arn #=> String
resp.rule.actions[0].timestream.role_arn #=> String
resp.rule.actions[0].timestream.database_name #=> String
resp.rule.actions[0].timestream.table_name #=> String
resp.rule.actions[0].timestream.dimensions #=> Array
resp.rule.actions[0].timestream.dimensions[0].name #=> String
resp.rule.actions[0].timestream.dimensions[0].value #=> String
resp.rule.actions[0].timestream.timestamp.value #=> String
resp.rule.actions[0].timestream.timestamp.unit #=> String
resp.rule.actions[0].http.url #=> String
resp.rule.actions[0].http.confirmation_url #=> String
resp.rule.actions[0].http.headers #=> Array
resp.rule.actions[0].http.headers[0].key #=> String
resp.rule.actions[0].http.headers[0].value #=> String
resp.rule.actions[0].http.auth.sigv4.signing_region #=> String
resp.rule.actions[0].http.auth.sigv4.service_name #=> String
resp.rule.actions[0].http.auth.sigv4.role_arn #=> String
resp.rule.actions[0].kafka.destination_arn #=> String
resp.rule.actions[0].kafka.topic #=> String
resp.rule.actions[0].kafka.key #=> String
resp.rule.actions[0].kafka.partition #=> String
resp.rule.actions[0].kafka.client_properties #=> Hash
resp.rule.actions[0].kafka.client_properties["String"] #=> String
resp.rule.actions[0].kafka.headers #=> Array
resp.rule.actions[0].kafka.headers[0].key #=> String
resp.rule.actions[0].kafka.headers[0].value #=> String
resp.rule.actions[0].open_search.role_arn #=> String
resp.rule.actions[0].open_search.endpoint #=> String
resp.rule.actions[0].open_search.index #=> String
resp.rule.actions[0].open_search.type #=> String
resp.rule.actions[0].open_search.id #=> String
resp.rule.actions[0].location.role_arn #=> String
resp.rule.actions[0].location.tracker_name #=> String
resp.rule.actions[0].location.device_id #=> String
resp.rule.actions[0].location.timestamp.value #=> String
resp.rule.actions[0].location.timestamp.unit #=> String
resp.rule.actions[0].location.latitude #=> String
resp.rule.actions[0].location.longitude #=> String
resp.rule.rule_disabled #=> Boolean
resp.rule.aws_iot_sql_version #=> String
resp.rule.error_action.dynamo_db.table_name #=> String
resp.rule.error_action.dynamo_db.role_arn #=> String
resp.rule.error_action.dynamo_db.operation #=> String
resp.rule.error_action.dynamo_db.hash_key_field #=> String
resp.rule.error_action.dynamo_db.hash_key_value #=> String
resp.rule.error_action.dynamo_db.hash_key_type #=> String, one of "STRING", "NUMBER"
resp.rule.error_action.dynamo_db.range_key_field #=> String
resp.rule.error_action.dynamo_db.range_key_value #=> String
resp.rule.error_action.dynamo_db.range_key_type #=> String, one of "STRING", "NUMBER"
resp.rule.error_action.dynamo_db.payload_field #=> String
resp.rule.error_action.dynamo_d_bv_2.role_arn #=> String
resp.rule.error_action.dynamo_d_bv_2.put_item.table_name #=> String
resp.rule.error_action.lambda.function_arn #=> String
resp.rule.error_action.sns.target_arn #=> String
resp.rule.error_action.sns.role_arn #=> String
resp.rule.error_action.sns.message_format #=> String, one of "RAW", "JSON"
resp.rule.error_action.sqs.role_arn #=> String
resp.rule.error_action.sqs.queue_url #=> String
resp.rule.error_action.sqs.use_base_64 #=> Boolean
resp.rule.error_action.kinesis.role_arn #=> String
resp.rule.error_action.kinesis.stream_name #=> String
resp.rule.error_action.kinesis.partition_key #=> String
resp.rule.error_action.republish.role_arn #=> String
resp.rule.error_action.republish.topic #=> String
resp.rule.error_action.republish.qos #=> Integer
resp.rule.error_action.republish.headers.payload_format_indicator #=> String
resp.rule.error_action.republish.headers.content_type #=> String
resp.rule.error_action.republish.headers.response_topic #=> String
resp.rule.error_action.republish.headers.correlation_data #=> String
resp.rule.error_action.republish.headers.message_expiry #=> String
resp.rule.error_action.republish.headers.user_properties #=> Array
resp.rule.error_action.republish.headers.user_properties[0].key #=> String
resp.rule.error_action.republish.headers.user_properties[0].value #=> String
resp.rule.error_action.s3.role_arn #=> String
resp.rule.error_action.s3.bucket_name #=> String
resp.rule.error_action.s3.key #=> String
resp.rule.error_action.s3.canned_acl #=> String, one of "private", "public-read", "public-read-write", "aws-exec-read", "authenticated-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write"
resp.rule.error_action.firehose.role_arn #=> String
resp.rule.error_action.firehose.delivery_stream_name #=> String
resp.rule.error_action.firehose.separator #=> String
resp.rule.error_action.firehose.batch_mode #=> Boolean
resp.rule.error_action.cloudwatch_metric.role_arn #=> String
resp.rule.error_action.cloudwatch_metric.metric_namespace #=> String
resp.rule.error_action.cloudwatch_metric.metric_name #=> String
resp.rule.error_action.cloudwatch_metric.metric_value #=> String
resp.rule.error_action.cloudwatch_metric.metric_unit #=> String
resp.rule.error_action.cloudwatch_metric.metric_timestamp #=> String
resp.rule.error_action.cloudwatch_alarm.role_arn #=> String
resp.rule.error_action.cloudwatch_alarm.alarm_name #=> String
resp.rule.error_action.cloudwatch_alarm.state_reason #=> String
resp.rule.error_action.cloudwatch_alarm.state_value #=> String
resp.rule.error_action.cloudwatch_logs.role_arn #=> String
resp.rule.error_action.cloudwatch_logs.log_group_name #=> String
resp.rule.error_action.cloudwatch_logs.batch_mode #=> Boolean
resp.rule.error_action.elasticsearch.role_arn #=> String
resp.rule.error_action.elasticsearch.endpoint #=> String
resp.rule.error_action.elasticsearch.index #=> String
resp.rule.error_action.elasticsearch.type #=> String
resp.rule.error_action.elasticsearch.id #=> String
resp.rule.error_action.salesforce.token #=> String
resp.rule.error_action.salesforce.url #=> String
resp.rule.error_action.iot_analytics.channel_arn #=> String
resp.rule.error_action.iot_analytics.channel_name #=> String
resp.rule.error_action.iot_analytics.batch_mode #=> Boolean
resp.rule.error_action.iot_analytics.role_arn #=> String
resp.rule.error_action.iot_events.input_name #=> String
resp.rule.error_action.iot_events.message_id #=> String
resp.rule.error_action.iot_events.batch_mode #=> Boolean
resp.rule.error_action.iot_events.role_arn #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries #=> Array
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].entry_id #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].asset_id #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_id #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_alias #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values #=> Array
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.string_value #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.integer_value #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.double_value #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values[0].value.boolean_value #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values[0].timestamp.time_in_seconds #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values[0].timestamp.offset_in_nanos #=> String
resp.rule.error_action.iot_site_wise.put_asset_property_value_entries[0].property_values[0].quality #=> String
resp.rule.error_action.iot_site_wise.role_arn #=> String
resp.rule.error_action.step_functions.execution_name_prefix #=> String
resp.rule.error_action.step_functions.state_machine_name #=> String
resp.rule.error_action.step_functions.role_arn #=> String
resp.rule.error_action.timestream.role_arn #=> String
resp.rule.error_action.timestream.database_name #=> String
resp.rule.error_action.timestream.table_name #=> String
resp.rule.error_action.timestream.dimensions #=> Array
resp.rule.error_action.timestream.dimensions[0].name #=> String
resp.rule.error_action.timestream.dimensions[0].value #=> String
resp.rule.error_action.timestream.timestamp.value #=> String
resp.rule.error_action.timestream.timestamp.unit #=> String
resp.rule.error_action.http.url #=> String
resp.rule.error_action.http.confirmation_url #=> String
resp.rule.error_action.http.headers #=> Array
resp.rule.error_action.http.headers[0].key #=> String
resp.rule.error_action.http.headers[0].value #=> String
resp.rule.error_action.http.auth.sigv4.signing_region #=> String
resp.rule.error_action.http.auth.sigv4.service_name #=> String
resp.rule.error_action.http.auth.sigv4.role_arn #=> String
resp.rule.error_action.kafka.destination_arn #=> String
resp.rule.error_action.kafka.topic #=> String
resp.rule.error_action.kafka.key #=> String
resp.rule.error_action.kafka.partition #=> String
resp.rule.error_action.kafka.client_properties #=> Hash
resp.rule.error_action.kafka.client_properties["String"] #=> String
resp.rule.error_action.kafka.headers #=> Array
resp.rule.error_action.kafka.headers[0].key #=> String
resp.rule.error_action.kafka.headers[0].value #=> String
resp.rule.error_action.open_search.role_arn #=> String
resp.rule.error_action.open_search.endpoint #=> String
resp.rule.error_action.open_search.index #=> String
resp.rule.error_action.open_search.type #=> String
resp.rule.error_action.open_search.id #=> String
resp.rule.error_action.location.role_arn #=> String
resp.rule.error_action.location.tracker_name #=> String
resp.rule.error_action.location.device_id #=> String
resp.rule.error_action.location.timestamp.value #=> String
resp.rule.error_action.location.timestamp.unit #=> String
resp.rule.error_action.location.latitude #=> String
resp.rule.error_action.location.longitude #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the rule.

Returns:



8775
8776
8777
8778
# File 'lib/aws-sdk-iot/client.rb', line 8775

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

#get_topic_rule_destination(params = {}) ⇒ Types::GetTopicRuleDestinationResponse

Gets information about a topic rule destination.

Requires permission to access the [GetTopicRuleDestination] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.get_topic_rule_destination({
  arn: "AwsArn", # required
})

Response structure


resp.topic_rule_destination.arn #=> String
resp.topic_rule_destination.status #=> String, one of "ENABLED", "IN_PROGRESS", "DISABLED", "ERROR", "DELETING"
resp.topic_rule_destination.created_at #=> Time
resp.topic_rule_destination.last_updated_at #=> Time
resp.topic_rule_destination.status_reason #=> String
resp.topic_rule_destination.http_url_properties.confirmation_url #=> String
resp.topic_rule_destination.vpc_properties.subnet_ids #=> Array
resp.topic_rule_destination.vpc_properties.subnet_ids[0] #=> String
resp.topic_rule_destination.vpc_properties.security_groups #=> Array
resp.topic_rule_destination.vpc_properties.security_groups[0] #=> String
resp.topic_rule_destination.vpc_properties.vpc_id #=> String
resp.topic_rule_destination.vpc_properties.role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The ARN of the topic rule destination.

Returns:



8818
8819
8820
8821
# File 'lib/aws-sdk-iot/client.rb', line 8818

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

#get_v2_logging_options(params = {}) ⇒ Types::GetV2LoggingOptionsResponse

Gets the fine grained logging options.

Requires permission to access the [GetV2LoggingOptions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Response structure


resp.role_arn #=> String
resp.default_log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.disable_all_logs #=> Boolean

Parameters:

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

    ({})

Returns:



8845
8846
8847
8848
# File 'lib/aws-sdk-iot/client.rb', line 8845

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

#list_active_violations(params = {}) ⇒ Types::ListActiveViolationsResponse

Lists the active violations for a given Device Defender security profile.

Requires permission to access the [ListActiveViolations] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_active_violations({
  thing_name: "DeviceDefenderThingName",
  security_profile_name: "SecurityProfileName",
  behavior_criteria_type: "STATIC", # accepts STATIC, STATISTICAL, MACHINE_LEARNING
  list_suppressed_alerts: false,
  verification_state: "FALSE_POSITIVE", # accepts FALSE_POSITIVE, BENIGN_POSITIVE, TRUE_POSITIVE, UNKNOWN
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.active_violations #=> Array
resp.active_violations[0].violation_id #=> String
resp.active_violations[0].thing_name #=> String
resp.active_violations[0].security_profile_name #=> String
resp.active_violations[0].behavior.name #=> String
resp.active_violations[0].behavior.metric #=> String
resp.active_violations[0].behavior.metric_dimension.dimension_name #=> String
resp.active_violations[0].behavior.metric_dimension.operator #=> String, one of "IN", "NOT_IN"
resp.active_violations[0].behavior.criteria.comparison_operator #=> String, one of "less-than", "less-than-equals", "greater-than", "greater-than-equals", "in-cidr-set", "not-in-cidr-set", "in-port-set", "not-in-port-set", "in-set", "not-in-set"
resp.active_violations[0].behavior.criteria.value.count #=> Integer
resp.active_violations[0].behavior.criteria.value.cidrs #=> Array
resp.active_violations[0].behavior.criteria.value.cidrs[0] #=> String
resp.active_violations[0].behavior.criteria.value.ports #=> Array
resp.active_violations[0].behavior.criteria.value.ports[0] #=> Integer
resp.active_violations[0].behavior.criteria.value.number #=> Float
resp.active_violations[0].behavior.criteria.value.numbers #=> Array
resp.active_violations[0].behavior.criteria.value.numbers[0] #=> Float
resp.active_violations[0].behavior.criteria.value.strings #=> Array
resp.active_violations[0].behavior.criteria.value.strings[0] #=> String
resp.active_violations[0].behavior.criteria.duration_seconds #=> Integer
resp.active_violations[0].behavior.criteria.consecutive_datapoints_to_alarm #=> Integer
resp.active_violations[0].behavior.criteria.consecutive_datapoints_to_clear #=> Integer
resp.active_violations[0].behavior.criteria.statistical_threshold.statistic #=> String
resp.active_violations[0].behavior.criteria.ml_detection_config.confidence_level #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.active_violations[0].behavior.suppress_alerts #=> Boolean
resp.active_violations[0].behavior.export_metric #=> Boolean
resp.active_violations[0].last_violation_value.count #=> Integer
resp.active_violations[0].last_violation_value.cidrs #=> Array
resp.active_violations[0].last_violation_value.cidrs[0] #=> String
resp.active_violations[0].last_violation_value.ports #=> Array
resp.active_violations[0].last_violation_value.ports[0] #=> Integer
resp.active_violations[0].last_violation_value.number #=> Float
resp.active_violations[0].last_violation_value.numbers #=> Array
resp.active_violations[0].last_violation_value.numbers[0] #=> Float
resp.active_violations[0].last_violation_value.strings #=> Array
resp.active_violations[0].last_violation_value.strings[0] #=> String
resp.active_violations[0].violation_event_additional_info.confidence_level #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.active_violations[0].verification_state #=> String, one of "FALSE_POSITIVE", "BENIGN_POSITIVE", "TRUE_POSITIVE", "UNKNOWN"
resp.active_violations[0].verification_state_description #=> String
resp.active_violations[0].last_violation_time #=> Time
resp.active_violations[0].violation_start_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (String)

    The name of the thing whose active violations are listed.

  • :security_profile_name (String)

    The name of the Device Defender security profile for which violations are listed.

  • :behavior_criteria_type (String)

    The criteria for a behavior.

  • :list_suppressed_alerts (Boolean)

    A list of all suppressed alerts.

  • :verification_state (String)

    The verification state of the violation (detect alarm).

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



8947
8948
8949
8950
# File 'lib/aws-sdk-iot/client.rb', line 8947

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

#list_attached_policies(params = {}) ⇒ Types::ListAttachedPoliciesResponse

Lists the policies attached to the specified thing group.

Requires permission to access the [ListAttachedPolicies] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_attached_policies({
  target: "PolicyTarget", # required
  recursive: false,
  marker: "Marker",
  page_size: 1,
})

Response structure


resp.policies #=> Array
resp.policies[0].policy_name #=> String
resp.policies[0].policy_arn #=> String
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :target (required, String)

    The group or principal for which the policies will be listed. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).

  • :recursive (Boolean)

    When true, recursively list attached policies.

  • :marker (String)

    The token to retrieve the next set of results.

  • :page_size (Integer)

    The maximum number of results to be returned per request.

Returns:



9001
9002
9003
9004
# File 'lib/aws-sdk-iot/client.rb', line 9001

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

#list_audit_findings(params = {}) ⇒ Types::ListAuditFindingsResponse

Lists the findings (results) of a Device Defender audit or of the audits performed during a specified time period. (Findings are retained for 90 days.)

Requires permission to access the [ListAuditFindings] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_audit_findings({
  task_id: "AuditTaskId",
  check_name: "AuditCheckName",
  resource_identifier: {
    device_certificate_id: "CertificateId",
    ca_certificate_id: "CertificateId",
    cognito_identity_pool_id: "CognitoIdentityPoolId",
    client_id: "ClientId",
    policy_version_identifier: {
      policy_name: "PolicyName",
      policy_version_id: "PolicyVersionId",
    },
    account: "AwsAccountId",
    iam_role_arn: "RoleArn",
    role_alias_arn: "RoleAliasArn",
    issuer_certificate_identifier: {
      issuer_certificate_subject: "IssuerCertificateSubject",
      issuer_id: "IssuerId",
      issuer_certificate_serial_number: "IssuerCertificateSerialNumber",
    },
    device_certificate_arn: "CertificateArn",
  },
  max_results: 1,
  next_token: "NextToken",
  start_time: Time.now,
  end_time: Time.now,
  list_suppressed_findings: false,
})

Response structure


resp.findings #=> Array
resp.findings[0].finding_id #=> String
resp.findings[0].task_id #=> String
resp.findings[0].check_name #=> String
resp.findings[0].task_start_time #=> Time
resp.findings[0].finding_time #=> Time
resp.findings[0].severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW"
resp.findings[0].non_compliant_resource.resource_type #=> String, one of "DEVICE_CERTIFICATE", "CA_CERTIFICATE", "IOT_POLICY", "COGNITO_IDENTITY_POOL", "CLIENT_ID", "ACCOUNT_SETTINGS", "ROLE_ALIAS", "IAM_ROLE", "ISSUER_CERTIFICATE"
resp.findings[0].non_compliant_resource.resource_identifier.device_certificate_id #=> String
resp.findings[0].non_compliant_resource.resource_identifier.ca_certificate_id #=> String
resp.findings[0].non_compliant_resource.resource_identifier.cognito_identity_pool_id #=> String
resp.findings[0].non_compliant_resource.resource_identifier.client_id #=> String
resp.findings[0].non_compliant_resource.resource_identifier.policy_version_identifier.policy_name #=> String
resp.findings[0].non_compliant_resource.resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.findings[0].non_compliant_resource.resource_identifier. #=> String
resp.findings[0].non_compliant_resource.resource_identifier.iam_role_arn #=> String
resp.findings[0].non_compliant_resource.resource_identifier.role_alias_arn #=> String
resp.findings[0].non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.findings[0].non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.findings[0].non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.findings[0].non_compliant_resource.resource_identifier.device_certificate_arn #=> String
resp.findings[0].non_compliant_resource.additional_info #=> Hash
resp.findings[0].non_compliant_resource.additional_info["String"] #=> String
resp.findings[0].related_resources #=> Array
resp.findings[0].related_resources[0].resource_type #=> String, one of "DEVICE_CERTIFICATE", "CA_CERTIFICATE", "IOT_POLICY", "COGNITO_IDENTITY_POOL", "CLIENT_ID", "ACCOUNT_SETTINGS", "ROLE_ALIAS", "IAM_ROLE", "ISSUER_CERTIFICATE"
resp.findings[0].related_resources[0].resource_identifier.device_certificate_id #=> String
resp.findings[0].related_resources[0].resource_identifier.ca_certificate_id #=> String
resp.findings[0].related_resources[0].resource_identifier.cognito_identity_pool_id #=> String
resp.findings[0].related_resources[0].resource_identifier.client_id #=> String
resp.findings[0].related_resources[0].resource_identifier.policy_version_identifier.policy_name #=> String
resp.findings[0].related_resources[0].resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.findings[0].related_resources[0].resource_identifier. #=> String
resp.findings[0].related_resources[0].resource_identifier.iam_role_arn #=> String
resp.findings[0].related_resources[0].resource_identifier.role_alias_arn #=> String
resp.findings[0].related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.findings[0].related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.findings[0].related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.findings[0].related_resources[0].resource_identifier.device_certificate_arn #=> String
resp.findings[0].related_resources[0].additional_info #=> Hash
resp.findings[0].related_resources[0].additional_info["String"] #=> String
resp.findings[0].reason_for_non_compliance #=> String
resp.findings[0].reason_for_non_compliance_code #=> String
resp.findings[0].is_suppressed #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (String)

    A filter to limit results to the audit with the specified ID. You must specify either the taskId or the startTime and endTime, but not both.

  • :check_name (String)

    A filter to limit results to the findings for the specified audit check.

  • :resource_identifier (Types::ResourceIdentifier)

    Information identifying the noncompliant resource.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

  • :next_token (String)

    The token for the next set of results.

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

    A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.

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

    A filter to limit results to those found before the specified time. You must specify either the startTime and endTime or the taskId, but not both.

  • :list_suppressed_findings (Boolean)

    Boolean flag indicating whether only the suppressed findings or the unsuppressed findings should be listed. If this parameter isn’t provided, the response will list both suppressed and unsuppressed findings.

Returns:



9137
9138
9139
9140
# File 'lib/aws-sdk-iot/client.rb', line 9137

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

#list_audit_mitigation_actions_executions(params = {}) ⇒ Types::ListAuditMitigationActionsExecutionsResponse

Gets the status of audit mitigation action tasks that were executed.

Requires permission to access the

ListAuditMitigationActionsExecutions][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_audit_mitigation_actions_executions({
  task_id: "MitigationActionsTaskId", # required
  action_status: "IN_PROGRESS", # accepts IN_PROGRESS, COMPLETED, FAILED, CANCELED, SKIPPED, PENDING
  finding_id: "FindingId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.actions_executions #=> Array
resp.actions_executions[0].task_id #=> String
resp.actions_executions[0].finding_id #=> String
resp.actions_executions[0].action_name #=> String
resp.actions_executions[0].action_id #=> String
resp.actions_executions[0].status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELED", "SKIPPED", "PENDING"
resp.actions_executions[0].start_time #=> Time
resp.actions_executions[0].end_time #=> Time
resp.actions_executions[0].error_code #=> String
resp.actions_executions[0].message #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    Specify this filter to limit results to actions for a specific audit mitigation actions task.

  • :action_status (String)

    Specify this filter to limit results to those with a specific status.

  • :finding_id (required, String)

    Specify this filter to limit results to those that were applied to a specific audit finding.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

  • :next_token (String)

    The token for the next set of results.

Returns:



9202
9203
9204
9205
# File 'lib/aws-sdk-iot/client.rb', line 9202

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

#list_audit_mitigation_actions_tasks(params = {}) ⇒ Types::ListAuditMitigationActionsTasksResponse

Gets a list of audit mitigation action tasks that match the specified filters.

Requires permission to access the [ListAuditMitigationActionsTasks] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_audit_mitigation_actions_tasks({
  audit_task_id: "AuditTaskId",
  finding_id: "FindingId",
  task_status: "IN_PROGRESS", # accepts IN_PROGRESS, COMPLETED, FAILED, CANCELED
  max_results: 1,
  next_token: "NextToken",
  start_time: Time.now, # required
  end_time: Time.now, # required
})

Response structure


resp.tasks #=> Array
resp.tasks[0].task_id #=> String
resp.tasks[0].start_time #=> Time
resp.tasks[0].task_status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELED"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :audit_task_id (String)

    Specify this filter to limit results to tasks that were applied to results for a specific audit.

  • :finding_id (String)

    Specify this filter to limit results to tasks that were applied to a specific audit finding.

  • :task_status (String)

    Specify this filter to limit results to tasks that are in a specific state.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

  • :next_token (String)

    The token for the next set of results.

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

    Specify this filter to limit results to tasks that began on or after a specific date and time.

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

    Specify this filter to limit results to tasks that were completed or canceled on or before a specific date and time.

Returns:



9273
9274
9275
9276
# File 'lib/aws-sdk-iot/client.rb', line 9273

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

#list_audit_suppressions(params = {}) ⇒ Types::ListAuditSuppressionsResponse

Lists your Device Defender audit listings.

Requires permission to access the [ListAuditSuppressions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_audit_suppressions({
  check_name: "AuditCheckName",
  resource_identifier: {
    device_certificate_id: "CertificateId",
    ca_certificate_id: "CertificateId",
    cognito_identity_pool_id: "CognitoIdentityPoolId",
    client_id: "ClientId",
    policy_version_identifier: {
      policy_name: "PolicyName",
      policy_version_id: "PolicyVersionId",
    },
    account: "AwsAccountId",
    iam_role_arn: "RoleArn",
    role_alias_arn: "RoleAliasArn",
    issuer_certificate_identifier: {
      issuer_certificate_subject: "IssuerCertificateSubject",
      issuer_id: "IssuerId",
      issuer_certificate_serial_number: "IssuerCertificateSerialNumber",
    },
    device_certificate_arn: "CertificateArn",
  },
  ascending_order: false,
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.suppressions #=> Array
resp.suppressions[0].check_name #=> String
resp.suppressions[0].resource_identifier.device_certificate_id #=> String
resp.suppressions[0].resource_identifier.ca_certificate_id #=> String
resp.suppressions[0].resource_identifier.cognito_identity_pool_id #=> String
resp.suppressions[0].resource_identifier.client_id #=> String
resp.suppressions[0].resource_identifier.policy_version_identifier.policy_name #=> String
resp.suppressions[0].resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.suppressions[0].resource_identifier. #=> String
resp.suppressions[0].resource_identifier.iam_role_arn #=> String
resp.suppressions[0].resource_identifier.role_alias_arn #=> String
resp.suppressions[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.suppressions[0].resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.suppressions[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.suppressions[0].resource_identifier.device_certificate_arn #=> String
resp.suppressions[0].expiration_date #=> Time
resp.suppressions[0].suppress_indefinitely #=> Boolean
resp.suppressions[0].description #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (String)

    An audit check name. Checks must be enabled for your account. (Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)

  • :resource_identifier (Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

  • :ascending_order (Boolean)

    Determines whether suppressions are listed in ascending order by expiration date or not. If parameter isn’t provided, ‘ascendingOrder=true`.

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

Returns:



9366
9367
9368
9369
# File 'lib/aws-sdk-iot/client.rb', line 9366

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

#list_audit_tasks(params = {}) ⇒ Types::ListAuditTasksResponse

Lists the Device Defender audits that have been performed during a given time period.

Requires permission to access the [ListAuditTasks] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_audit_tasks({
  start_time: Time.now, # required
  end_time: Time.now, # required
  task_type: "ON_DEMAND_AUDIT_TASK", # accepts ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK
  task_status: "IN_PROGRESS", # accepts IN_PROGRESS, COMPLETED, FAILED, CANCELED
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.tasks #=> Array
resp.tasks[0].task_id #=> String
resp.tasks[0].task_status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELED"
resp.tasks[0].task_type #=> String, one of "ON_DEMAND_AUDIT_TASK", "SCHEDULED_AUDIT_TASK"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

    The beginning of the time period. Audit information is retained for a limited time (90 days). Requesting a start time prior to what is retained results in an “InvalidRequestException”.

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

    The end of the time period.

  • :task_type (String)

    A filter to limit the output to the specified type of audit: can be one of “ON_DEMAND_AUDIT_TASK” or “SCHEDULED_AUDITTASK”.

  • :task_status (String)

    A filter to limit the output to audits with the specified completion status: can be one of “IN_PROGRESS”, “COMPLETED”, “FAILED”, or “CANCELED”.

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

Returns:



9432
9433
9434
9435
# File 'lib/aws-sdk-iot/client.rb', line 9432

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

#list_authorizers(params = {}) ⇒ Types::ListAuthorizersResponse

Lists the authorizers registered in your account.

Requires permission to access the [ListAuthorizers] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_authorizers({
  page_size: 1,
  marker: "Marker",
  ascending_order: false,
  status: "ACTIVE", # accepts ACTIVE, INACTIVE
})

Response structure


resp.authorizers #=> Array
resp.authorizers[0].authorizer_name #=> String
resp.authorizers[0].authorizer_arn #=> String
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :page_size (Integer)

    The maximum number of results to return at one time.

  • :marker (String)

    A marker used to get the next set of results.

  • :ascending_order (Boolean)

    Return the list of authorizers in ascending alphabetical order.

  • :status (String)

    The status of the list authorizers request.

Returns:



9482
9483
9484
9485
# File 'lib/aws-sdk-iot/client.rb', line 9482

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

#list_billing_groups(params = {}) ⇒ Types::ListBillingGroupsResponse

Lists the billing groups you have created.

Requires permission to access the [ListBillingGroups] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.billing_groups #=> Array
resp.billing_groups[0].group_name #=> String
resp.billing_groups[0].group_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return per request.

  • :name_prefix_filter (String)

    Limit the results to billing groups whose names have the given prefix.

Returns:



9530
9531
9532
9533
# File 'lib/aws-sdk-iot/client.rb', line 9530

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

#list_ca_certificates(params = {}) ⇒ Types::ListCACertificatesResponse

Lists the CA certificates registered for your Amazon Web Services account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

Requires permission to access the [ListCACertificates] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_ca_certificates({
  page_size: 1,
  marker: "Marker",
  ascending_order: false,
  template_name: "TemplateName",
})

Response structure


resp.certificates #=> Array
resp.certificates[0].certificate_arn #=> String
resp.certificates[0].certificate_id #=> String
resp.certificates[0].status #=> String, one of "ACTIVE", "INACTIVE"
resp.certificates[0].creation_date #=> Time
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :page_size (Integer)

    The result page size.

  • :marker (String)

    The marker for the next set of results.

  • :ascending_order (Boolean)

    Determines the order of the results.

  • :template_name (String)

    The name of the provisioning template.

Returns:



9586
9587
9588
9589
# File 'lib/aws-sdk-iot/client.rb', line 9586

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

#list_certificate_providers(params = {}) ⇒ Types::ListCertificateProvidersResponse

Lists all your certificate providers in your Amazon Web Services account.

Requires permission to access the [ListCertificateProviders] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.list_certificate_providers({
  next_token: "Marker",
  ascending_order: false,
})

Response structure


resp.certificate_providers #=> Array
resp.certificate_providers[0].certificate_provider_name #=> String
resp.certificate_providers[0].certificate_provider_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results, or ‘null` if there are no more results.

  • :ascending_order (Boolean)

    Returns the list of certificate providers in ascending alphabetical order.

Returns:



9630
9631
9632
9633
# File 'lib/aws-sdk-iot/client.rb', line 9630

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

#list_certificates(params = {}) ⇒ Types::ListCertificatesResponse

Lists the certificates registered in your Amazon Web Services account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

Requires permission to access the [ListCertificates] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_certificates({
  page_size: 1,
  marker: "Marker",
  ascending_order: false,
})

Response structure


resp.certificates #=> Array
resp.certificates[0].certificate_arn #=> String
resp.certificates[0].certificate_id #=> String
resp.certificates[0].status #=> String, one of "ACTIVE", "INACTIVE", "REVOKED", "PENDING_TRANSFER", "REGISTER_INACTIVE", "PENDING_ACTIVATION"
resp.certificates[0].certificate_mode #=> String, one of "DEFAULT", "SNI_ONLY"
resp.certificates[0].creation_date #=> Time
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :page_size (Integer)

    The result page size.

  • :marker (String)

    The marker for the next set of results.

  • :ascending_order (Boolean)

    Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.

Returns:



9683
9684
9685
9686
# File 'lib/aws-sdk-iot/client.rb', line 9683

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

#list_certificates_by_ca(params = {}) ⇒ Types::ListCertificatesByCAResponse

List the device certificates signed by the specified CA certificate.

Requires permission to access the [ListCertificatesByCA] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_certificates_by_ca({
  ca_certificate_id: "CertificateId", # required
  page_size: 1,
  marker: "Marker",
  ascending_order: false,
})

Response structure


resp.certificates #=> Array
resp.certificates[0].certificate_arn #=> String
resp.certificates[0].certificate_id #=> String
resp.certificates[0].status #=> String, one of "ACTIVE", "INACTIVE", "REVOKED", "PENDING_TRANSFER", "REGISTER_INACTIVE", "PENDING_ACTIVATION"
resp.certificates[0].certificate_mode #=> String, one of "DEFAULT", "SNI_ONLY"
resp.certificates[0].creation_date #=> Time
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :ca_certificate_id (required, String)

    The ID of the CA certificate. This operation will list all registered device certificate that were signed by this CA certificate.

  • :page_size (Integer)

    The result page size.

  • :marker (String)

    The marker for the next set of results.

  • :ascending_order (Boolean)

    Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.

Returns:



9738
9739
9740
9741
# File 'lib/aws-sdk-iot/client.rb', line 9738

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

#list_command_executions(params = {}) ⇒ Types::ListCommandExecutionsResponse

List all command executions.

You must provide only the ‘startedTimeFilter` or the `completedTimeFilter` information. If you provide both time filters, the API will generate an error. You can use this information to find command executions that started within a specific timeframe.

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_command_executions({
  max_results: 1,
  next_token: "NextToken",
  namespace: "AWS-IoT", # accepts AWS-IoT, AWS-IoT-FleetWise
  status: "CREATED", # accepts CREATED, IN_PROGRESS, SUCCEEDED, FAILED, REJECTED, TIMED_OUT
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
  started_time_filter: {
    after: "StringDateTime",
    before: "StringDateTime",
  },
  completed_time_filter: {
    after: "StringDateTime",
    before: "StringDateTime",
  },
  target_arn: "TargetArn",
  command_arn: "CommandArn",
})

Response structure


resp.command_executions #=> Array
resp.command_executions[0].command_arn #=> String
resp.command_executions[0].execution_id #=> String
resp.command_executions[0].target_arn #=> String
resp.command_executions[0].status #=> String, one of "CREATED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "REJECTED", "TIMED_OUT"
resp.command_executions[0].created_at #=> Time
resp.command_executions[0].started_at #=> Time
resp.command_executions[0].completed_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise `null` to receive the first set of results.

  • :namespace (String)

    The namespace of the command.

  • :status (String)

    List all command executions for the device that have a particular status. For example, you can filter the list to display only command executions that have failed or timed out.

  • :sort_order (String)

    Specify whether to list the command executions that were created in the ascending or descending order. By default, the API returns all commands in the descending order based on the start time or completion time of the executions, that are determined by the ‘startTimeFilter` and `completeTimeFilter` parameters.

  • :started_time_filter (Types::TimeFilter)

    List all command executions that started any time before or after the date and time that you specify. The date and time uses the format ‘yyyy-MM-dd’T’HH:mm`.

  • :completed_time_filter (Types::TimeFilter)

    List all command executions that completed any time before or after the date and time that you specify. The date and time uses the format ‘yyyy-MM-dd’T’HH:mm`.

  • :target_arn (String)

    The Amazon Resource Number (ARN) of the target device. You can use this information to list all command executions for a particular device.

  • :command_arn (String)

    The Amazon Resource Number (ARN) of the command. You can use this information to list all command executions for a particular command.

Returns:



9833
9834
9835
9836
# File 'lib/aws-sdk-iot/client.rb', line 9833

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

#list_commands(params = {}) ⇒ Types::ListCommandsResponse

List all commands in your account.

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

Examples:

Request syntax with placeholder values


resp = client.list_commands({
  max_results: 1,
  next_token: "NextToken",
  namespace: "AWS-IoT", # accepts AWS-IoT, AWS-IoT-FleetWise
  command_parameter_name: "CommandParameterName",
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
})

Response structure


resp.commands #=> Array
resp.commands[0].command_arn #=> String
resp.commands[0].command_id #=> String
resp.commands[0].display_name #=> String
resp.commands[0].deprecated #=> Boolean
resp.commands[0].created_at #=> Time
resp.commands[0].last_updated_at #=> Time
resp.commands[0].pending_deletion #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return in this operation. By default, the API returns up to a maximum of 25 results. You can override this default value to return up to a maximum of 100 results for this operation.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise `null` to receive the first set of results.

  • :namespace (String)

    The namespace of the command. By default, the API returns all commands that have been created for both ‘AWS-IoT` and `AWS-IoT-FleetWise` namespaces. You can override this default value if you want to return all commands that have been created only for a specific namespace.

  • :command_parameter_name (String)

    A filter that can be used to display the list of commands that have a specific command parameter name.

  • :sort_order (String)

    Specify whether to list the commands that you have created in the ascending or descending order. By default, the API returns all commands in the descending order based on the time that they were created.

Returns:



9898
9899
9900
9901
# File 'lib/aws-sdk-iot/client.rb', line 9898

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

#list_custom_metrics(params = {}) ⇒ Types::ListCustomMetricsResponse

Lists your Device Defender detect custom metrics.

Requires permission to access the [ListCustomMetrics] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

Returns:



9940
9941
9942
9943
# File 'lib/aws-sdk-iot/client.rb', line 9940

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

#list_detect_mitigation_actions_executions(params = {}) ⇒ Types::ListDetectMitigationActionsExecutionsResponse

Lists mitigation actions executions for a Device Defender ML Detect Security Profile.

Requires permission to access the

ListDetectMitigationActionsExecutions][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_detect_mitigation_actions_executions({
  task_id: "MitigationActionsTaskId",
  violation_id: "ViolationId",
  thing_name: "DeviceDefenderThingName",
  start_time: Time.now,
  end_time: Time.now,
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.actions_executions #=> Array
resp.actions_executions[0].task_id #=> String
resp.actions_executions[0].violation_id #=> String
resp.actions_executions[0].action_name #=> String
resp.actions_executions[0].thing_name #=> String
resp.actions_executions[0].execution_start_date #=> Time
resp.actions_executions[0].execution_end_date #=> Time
resp.actions_executions[0].status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED", "SKIPPED"
resp.actions_executions[0].error_code #=> String
resp.actions_executions[0].message #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (String)

    The unique identifier of the task.

  • :violation_id (String)

    The unique identifier of the violation.

  • :thing_name (String)

    The name of the thing whose mitigation actions are listed.

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

    A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.

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

    The end of the time period for which ML Detect mitigation actions executions are returned.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

  • :next_token (String)

    The token for the next set of results.

Returns:



10015
10016
10017
10018
# File 'lib/aws-sdk-iot/client.rb', line 10015

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

#list_detect_mitigation_actions_tasks(params = {}) ⇒ Types::ListDetectMitigationActionsTasksResponse

List of Device Defender ML Detect mitigation actions tasks.

Requires permission to access the

ListDetectMitigationActionsTasks][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_detect_mitigation_actions_tasks({
  max_results: 1,
  next_token: "NextToken",
  start_time: Time.now, # required
  end_time: Time.now, # required
})

Response structure


resp.tasks #=> Array
resp.tasks[0].task_id #=> String
resp.tasks[0].task_status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED", "CANCELED"
resp.tasks[0].task_start_time #=> Time
resp.tasks[0].task_end_time #=> Time
resp.tasks[0].target.violation_ids #=> Array
resp.tasks[0].target.violation_ids[0] #=> String
resp.tasks[0].target.security_profile_name #=> String
resp.tasks[0].target.behavior_name #=> String
resp.tasks[0].violation_event_occurrence_range.start_time #=> Time
resp.tasks[0].violation_event_occurrence_range.end_time #=> Time
resp.tasks[0].only_active_violations_included #=> Boolean
resp.tasks[0].suppressed_alerts_included #=> Boolean
resp.tasks[0].actions_definition #=> Array
resp.tasks[0].actions_definition[0].name #=> String
resp.tasks[0].actions_definition[0].id #=> String
resp.tasks[0].actions_definition[0].role_arn #=> String
resp.tasks[0].actions_definition[0].action_params.update_device_certificate_params.action #=> String, one of "DEACTIVATE"
resp.tasks[0].actions_definition[0].action_params.update_ca_certificate_params.action #=> String, one of "DEACTIVATE"
resp.tasks[0].actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names #=> Array
resp.tasks[0].actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names[0] #=> String
resp.tasks[0].actions_definition[0].action_params.add_things_to_thing_group_params.override_dynamic_groups #=> Boolean
resp.tasks[0].actions_definition[0].action_params.replace_default_policy_version_params.template_name #=> String, one of "BLANK_POLICY"
resp.tasks[0].actions_definition[0].action_params.enable_io_t_logging_params.role_arn_for_logging #=> String
resp.tasks[0].actions_definition[0].action_params.enable_io_t_logging_params.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.tasks[0].actions_definition[0].action_params.publish_finding_to_sns_params.topic_arn #=> String
resp.tasks[0].task_statistics.actions_executed #=> Integer
resp.tasks[0].task_statistics.actions_skipped #=> Integer
resp.tasks[0].task_statistics.actions_failed #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

  • :next_token (String)

    The token for the next set of results.

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

    A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.

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

    The end of the time period for which ML Detect mitigation actions tasks are returned.

Returns:



10096
10097
10098
10099
# File 'lib/aws-sdk-iot/client.rb', line 10096

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

#list_dimensions(params = {}) ⇒ Types::ListDimensionsResponse

List the set of dimensions that are defined for your Amazon Web Services accounts.

Requires permission to access the [ListDimensions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to retrieve at one time.

Returns:



10138
10139
10140
10141
# File 'lib/aws-sdk-iot/client.rb', line 10138

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

#list_domain_configurations(params = {}) ⇒ Types::ListDomainConfigurationsResponse

Gets a list of domain configurations for the user. This list is sorted alphabetically by domain configuration name.

Requires permission to access the [ListDomainConfigurations] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_domain_configurations({
  marker: "Marker",
  page_size: 1,
  service_type: "DATA", # accepts DATA, CREDENTIAL_PROVIDER, JOBS
})

Response structure


resp.domain_configurations #=> Array
resp.domain_configurations[0].domain_configuration_name #=> String
resp.domain_configurations[0].domain_configuration_arn #=> String
resp.domain_configurations[0].service_type #=> String, one of "DATA", "CREDENTIAL_PROVIDER", "JOBS"
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :marker (String)

    The marker for the next set of results.

  • :page_size (Integer)

    The result page size.

  • :service_type (String)

    The type of service delivered by the endpoint.

Returns:



10187
10188
10189
10190
# File 'lib/aws-sdk-iot/client.rb', line 10187

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

#list_fleet_metrics(params = {}) ⇒ Types::ListFleetMetricsResponse

Lists all your fleet metrics.

Requires permission to access the [ListFleetMetrics] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.fleet_metrics #=> Array
resp.fleet_metrics[0].metric_name #=> String
resp.fleet_metrics[0].metric_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise `null` to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

Returns:



10231
10232
10233
10234
# File 'lib/aws-sdk-iot/client.rb', line 10231

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

#list_indices(params = {}) ⇒ Types::ListIndicesResponse

Lists the search indices.

Requires permission to access the [ListIndices] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token used to get the next set of results, or ‘null` if there are no additional results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



10273
10274
10275
10276
# File 'lib/aws-sdk-iot/client.rb', line 10273

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

#list_job_executions_for_job(params = {}) ⇒ Types::ListJobExecutionsForJobResponse

Lists the job executions for a job.

Requires permission to access the [ListJobExecutionsForJob] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_job_executions_for_job({
  job_id: "JobId", # required
  status: "QUEUED", # accepts QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT, REJECTED, REMOVED, CANCELED
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.execution_summaries #=> Array
resp.execution_summaries[0].thing_arn #=> String
resp.execution_summaries[0].job_execution_summary.status #=> String, one of "QUEUED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "TIMED_OUT", "REJECTED", "REMOVED", "CANCELED"
resp.execution_summaries[0].job_execution_summary.queued_at #=> Time
resp.execution_summaries[0].job_execution_summary.started_at #=> Time
resp.execution_summaries[0].job_execution_summary.last_updated_at #=> Time
resp.execution_summaries[0].job_execution_summary.execution_number #=> Integer
resp.execution_summaries[0].job_execution_summary.retry_attempt #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The unique identifier you assigned to this job when it was created.

  • :status (String)

    The status of the job.

  • :max_results (Integer)

    The maximum number of results to be returned per request.

  • :next_token (String)

    The token to retrieve the next set of results.

Returns:



10328
10329
10330
10331
# File 'lib/aws-sdk-iot/client.rb', line 10328

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

#list_job_executions_for_thing(params = {}) ⇒ Types::ListJobExecutionsForThingResponse

Lists the job executions for the specified thing.

Requires permission to access the [ListJobExecutionsForThing] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_job_executions_for_thing({
  thing_name: "ThingName", # required
  status: "QUEUED", # accepts QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT, REJECTED, REMOVED, CANCELED
  namespace_id: "NamespaceId",
  max_results: 1,
  next_token: "NextToken",
  job_id: "JobId",
})

Response structure


resp.execution_summaries #=> Array
resp.execution_summaries[0].job_id #=> String
resp.execution_summaries[0].job_execution_summary.status #=> String, one of "QUEUED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "TIMED_OUT", "REJECTED", "REMOVED", "CANCELED"
resp.execution_summaries[0].job_execution_summary.queued_at #=> Time
resp.execution_summaries[0].job_execution_summary.started_at #=> Time
resp.execution_summaries[0].job_execution_summary.last_updated_at #=> Time
resp.execution_summaries[0].job_execution_summary.execution_number #=> Integer
resp.execution_summaries[0].job_execution_summary.retry_attempt #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The thing name.

  • :status (String)

    An optional filter that lets you search for jobs that have the specified status.

  • :namespace_id (String)

    The namespace used to indicate that a job is a customer-managed job.

    When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

    ‘$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/`

    <note markdown=“1”> The ‘namespaceId` feature is only supported by IoT Greengrass at this time. For more information, see [Setting up IoT Greengrass core devices.]

    </note>
    

    [1]: docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html

  • :max_results (Integer)

    The maximum number of results to be returned per request.

  • :next_token (String)

    The token to retrieve the next set of results.

  • :job_id (String)

    The unique identifier you assigned to this job when it was created.

Returns:



10409
10410
10411
10412
# File 'lib/aws-sdk-iot/client.rb', line 10409

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

#list_job_templates(params = {}) ⇒ Types::ListJobTemplatesResponse

Returns a list of job templates.

Requires permission to access the [ListJobTemplates] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.job_templates #=> Array
resp.job_templates[0].job_template_arn #=> String
resp.job_templates[0].job_template_id #=> String
resp.job_templates[0].description #=> String
resp.job_templates[0].created_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return in the list.

  • :next_token (String)

    The token to use to return the next set of results in the list.

Returns:



10453
10454
10455
10456
# File 'lib/aws-sdk-iot/client.rb', line 10453

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

#list_jobs(params = {}) ⇒ Types::ListJobsResponse

Lists jobs.

Requires permission to access the [ListJobs] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_jobs({
  status: "IN_PROGRESS", # accepts IN_PROGRESS, CANCELED, COMPLETED, DELETION_IN_PROGRESS, SCHEDULED
  target_selection: "CONTINUOUS", # accepts CONTINUOUS, SNAPSHOT
  max_results: 1,
  next_token: "NextToken",
  thing_group_name: "ThingGroupName",
  thing_group_id: "ThingGroupId",
  namespace_id: "NamespaceId",
})

Response structure


resp.jobs #=> Array
resp.jobs[0].job_arn #=> String
resp.jobs[0].job_id #=> String
resp.jobs[0].thing_group_id #=> String
resp.jobs[0].target_selection #=> String, one of "CONTINUOUS", "SNAPSHOT"
resp.jobs[0].status #=> String, one of "IN_PROGRESS", "CANCELED", "COMPLETED", "DELETION_IN_PROGRESS", "SCHEDULED"
resp.jobs[0].created_at #=> Time
resp.jobs[0].last_updated_at #=> Time
resp.jobs[0].completed_at #=> Time
resp.jobs[0].is_concurrent #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :status (String)

    An optional filter that lets you search for jobs that have the specified status.

  • :target_selection (String)

    Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

    <note markdown=“1”> We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.

    </note>
    
  • :max_results (Integer)

    The maximum number of results to return per request.

  • :next_token (String)

    The token to retrieve the next set of results.

  • :thing_group_name (String)

    A filter that limits the returned jobs to those for the specified group.

  • :thing_group_id (String)

    A filter that limits the returned jobs to those for the specified group.

  • :namespace_id (String)

    The namespace used to indicate that a job is a customer-managed job.

    When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

    ‘$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/`

    <note markdown=“1”> The ‘namespaceId` feature is only supported by IoT Greengrass at this time. For more information, see [Setting up IoT Greengrass core devices.]

    </note>
    

    [1]: docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html

Returns:



10553
10554
10555
10556
# File 'lib/aws-sdk-iot/client.rb', line 10553

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

#list_managed_job_templates(params = {}) ⇒ Types::ListManagedJobTemplatesResponse

Returns a list of managed job templates.

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

Response structure


resp.managed_job_templates #=> Array
resp.managed_job_templates[0].template_arn #=> String
resp.managed_job_templates[0].template_name #=> String
resp.managed_job_templates[0].description #=> String
resp.managed_job_templates[0].environments #=> Array
resp.managed_job_templates[0].environments[0] #=> String
resp.managed_job_templates[0].template_version #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (String)

    An optional parameter for template name. If specified, only the versions of the managed job templates that have the specified template name will be returned.

  • :max_results (Integer)

    Maximum number of entries that can be returned.

  • :next_token (String)

    The token to retrieve the next set of results.

Returns:



10599
10600
10601
10602
# File 'lib/aws-sdk-iot/client.rb', line 10599

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

#list_metric_values(params = {}) ⇒ Types::ListMetricValuesResponse

Lists the values reported for an IoT Device Defender metric (device-side metric, cloud-side metric, or custom metric) by the given thing during the specified time period.

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_metric_values({
  thing_name: "DeviceDefenderThingName", # required
  metric_name: "BehaviorMetric", # required
  dimension_name: "DimensionName",
  dimension_value_operator: "IN", # accepts IN, NOT_IN
  start_time: Time.now, # required
  end_time: Time.now, # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.metric_datum_list #=> Array
resp.metric_datum_list[0].timestamp #=> Time
resp.metric_datum_list[0].value.count #=> Integer
resp.metric_datum_list[0].value.cidrs #=> Array
resp.metric_datum_list[0].value.cidrs[0] #=> String
resp.metric_datum_list[0].value.ports #=> Array
resp.metric_datum_list[0].value.ports[0] #=> Integer
resp.metric_datum_list[0].value.number #=> Float
resp.metric_datum_list[0].value.numbers #=> Array
resp.metric_datum_list[0].value.numbers[0] #=> Float
resp.metric_datum_list[0].value.strings #=> Array
resp.metric_datum_list[0].value.strings[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing for which security profile metric values are returned.

  • :metric_name (required, String)

    The name of the security profile metric for which values are returned.

  • :dimension_name (String)

    The dimension name.

  • :dimension_value_operator (String)

    The dimension value operator.

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

    The start of the time period for which metric values are returned.

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

    The end of the time period for which metric values are returned.

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :next_token (String)

    The token for the next set of results.

Returns:



10671
10672
10673
10674
# File 'lib/aws-sdk-iot/client.rb', line 10671

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

#list_mitigation_actions(params = {}) ⇒ Types::ListMitigationActionsResponse

Gets a list of all mitigation actions that match the specified filter criteria.

Requires permission to access the [ListMitigationActions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_mitigation_actions({
  action_type: "UPDATE_DEVICE_CERTIFICATE", # accepts UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.action_identifiers #=> Array
resp.action_identifiers[0].action_name #=> String
resp.action_identifiers[0].action_arn #=> String
resp.action_identifiers[0].creation_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :action_type (String)

    Specify a value to limit the result to mitigation actions with a specific action type.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

  • :next_token (String)

    The token for the next set of results.

Returns:



10721
10722
10723
10724
# File 'lib/aws-sdk-iot/client.rb', line 10721

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

#list_ota_updates(params = {}) ⇒ Types::ListOTAUpdatesResponse

Lists OTA updates.

Requires permission to access the [ListOTAUpdates] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_ota_updates({
  max_results: 1,
  next_token: "NextToken",
  ota_update_status: "CREATE_PENDING", # accepts CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_COMPLETE, CREATE_FAILED, DELETE_IN_PROGRESS, DELETE_FAILED
})

Response structure


resp.ota_updates #=> Array
resp.ota_updates[0].ota_update_id #=> String
resp.ota_updates[0].ota_update_arn #=> String
resp.ota_updates[0].creation_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :next_token (String)

    A token used to retrieve the next set of results.

  • :ota_update_status (String)

    The OTA update job status.

Returns:



10768
10769
10770
10771
# File 'lib/aws-sdk-iot/client.rb', line 10768

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

#list_outgoing_certificates(params = {}) ⇒ Types::ListOutgoingCertificatesResponse

Lists certificates that are being transferred but not yet accepted.

Requires permission to access the [ListOutgoingCertificates] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_outgoing_certificates({
  page_size: 1,
  marker: "Marker",
  ascending_order: false,
})

Response structure


resp.outgoing_certificates #=> Array
resp.outgoing_certificates[0].certificate_arn #=> String
resp.outgoing_certificates[0].certificate_id #=> String
resp.outgoing_certificates[0].transferred_to #=> String
resp.outgoing_certificates[0].transfer_date #=> Time
resp.outgoing_certificates[0].transfer_message #=> String
resp.outgoing_certificates[0].creation_date #=> Time
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :page_size (Integer)

    The result page size.

  • :marker (String)

    The marker for the next set of results.

  • :ascending_order (Boolean)

    Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.

Returns:



10820
10821
10822
10823
# File 'lib/aws-sdk-iot/client.rb', line 10820

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

#list_package_versions(params = {}) ⇒ Types::ListPackageVersionsResponse

Lists the software package versions associated to the account.

Requires permission to access the [ListPackageVersions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_package_versions({
  package_name: "PackageName", # required
  status: "DRAFT", # accepts DRAFT, PUBLISHED, DEPRECATED
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.package_version_summaries #=> Array
resp.package_version_summaries[0].package_name #=> String
resp.package_version_summaries[0].version_name #=> String
resp.package_version_summaries[0].status #=> String, one of "DRAFT", "PUBLISHED", "DEPRECATED"
resp.package_version_summaries[0].creation_date #=> Time
resp.package_version_summaries[0].last_modified_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:



10878
10879
10880
10881
# File 'lib/aws-sdk-iot/client.rb', line 10878

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

#list_packages(params = {}) ⇒ Types::ListPackagesResponse

Lists the software packages associated to the account.

Requires permission to access the [ListPackages] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.package_summaries #=> Array
resp.package_summaries[0].package_name #=> String
resp.package_summaries[0].default_version_name #=> String
resp.package_summaries[0].creation_date #=> Time
resp.package_summaries[0].last_modified_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results returned at one time.

  • :next_token (String)

    The token for the next set of results.

Returns:



10922
10923
10924
10925
# File 'lib/aws-sdk-iot/client.rb', line 10922

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

#list_policies(params = {}) ⇒ Types::ListPoliciesResponse

Lists your policies.

Requires permission to access the [ListPolicies] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_policies({
  marker: "Marker",
  page_size: 1,
  ascending_order: false,
})

Response structure


resp.policies #=> Array
resp.policies[0].policy_name #=> String
resp.policies[0].policy_arn #=> String
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :marker (String)

    The marker for the next set of results.

  • :page_size (Integer)

    The result page size.

  • :ascending_order (Boolean)

    Specifies the order for results. If true, the results are returned in ascending creation order.

Returns:



10969
10970
10971
10972
# File 'lib/aws-sdk-iot/client.rb', line 10969

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

#list_policy_principals(params = {}) ⇒ Types::ListPolicyPrincipalsResponse

Lists the principals associated with the specified policy.

Note: This action is deprecated and works as expected for backward compatibility, but we won’t add enhancements. Use ListTargetsForPolicy instead.

Requires permission to access the [ListPolicyPrincipals] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_policy_principals({
  policy_name: "PolicyName", # required
  marker: "Marker",
  page_size: 1,
  ascending_order: false,
})

Response structure


resp.principals #=> Array
resp.principals[0] #=> String
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

  • :marker (String)

    The marker for the next set of results.

  • :page_size (Integer)

    The result page size.

  • :ascending_order (Boolean)

    Specifies the order for results. If true, the results are returned in ascending creation order.

Returns:



11023
11024
11025
11026
# File 'lib/aws-sdk-iot/client.rb', line 11023

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

#list_policy_versions(params = {}) ⇒ Types::ListPolicyVersionsResponse

Lists the versions of the specified policy and identifies the default version.

Requires permission to access the [ListPolicyVersions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.list_policy_versions({
  policy_name: "PolicyName", # required
})

Response structure


resp.policy_versions #=> Array
resp.policy_versions[0].version_id #=> String
resp.policy_versions[0].is_default_version #=> Boolean
resp.policy_versions[0].create_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

Returns:



11059
11060
11061
11062
# File 'lib/aws-sdk-iot/client.rb', line 11059

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

#list_principal_policies(params = {}) ⇒ Types::ListPrincipalPoliciesResponse

Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in [AmazonCognito Identity format].

Note: This action is deprecated and works as expected for backward compatibility, but we won’t add enhancements. Use ListAttachedPolicies instead.

Requires permission to access the [ListPrincipalPolicies] action.

[1]: docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html#API_GetCredentialsForIdentity_RequestSyntax [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_principal_policies({
  principal: "Principal", # required
  marker: "Marker",
  page_size: 1,
  ascending_order: false,
})

Response structure


resp.policies #=> Array
resp.policies[0].policy_name #=> String
resp.policies[0].policy_arn #=> String
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :principal (required, String)

    The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).

  • :marker (String)

    The marker for the next set of results.

  • :page_size (Integer)

    The result page size.

  • :ascending_order (Boolean)

    Specifies the order for results. If true, results are returned in ascending creation order.

Returns:



11120
11121
11122
11123
# File 'lib/aws-sdk-iot/client.rb', line 11120

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

#list_principal_things(params = {}) ⇒ Types::ListPrincipalThingsResponse

Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Requires permission to access the [ListPrincipalThings] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_principal_things({
  next_token: "NextToken",
  max_results: 1,
  principal: "Principal", # required
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :principal (required, String)

    The principal.

Returns:



11169
11170
11171
11172
# File 'lib/aws-sdk-iot/client.rb', line 11169

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

#list_principal_things_v2(params = {}) ⇒ Types::ListPrincipalThingsV2Response

Lists the things associated with the specified principal. A principal can be an X.509 certificate or an Amazon Cognito ID.

Requires permission to access the [ListPrincipalThings] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_principal_things_v2({
  next_token: "NextToken",
  max_results: 1,
  principal: "Principal", # required
  thing_principal_type: "EXCLUSIVE_THING", # accepts EXCLUSIVE_THING, NON_EXCLUSIVE_THING
})

Response structure


resp.principal_thing_objects #=> Array
resp.principal_thing_objects[0].thing_name #=> String
resp.principal_thing_objects[0].thing_principal_type #=> String, one of "EXCLUSIVE_THING", "NON_EXCLUSIVE_THING"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :principal (required, String)

    The principal. A principal can be an X.509 certificate or an Amazon Cognito ID.

  • :thing_principal_type (String)

    The type of the relation you want to filter in the response. If no value is provided in this field, the response will list all things, including both the ‘EXCLUSIVE_THING` and `NON_EXCLUSIVE_THING` attachment types.

    • ‘EXCLUSIVE_THING` - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.

    ^ ^

    • ‘NON_EXCLUSIVE_THING` - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.

    ^

Returns:



11238
11239
11240
11241
# File 'lib/aws-sdk-iot/client.rb', line 11238

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

#list_provisioning_template_versions(params = {}) ⇒ Types::ListProvisioningTemplateVersionsResponse

A list of provisioning template versions.

Requires permission to access the

ListProvisioningTemplateVersions][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_provisioning_template_versions({
  template_name: "TemplateName", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.versions #=> Array
resp.versions[0].version_id #=> Integer
resp.versions[0].creation_date #=> Time
resp.versions[0].is_default_version #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template.

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :next_token (String)

    A token to retrieve the next set of results.

Returns:



11286
11287
11288
11289
# File 'lib/aws-sdk-iot/client.rb', line 11286

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

#list_provisioning_templates(params = {}) ⇒ Types::ListProvisioningTemplatesResponse

Lists the provisioning templates in your Amazon Web Services account.

Requires permission to access the [ListProvisioningTemplates] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.templates #=> Array
resp.templates[0].template_arn #=> String
resp.templates[0].template_name #=> String
resp.templates[0].description #=> String
resp.templates[0].creation_date #=> Time
resp.templates[0].last_modified_date #=> Time
resp.templates[0].enabled #=> Boolean
resp.templates[0].type #=> String, one of "FLEET_PROVISIONING", "JITP"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :next_token (String)

    A token to retrieve the next set of results.

Returns:



11334
11335
11336
11337
# File 'lib/aws-sdk-iot/client.rb', line 11334

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

The related resources of an Audit finding. The following resources can be returned from calling this API:

  • DEVICE_CERTIFICATE

  • CA_CERTIFICATE

  • IOT_POLICY

  • COGNITO_IDENTITY_POOL

  • CLIENT_ID

  • ACCOUNT_SETTINGS

  • ROLE_ALIAS

  • IAM_ROLE

  • ISSUER_CERTIFICATE

<note markdown=“1”> This API is similar to DescribeAuditFinding’s [RelatedResources] but provides pagination and is not limited to 10 resources. When calling [DescribeAuditFinding] for the intermediate CA revoked for active device certificates check, RelatedResources will not be populated. You must use this API, ListRelatedResourcesForAuditFinding, to list the certificates.

</note>

[1]: docs.aws.amazon.com/iot/latest/apireference/API_DescribeAuditFinding.html

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_related_resources_for_audit_finding({
  finding_id: "FindingId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.related_resources #=> Array
resp.related_resources[0].resource_type #=> String, one of "DEVICE_CERTIFICATE", "CA_CERTIFICATE", "IOT_POLICY", "COGNITO_IDENTITY_POOL", "CLIENT_ID", "ACCOUNT_SETTINGS", "ROLE_ALIAS", "IAM_ROLE", "ISSUER_CERTIFICATE"
resp.related_resources[0].resource_identifier.device_certificate_id #=> String
resp.related_resources[0].resource_identifier.ca_certificate_id #=> String
resp.related_resources[0].resource_identifier.cognito_identity_pool_id #=> String
resp.related_resources[0].resource_identifier.client_id #=> String
resp.related_resources[0].resource_identifier.policy_version_identifier.policy_name #=> String
resp.related_resources[0].resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.related_resources[0].resource_identifier. #=> String
resp.related_resources[0].resource_identifier.iam_role_arn #=> String
resp.related_resources[0].resource_identifier.role_alias_arn #=> String
resp.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.related_resources[0].resource_identifier.device_certificate_arn #=> String
resp.related_resources[0].additional_info #=> Hash
resp.related_resources[0].additional_info["String"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :finding_id (required, String)

    The finding Id.

  • :next_token (String)

    A token that can be used to retrieve the next set of results, or ‘null` if there are no additional results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



11421
11422
11423
11424
# File 'lib/aws-sdk-iot/client.rb', line 11421

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

#list_role_aliases(params = {}) ⇒ Types::ListRoleAliasesResponse

Lists the role aliases registered in your account.

Requires permission to access the [ListRoleAliases] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_role_aliases({
  page_size: 1,
  marker: "Marker",
  ascending_order: false,
})

Response structure


resp.role_aliases #=> Array
resp.role_aliases[0] #=> String
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :page_size (Integer)

    The maximum number of results to return at one time.

  • :marker (String)

    A marker used to get the next set of results.

  • :ascending_order (Boolean)

    Return the list of role aliases in ascending alphabetical order.

Returns:



11466
11467
11468
11469
# File 'lib/aws-sdk-iot/client.rb', line 11466

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

#list_sbom_validation_results(params = {}) ⇒ Types::ListSbomValidationResultsResponse

The validation results for all software bill of materials (SBOM) attached to a specific software package version.

Requires permission to access the [ListSbomValidationResults] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_sbom_validation_results({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
  validation_result: "FAILED", # accepts FAILED, SUCCEEDED
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.validation_result_summaries #=> Array
resp.validation_result_summaries[0].file_name #=> String
resp.validation_result_summaries[0].validation_result #=> String, one of "FAILED", "SUCCEEDED"
resp.validation_result_summaries[0].error_code #=> String, one of "INCOMPATIBLE_FORMAT", "FILE_SIZE_LIMIT_EXCEEDED"
resp.validation_result_summaries[0].error_message #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the new software package.

  • :version_name (required, String)

    The name of the new package version.

  • :validation_result (String)

    The end result of the

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :next_token (String)

    A token that can be used to retrieve the next set of results, or null if there are no additional results.

Returns:



11525
11526
11527
11528
# File 'lib/aws-sdk-iot/client.rb', line 11525

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

#list_scheduled_audits(params = {}) ⇒ Types::ListScheduledAuditsResponse

Lists all of your scheduled audits.

Requires permission to access the [ListScheduledAudits] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.scheduled_audits #=> Array
resp.scheduled_audits[0].scheduled_audit_name #=> String
resp.scheduled_audits[0].scheduled_audit_arn #=> String
resp.scheduled_audits[0].frequency #=> String, one of "DAILY", "WEEKLY", "BIWEEKLY", "MONTHLY"
resp.scheduled_audits[0].day_of_month #=> String
resp.scheduled_audits[0].day_of_week #=> String, one of "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time. The default is 25.

Returns:



11571
11572
11573
11574
# File 'lib/aws-sdk-iot/client.rb', line 11571

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

#list_security_profiles(params = {}) ⇒ Types::ListSecurityProfilesResponse

Lists the Device Defender security profiles you’ve created. You can filter security profiles by dimension or custom metric.

Requires permission to access the [ListSecurityProfiles] action.

<note markdown=“1”> ‘dimensionName` and `metricName` cannot be used in the same request.

</note>

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_security_profiles({
  next_token: "NextToken",
  max_results: 1,
  dimension_name: "DimensionName",
  metric_name: "MetricName",
})

Response structure


resp.security_profile_identifiers #=> Array
resp.security_profile_identifiers[0].name #=> String
resp.security_profile_identifiers[0].arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :dimension_name (String)

    A filter to limit results to the security profiles that use the defined dimension. Cannot be used with ‘metricName`

  • :metric_name (String)

    The name of the custom metric. Cannot be used with ‘dimensionName`.

Returns:



11627
11628
11629
11630
# File 'lib/aws-sdk-iot/client.rb', line 11627

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

#list_security_profiles_for_target(params = {}) ⇒ Types::ListSecurityProfilesForTargetResponse

Lists the Device Defender security profiles attached to a target (thing group).

Requires permission to access the [ListSecurityProfilesForTarget] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_security_profiles_for_target({
  next_token: "NextToken",
  max_results: 1,
  recursive: false,
  security_profile_target_arn: "SecurityProfileTargetArn", # required
})

Response structure


resp.security_profile_target_mappings #=> Array
resp.security_profile_target_mappings[0].security_profile_identifier.name #=> String
resp.security_profile_target_mappings[0].security_profile_identifier.arn #=> String
resp.security_profile_target_mappings[0].target.arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :recursive (Boolean)

    If true, return child groups too.

  • :security_profile_target_arn (required, String)

    The ARN of the target (thing group) whose attached security profiles you want to get.

Returns:



11681
11682
11683
11684
# File 'lib/aws-sdk-iot/client.rb', line 11681

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

#list_streams(params = {}) ⇒ Types::ListStreamsResponse

Lists all of the streams in your Amazon Web Services account.

Requires permission to access the [ListStreams] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.streams #=> Array
resp.streams[0].stream_id #=> String
resp.streams[0].stream_arn #=> String
resp.streams[0].stream_version #=> Integer
resp.streams[0].description #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return at a time.

  • :next_token (String)

    A token used to get the next set of results.

  • :ascending_order (Boolean)

    Set to true to return the list of streams in ascending order.

Returns:



11729
11730
11731
11732
# File 'lib/aws-sdk-iot/client.rb', line 11729

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

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

Lists the tags (metadata) you have assigned to the resource.

Requires permission to access the [ListTagsForResource] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

Returns:



11773
11774
11775
11776
# File 'lib/aws-sdk-iot/client.rb', line 11773

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

#list_targets_for_policy(params = {}) ⇒ Types::ListTargetsForPolicyResponse

List targets for the specified policy.

Requires permission to access the [ListTargetsForPolicy] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_targets_for_policy({
  policy_name: "PolicyName", # required
  marker: "Marker",
  page_size: 1,
})

Response structure


resp.targets #=> Array
resp.targets[0] #=> String
resp.next_marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

  • :marker (String)

    A marker used to get the next set of results.

  • :page_size (Integer)

    The maximum number of results to return at one time.

Returns:



11818
11819
11820
11821
# File 'lib/aws-sdk-iot/client.rb', line 11818

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

#list_targets_for_security_profile(params = {}) ⇒ Types::ListTargetsForSecurityProfileResponse

Lists the targets (thing groups) associated with a given Device Defender security profile.

Requires permission to access the [ListTargetsForSecurityProfile] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_targets_for_security_profile({
  security_profile_name: "SecurityProfileName", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.security_profile_targets #=> Array
resp.security_profile_targets[0].arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The security profile.

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



11865
11866
11867
11868
# File 'lib/aws-sdk-iot/client.rb', line 11865

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

#list_thing_groups(params = {}) ⇒ Types::ListThingGroupsResponse

List the thing groups in your account.

Requires permission to access the [ListThingGroups] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_thing_groups({
  next_token: "NextToken",
  max_results: 1,
  parent_group: "ThingGroupName",
  name_prefix_filter: "ThingGroupName",
  recursive: false,
})

Response structure


resp.thing_groups #=> Array
resp.thing_groups[0].group_name #=> String
resp.thing_groups[0].group_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :parent_group (String)

    A filter that limits the results to those with the specified parent group.

  • :name_prefix_filter (String)

    A filter that limits the results to those with the specified name prefix.

  • :recursive (Boolean)

    If true, return child groups as well.

Returns:



11923
11924
11925
11926
# File 'lib/aws-sdk-iot/client.rb', line 11923

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

#list_thing_groups_for_thing(params = {}) ⇒ Types::ListThingGroupsForThingResponse

List the thing groups to which the specified thing belongs.

Requires permission to access the [ListThingGroupsForThing] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_thing_groups_for_thing({
  thing_name: "ThingName", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.thing_groups #=> Array
resp.thing_groups[0].group_name #=> String
resp.thing_groups[0].group_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The thing name.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



11971
11972
11973
11974
# File 'lib/aws-sdk-iot/client.rb', line 11971

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

#list_thing_principals(params = {}) ⇒ Types::ListThingPrincipalsResponse

Lists the principals associated with the specified thing. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

Requires permission to access the [ListThingPrincipals] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_thing_principals({
  next_token: "NextToken",
  max_results: 1,
  thing_name: "ThingName", # required
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :thing_name (required, String)

    The name of the thing.

Returns:



12020
12021
12022
12023
# File 'lib/aws-sdk-iot/client.rb', line 12020

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

#list_thing_principals_v2(params = {}) ⇒ Types::ListThingPrincipalsV2Response

Lists the principals associated with the specified thing. A principal can be an X.509 certificate or an Amazon Cognito ID.

Requires permission to access the [ListThingPrincipals] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_thing_principals_v2({
  next_token: "NextToken",
  max_results: 1,
  thing_name: "ThingName", # required
  thing_principal_type: "EXCLUSIVE_THING", # accepts EXCLUSIVE_THING, NON_EXCLUSIVE_THING
})

Response structure


resp.thing_principal_objects #=> Array
resp.thing_principal_objects[0].principal #=> String
resp.thing_principal_objects[0].thing_principal_type #=> String, one of "EXCLUSIVE_THING", "NON_EXCLUSIVE_THING"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :thing_name (required, String)

    The name of the thing.

  • :thing_principal_type (String)

    The type of the relation you want to filter in the response. If no value is provided in this field, the response will list all principals, including both the ‘EXCLUSIVE_THING` and `NON_EXCLUSIVE_THING` attachment types.

    • ‘EXCLUSIVE_THING` - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.

    ^ ^

    • ‘NON_EXCLUSIVE_THING` - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.

    ^

Returns:



12088
12089
12090
12091
# File 'lib/aws-sdk-iot/client.rb', line 12088

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

#list_thing_registration_task_reports(params = {}) ⇒ Types::ListThingRegistrationTaskReportsResponse

Information about the thing registration tasks.

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_thing_registration_task_reports({
  task_id: "TaskId", # required
  report_type: "ERRORS", # required, accepts ERRORS, RESULTS
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.resource_links #=> Array
resp.resource_links[0] #=> String
resp.report_type #=> String, one of "ERRORS", "RESULTS"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The id of the task.

  • :report_type (required, String)

    The type of task report.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return per request.

Returns:



12135
12136
12137
12138
# File 'lib/aws-sdk-iot/client.rb', line 12135

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

#list_thing_registration_tasks(params = {}) ⇒ Types::ListThingRegistrationTasksResponse

List bulk thing provisioning tasks.

Requires permission to access the [ListThingRegistrationTasks] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_thing_registration_tasks({
  next_token: "NextToken",
  max_results: 1,
  status: "InProgress", # accepts InProgress, Completed, Failed, Cancelled, Cancelling
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :status (String)

    The status of the bulk thing provisioning task.

Returns:



12183
12184
12185
12186
# File 'lib/aws-sdk-iot/client.rb', line 12183

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

#list_thing_types(params = {}) ⇒ Types::ListThingTypesResponse

Lists the existing thing types.

Requires permission to access the [ListThingTypes] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.thing_types #=> Array
resp.thing_types[0].thing_type_name #=> String
resp.thing_types[0].thing_type_arn #=> String
resp.thing_types[0].thing_type_properties.thing_type_description #=> String
resp.thing_types[0].thing_type_properties.searchable_attributes #=> Array
resp.thing_types[0].thing_type_properties.searchable_attributes[0] #=> String
resp.thing_types[0].thing_type_properties.mqtt5_configuration.propagating_attributes #=> Array
resp.thing_types[0].thing_type_properties.mqtt5_configuration.propagating_attributes[0].user_property_key #=> String
resp.thing_types[0].thing_type_properties.mqtt5_configuration.propagating_attributes[0].thing_attribute #=> String
resp.thing_types[0].thing_type_properties.mqtt5_configuration.propagating_attributes[0].connection_attribute #=> String
resp.thing_types[0]..deprecated #=> Boolean
resp.thing_types[0]..deprecation_date #=> Time
resp.thing_types[0]..creation_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :thing_type_name (String)

    The name of the thing type.

Returns:



12241
12242
12243
12244
# File 'lib/aws-sdk-iot/client.rb', line 12241

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

#list_things(params = {}) ⇒ Types::ListThingsResponse

Lists your things. Use the attributeName and attributeValue parameters to filter your things. For example, calling ‘ListThings` with attributeName=Color and attributeValue=Red retrieves all things in the registry that contain an attribute Color with the value Red. For more information, see [List Things] from the *Amazon Web Services IoT Core Developer Guide*.

Requires permission to access the [ListThings] action.

<note markdown=“1”> You will not be charged for calling this API if an ‘Access denied` error is returned. You will also not be charged if no attributes or pagination token was provided in request and no pagination token and no results were returned.

</note>

[1]: docs.aws.amazon.com/iot/latest/developerguide/thing-registry.html#list-things [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_things({
  next_token: "NextToken",
  max_results: 1,
  attribute_name: "AttributeName",
  attribute_value: "AttributeValue",
  thing_type_name: "ThingTypeName",
  use_prefix_attribute_value: false,
})

Response structure


resp.things #=> Array
resp.things[0].thing_name #=> String
resp.things[0].thing_type_name #=> String
resp.things[0].thing_arn #=> String
resp.things[0].attributes #=> Hash
resp.things[0].attributes["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.things[0].version #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :attribute_name (String)

    The attribute name used to search for things.

  • :attribute_value (String)

    The attribute value used to search for things.

  • :thing_type_name (String)

    The name of the thing type used to search for things.

  • :use_prefix_attribute_value (Boolean)

    When ‘true`, the action returns the thing resources with attribute values that start with the `attributeValue` provided.

    When ‘false`, or not present, the action returns only the thing resources with attribute values that match the entire `attributeValue` provided.

Returns:



12323
12324
12325
12326
# File 'lib/aws-sdk-iot/client.rb', line 12323

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

#list_things_in_billing_group(params = {}) ⇒ Types::ListThingsInBillingGroupResponse

Lists the things you have added to the given billing group.

Requires permission to access the [ListThingsInBillingGroup] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_things_in_billing_group({
  billing_group_name: "BillingGroupName", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name of the billing group.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return per request.

Returns:



12371
12372
12373
12374
# File 'lib/aws-sdk-iot/client.rb', line 12371

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

#list_things_in_thing_group(params = {}) ⇒ Types::ListThingsInThingGroupResponse

Lists the things in the specified group.

Requires permission to access the [ListThingsInThingGroup] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_things_in_thing_group({
  thing_group_name: "ThingGroupName", # required
  recursive: false,
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The thing group name.

  • :recursive (Boolean)

    When true, list things in this thing group and in all child groups as well.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



12423
12424
12425
12426
# File 'lib/aws-sdk-iot/client.rb', line 12423

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

#list_topic_rule_destinations(params = {}) ⇒ Types::ListTopicRuleDestinationsResponse

Lists all the topic rule destinations in your Amazon Web Services account.

Requires permission to access the [ListTopicRuleDestinations] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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

Response structure


resp.destination_summaries #=> Array
resp.destination_summaries[0].arn #=> String
resp.destination_summaries[0].status #=> String, one of "ENABLED", "IN_PROGRESS", "DISABLED", "ERROR", "DELETING"
resp.destination_summaries[0].created_at #=> Time
resp.destination_summaries[0].last_updated_at #=> Time
resp.destination_summaries[0].status_reason #=> String
resp.destination_summaries[0].http_url_summary.confirmation_url #=> String
resp.destination_summaries[0].vpc_destination_summary.subnet_ids #=> Array
resp.destination_summaries[0].vpc_destination_summary.subnet_ids[0] #=> String
resp.destination_summaries[0].vpc_destination_summary.security_groups #=> Array
resp.destination_summaries[0].vpc_destination_summary.security_groups[0] #=> String
resp.destination_summaries[0].vpc_destination_summary.vpc_id #=> String
resp.destination_summaries[0].vpc_destination_summary.role_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return at one time.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

Returns:



12479
12480
12481
12482
# File 'lib/aws-sdk-iot/client.rb', line 12479

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

#list_topic_rules(params = {}) ⇒ Types::ListTopicRulesResponse

Lists the rules for the specific topic.

Requires permission to access the [ListTopicRules] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_topic_rules({
  topic: "Topic",
  max_results: 1,
  next_token: "NextToken",
  rule_disabled: false,
})

Response structure


resp.rules #=> Array
resp.rules[0].rule_arn #=> String
resp.rules[0].rule_name #=> String
resp.rules[0].topic_pattern #=> String
resp.rules[0].created_at #=> Time
resp.rules[0].rule_disabled #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :topic (String)

    The topic.

  • :max_results (Integer)

    The maximum number of results to return.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :rule_disabled (Boolean)

    Specifies whether the rule is disabled.

Returns:



12534
12535
12536
12537
# File 'lib/aws-sdk-iot/client.rb', line 12534

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

#list_v2_logging_levels(params = {}) ⇒ Types::ListV2LoggingLevelsResponse

Lists logging levels.

Requires permission to access the [ListV2LoggingLevels] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_v2_logging_levels({
  target_type: "DEFAULT", # accepts DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP, PRINCIPAL_ID
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.log_target_configurations #=> Array
resp.log_target_configurations[0].log_target.target_type #=> String, one of "DEFAULT", "THING_GROUP", "CLIENT_ID", "SOURCE_IP", "PRINCIPAL_ID"
resp.log_target_configurations[0].log_target.target_name #=> String
resp.log_target_configurations[0].log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :target_type (String)

    The type of resource for which you are configuring logging. Must be ‘THING_Group`.

  • :next_token (String)

    To retrieve the next set of results, the ‘nextToken` value from a previous response; otherwise null to receive the first set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



12584
12585
12586
12587
# File 'lib/aws-sdk-iot/client.rb', line 12584

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

#list_violation_events(params = {}) ⇒ Types::ListViolationEventsResponse

Lists the Device Defender security profile violations discovered during the given time period. You can use filters to limit the results to those alerts issued for a particular security profile, behavior, or thing (device).

Requires permission to access the [ListViolationEvents] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

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_violation_events({
  start_time: Time.now, # required
  end_time: Time.now, # required
  thing_name: "DeviceDefenderThingName",
  security_profile_name: "SecurityProfileName",
  behavior_criteria_type: "STATIC", # accepts STATIC, STATISTICAL, MACHINE_LEARNING
  list_suppressed_alerts: false,
  verification_state: "FALSE_POSITIVE", # accepts FALSE_POSITIVE, BENIGN_POSITIVE, TRUE_POSITIVE, UNKNOWN
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.violation_events #=> Array
resp.violation_events[0].violation_id #=> String
resp.violation_events[0].thing_name #=> String
resp.violation_events[0].security_profile_name #=> String
resp.violation_events[0].behavior.name #=> String
resp.violation_events[0].behavior.metric #=> String
resp.violation_events[0].behavior.metric_dimension.dimension_name #=> String
resp.violation_events[0].behavior.metric_dimension.operator #=> String, one of "IN", "NOT_IN"
resp.violation_events[0].behavior.criteria.comparison_operator #=> String, one of "less-than", "less-than-equals", "greater-than", "greater-than-equals", "in-cidr-set", "not-in-cidr-set", "in-port-set", "not-in-port-set", "in-set", "not-in-set"
resp.violation_events[0].behavior.criteria.value.count #=> Integer
resp.violation_events[0].behavior.criteria.value.cidrs #=> Array
resp.violation_events[0].behavior.criteria.value.cidrs[0] #=> String
resp.violation_events[0].behavior.criteria.value.ports #=> Array
resp.violation_events[0].behavior.criteria.value.ports[0] #=> Integer
resp.violation_events[0].behavior.criteria.value.number #=> Float
resp.violation_events[0].behavior.criteria.value.numbers #=> Array
resp.violation_events[0].behavior.criteria.value.numbers[0] #=> Float
resp.violation_events[0].behavior.criteria.value.strings #=> Array
resp.violation_events[0].behavior.criteria.value.strings[0] #=> String
resp.violation_events[0].behavior.criteria.duration_seconds #=> Integer
resp.violation_events[0].behavior.criteria.consecutive_datapoints_to_alarm #=> Integer
resp.violation_events[0].behavior.criteria.consecutive_datapoints_to_clear #=> Integer
resp.violation_events[0].behavior.criteria.statistical_threshold.statistic #=> String
resp.violation_events[0].behavior.criteria.ml_detection_config.confidence_level #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.violation_events[0].behavior.suppress_alerts #=> Boolean
resp.violation_events[0].behavior.export_metric #=> Boolean
resp.violation_events[0].metric_value.count #=> Integer
resp.violation_events[0].metric_value.cidrs #=> Array
resp.violation_events[0].metric_value.cidrs[0] #=> String
resp.violation_events[0].metric_value.ports #=> Array
resp.violation_events[0].metric_value.ports[0] #=> Integer
resp.violation_events[0].metric_value.number #=> Float
resp.violation_events[0].metric_value.numbers #=> Array
resp.violation_events[0].metric_value.numbers[0] #=> Float
resp.violation_events[0].metric_value.strings #=> Array
resp.violation_events[0].metric_value.strings[0] #=> String
resp.violation_events[0].violation_event_additional_info.confidence_level #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.violation_events[0].violation_event_type #=> String, one of "in-alarm", "alarm-cleared", "alarm-invalidated"
resp.violation_events[0].verification_state #=> String, one of "FALSE_POSITIVE", "BENIGN_POSITIVE", "TRUE_POSITIVE", "UNKNOWN"
resp.violation_events[0].verification_state_description #=> String
resp.violation_events[0].violation_event_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

    The start time for the alerts to be listed.

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

    The end time for the alerts to be listed.

  • :thing_name (String)

    A filter to limit results to those alerts caused by the specified thing.

  • :security_profile_name (String)

    A filter to limit results to those alerts generated by the specified security profile.

  • :behavior_criteria_type (String)

    The criteria for a behavior.

  • :list_suppressed_alerts (Boolean)

    A list of all suppressed alerts.

  • :verification_state (String)

    The verification state of the violation (detect alarm).

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



12697
12698
12699
12700
# File 'lib/aws-sdk-iot/client.rb', line 12697

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

#put_verification_state_on_violation(params = {}) ⇒ Struct

Set a verification state and provide a description of that verification state on a violation (detect alarm).

Examples:

Request syntax with placeholder values


resp = client.put_verification_state_on_violation({
  violation_id: "ViolationId", # required
  verification_state: "FALSE_POSITIVE", # required, accepts FALSE_POSITIVE, BENIGN_POSITIVE, TRUE_POSITIVE, UNKNOWN
  verification_state_description: "VerificationStateDescription",
})

Parameters:

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

    ({})

Options Hash (params):

  • :violation_id (required, String)

    The violation ID.

  • :verification_state (required, String)

    The verification state of the violation.

  • :verification_state_description (String)

    The description of the verification state of the violation (detect alarm).

Returns:

  • (Struct)

    Returns an empty response.



12727
12728
12729
12730
# File 'lib/aws-sdk-iot/client.rb', line 12727

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

#register_ca_certificate(params = {}) ⇒ Types::RegisterCACertificateResponse

Registers a CA certificate with Amazon Web Services IoT Core. There is no limit to the number of CA certificates you can register in your Amazon Web Services account. You can register up to 10 CA certificates with the same ‘CA subject field` per Amazon Web Services account.

Requires permission to access the [RegisterCACertificate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.register_ca_certificate({
  ca_certificate: "CertificatePem", # required
  verification_certificate: "CertificatePem",
  set_as_active: false,
  allow_auto_registration: false,
  registration_config: {
    template_body: "TemplateBody",
    role_arn: "RoleArn",
    template_name: "TemplateName",
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  certificate_mode: "DEFAULT", # accepts DEFAULT, SNI_ONLY
})

Response structure


resp.certificate_arn #=> String
resp.certificate_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :ca_certificate (required, String)

    The CA certificate.

  • :verification_certificate (String)

    The private key verification certificate. If ‘certificateMode` is `SNI_ONLY`, the `verificationCertificate` field must be empty. If `certificateMode` is `DEFAULT` or not provided, the `verificationCertificate` field must not be empty.

  • :set_as_active (Boolean)

    A boolean value that specifies if the CA certificate is set to active.

    Valid values: ‘ACTIVE | INACTIVE`

  • :allow_auto_registration (Boolean)

    Allows this CA certificate to be used for auto registration of device certificates.

  • :registration_config (Types::RegistrationConfig)

    Information about the registration configuration.

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

    Metadata which can be used to manage the CA certificate.

    <note markdown=“1”> For URI Request parameters use format: …key1=value1&amp;key2=value2…

    For the CLI command-line parameter use format: &amp;&amp;tags
    

    “key1=value1&amp;key2=value2…”

    For the cli-input-json file use format: "tags":
    

    “key1=value1&amp;key2=value2…”

    </note>
    
  • :certificate_mode (String)

    Describes the certificate mode in which the Certificate Authority (CA) will be registered. If the ‘verificationCertificate` field is not provided, set `certificateMode` to be `SNI_ONLY`. If the `verificationCertificate` field is provided, set `certificateMode` to be `DEFAULT`. When `certificateMode` is not provided, it defaults to `DEFAULT`. All the device certificates that are registered using this CA will be registered in the same certificate mode as the CA. For more information about certificate mode for device certificates, see [ certificate mode].

    [1]: docs.aws.amazon.com/iot/latest/apireference/API_CertificateDescription.html#iot-Type-CertificateDescription-certificateMode

Returns:



12826
12827
12828
12829
# File 'lib/aws-sdk-iot/client.rb', line 12826

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

#register_certificate(params = {}) ⇒ Types::RegisterCertificateResponse

Registers a device certificate with IoT in the same [certificate mode] as the signing CA. If you have more than one CA certificate that has the same subject field, you must specify the CA certificate that was used to sign the device certificate being registered.

Requires permission to access the [RegisterCertificate] action.

[1]: docs.aws.amazon.com/iot/latest/apireference/API_CertificateDescription.html#iot-Type-CertificateDescription-certificateMode [2]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.register_certificate({
  certificate_pem: "CertificatePem", # required
  ca_certificate_pem: "CertificatePem",
  set_as_active: false,
  status: "ACTIVE", # accepts ACTIVE, INACTIVE, REVOKED, PENDING_TRANSFER, REGISTER_INACTIVE, PENDING_ACTIVATION
})

Response structure


resp.certificate_arn #=> String
resp.certificate_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_pem (required, String)

    The certificate data, in PEM format.

  • :ca_certificate_pem (String)

    The CA certificate used to sign the device certificate being registered.

  • :set_as_active (Boolean)

    A boolean value that specifies if the certificate is set to active.

    Valid values: ‘ACTIVE | INACTIVE`

  • :status (String)

    The status of the register certificate request. Valid values that you can use include ‘ACTIVE`, `INACTIVE`, and `REVOKED`.

Returns:



12880
12881
12882
12883
# File 'lib/aws-sdk-iot/client.rb', line 12880

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

#register_certificate_without_ca(params = {}) ⇒ Types::RegisterCertificateWithoutCAResponse

Register a certificate that does not have a certificate authority (CA). For supported certificates, consult [ Certificate signing algorithms supported by IoT].

[1]: docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-cert-algorithms

Examples:

Request syntax with placeholder values


resp = client.register_certificate_without_ca({
  certificate_pem: "CertificatePem", # required
  status: "ACTIVE", # accepts ACTIVE, INACTIVE, REVOKED, PENDING_TRANSFER, REGISTER_INACTIVE, PENDING_ACTIVATION
})

Response structure


resp.certificate_arn #=> String
resp.certificate_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_pem (required, String)

    The certificate data, in PEM format.

  • :status (String)

    The status of the register certificate request.

Returns:



12918
12919
12920
12921
# File 'lib/aws-sdk-iot/client.rb', line 12918

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

#register_thing(params = {}) ⇒ Types::RegisterThingResponse

Provisions a thing in the device registry. RegisterThing calls other IoT control plane APIs. These calls might exceed your account level [ IoT Throttling Limits] and cause throttle errors. Please contact

Amazon Web Services Customer Support][2

to raise your throttling

limits if necessary.

Requires permission to access the [RegisterThing] action.

[1]: docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_iot [2]: console.aws.amazon.com/support/home [3]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.register_thing({
  template_body: "TemplateBody", # required
  parameters: {
    "Parameter" => "Value",
  },
})

Response structure


resp.certificate_pem #=> String
resp.resource_arns #=> Hash
resp.resource_arns["ResourceLogicalId"] #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:



12975
12976
12977
12978
# File 'lib/aws-sdk-iot/client.rb', line 12975

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

#reject_certificate_transfer(params = {}) ⇒ Struct

Rejects a pending certificate transfer. After IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANSFER to INACTIVE.

To check for pending certificate transfers, call ListCertificates to enumerate your certificates.

This operation can only be called by the transfer destination. After it is called, the certificate will be returned to the source’s account in the INACTIVE state.

Requires permission to access the [RejectCertificateTransfer] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.reject_certificate_transfer({
  certificate_id: "CertificateId", # required
  reject_reason: "Message",
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

  • :reject_reason (String)

    The reason the certificate transfer was rejected.

Returns:

  • (Struct)

    Returns an empty response.



13016
13017
13018
13019
# File 'lib/aws-sdk-iot/client.rb', line 13016

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

#remove_thing_from_billing_group(params = {}) ⇒ Struct

Removes the given thing from the billing group.

Requires permission to access the [RemoveThingFromBillingGroup] action.

<note markdown=“1”> This call is asynchronous. It might take several seconds for the detachment to propagate.

</note>

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.remove_thing_from_billing_group({
  billing_group_name: "BillingGroupName",
  billing_group_arn: "BillingGroupArn",
  thing_name: "ThingName",
  thing_arn: "ThingArn",
})

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (String)

    The name of the billing group.

  • :billing_group_arn (String)

    The ARN of the billing group.

  • :thing_name (String)

    The name of the thing to be removed from the billing group.

  • :thing_arn (String)

    The ARN of the thing to be removed from the billing group.

Returns:

  • (Struct)

    Returns an empty response.



13060
13061
13062
13063
# File 'lib/aws-sdk-iot/client.rb', line 13060

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

#remove_thing_from_thing_group(params = {}) ⇒ Struct

Remove the specified thing from the specified group.

You must specify either a ‘thingGroupArn` or a `thingGroupName` to identify the thing group and either a `thingArn` or a `thingName` to identify the thing to remove from the thing group.

Requires permission to access the [RemoveThingFromThingGroup] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.remove_thing_from_thing_group({
  thing_group_name: "ThingGroupName",
  thing_group_arn: "ThingGroupArn",
  thing_name: "ThingName",
  thing_arn: "ThingArn",
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (String)

    The group name.

  • :thing_group_arn (String)

    The group ARN.

  • :thing_name (String)

    The name of the thing to remove from the group.

  • :thing_arn (String)

    The ARN of the thing to remove from the group.

Returns:

  • (Struct)

    Returns an empty response.



13103
13104
13105
13106
# File 'lib/aws-sdk-iot/client.rb', line 13103

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

#replace_topic_rule(params = {}) ⇒ Struct

Replaces the rule. You must specify all parameters for the new rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.

Requires permission to access the [ReplaceTopicRule] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.replace_topic_rule({
  rule_name: "RuleName", # required
  topic_rule_payload: { # required
    sql: "SQL", # required
    description: "Description",
    actions: [ # required
      {
        dynamo_db: {
          table_name: "TableName", # required
          role_arn: "AwsArn", # required
          operation: "DynamoOperation",
          hash_key_field: "HashKeyField", # required
          hash_key_value: "HashKeyValue", # required
          hash_key_type: "STRING", # accepts STRING, NUMBER
          range_key_field: "RangeKeyField",
          range_key_value: "RangeKeyValue",
          range_key_type: "STRING", # accepts STRING, NUMBER
          payload_field: "PayloadField",
        },
        dynamo_d_bv_2: {
          role_arn: "AwsArn", # required
          put_item: { # required
            table_name: "TableName", # required
          },
        },
        lambda: {
          function_arn: "FunctionArn", # required
        },
        sns: {
          target_arn: "AwsArn", # required
          role_arn: "AwsArn", # required
          message_format: "RAW", # accepts RAW, JSON
        },
        sqs: {
          role_arn: "AwsArn", # required
          queue_url: "QueueUrl", # required
          use_base_64: false,
        },
        kinesis: {
          role_arn: "AwsArn", # required
          stream_name: "StreamName", # required
          partition_key: "PartitionKey",
        },
        republish: {
          role_arn: "AwsArn", # required
          topic: "TopicPattern", # required
          qos: 1,
          headers: {
            payload_format_indicator: "PayloadFormatIndicator",
            content_type: "ContentType",
            response_topic: "ResponseTopic",
            correlation_data: "CorrelationData",
            message_expiry: "MessageExpiry",
            user_properties: [
              {
                key: "UserPropertyKey", # required
                value: "UserPropertyValue", # required
              },
            ],
          },
        },
        s3: {
          role_arn: "AwsArn", # required
          bucket_name: "BucketName", # required
          key: "Key", # required
          canned_acl: "private", # accepts private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write
        },
        firehose: {
          role_arn: "AwsArn", # required
          delivery_stream_name: "DeliveryStreamName", # required
          separator: "FirehoseSeparator",
          batch_mode: false,
        },
        cloudwatch_metric: {
          role_arn: "AwsArn", # required
          metric_namespace: "String", # required
          metric_name: "String", # required
          metric_value: "String", # required
          metric_unit: "String", # required
          metric_timestamp: "String",
        },
        cloudwatch_alarm: {
          role_arn: "AwsArn", # required
          alarm_name: "AlarmName", # required
          state_reason: "StateReason", # required
          state_value: "StateValue", # required
        },
        cloudwatch_logs: {
          role_arn: "AwsArn", # required
          log_group_name: "LogGroupName", # required
          batch_mode: false,
        },
        elasticsearch: {
          role_arn: "AwsArn", # required
          endpoint: "ElasticsearchEndpoint", # required
          index: "ElasticsearchIndex", # required
          type: "ElasticsearchType", # required
          id: "ElasticsearchId", # required
        },
        salesforce: {
          token: "SalesforceToken", # required
          url: "SalesforceEndpoint", # required
        },
        iot_analytics: {
          channel_arn: "AwsArn",
          channel_name: "ChannelName",
          batch_mode: false,
          role_arn: "AwsArn",
        },
        iot_events: {
          input_name: "InputName", # required
          message_id: "MessageId",
          batch_mode: false,
          role_arn: "AwsArn", # required
        },
        iot_site_wise: {
          put_asset_property_value_entries: [ # required
            {
              entry_id: "AssetPropertyEntryId",
              asset_id: "AssetId",
              property_id: "AssetPropertyId",
              property_alias: "AssetPropertyAlias",
              property_values: [ # required
                {
                  value: { # required
                    string_value: "AssetPropertyStringValue",
                    integer_value: "AssetPropertyIntegerValue",
                    double_value: "AssetPropertyDoubleValue",
                    boolean_value: "AssetPropertyBooleanValue",
                  },
                  timestamp: { # required
                    time_in_seconds: "AssetPropertyTimeInSeconds", # required
                    offset_in_nanos: "AssetPropertyOffsetInNanos",
                  },
                  quality: "AssetPropertyQuality",
                },
              ],
            },
          ],
          role_arn: "AwsArn", # required
        },
        step_functions: {
          execution_name_prefix: "ExecutionNamePrefix",
          state_machine_name: "StateMachineName", # required
          role_arn: "AwsArn", # required
        },
        timestream: {
          role_arn: "AwsArn", # required
          database_name: "TimestreamDatabaseName", # required
          table_name: "TimestreamTableName", # required
          dimensions: [ # required
            {
              name: "TimestreamDimensionName", # required
              value: "TimestreamDimensionValue", # required
            },
          ],
          timestamp: {
            value: "TimestreamTimestampValue", # required
            unit: "TimestreamTimestampUnit", # required
          },
        },
        http: {
          url: "Url", # required
          confirmation_url: "Url",
          headers: [
            {
              key: "HeaderKey", # required
              value: "HeaderValue", # required
            },
          ],
          auth: {
            sigv4: {
              signing_region: "SigningRegion", # required
              service_name: "ServiceName", # required
              role_arn: "AwsArn", # required
            },
          },
        },
        kafka: {
          destination_arn: "AwsArn", # required
          topic: "String", # required
          key: "String",
          partition: "String",
          client_properties: { # required
            "String" => "String",
          },
          headers: [
            {
              key: "KafkaHeaderKey", # required
              value: "KafkaHeaderValue", # required
            },
          ],
        },
        open_search: {
          role_arn: "AwsArn", # required
          endpoint: "ElasticsearchEndpoint", # required
          index: "ElasticsearchIndex", # required
          type: "ElasticsearchType", # required
          id: "ElasticsearchId", # required
        },
        location: {
          role_arn: "AwsArn", # required
          tracker_name: "String", # required
          device_id: "String", # required
          timestamp: {
            value: "String", # required
            unit: "String",
          },
          latitude: "String", # required
          longitude: "String", # required
        },
      },
    ],
    rule_disabled: false,
    aws_iot_sql_version: "AwsIotSqlVersion",
    error_action: {
      dynamo_db: {
        table_name: "TableName", # required
        role_arn: "AwsArn", # required
        operation: "DynamoOperation",
        hash_key_field: "HashKeyField", # required
        hash_key_value: "HashKeyValue", # required
        hash_key_type: "STRING", # accepts STRING, NUMBER
        range_key_field: "RangeKeyField",
        range_key_value: "RangeKeyValue",
        range_key_type: "STRING", # accepts STRING, NUMBER
        payload_field: "PayloadField",
      },
      dynamo_d_bv_2: {
        role_arn: "AwsArn", # required
        put_item: { # required
          table_name: "TableName", # required
        },
      },
      lambda: {
        function_arn: "FunctionArn", # required
      },
      sns: {
        target_arn: "AwsArn", # required
        role_arn: "AwsArn", # required
        message_format: "RAW", # accepts RAW, JSON
      },
      sqs: {
        role_arn: "AwsArn", # required
        queue_url: "QueueUrl", # required
        use_base_64: false,
      },
      kinesis: {
        role_arn: "AwsArn", # required
        stream_name: "StreamName", # required
        partition_key: "PartitionKey",
      },
      republish: {
        role_arn: "AwsArn", # required
        topic: "TopicPattern", # required
        qos: 1,
        headers: {
          payload_format_indicator: "PayloadFormatIndicator",
          content_type: "ContentType",
          response_topic: "ResponseTopic",
          correlation_data: "CorrelationData",
          message_expiry: "MessageExpiry",
          user_properties: [
            {
              key: "UserPropertyKey", # required
              value: "UserPropertyValue", # required
            },
          ],
        },
      },
      s3: {
        role_arn: "AwsArn", # required
        bucket_name: "BucketName", # required
        key: "Key", # required
        canned_acl: "private", # accepts private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write
      },
      firehose: {
        role_arn: "AwsArn", # required
        delivery_stream_name: "DeliveryStreamName", # required
        separator: "FirehoseSeparator",
        batch_mode: false,
      },
      cloudwatch_metric: {
        role_arn: "AwsArn", # required
        metric_namespace: "String", # required
        metric_name: "String", # required
        metric_value: "String", # required
        metric_unit: "String", # required
        metric_timestamp: "String",
      },
      cloudwatch_alarm: {
        role_arn: "AwsArn", # required
        alarm_name: "AlarmName", # required
        state_reason: "StateReason", # required
        state_value: "StateValue", # required
      },
      cloudwatch_logs: {
        role_arn: "AwsArn", # required
        log_group_name: "LogGroupName", # required
        batch_mode: false,
      },
      elasticsearch: {
        role_arn: "AwsArn", # required
        endpoint: "ElasticsearchEndpoint", # required
        index: "ElasticsearchIndex", # required
        type: "ElasticsearchType", # required
        id: "ElasticsearchId", # required
      },
      salesforce: {
        token: "SalesforceToken", # required
        url: "SalesforceEndpoint", # required
      },
      iot_analytics: {
        channel_arn: "AwsArn",
        channel_name: "ChannelName",
        batch_mode: false,
        role_arn: "AwsArn",
      },
      iot_events: {
        input_name: "InputName", # required
        message_id: "MessageId",
        batch_mode: false,
        role_arn: "AwsArn", # required
      },
      iot_site_wise: {
        put_asset_property_value_entries: [ # required
          {
            entry_id: "AssetPropertyEntryId",
            asset_id: "AssetId",
            property_id: "AssetPropertyId",
            property_alias: "AssetPropertyAlias",
            property_values: [ # required
              {
                value: { # required
                  string_value: "AssetPropertyStringValue",
                  integer_value: "AssetPropertyIntegerValue",
                  double_value: "AssetPropertyDoubleValue",
                  boolean_value: "AssetPropertyBooleanValue",
                },
                timestamp: { # required
                  time_in_seconds: "AssetPropertyTimeInSeconds", # required
                  offset_in_nanos: "AssetPropertyOffsetInNanos",
                },
                quality: "AssetPropertyQuality",
              },
            ],
          },
        ],
        role_arn: "AwsArn", # required
      },
      step_functions: {
        execution_name_prefix: "ExecutionNamePrefix",
        state_machine_name: "StateMachineName", # required
        role_arn: "AwsArn", # required
      },
      timestream: {
        role_arn: "AwsArn", # required
        database_name: "TimestreamDatabaseName", # required
        table_name: "TimestreamTableName", # required
        dimensions: [ # required
          {
            name: "TimestreamDimensionName", # required
            value: "TimestreamDimensionValue", # required
          },
        ],
        timestamp: {
          value: "TimestreamTimestampValue", # required
          unit: "TimestreamTimestampUnit", # required
        },
      },
      http: {
        url: "Url", # required
        confirmation_url: "Url",
        headers: [
          {
            key: "HeaderKey", # required
            value: "HeaderValue", # required
          },
        ],
        auth: {
          sigv4: {
            signing_region: "SigningRegion", # required
            service_name: "ServiceName", # required
            role_arn: "AwsArn", # required
          },
        },
      },
      kafka: {
        destination_arn: "AwsArn", # required
        topic: "String", # required
        key: "String",
        partition: "String",
        client_properties: { # required
          "String" => "String",
        },
        headers: [
          {
            key: "KafkaHeaderKey", # required
            value: "KafkaHeaderValue", # required
          },
        ],
      },
      open_search: {
        role_arn: "AwsArn", # required
        endpoint: "ElasticsearchEndpoint", # required
        index: "ElasticsearchIndex", # required
        type: "ElasticsearchType", # required
        id: "ElasticsearchId", # required
      },
      location: {
        role_arn: "AwsArn", # required
        tracker_name: "String", # required
        device_id: "String", # required
        timestamp: {
          value: "String", # required
          unit: "String",
        },
        latitude: "String", # required
        longitude: "String", # required
      },
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the rule.

  • :topic_rule_payload (required, Types::TopicRulePayload)

    The rule payload.

Returns:

  • (Struct)

    Returns an empty response.



13555
13556
13557
13558
# File 'lib/aws-sdk-iot/client.rb', line 13555

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

#search_index(params = {}) ⇒ Types::SearchIndexResponse

Examples:

Request syntax with placeholder values


resp = client.search_index({
  index_name: "IndexName",
  query_string: "QueryString", # required
  next_token: "NextToken",
  max_results: 1,
  query_version: "QueryVersion",
})

Response structure


resp.next_token #=> String
resp.things #=> Array
resp.things[0].thing_name #=> String
resp.things[0].thing_id #=> String
resp.things[0].thing_type_name #=> String
resp.things[0].thing_group_names #=> Array
resp.things[0].thing_group_names[0] #=> String
resp.things[0].attributes #=> Hash
resp.things[0].attributes["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.things[0].shadow #=> String
resp.things[0].device_defender #=> String
resp.things[0].connectivity.connected #=> Boolean
resp.things[0].connectivity.timestamp #=> Integer
resp.things[0].connectivity.disconnect_reason #=> String
resp.thing_groups #=> Array
resp.thing_groups[0].thing_group_name #=> String
resp.thing_groups[0].thing_group_id #=> String
resp.thing_groups[0].thing_group_description #=> String
resp.thing_groups[0].attributes #=> Hash
resp.thing_groups[0].attributes["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.thing_groups[0].parent_group_names #=> Array
resp.thing_groups[0].parent_group_names[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:



13639
13640
13641
13642
# File 'lib/aws-sdk-iot/client.rb', line 13639

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

#set_default_authorizer(params = {}) ⇒ Types::SetDefaultAuthorizerResponse

Sets the default authorizer. This will be used if a websocket connection is made without specifying an authorizer.

Requires permission to access the [SetDefaultAuthorizer] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.set_default_authorizer({
  authorizer_name: "AuthorizerName", # required
})

Response structure


resp.authorizer_name #=> String
resp.authorizer_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The authorizer name.

Returns:



13674
13675
13676
13677
# File 'lib/aws-sdk-iot/client.rb', line 13674

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

#set_default_policy_version(params = {}) ⇒ Struct

Sets the specified version of the specified policy as the policy’s default (operative) version. This action affects all certificates to which the policy is attached. To list the principals the policy is attached to, use the ListPrincipalPolicies action.

Requires permission to access the [SetDefaultPolicyVersion] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.set_default_policy_version({
  policy_name: "PolicyName", # required
  policy_version_id: "PolicyVersionId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

  • :policy_version_id (required, String)

    The policy version ID.

Returns:

  • (Struct)

    Returns an empty response.



13707
13708
13709
13710
# File 'lib/aws-sdk-iot/client.rb', line 13707

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

#set_logging_options(params = {}) ⇒ Struct

Sets the logging options.

NOTE: use of this command is not recommended. Use ‘SetV2LoggingOptions` instead.

Requires permission to access the [SetLoggingOptions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.set_logging_options({
  logging_options_payload: { # required
    role_arn: "AwsArn", # required
    log_level: "DEBUG", # accepts DEBUG, INFO, ERROR, WARN, DISABLED
  },
})

Parameters:

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

    ({})

Options Hash (params):

Returns:

  • (Struct)

    Returns an empty response.



13739
13740
13741
13742
# File 'lib/aws-sdk-iot/client.rb', line 13739

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

#set_v2_logging_level(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.set_v2_logging_level({
  log_target: { # required
    target_type: "DEFAULT", # required, accepts DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP, PRINCIPAL_ID
    target_name: "LogTargetName",
  },
  log_level: "DEBUG", # required, accepts DEBUG, INFO, ERROR, WARN, DISABLED
})

Parameters:

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

    ({})

Options Hash (params):

  • :log_target (required, Types::LogTarget)

    The log target.

  • :log_level (required, String)

    The log level.

Returns:

  • (Struct)

    Returns an empty response.



13772
13773
13774
13775
# File 'lib/aws-sdk-iot/client.rb', line 13772

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

#set_v2_logging_options(params = {}) ⇒ Struct

Sets the logging options for the V2 logging service.

Requires permission to access the [SetV2LoggingOptions] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.set_v2_logging_options({
  role_arn: "AwsArn",
  default_log_level: "DEBUG", # accepts DEBUG, INFO, ERROR, WARN, DISABLED
  disable_all_logs: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :role_arn (String)

    The ARN of the role that allows IoT to write to Cloudwatch logs.

  • :default_log_level (String)

    The default logging level.

  • :disable_all_logs (Boolean)

    If true all logs are disabled. The default is false.

Returns:

  • (Struct)

    Returns an empty response.



13806
13807
13808
13809
# File 'lib/aws-sdk-iot/client.rb', line 13806

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

#start_audit_mitigation_actions_task(params = {}) ⇒ Types::StartAuditMitigationActionsTaskResponse

Starts a task that applies a set of mitigation actions to the specified target.

Requires permission to access the [StartAuditMitigationActionsTask] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.start_audit_mitigation_actions_task({
  task_id: "MitigationActionsTaskId", # required
  target: { # required
    audit_task_id: "AuditTaskId",
    finding_ids: ["FindingId"],
    audit_check_to_reason_code_filter: {
      "AuditCheckName" => ["ReasonForNonComplianceCode"],
    },
  },
  audit_check_to_actions_mapping: { # required
    "AuditCheckName" => ["MitigationActionName"],
  },
  client_request_token: "ClientRequestToken", # required
})

Response structure


resp.task_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    A unique identifier for the task. You can use this identifier to check the status of the task or to cancel it.

  • :target (required, Types::AuditMitigationActionsTaskTarget)

    Specifies the audit findings to which the mitigation actions are applied. You can apply them to a type of audit check, to all findings from an audit, or to a specific set of findings.

  • :audit_check_to_actions_mapping (required, Hash<String,Array>)

    For an audit check, specifies which mitigation actions to apply. Those actions must be defined in your Amazon Web Services accounts.

  • :client_request_token (required, String)

    Each audit mitigation task must have a unique client request token. If you try to start a new task with the same token as a task that already exists, an exception occurs. If you omit this value, a unique client request token is generated automatically.

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

Returns:



13870
13871
13872
13873
# File 'lib/aws-sdk-iot/client.rb', line 13870

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

#start_detect_mitigation_actions_task(params = {}) ⇒ Types::StartDetectMitigationActionsTaskResponse

Starts a Device Defender ML Detect mitigation actions task.

Requires permission to access the

StartDetectMitigationActionsTask][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.start_detect_mitigation_actions_task({
  task_id: "MitigationActionsTaskId", # required
  target: { # required
    violation_ids: ["ViolationId"],
    security_profile_name: "SecurityProfileName",
    behavior_name: "BehaviorName",
  },
  actions: ["MitigationActionName"], # required
  violation_event_occurrence_range: {
    start_time: Time.now, # required
    end_time: Time.now, # required
  },
  include_only_active_violations: false,
  include_suppressed_alerts: false,
  client_request_token: "ClientRequestToken", # required
})

Response structure


resp.task_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier of the task.

  • :target (required, Types::DetectMitigationActionsTaskTarget)

    Specifies the ML Detect findings to which the mitigation actions are applied.

  • :actions (required, Array<String>)

    The actions to be performed when a device has unexpected behavior.

  • :violation_event_occurrence_range (Types::ViolationEventOccurrenceRange)

    Specifies the time period of which violation events occurred between.

  • :include_only_active_violations (Boolean)

    Specifies to list only active violations.

  • :include_suppressed_alerts (Boolean)

    Specifies to include suppressed alerts.

  • :client_request_token (required, String)

    Each mitigation action task must have a unique client request token. If you try to create a new task with the same token as a task that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

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

Returns:



13941
13942
13943
13944
# File 'lib/aws-sdk-iot/client.rb', line 13941

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

#start_on_demand_audit_task(params = {}) ⇒ Types::StartOnDemandAuditTaskResponse

Starts an on-demand Device Defender audit.

Requires permission to access the [StartOnDemandAuditTask] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.start_on_demand_audit_task({
  target_check_names: ["AuditCheckName"], # required
})

Response structure


resp.task_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :target_check_names (required, Array<String>)

    Which checks are performed during the audit. The checks you specify must be enabled for your account or an exception occurs. Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or `UpdateAccountAuditConfiguration` to select which checks are enabled.

Returns:



13977
13978
13979
13980
# File 'lib/aws-sdk-iot/client.rb', line 13977

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

#start_thing_registration_task(params = {}) ⇒ Types::StartThingRegistrationTaskResponse

Creates a bulk thing provisioning task.

Requires permission to access the [StartThingRegistrationTask] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.start_thing_registration_task({
  template_body: "TemplateBody", # required
  input_file_bucket: "RegistryS3BucketName", # required
  input_file_key: "RegistryS3KeyName", # required
  role_arn: "RoleArn", # required
})

Response structure


resp.task_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :template_body (required, String)

    The provisioning template.

  • :input_file_bucket (required, String)

    The S3 bucket that contains the input file.

  • :input_file_key (required, String)

    The name of input file within the S3 bucket. This file contains a newline delimited JSON file. Each line contains the parameter values to provision one device (thing).

  • :role_arn (required, String)

    The IAM role ARN that grants permission the input file.

Returns:



14024
14025
14026
14027
# File 'lib/aws-sdk-iot/client.rb', line 14024

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

#stop_thing_registration_task(params = {}) ⇒ Struct

Cancels a bulk thing provisioning task.

Requires permission to access the [StopThingRegistrationTask] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.stop_thing_registration_task({
  task_id: "TaskId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The bulk thing provisioning task ID.

Returns:

  • (Struct)

    Returns an empty response.



14051
14052
14053
14054
# File 'lib/aws-sdk-iot/client.rb', line 14051

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

#tag_resource(params = {}) ⇒ Struct

Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.

Requires permission to access the [TagResource] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource.

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

    The new or modified tags for the resource.

Returns:

  • (Struct)

    Returns an empty response.



14087
14088
14089
14090
# File 'lib/aws-sdk-iot/client.rb', line 14087

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

#test_authorization(params = {}) ⇒ Types::TestAuthorizationResponse

Tests if a specified principal is authorized to perform an IoT action on a specified resource. Use this to test and debug the authorization behavior of devices that connect to the IoT device gateway.

Requires permission to access the [TestAuthorization] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.test_authorization({
  principal: "Principal",
  cognito_identity_pool_id: "CognitoIdentityPoolId",
  auth_infos: [ # required
    {
      action_type: "PUBLISH", # accepts PUBLISH, SUBSCRIBE, RECEIVE, CONNECT
      resources: ["Resource"], # required
    },
  ],
  client_id: "ClientId",
  policy_names_to_add: ["PolicyName"],
  policy_names_to_skip: ["PolicyName"],
})

Response structure


resp.auth_results #=> Array
resp.auth_results[0].auth_info.action_type #=> String, one of "PUBLISH", "SUBSCRIBE", "RECEIVE", "CONNECT"
resp.auth_results[0].auth_info.resources #=> Array
resp.auth_results[0].auth_info.resources[0] #=> String
resp.auth_results[0].allowed.policies #=> Array
resp.auth_results[0].allowed.policies[0].policy_name #=> String
resp.auth_results[0].allowed.policies[0].policy_arn #=> String
resp.auth_results[0].denied.implicit_deny.policies #=> Array
resp.auth_results[0].denied.implicit_deny.policies[0].policy_name #=> String
resp.auth_results[0].denied.implicit_deny.policies[0].policy_arn #=> String
resp.auth_results[0].denied.explicit_deny.policies #=> Array
resp.auth_results[0].denied.explicit_deny.policies[0].policy_name #=> String
resp.auth_results[0].denied.explicit_deny.policies[0].policy_arn #=> String
resp.auth_results[0].auth_decision #=> String, one of "ALLOWED", "EXPLICIT_DENY", "IMPLICIT_DENY"
resp.auth_results[0].missing_context_values #=> Array
resp.auth_results[0].missing_context_values[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :principal (String)

    The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).

  • :cognito_identity_pool_id (String)

    The Cognito identity pool ID.

  • :auth_infos (required, Array<Types::AuthInfo>)

    A list of authorization info objects. Simulating authorization will create a response for each ‘authInfo` object in the list.

  • :client_id (String)

    The MQTT client ID.

  • :policy_names_to_add (Array<String>)

    When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.

  • :policy_names_to_skip (Array<String>)

    When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.

Returns:



14167
14168
14169
14170
# File 'lib/aws-sdk-iot/client.rb', line 14167

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

#test_invoke_authorizer(params = {}) ⇒ Types::TestInvokeAuthorizerResponse

Tests a custom authorization behavior by invoking a specified custom authorizer. Use this to test and debug the custom authorization behavior of devices that connect to the IoT device gateway.

Requires permission to access the [TestInvokeAuthorizer] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.test_invoke_authorizer({
  authorizer_name: "AuthorizerName", # required
  token: "Token",
  token_signature: "TokenSignature",
  http_context: {
    headers: {
      "HttpHeaderName" => "HttpHeaderValue",
    },
    query_string: "HttpQueryString",
  },
  mqtt_context: {
    username: "MqttUsername",
    password: "data",
    client_id: "MqttClientId",
  },
  tls_context: {
    server_name: "ServerName",
  },
})

Response structure


resp.is_authenticated #=> Boolean
resp.principal_id #=> String
resp.policy_documents #=> Array
resp.policy_documents[0] #=> String
resp.refresh_after_in_seconds #=> Integer
resp.disconnect_after_in_seconds #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The custom authorizer name.

  • :token (String)

    The token returned by your custom authentication service.

  • :token_signature (String)

    The signature made with the token and your custom authentication service’s private key. This value must be Base-64-encoded.

  • :http_context (Types::HttpContext)

    Specifies a test HTTP authorization request.

  • :mqtt_context (Types::MqttContext)

    Specifies a test MQTT authorization request.

  • :tls_context (Types::TlsContext)

    Specifies a test TLS authorization request.

Returns:



14242
14243
14244
14245
# File 'lib/aws-sdk-iot/client.rb', line 14242

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

#transfer_certificate(params = {}) ⇒ Types::TransferCertificateResponse

Transfers the specified certificate to the specified Amazon Web Services account.

Requires permission to access the [TransferCertificate] action.

You can cancel the transfer until it is acknowledged by the recipient.

No notification is sent to the transfer destination’s account. It is up to the caller to notify the transfer target.

The certificate being transferred must not be in the ACTIVE state. You can use the UpdateCertificate action to deactivate it.

The certificate must not have any policies attached to it. You can use the DetachPolicy action to detach them.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.transfer_certificate({
  certificate_id: "CertificateId", # required
  target_aws_account: "AwsAccountId", # required
  transfer_message: "Message",
})

Response structure


resp.transferred_certificate_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

  • :target_aws_account (required, String)

    The Amazon Web Services account.

  • :transfer_message (String)

    The transfer message.

Returns:



14295
14296
14297
14298
# File 'lib/aws-sdk-iot/client.rb', line 14295

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

#untag_resource(params = {}) ⇒ Struct

Removes the given tags (metadata) from the resource.

Requires permission to access the [UntagResource] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource.

  • :tag_keys (required, Array<String>)

    A list of the keys of the tags to be removed from the resource.

Returns:

  • (Struct)

    Returns an empty response.



14325
14326
14327
14328
# File 'lib/aws-sdk-iot/client.rb', line 14325

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

#update_account_audit_configuration(params = {}) ⇒ Struct

Configures or reconfigures the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.

Requires permission to access the [UpdateAccountAuditConfiguration] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.({
  role_arn: "RoleArn",
  audit_notification_target_configurations: {
    "SNS" => {
      target_arn: "TargetArn",
      role_arn: "RoleArn",
      enabled: false,
    },
  },
  audit_check_configurations: {
    "AuditCheckName" => {
      enabled: false,
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :role_arn (String)

    The Amazon Resource Name (ARN) of the role that grants permission to IoT to access information about your devices, policies, certificates, and other items as required when performing an audit.

  • :audit_notification_target_configurations (Hash<String,Types::AuditNotificationTarget>)

    Information about the targets to which audit notifications are sent.

  • :audit_check_configurations (Hash<String,Types::AuditCheckConfiguration>)

    Specifies which audit checks are enabled and disabled for this account. Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are currently enabled.

    Some data collection might start immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted.

    You cannot disable a check if it’s used by any scheduled audit. You must first delete the check from the scheduled audit or delete the scheduled audit itself.

    On the first call to ‘UpdateAccountAuditConfiguration`, this parameter is required and must specify at least one enabled check.

Returns:

  • (Struct)

    Returns an empty response.



14387
14388
14389
14390
# File 'lib/aws-sdk-iot/client.rb', line 14387

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

#update_audit_suppression(params = {}) ⇒ Struct

Updates a Device Defender audit suppression.

Examples:

Request syntax with placeholder values


resp = client.update_audit_suppression({
  check_name: "AuditCheckName", # required
  resource_identifier: { # required
    device_certificate_id: "CertificateId",
    ca_certificate_id: "CertificateId",
    cognito_identity_pool_id: "CognitoIdentityPoolId",
    client_id: "ClientId",
    policy_version_identifier: {
      policy_name: "PolicyName",
      policy_version_id: "PolicyVersionId",
    },
    account: "AwsAccountId",
    iam_role_arn: "RoleArn",
    role_alias_arn: "RoleAliasArn",
    issuer_certificate_identifier: {
      issuer_certificate_subject: "IssuerCertificateSubject",
      issuer_id: "IssuerId",
      issuer_certificate_serial_number: "IssuerCertificateSerialNumber",
    },
    device_certificate_arn: "CertificateArn",
  },
  expiration_date: Time.now,
  suppress_indefinitely: false,
  description: "AuditDescription",
})

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (required, String)

    An audit check name. Checks must be enabled for your account. (Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)

  • :resource_identifier (required, Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

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

    The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to.

  • :suppress_indefinitely (Boolean)

    Indicates whether a suppression should exist indefinitely or not.

  • :description (String)

    The description of the audit suppression.

Returns:

  • (Struct)

    Returns an empty response.



14445
14446
14447
14448
# File 'lib/aws-sdk-iot/client.rb', line 14445

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

#update_authorizer(params = {}) ⇒ Types::UpdateAuthorizerResponse

Examples:

Request syntax with placeholder values


resp = client.update_authorizer({
  authorizer_name: "AuthorizerName", # required
  authorizer_function_arn: "AuthorizerFunctionArn",
  token_key_name: "TokenKeyName",
  token_signing_public_keys: {
    "KeyName" => "KeyValue",
  },
  status: "ACTIVE", # accepts ACTIVE, INACTIVE
  enable_caching_for_http: false,
})

Response structure


resp.authorizer_name #=> String
resp.authorizer_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The authorizer name.

  • :authorizer_function_arn (String)

    The ARN of the authorizer’s Lambda function.

  • :token_key_name (String)

    The key used to extract the token from the HTTP headers.

  • :token_signing_public_keys (Hash<String,String>)

    The public keys used to verify the token signature.

  • :status (String)

    The status of the update authorizer request.

  • :enable_caching_for_http (Boolean)

    When ‘true`, the result from the authorizer’s Lambda function is cached for the time specified in `refreshAfterInSeconds`. The cached result is used while the device reuses the same HTTP connection.

Returns:



14503
14504
14505
14506
# File 'lib/aws-sdk-iot/client.rb', line 14503

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

#update_billing_group(params = {}) ⇒ Types::UpdateBillingGroupResponse

Updates information about the billing group.

Requires permission to access the [UpdateBillingGroup] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_billing_group({
  billing_group_name: "BillingGroupName", # required
  billing_group_properties: { # required
    billing_group_description: "BillingGroupDescription",
  },
  expected_version: 1,
})

Response structure


resp.version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name of the billing group.

  • :billing_group_properties (required, Types::BillingGroupProperties)

    The properties of the billing group.

  • :expected_version (Integer)

    The expected version of the billing group. If the version of the billing group does not match the expected version specified in the request, the ‘UpdateBillingGroup` request is rejected with a `VersionConflictException`.

Returns:



14548
14549
14550
14551
# File 'lib/aws-sdk-iot/client.rb', line 14548

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

#update_ca_certificate(params = {}) ⇒ Struct

Updates a registered CA certificate.

Requires permission to access the [UpdateCACertificate] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_ca_certificate({
  certificate_id: "CertificateId", # required
  new_status: "ACTIVE", # accepts ACTIVE, INACTIVE
  new_auto_registration_status: "ENABLE", # accepts ENABLE, DISABLE
  registration_config: {
    template_body: "TemplateBody",
    role_arn: "RoleArn",
    template_name: "TemplateName",
  },
  remove_auto_registration: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The CA certificate identifier.

  • :new_status (String)

    The updated status of the CA certificate.

    Note: The status value REGISTER_INACTIVE is deprecated and should not be used.

  • :new_auto_registration_status (String)

    The new value for the auto registration status. Valid values are: “ENABLE” or “DISABLE”.

  • :registration_config (Types::RegistrationConfig)

    Information about the registration configuration.

  • :remove_auto_registration (Boolean)

    If true, removes auto registration.

Returns:

  • (Struct)

    Returns an empty response.



14598
14599
14600
14601
# File 'lib/aws-sdk-iot/client.rb', line 14598

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

#update_certificate(params = {}) ⇒ Struct

Updates the status of the specified certificate. This operation is idempotent.

Requires permission to access the [UpdateCertificate] action.

Certificates must be in the ACTIVE state to authenticate devices that use a certificate to connect to IoT.

Within a few minutes of updating a certificate from the ACTIVE state to any other state, IoT disconnects all devices that used that certificate to connect. Devices cannot use a certificate that is not in the ACTIVE state to reconnect.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_certificate({
  certificate_id: "CertificateId", # required
  new_status: "ACTIVE", # required, accepts ACTIVE, INACTIVE, REVOKED, PENDING_TRANSFER, REGISTER_INACTIVE, PENDING_ACTIVATION
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

  • :new_status (required, String)

    The new status.

    Note: Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by IoT. They are not intended for developer use.

    Note: The status value REGISTER_INACTIVE is deprecated and should not be used.

Returns:

  • (Struct)

    Returns an empty response.



14646
14647
14648
14649
# File 'lib/aws-sdk-iot/client.rb', line 14646

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

#update_certificate_provider(params = {}) ⇒ Types::UpdateCertificateProviderResponse

Examples:

Request syntax with placeholder values


resp = client.update_certificate_provider({
  certificate_provider_name: "CertificateProviderName", # required
  lambda_function_arn: "CertificateProviderFunctionArn",
  account_default_for_operations: ["CreateCertificateFromCsr"], # accepts CreateCertificateFromCsr
})

Response structure


resp.certificate_provider_name #=> String
resp.certificate_provider_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_provider_name (required, String)

    The name of the certificate provider.

  • :lambda_function_arn (String)

    The Lambda function ARN that’s associated with the certificate provider.

  • :account_default_for_operations (Array<String>)

    A list of the operations that the certificate provider will use to generate certificates. Valid value: ‘CreateCertificateFromCsr`.

Returns:



14691
14692
14693
14694
# File 'lib/aws-sdk-iot/client.rb', line 14691

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

#update_command(params = {}) ⇒ Types::UpdateCommandResponse

Update information about a command or mark a command for deprecation.

Examples:

Request syntax with placeholder values


resp = client.update_command({
  command_id: "CommandId", # required
  display_name: "DisplayName",
  description: "CommandDescription",
  deprecated: false,
})

Response structure


resp.command_id #=> String
resp.display_name #=> String
resp.description #=> String
resp.deprecated #=> Boolean
resp.last_updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :command_id (required, String)

    The unique identifier of the command to be updated.

  • :display_name (String)

    The new user-friendly name to use in the console for the command.

  • :description (String)

    A short text description of the command.

  • :deprecated (Boolean)

    A boolean that you can use to specify whether to deprecate a command.

Returns:



14737
14738
14739
14740
# File 'lib/aws-sdk-iot/client.rb', line 14737

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

#update_custom_metric(params = {}) ⇒ Types::UpdateCustomMetricResponse

Updates a Device Defender detect custom metric.

Requires permission to access the [UpdateCustomMetric] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_custom_metric({
  metric_name: "MetricName", # required
  display_name: "CustomMetricDisplayName", # required
})

Response structure


resp.metric_name #=> String
resp.metric_arn #=> String
resp.metric_type #=> String, one of "string-list", "ip-address-list", "number-list", "number"
resp.display_name #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the custom metric. Cannot be updated.

  • :display_name (required, String)

    Field represents a friendly name in the console for the custom metric, it doesn’t have to be unique. Don’t use this name as the metric identifier in the device metric report. Can be updated.

Returns:



14785
14786
14787
14788
# File 'lib/aws-sdk-iot/client.rb', line 14785

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

#update_dimension(params = {}) ⇒ Types::UpdateDimensionResponse

Updates the definition for a dimension. You cannot change the type of a dimension after it is created (you can delete it and recreate it).

Requires permission to access the [UpdateDimension] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_dimension({
  name: "DimensionName", # required
  string_values: ["DimensionStringValue"], # required
})

Response structure


resp.name #=> String
resp.arn #=> String
resp.type #=> String, one of "TOPIC_FILTER"
resp.string_values #=> Array
resp.string_values[0] #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.

  • :string_values (required, Array<String>)

    Specifies the value or list of values for the dimension. For ‘TOPIC_FILTER` dimensions, this is a pattern used to match the MQTT topic (for example, “admin/#”).

Returns:



14836
14837
14838
14839
# File 'lib/aws-sdk-iot/client.rb', line 14836

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

#update_domain_configuration(params = {}) ⇒ Types::UpdateDomainConfigurationResponse

Updates values stored in the domain configuration. Domain configurations for default endpoints can’t be updated.

Requires permission to access the [UpdateDomainConfiguration] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_domain_configuration({
  domain_configuration_name: "ReservedDomainConfigurationName", # required
  authorizer_config: {
    default_authorizer_name: "AuthorizerName",
    allow_authorizer_override: false,
  },
  domain_configuration_status: "ENABLED", # accepts ENABLED, DISABLED
  remove_authorizer_config: false,
  tls_config: {
    security_policy: "SecurityPolicy",
  },
  server_certificate_config: {
    enable_ocsp_check: false,
    ocsp_lambda_arn: "OCSPLambdaArn",
    ocsp_authorized_responder_arn: "AcmCertificateArn",
  },
  authentication_type: "CUSTOM_AUTH_X509", # accepts CUSTOM_AUTH_X509, CUSTOM_AUTH, AWS_X509, AWS_SIGV4, DEFAULT
  application_protocol: "SECURE_MQTT", # accepts SECURE_MQTT, MQTT_WSS, HTTPS, DEFAULT
  client_certificate_config: {
    client_certificate_callback_arn: "ClientCertificateCallbackArn",
  },
})

Response structure


resp.domain_configuration_name #=> String
resp.domain_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_configuration_name (required, String)

    The name of the domain configuration to be updated.

  • :authorizer_config (Types::AuthorizerConfig)

    An object that specifies the authorization service for a domain.

  • :domain_configuration_status (String)

    The status to which the domain configuration should be updated.

  • :remove_authorizer_config (Boolean)

    Removes the authorization configuration from a domain.

  • :tls_config (Types::TlsConfig)

    An object that specifies the TLS configuration for a domain.

  • :server_certificate_config (Types::ServerCertificateConfig)

    The server certificate configuration.

  • :authentication_type (String)

    An enumerated string that specifies the authentication type.

    • ‘CUSTOM_AUTH_X509` - Use custom authentication and authorization with additional details from the X.509 client certificate.

    ^ ^

    • ‘CUSTOM_AUTH` - Use custom authentication and authorization. For more information, see [Custom authentication and authorization].

    ^ ^

    • ‘AWS_X509` - Use X.509 client certificates without custom authentication and authorization. For more information, see [X.509 client certificates].

    ^ ^

    • ‘AWS_SIGV4` - Use Amazon Web Services Signature Version 4. For more information, see [IAM users, groups, and roles].

    ^ ^

    • ‘DEFAULT ` - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see [Device communication protocols].

    ^

    [1]: docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html [2]: docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html [3]: docs.aws.amazon.com/iot/latest/developerguide/protocols.html

  • :application_protocol (String)

    An enumerated string that specifies the application-layer protocol.

    • ‘SECURE_MQTT` - MQTT over TLS.

    ^ ^

    • ‘MQTT_WSS` - MQTT over WebSocket.

    ^ ^

    • ‘HTTPS` - HTTP over TLS.

    ^ ^

    • ‘DEFAULT` - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol. For more information, see [Device communication protocols].

    ^

    [1]: docs.aws.amazon.com/iot/latest/developerguide/protocols.html

  • :client_certificate_config (Types::ClientCertificateConfig)

    An object that specifies the client certificate configuration for a domain.

Returns:



14978
14979
14980
14981
# File 'lib/aws-sdk-iot/client.rb', line 14978

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

#update_dynamic_thing_group(params = {}) ⇒ Types::UpdateDynamicThingGroupResponse

Examples:

Request syntax with placeholder values


resp = client.update_dynamic_thing_group({
  thing_group_name: "ThingGroupName", # required
  thing_group_properties: { # required
    thing_group_description: "ThingGroupDescription",
    attribute_payload: {
      attributes: {
        "AttributeName" => "AttributeValue",
      },
      merge: false,
    },
  },
  expected_version: 1,
  index_name: "IndexName",
  query_string: "QueryString",
  query_version: "QueryVersion",
})

Response structure


resp.version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The name of the dynamic thing group to update.

  • :thing_group_properties (required, Types::ThingGroupProperties)

    The dynamic thing group properties to update.

  • :expected_version (Integer)

    The expected version of the dynamic thing group to update.

  • :index_name (String)

    The dynamic thing group index to update.

    <note markdown=“1”> Currently one index is supported: ‘AWS_Things`.

    </note>
    
  • :query_string (String)

    The dynamic thing group search query string to update.

  • :query_version (String)

    The dynamic thing group query version to update.

    <note markdown=“1”> Currently one query version is supported: “2017-09-30”. If not specified, the query version defaults to this value.

    </note>
    

Returns:



15047
15048
15049
15050
# File 'lib/aws-sdk-iot/client.rb', line 15047

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

#update_event_configurations(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.update_event_configurations({
  event_configurations: {
    "THING" => {
      enabled: false,
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

Returns:

  • (Struct)

    Returns an empty response.



15078
15079
15080
15081
# File 'lib/aws-sdk-iot/client.rb', line 15078

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

#update_fleet_metric(params = {}) ⇒ Struct

Updates the data for a fleet metric.

Requires permission to access the [UpdateFleetMetric] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_fleet_metric({
  metric_name: "FleetMetricName", # required
  query_string: "QueryString",
  aggregation_type: {
    name: "Statistics", # required, accepts Statistics, Percentiles, Cardinality
    values: ["AggregationTypeValue"],
  },
  period: 1,
  aggregation_field: "AggregationField",
  description: "FleetMetricDescription",
  query_version: "QueryVersion",
  index_name: "IndexName", # required
  unit: "Seconds", # accepts Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the fleet metric to update.

  • :query_string (String)

    The search query string.

  • :aggregation_type (Types::AggregationType)

    The type of the aggregation query.

  • :period (Integer)

    The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.

  • :aggregation_field (String)

    The field to aggregate.

  • :description (String)

    The description of the fleet metric.

  • :query_version (String)

    The version of the query.

  • :index_name (required, String)

    The name of the index to search.

  • :unit (String)

    Used to support unit transformation such as milliseconds to seconds. The unit must be supported by [CW metric].

    [1]: docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html

  • :expected_version (Integer)

    The expected version of the fleet metric record in the registry.

Returns:

  • (Struct)

    Returns an empty response.



15149
15150
15151
15152
# File 'lib/aws-sdk-iot/client.rb', line 15149

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

#update_indexing_configuration(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.update_indexing_configuration({
  thing_indexing_configuration: {
    thing_indexing_mode: "OFF", # required, accepts OFF, REGISTRY, REGISTRY_AND_SHADOW
    thing_connectivity_indexing_mode: "OFF", # accepts OFF, STATUS
    device_defender_indexing_mode: "OFF", # accepts OFF, VIOLATIONS
    named_shadow_indexing_mode: "OFF", # accepts OFF, ON
    managed_fields: [
      {
        name: "FieldName",
        type: "Number", # accepts Number, String, Boolean
      },
    ],
    custom_fields: [
      {
        name: "FieldName",
        type: "Number", # accepts Number, String, Boolean
      },
    ],
    filter: {
      named_shadow_names: ["ShadowName"],
      geo_locations: [
        {
          name: "TargetFieldName",
          order: "LatLon", # accepts LatLon, LonLat
        },
      ],
    },
  },
  thing_group_indexing_configuration: {
    thing_group_indexing_mode: "OFF", # required, accepts OFF, ON
    managed_fields: [
      {
        name: "FieldName",
        type: "Number", # accepts Number, String, Boolean
      },
    ],
    custom_fields: [
      {
        name: "FieldName",
        type: "Number", # accepts Number, String, Boolean
      },
    ],
  },
})

Parameters:

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

    ({})

Options Hash (params):

Returns:

  • (Struct)

    Returns an empty response.



15220
15221
15222
15223
# File 'lib/aws-sdk-iot/client.rb', line 15220

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

#update_job(params = {}) ⇒ Struct

Updates supported fields of the specified job.

Requires permission to access the [UpdateJob] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_job({
  job_id: "JobId", # required
  description: "JobDescription",
  presigned_url_config: {
    role_arn: "RoleArn",
    expires_in_sec: 1,
  },
  job_executions_rollout_config: {
    maximum_per_minute: 1,
    exponential_rate: {
      base_rate_per_minute: 1, # required
      increment_factor: 1.0, # required
      rate_increase_criteria: { # required
        number_of_notified_things: 1,
        number_of_succeeded_things: 1,
      },
    },
  },
  abort_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, REJECTED, TIMED_OUT, ALL
        action: "CANCEL", # required, accepts CANCEL
        threshold_percentage: 1.0, # required
        min_number_of_executed_things: 1, # required
      },
    ],
  },
  timeout_config: {
    in_progress_timeout_in_minutes: 1,
  },
  namespace_id: "NamespaceId",
  job_executions_retry_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, TIMED_OUT, ALL
        number_of_retries: 1, # required
      },
    ],
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The ID of the job to be updated.

  • :description (String)

    A short text description of the job.

  • :presigned_url_config (Types::PresignedUrlConfig)

    Configuration information for pre-signed S3 URLs.

  • :job_executions_rollout_config (Types::JobExecutionsRolloutConfig)

    Allows you to create a staged rollout of the job.

  • :abort_config (Types::AbortConfig)

    Allows you to create criteria to abort a job.

  • :timeout_config (Types::TimeoutConfig)

    Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to ‘IN_PROGRESS`. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to `TIMED_OUT`.

  • :namespace_id (String)

    The namespace used to indicate that a job is a customer-managed job.

    When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

    ‘$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/`

    <note markdown=“1”> The ‘namespaceId` feature is only supported by IoT Greengrass at this time. For more information, see [Setting up IoT Greengrass core devices.]

    </note>
    

    [1]: docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html

  • :job_executions_retry_config (Types::JobExecutionsRetryConfig)

    Allows you to create the criteria to retry a job.

Returns:

  • (Struct)

    Returns an empty response.



15325
15326
15327
15328
# File 'lib/aws-sdk-iot/client.rb', line 15325

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

#update_mitigation_action(params = {}) ⇒ Types::UpdateMitigationActionResponse

Updates the definition for the specified mitigation action.

Requires permission to access the [UpdateMitigationAction] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_mitigation_action({
  action_name: "MitigationActionName", # required
  role_arn: "RoleArn",
  action_params: {
    update_device_certificate_params: {
      action: "DEACTIVATE", # required, accepts DEACTIVATE
    },
    update_ca_certificate_params: {
      action: "DEACTIVATE", # required, accepts DEACTIVATE
    },
    add_things_to_thing_group_params: {
      thing_group_names: ["ThingGroupName"], # required
      override_dynamic_groups: false,
    },
    replace_default_policy_version_params: {
      template_name: "BLANK_POLICY", # required, accepts BLANK_POLICY
    },
    enable_io_t_logging_params: {
      role_arn_for_logging: "RoleArn", # required
      log_level: "DEBUG", # required, accepts DEBUG, INFO, ERROR, WARN, DISABLED
    },
    publish_finding_to_sns_params: {
      topic_arn: "SnsTopicArn", # required
    },
  },
})

Response structure


resp.action_arn #=> String
resp.action_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :action_name (required, String)

    The friendly name for the mitigation action. You cannot change the name by using ‘UpdateMitigationAction`. Instead, you must delete and recreate the mitigation action with the new name.

  • :role_arn (String)

    The ARN of the IAM role that is used to apply the mitigation action.

  • :action_params (Types::MitigationActionParams)

    Defines the type of action and the parameters for that action.

Returns:



15390
15391
15392
15393
# File 'lib/aws-sdk-iot/client.rb', line 15390

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

#update_package(params = {}) ⇒ Struct

Updates the supported fields for a specific software package.

Requires permission to access the [UpdatePackage] and

GetIndexingConfiguration][1

actions.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_package({
  package_name: "PackageName", # required
  description: "ResourceDescription",
  default_version_name: "VersionName",
  unset_default_version: false,
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the target software package.

  • :description (String)

    The package description.

  • :default_version_name (String)

    The name of the default package version.

    Note: You cannot name a ‘defaultVersion` and set `unsetDefaultVersion` equal to `true` at the same time.

  • :unset_default_version (Boolean)

    Indicates whether you want to remove the named default package version from the software package. Set as ‘true` to remove the default package version.

    Note: You cannot name a ‘defaultVersion` and set `unsetDefaultVersion` equal to `true` at the same time.

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



15446
15447
15448
15449
# File 'lib/aws-sdk-iot/client.rb', line 15446

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

#update_package_configuration(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.update_package_configuration({
  version_update_by_jobs_config: {
    enabled: false,
    role_arn: "RoleArn",
  },
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :version_update_by_jobs_config (Types::VersionUpdateByJobsConfig)

    Configuration to manage job’s package version reporting. This updates the thing’s reserved named shadow that the job targets.

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



15487
15488
15489
15490
# File 'lib/aws-sdk-iot/client.rb', line 15487

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

#update_package_version(params = {}) ⇒ Struct

Updates the supported fields for a specific package version.

Requires permission to access the [UpdatePackageVersion] and

GetIndexingConfiguration][1

actions.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_package_version({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
  description: "ResourceDescription",
  attributes: {
    "ResourceAttributeKey" => "ResourceAttributeValue",
  },
  artifact: {
    s3_location: {
      bucket: "S3Bucket",
      key: "S3Key",
      version: "S3Version",
    },
  },
  action: "PUBLISH", # accepts PUBLISH, DEPRECATE
  recipe: "PackageVersionRecipe",
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the associated software package.

  • :version_name (required, String)

    The name of the target package version.

  • :description (String)

    The package version description.

  • :attributes (Hash<String,String>)

    Metadata that can be used to define a package version’s configuration. For example, the Amazon S3 file location, configuration options that are being sent to the device or fleet.

    Note: Attributes can be updated only when the package version is in a draft state.

    The combined size of all the attributes on a package version is limited to 3KB.

  • :artifact (Types::PackageVersionArtifact)

    The various components that make up a software package version.

  • :action (String)

    The status that the package version should be assigned. For more information, see [Package version lifecycle].

    [1]: docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle

  • :recipe (String)

    The inline job document associated with a software package version used for a quick job deployment.

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



15569
15570
15571
15572
# File 'lib/aws-sdk-iot/client.rb', line 15569

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

#update_provisioning_template(params = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.update_provisioning_template({
  template_name: "TemplateName", # required
  description: "TemplateDescription",
  enabled: false,
  default_version_id: 1,
  provisioning_role_arn: "RoleArn",
  pre_provisioning_hook: {
    payload_version: "PayloadVersion",
    target_arn: "TargetArn", # required
  },
  remove_pre_provisioning_hook: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template.

  • :description (String)

    The description of the provisioning template.

  • :enabled (Boolean)

    True to enable the provisioning template, otherwise false.

  • :default_version_id (Integer)

    The ID of the default provisioning template version.

  • :provisioning_role_arn (String)

    The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.

  • :pre_provisioning_hook (Types::ProvisioningHook)

    Updates the pre-provisioning hook template. Only supports template of type ‘FLEET_PROVISIONING`. For more information about provisioning template types, see [type].

    [1]: docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type

  • :remove_pre_provisioning_hook (Boolean)

    Removes pre-provisioning hook template.

Returns:

  • (Struct)

    Returns an empty response.



15630
15631
15632
15633
# File 'lib/aws-sdk-iot/client.rb', line 15630

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

#update_role_alias(params = {}) ⇒ Types::UpdateRoleAliasResponse

Updates a role alias.

Requires permission to access the [UpdateRoleAlias] action.

The value of [ ‘credentialDurationSeconds` ][2] must be less than or equal to the maximum session duration of the IAM role that the role alias references. For more information, see [ Modifying a role maximum session duration (Amazon Web Services API)] from the Amazon Web Services Identity and Access Management User Guide.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions [2]: docs.aws.amazon.com/iot/latest/apireference/API_UpdateRoleAlias.html#iot-UpdateRoleAlias-request-credentialDurationSeconds [3]: docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-api.html#roles-modify_max-session-duration-api

Examples:

Request syntax with placeholder values


resp = client.update_role_alias({
  role_alias: "RoleAlias", # required
  role_arn: "RoleArn",
  credential_duration_seconds: 1,
})

Response structure


resp.role_alias #=> String
resp.role_alias_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :role_alias (required, String)

    The role alias to update.

  • :role_arn (String)

    The role ARN.

  • :credential_duration_seconds (Integer)

    The number of seconds the credential will be valid.

    This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.

Returns:



15683
15684
15685
15686
# File 'lib/aws-sdk-iot/client.rb', line 15683

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

#update_scheduled_audit(params = {}) ⇒ Types::UpdateScheduledAuditResponse

Updates a scheduled audit, including which checks are performed and how often the audit takes place.

Requires permission to access the [UpdateScheduledAudit] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_scheduled_audit({
  frequency: "DAILY", # accepts DAILY, WEEKLY, BIWEEKLY, MONTHLY
  day_of_month: "DayOfMonth",
  day_of_week: "SUN", # accepts SUN, MON, TUE, WED, THU, FRI, SAT
  target_check_names: ["AuditCheckName"],
  scheduled_audit_name: "ScheduledAuditName", # required
})

Response structure


resp.scheduled_audit_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :frequency (String)

    How often the scheduled audit takes place, either ‘DAILY`, `WEEKLY`, `BIWEEKLY`, or `MONTHLY`. The start time of each audit is determined by the system.

  • :day_of_month (String)

    The day of the month on which the scheduled audit takes place. This can be ‘1` through `31` or `LAST`. This field is required if the `frequency` parameter is set to `MONTHLY`. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the “LAST” day of the month.

  • :day_of_week (String)

    The day of the week on which the scheduled audit takes place. This can be one of ‘SUN`, `MON`, `TUE`, `WED`, `THU`, `FRI`, or `SAT`. This field is required if the “frequency” parameter is set to `WEEKLY` or `BIWEEKLY`.

  • :target_check_names (Array<String>)

    Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use ‘DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)

  • :scheduled_audit_name (required, String)

    The name of the scheduled audit. (Max. 128 chars)

Returns:



15744
15745
15746
15747
# File 'lib/aws-sdk-iot/client.rb', line 15744

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

#update_security_profile(params = {}) ⇒ Types::UpdateSecurityProfileResponse

Updates a Device Defender security profile.

Requires permission to access the [UpdateSecurityProfile] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_security_profile({
  security_profile_name: "SecurityProfileName", # required
  security_profile_description: "SecurityProfileDescription",
  behaviors: [
    {
      name: "BehaviorName", # required
      metric: "BehaviorMetric",
      metric_dimension: {
        dimension_name: "DimensionName", # required
        operator: "IN", # accepts IN, NOT_IN
      },
      criteria: {
        comparison_operator: "less-than", # accepts less-than, less-than-equals, greater-than, greater-than-equals, in-cidr-set, not-in-cidr-set, in-port-set, not-in-port-set, in-set, not-in-set
        value: {
          count: 1,
          cidrs: ["Cidr"],
          ports: [1],
          number: 1.0,
          numbers: [1.0],
          strings: ["stringValue"],
        },
        duration_seconds: 1,
        consecutive_datapoints_to_alarm: 1,
        consecutive_datapoints_to_clear: 1,
        statistical_threshold: {
          statistic: "EvaluationStatistic",
        },
        ml_detection_config: {
          confidence_level: "LOW", # required, accepts LOW, MEDIUM, HIGH
        },
      },
      suppress_alerts: false,
      export_metric: false,
    },
  ],
  alert_targets: {
    "SNS" => {
      alert_target_arn: "AlertTargetArn", # required
      role_arn: "RoleArn", # required
    },
  },
  additional_metrics_to_retain: ["BehaviorMetric"],
  additional_metrics_to_retain_v2: [
    {
      metric: "BehaviorMetric", # required
      metric_dimension: {
        dimension_name: "DimensionName", # required
        operator: "IN", # accepts IN, NOT_IN
      },
      export_metric: false,
    },
  ],
  delete_behaviors: false,
  delete_alert_targets: false,
  delete_additional_metrics_to_retain: false,
  expected_version: 1,
  metrics_export_config: {
    mqtt_topic: "MqttTopic", # required
    role_arn: "RoleArn", # required
  },
  delete_metrics_export_config: false,
})

Response structure


resp.security_profile_name #=> String
resp.security_profile_arn #=> String
resp.security_profile_description #=> String
resp.behaviors #=> Array
resp.behaviors[0].name #=> String
resp.behaviors[0].metric #=> String
resp.behaviors[0].metric_dimension.dimension_name #=> String
resp.behaviors[0].metric_dimension.operator #=> String, one of "IN", "NOT_IN"
resp.behaviors[0].criteria.comparison_operator #=> String, one of "less-than", "less-than-equals", "greater-than", "greater-than-equals", "in-cidr-set", "not-in-cidr-set", "in-port-set", "not-in-port-set", "in-set", "not-in-set"
resp.behaviors[0].criteria.value.count #=> Integer
resp.behaviors[0].criteria.value.cidrs #=> Array
resp.behaviors[0].criteria.value.cidrs[0] #=> String
resp.behaviors[0].criteria.value.ports #=> Array
resp.behaviors[0].criteria.value.ports[0] #=> Integer
resp.behaviors[0].criteria.value.number #=> Float
resp.behaviors[0].criteria.value.numbers #=> Array
resp.behaviors[0].criteria.value.numbers[0] #=> Float
resp.behaviors[0].criteria.value.strings #=> Array
resp.behaviors[0].criteria.value.strings[0] #=> String
resp.behaviors[0].criteria.duration_seconds #=> Integer
resp.behaviors[0].criteria.consecutive_datapoints_to_alarm #=> Integer
resp.behaviors[0].criteria.consecutive_datapoints_to_clear #=> Integer
resp.behaviors[0].criteria.statistical_threshold.statistic #=> String
resp.behaviors[0].criteria.ml_detection_config.confidence_level #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.behaviors[0].suppress_alerts #=> Boolean
resp.behaviors[0].export_metric #=> Boolean
resp.alert_targets #=> Hash
resp.alert_targets["AlertTargetType"].alert_target_arn #=> String
resp.alert_targets["AlertTargetType"].role_arn #=> String
resp.additional_metrics_to_retain #=> Array
resp.additional_metrics_to_retain[0] #=> String
resp.additional_metrics_to_retain_v2 #=> Array
resp.additional_metrics_to_retain_v2[0].metric #=> String
resp.additional_metrics_to_retain_v2[0].metric_dimension.dimension_name #=> String
resp.additional_metrics_to_retain_v2[0].metric_dimension.operator #=> String, one of "IN", "NOT_IN"
resp.additional_metrics_to_retain_v2[0].export_metric #=> Boolean
resp.version #=> Integer
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.metrics_export_config.mqtt_topic #=> String
resp.metrics_export_config.role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The name of the security profile you want to update.

  • :security_profile_description (String)

    A description of the security profile.

  • :behaviors (Array<Types::Behavior>)

    Specifies the behaviors that, when violated by a device (thing), cause an alert.

  • :alert_targets (Hash<String,Types::AlertTarget>)

    Where the alerts are sent. (Alerts are always sent to the console.)

  • :additional_metrics_to_retain (Array<String>)

    *Please use UpdateSecurityProfileRequest$additionalMetricsToRetainV2 instead.*

    A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile’s ‘behaviors`, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.

  • :additional_metrics_to_retain_v2 (Array<Types::MetricToRetain>)

    A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile’s behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.

  • :delete_behaviors (Boolean)

    If true, delete all ‘behaviors` defined for this security profile. If any `behaviors` are defined in the current invocation, an exception occurs.

  • :delete_alert_targets (Boolean)

    If true, delete all ‘alertTargets` defined for this security profile. If any `alertTargets` are defined in the current invocation, an exception occurs.

  • :delete_additional_metrics_to_retain (Boolean)

    If true, delete all ‘additionalMetricsToRetain` defined for this security profile. If any `additionalMetricsToRetain` are defined in the current invocation, an exception occurs.

  • :expected_version (Integer)

    The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a ‘VersionConflictException` is thrown.

  • :metrics_export_config (Types::MetricsExportConfig)

    Specifies the MQTT topic and role ARN required for metric export.

  • :delete_metrics_export_config (Boolean)

    Set the value as true to delete metrics export related configurations.

Returns:



15937
15938
15939
15940
# File 'lib/aws-sdk-iot/client.rb', line 15937

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

#update_stream(params = {}) ⇒ Types::UpdateStreamResponse

Updates an existing stream. The stream version will be incremented by one.

Requires permission to access the [UpdateStream] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_stream({
  stream_id: "StreamId", # required
  description: "StreamDescription",
  files: [
    {
      file_id: 1,
      s3_location: {
        bucket: "S3Bucket",
        key: "S3Key",
        version: "S3Version",
      },
    },
  ],
  role_arn: "RoleArn",
})

Response structure


resp.stream_id #=> String
resp.stream_arn #=> String
resp.description #=> String
resp.stream_version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :stream_id (required, String)

    The stream ID.

  • :description (String)

    The description of the stream.

  • :files (Array<Types::StreamFile>)

    The files associated with the stream.

  • :role_arn (String)

    An IAM role that allows the IoT service principal assumes to access your S3 files.

Returns:



15998
15999
16000
16001
# File 'lib/aws-sdk-iot/client.rb', line 15998

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

#update_thing(params = {}) ⇒ Struct

Updates the data for a thing.

Requires permission to access the [UpdateThing] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_thing({
  thing_name: "ThingName", # required
  thing_type_name: "ThingTypeName",
  attribute_payload: {
    attributes: {
      "AttributeName" => "AttributeValue",
    },
    merge: false,
  },
  expected_version: 1,
  remove_thing_type: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing to update.

    You can’t change a thing’s name. To change a thing’s name, you must create a new thing, give it the new name, and then delete the old thing.

  • :thing_type_name (String)

    The name of the thing type.

  • :attribute_payload (Types::AttributePayload)

    A list of thing attributes, a JSON string containing name-value pairs. For example:

    ‘“attributes”:{“name1”:“value2”}`

    This data is used to add new attributes or update existing attributes.

  • :expected_version (Integer)

    The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the ‘UpdateThing` request is rejected with a `VersionConflictException`.

  • :remove_thing_type (Boolean)

    Remove a thing type association. If true, the association is removed.

Returns:

  • (Struct)

    Returns an empty response.



16058
16059
16060
16061
# File 'lib/aws-sdk-iot/client.rb', line 16058

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

#update_thing_group(params = {}) ⇒ Types::UpdateThingGroupResponse

Examples:

Request syntax with placeholder values


resp = client.update_thing_group({
  thing_group_name: "ThingGroupName", # required
  thing_group_properties: { # required
    thing_group_description: "ThingGroupDescription",
    attribute_payload: {
      attributes: {
        "AttributeName" => "AttributeValue",
      },
      merge: false,
    },
  },
  expected_version: 1,
})

Response structure


resp.version #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The thing group to update.

  • :thing_group_properties (required, Types::ThingGroupProperties)

    The thing group properties.

  • :expected_version (Integer)

    The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.

Returns:



16107
16108
16109
16110
# File 'lib/aws-sdk-iot/client.rb', line 16107

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

#update_thing_groups_for_thing(params = {}) ⇒ Struct

Updates the groups to which the thing belongs.

Requires permission to access the [UpdateThingGroupsForThing] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_thing_groups_for_thing({
  thing_name: "ThingName",
  thing_groups_to_add: ["ThingGroupName"],
  thing_groups_to_remove: ["ThingGroupName"],
  override_dynamic_groups: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (String)

    The thing whose group memberships will be updated.

  • :thing_groups_to_add (Array<String>)

    The groups to which the thing will be added.

  • :thing_groups_to_remove (Array<String>)

    The groups from which the thing will be removed.

  • :override_dynamic_groups (Boolean)

    Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

Returns:

  • (Struct)

    Returns an empty response.



16149
16150
16151
16152
# File 'lib/aws-sdk-iot/client.rb', line 16149

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

#update_thing_type(params = {}) ⇒ Struct

Updates a thing type.

Examples:

Request syntax with placeholder values


resp = client.update_thing_type({
  thing_type_name: "ThingTypeName", # required
  thing_type_properties: {
    thing_type_description: "ThingTypeDescription",
    searchable_attributes: ["AttributeName"],
    mqtt5_configuration: {
      propagating_attributes: [
        {
          user_property_key: "UserPropertyKeyName",
          thing_attribute: "AttributeName",
          connection_attribute: "ConnectionAttributeName",
        },
      ],
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :thing_type_name (required, String)

    The name of a thing type.

  • :thing_type_properties (Types::ThingTypeProperties)

    The ThingTypeProperties contains information about the thing type including: a thing type description, and a list of searchable thing attribute names.

Returns:

  • (Struct)

    Returns an empty response.



16187
16188
16189
16190
# File 'lib/aws-sdk-iot/client.rb', line 16187

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

#update_topic_rule_destination(params = {}) ⇒ Struct

Updates a topic rule destination. You use this to change the status, endpoint URL, or confirmation URL of the destination.

Requires permission to access the [UpdateTopicRuleDestination] action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.update_topic_rule_destination({
  arn: "AwsArn", # required
  status: "ENABLED", # required, accepts ENABLED, IN_PROGRESS, DISABLED, ERROR, DELETING
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The ARN of the topic rule destination.

  • :status (required, String)

    The status of the topic rule destination. Valid values are:

    IN_PROGRESS

    : A topic rule destination was created but has not been confirmed. You

    can set `status` to `IN_PROGRESS` by calling
    `UpdateTopicRuleDestination`. Calling `UpdateTopicRuleDestination`
    causes a new confirmation challenge to be sent to your confirmation
    endpoint.
    

    ENABLED

    : Confirmation was completed, and traffic to this destination is

    allowed. You can set `status` to `DISABLED` by calling
    `UpdateTopicRuleDestination`.
    

    DISABLED

    : Confirmation was completed, and traffic to this destination is not

    allowed. You can set `status` to `ENABLED` by calling
    `UpdateTopicRuleDestination`.
    

    ERROR

    : Confirmation could not be completed, for example if the confirmation

    timed out. You can call `GetTopicRuleDestination` for details about
    the error. You can set `status` to `IN_PROGRESS` by calling
    `UpdateTopicRuleDestination`. Calling `UpdateTopicRuleDestination`
    causes a new confirmation challenge to be sent to your confirmation
    endpoint.
    

Returns:

  • (Struct)

    Returns an empty response.



16248
16249
16250
16251
# File 'lib/aws-sdk-iot/client.rb', line 16248

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

#validate_security_profile_behaviors(params = {}) ⇒ Types::ValidateSecurityProfileBehaviorsResponse

Validates a Device Defender security profile behaviors specification.

Requires permission to access the

ValidateSecurityProfileBehaviors][1

action.

[1]: docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions

Examples:

Request syntax with placeholder values


resp = client.validate_security_profile_behaviors({
  behaviors: [ # required
    {
      name: "BehaviorName", # required
      metric: "BehaviorMetric",
      metric_dimension: {
        dimension_name: "DimensionName", # required
        operator: "IN", # accepts IN, NOT_IN
      },
      criteria: {
        comparison_operator: "less-than", # accepts less-than, less-than-equals, greater-than, greater-than-equals, in-cidr-set, not-in-cidr-set, in-port-set, not-in-port-set, in-set, not-in-set
        value: {
          count: 1,
          cidrs: ["Cidr"],
          ports: [1],
          number: 1.0,
          numbers: [1.0],
          strings: ["stringValue"],
        },
        duration_seconds: 1,
        consecutive_datapoints_to_alarm: 1,
        consecutive_datapoints_to_clear: 1,
        statistical_threshold: {
          statistic: "EvaluationStatistic",
        },
        ml_detection_config: {
          confidence_level: "LOW", # required, accepts LOW, MEDIUM, HIGH
        },
      },
      suppress_alerts: false,
      export_metric: false,
    },
  ],
})

Response structure


resp.valid #=> Boolean
resp.validation_errors #=> Array
resp.validation_errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :behaviors (required, Array<Types::Behavior>)

    Specifies the behaviors that, when violated by a device (thing), cause an alert.

Returns:



16316
16317
16318
16319
# File 'lib/aws-sdk-iot/client.rb', line 16316

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

#waiter_namesObject

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

Deprecated.


16345
16346
16347
# File 'lib/aws-sdk-iot/client.rb', line 16345

def waiter_names
  []
end