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

Class: Aws::IoT::Client

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

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

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

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

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

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

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

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

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

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

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

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

  • :endpoint (String)

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

  • :endpoint_cache_max_entries (Integer) — default: 1000

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

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

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

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

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

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

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

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials.

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

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

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

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

  • :validate_params (Boolean) — default: true

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



196
197
198
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 196

def initialize(*args)
  super
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.

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.



226
227
228
229
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 226

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

#add_thing_to_thing_group(params = {}) ⇒ Struct

Adds a thing to a thing group.

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

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.

Returns:

  • (Struct)

    Returns an empty response.



258
259
260
261
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 258

def add_thing_to_thing_group(params = {}, options = {})
  req = build_request(:add_thing_to_thing_group, 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

Examples:

Request syntax with placeholder values


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

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.

Returns:



306
307
308
309
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 306

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 a policy to the specified target.

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

  • :policy_name (required, String)

    The name of the policy to attach.

  • :target (required, String)

    The identity to which the policy is attached.

Returns:

  • (Struct)

    Returns an empty response.



330
331
332
333
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 330

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 API is deprecated. Please use AttachPolicy instead.

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.



358
359
360
361
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 358

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 with this account. Each thing group or account can have up to five security profiles associated with it.

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.



385
386
387
388
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 385

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.

Examples:

Request syntax with placeholder values


resp = client.attach_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)

    The principal, such as a certificate or other credential.

Returns:

  • (Struct)

    Returns an empty response.



409
410
411
412
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 409

def attach_thing_principal(params = {}, options = {})
  req = build_request(:attach_thing_principal, 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 is not in progress, an "InvalidRequestException" occurs.

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.



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

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, AWS 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.

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.



463
464
465
466
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 463

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

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

Cancels a job.

Examples:

Request syntax with placeholder values


resp = client.cancel_job({
  job_id: "JobId", # required
  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.

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



508
509
510
511
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 508

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.

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.



563
564
565
566
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 563

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

#clear_default_authorizer(params = {}) ⇒ Struct

Clears the default authorizer.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.



574
575
576
577
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 574

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

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

Creates an authorizer.

Examples:

Request syntax with placeholder values


resp = client.create_authorizer({
  authorizer_name: "AuthorizerName", # required
  authorizer_function_arn: "AuthorizerFunctionArn", # required
  token_key_name: "TokenKeyName", # required
  token_signing_public_keys: { # required
    "KeyName" => "KeyValue",
  },
  status: "ACTIVE", # accepts ACTIVE, INACTIVE
})

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 (required, String)

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

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

Returns:



622
623
624
625
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 622

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

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

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

Note: 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 or NIST P-384 curves.

Note: Reusing the same certificate signing request (CSR) results in a distinct certificate.

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.

Assuming 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 AWS CLI command to create a certificate for the corresponding CSR.

The aws iot create-certificate-from-csr part of the command can also be run 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 | %{aws 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"

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:



703
704
705
706
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 703

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

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

Creates a job.

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,
  },
  timeout_config: {
    in_progress_timeout_in_minutes: 1,
  },
})

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 AWS 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 to the job document.

  • :document (String)

    The job document.

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

  • :job_executions_rollout_config (Types::JobExecutionsRolloutConfig)

    Allows you to create a staged rollout of the 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.

Returns:



783
784
785
786
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 783

def create_job(params = {}, options = {})
  req = build_request(:create_job, 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.

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

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:



820
821
822
823
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 820

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

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

Creates an AWS IoT OTAUpdate on a target group of things or groups.

Examples:

Request syntax with placeholder values


resp = client.create_ota_update({
  ota_update_id: "OTAUpdateId", # required
  description: "OTAUpdateDescription",
  targets: ["Target"], # required
  target_selection: "CONTINUOUS", # accepts CONTINUOUS, SNAPSHOT
  aws_job_executions_rollout_config: {
    maximum_per_minute: 1,
  },
  files: [ # required
    {
      file_name: "FileName",
      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",
  },
})

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"

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 targeted devices to receive OTA updates.

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

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

    The files to be streamed by the OTA update.

  • :role_arn (required, String)

    The IAM role that allows access to the AWS IoT Jobs service.

  • :additional_parameters (Hash<String,String>)

    A list of additional OTA update parameters which are name-value pairs.

Returns:



939
940
941
942
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 939

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

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

Creates an AWS 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.

Examples:

Request syntax with placeholder values


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

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.

Returns:



981
982
983
984
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 981

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

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:



1034
1035
1036
1037
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1034

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

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

Creates a role alias.

Examples:

Request syntax with placeholder values


resp = client.create_role_alias({
  role_alias: "RoleAlias", # required
  role_arn: "RoleArn", # required
  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 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.

Returns:



1071
1072
1073
1074
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1071

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.

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

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. Can be one of "DAILY", "WEEKLY", "BIWEEKLY" or "MONTHLY". The actual 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. 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. 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 (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 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)

Returns:



1125
1126
1127
1128
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1125

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.

Examples:

Request syntax with placeholder values


resp = client.create_security_profile({
  security_profile_name: "SecurityProfileName", # required
  security_profile_description: "SecurityProfileDescription",
  behaviors: [ # required
    {
      name: "BehaviorName", # required
      metric: "BehaviorMetric",
      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
        value: {
          count: 1,
          cidrs: ["Cidr"],
          ports: [1],
        },
        duration_seconds: 1,
      },
    },
  ],
  alert_targets: {
    "SNS" => {
      alert_target_arn: "AlertTargetArn", # 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 (required, 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.

Returns:



1187
1188
1189
1190
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1187

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. The total size of a file associated with the stream cannot exceed more than 2 MB. The stream will be created with version 0. If a stream is created with the same streamID as a stream that existed and was deleted within last 90 days, we will resurrect that old stream by incrementing the version by 1.

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

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 assumes to access your S3 files.

Returns:



1248
1249
1250
1251
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1248

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.

This is a control plane operation. See Authorization for information about authorizing control plane actions.

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,
  },
})

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.

  • :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"\}\}

Returns:



1303
1304
1305
1306
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1303

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.

This is a control plane operation. See Authorization for information about authorizing control plane actions.

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,
    },
  },
})

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.

Returns:



1358
1359
1360
1361
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1358

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.

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"],
  },
})

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.

Returns:



1397
1398
1399
1400
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1397

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.

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",
          put_item: {
            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
        },
        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",
        },
        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
        },
        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",
          role_arn: "AwsArn",
        },
        step_functions: {
          execution_name_prefix: "ExecutionNamePrefix",
          state_machine_name: "StateMachineName", # required
          role_arn: "AwsArn", # 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",
        put_item: {
          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
      },
      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",
      },
      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
      },
      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",
        role_arn: "AwsArn",
      },
      step_functions: {
        execution_name_prefix: "ExecutionNamePrefix",
        state_machine_name: "StateMachineName", # required
        role_arn: "AwsArn", # 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.



1606
1607
1608
1609
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1606

def create_topic_rule(params = {}, options = {})
  req = build_request(:create_topic_rule, 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.

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.



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

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

#delete_authorizer(params = {}) ⇒ Struct

Deletes an authorizer.

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.



1648
1649
1650
1651
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1648

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

#delete_ca_certificate(params = {}) ⇒ Struct

Deletes a registered CA certificate.

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.



1669
1670
1671
1672
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1669

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 attached to it or if its status is set to ACTIVE. To delete a certificate, first use the DetachPrincipalPolicy API to detach all policies. Next, use the UpdateCertificate API to set the certificate to the INACTIVE status.

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 a certificate request to be deleted.

Returns:

  • (Struct)

    Returns an empty response.



1699
1700
1701
1702
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1699

def delete_certificate(params = {}, options = {})
  req = build_request(:delete_certificate, 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.

Examples:

Request syntax with placeholder values


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

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.

    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.

Returns:

  • (Struct)

    Returns an empty response.



1747
1748
1749
1750
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1747

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

#delete_job_execution(params = {}) ⇒ Struct

Deletes a job execution.

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,
})

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.

    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.

Returns:

  • (Struct)

    Returns an empty response.



1795
1796
1797
1798
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1795

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

#delete_ota_update(params = {}) ⇒ Struct

Delete an OTA update.

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 OTA update ID to delete.

  • :delete_stream (Boolean)

    Specifies if the stream associated with an OTA update should be deleted when the OTA update is deleted.

  • :force_delete_aws_job (Boolean)

    Specifies if the AWS Job associated with the OTA update should be deleted with the OTA update is deleted.

Returns:

  • (Struct)

    Returns an empty response.



1825
1826
1827
1828
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1825

def delete_ota_update(params = {}, options = {})
  req = build_request(:delete_ota_update, 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 API to delete all non-default versions of the policy; use the DetachPrincipalPolicy API to detach the policy from any certificate; and then use the DeletePolicy API to delete the policy.

When a policy is deleted using DeletePolicy, its default version is deleted with it.

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.



1856
1857
1858
1859
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1856

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

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.



1884
1885
1886
1887
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1884

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

#delete_registration_code(params = {}) ⇒ Struct

Deletes a CA certificate registration code.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.



1895
1896
1897
1898
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1895

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

#delete_role_alias(params = {}) ⇒ Struct

Deletes a role alias

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.



1915
1916
1917
1918
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1915

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

#delete_scheduled_audit(params = {}) ⇒ Struct

Deletes a scheduled audit.

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.



1935
1936
1937
1938
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1935

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.

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 than the actual version, a VersionConflictException is thrown.

Returns:

  • (Struct)

    Returns an empty response.



1962
1963
1964
1965
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1962

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

#delete_stream(params = {}) ⇒ Struct

Deletes a stream.

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.



1982
1983
1984
1985
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1982

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

#delete_thing(params = {}) ⇒ Struct

Deletes the specified thing.

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.



2009
2010
2011
2012
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2009

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

#delete_thing_group(params = {}) ⇒ Struct

Deletes a thing group.

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.



2033
2034
2035
2036
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2033

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.

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.



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

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

#delete_topic_rule(params = {}) ⇒ Struct

Deletes the rule.

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.



2078
2079
2080
2081
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2078

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

#delete_v2_logging_level(params = {}) ⇒ Struct

Deletes a logging level.

Examples:

Request syntax with placeholder values


resp = client.delete_v2_logging_level({
  target_type: "DEFAULT", # required, accepts DEFAULT, THING_GROUP
  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.



2103
2104
2105
2106
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2103

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.

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.



2130
2131
2132
2133
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2130

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.

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:



2157
2158
2159
2160
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2157

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

#describe_audit_task(params = {}) ⇒ Types::DescribeAuditTaskResponse

Gets information about a Device Defender audit.

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



2205
2206
2207
2208
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2205

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

#describe_authorizer(params = {}) ⇒ Types::DescribeAuthorizerResponse

Describes an authorizer.

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

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The name of the authorizer to describe.

Returns:



2239
2240
2241
2242
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2239

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

#describe_ca_certificate(params = {}) ⇒ Types::DescribeCACertificateResponse

Describes a registered CA certificate.

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.registration_config.template_body #=> String
resp.registration_config.role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The CA certificate identifier.

Returns:



2279
2280
2281
2282
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2279

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.

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

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:



2323
2324
2325
2326
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2323

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

#describe_default_authorizer(params = {}) ⇒ Types::DescribeDefaultAuthorizerResponse

Describes the default authorizer.

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

Parameters:

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

    ({})

Returns:



2348
2349
2350
2351
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2348

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

#describe_endpoint(params = {}) ⇒ Types::DescribeEndpointResponse

Returns a unique endpoint specific to the AWS account making the call.

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 AWS IoT credentials provider API endpoint.

    ^ ^

    • iot:Jobs - Returns an AWS IoT device management Jobs API endpoint.

    ^

Returns:



2394
2395
2396
2397
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2394

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

#describe_event_configurations(params = {}) ⇒ Types::DescribeEventConfigurationsResponse

Describes event configurations.

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:



2416
2417
2418
2419
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2416

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

#describe_index(params = {}) ⇒ Types::DescribeIndexResponse

Describes a search index.

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:



2446
2447
2448
2449
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2446

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

#describe_job(params = {}) ⇒ Types::DescribeJobResponse

Describes a job.

Examples:

Request syntax with placeholder values


resp = client.describe_job({
  job_id: "JobId", # required
})

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"
resp.job.force_canceled #=> Boolean
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.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

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

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

Returns:



2499
2500
2501
2502
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2499

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

#describe_job_execution(params = {}) ⇒ Types::DescribeJobExecutionResponse

Describes a job execution.

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:



2545
2546
2547
2548
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2545

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

#describe_role_alias(params = {}) ⇒ Types::DescribeRoleAliasResponse

Describes a role alias.

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:



2577
2578
2579
2580
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2577

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.

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:



2614
2615
2616
2617
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2614

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.

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].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"
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.duration_seconds #=> Integer
resp.alert_targets #=> Hash
resp.alert_targets["AlertTargetType"].alert_target_arn #=> String
resp.alert_targets["AlertTargetType"].role_arn #=> String
resp.version #=> Integer
resp.creation_date #=> Time
resp.last_modified_date #=> Time

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:



2665
2666
2667
2668
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2665

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.

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:



2702
2703
2704
2705
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2702

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.

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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing.

Returns:



2741
2742
2743
2744
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2741

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

#describe_thing_group(params = {}) ⇒ Types::DescribeThingGroupResponse

Describe a thing group.

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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The name of the thing group.

Returns:



2784
2785
2786
2787
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2784

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.

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:



2832
2833
2834
2835
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2832

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.

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



2870
2871
2872
2873
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2870

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.

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.



2894
2895
2896
2897
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2894

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 API is deprecated. Please use DetachPolicy instead.

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.

    If the principal is a certificate, specify the certificate ARN. If the principal is an Amazon Cognito identity, specify the identity ID.

Returns:

  • (Struct)

    Returns an empty response.



2923
2924
2925
2926
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2923

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.

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.



2949
2950
2951
2952
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2949

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.

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.



2975
2976
2977
2978
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2975

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

#disable_topic_rule(params = {}) ⇒ Struct

Disables the rule.

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.



2995
2996
2997
2998
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2995

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

#enable_topic_rule(params = {}) ⇒ Struct

Enables the rule.

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.



3015
3016
3017
3018
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3015

def enable_topic_rule(params = {}, options = {})
  req = build_request(:enable_topic_rule, 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 AWS IoT device gateway.

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.

  • :cognito_identity_pool_id (String)

    The Cognito identity pool ID.

  • :thing_name (String)

    The thing name.

Returns:



3054
3055
3056
3057
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3054

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

#get_indexing_configuration(params = {}) ⇒ Types::GetIndexingConfigurationResponse

Gets the search configuration.

Examples:

Response structure


resp.thing_indexing_configuration.thing_indexing_mode #=> String, one of "OFF", "REGISTRY", "REGISTRY_AND_SHADOW"
resp.thing_group_indexing_configuration.thing_group_indexing_mode #=> String, one of "OFF", "ON"

Parameters:

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

    ({})

Returns:



3073
3074
3075
3076
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3073

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

#get_job_document(params = {}) ⇒ Types::GetJobDocumentResponse

Gets a job document.

Examples:

Request syntax with placeholder values


resp = client.get_job_document({
  job_id: "JobId", # required
})

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.

Returns:



3099
3100
3101
3102
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3099

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.

Examples:

Response structure


resp.role_arn #=> String
resp.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"

Parameters:

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

    ({})

Returns:



3121
3122
3123
3124
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3121

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

#get_ota_update(params = {}) ⇒ Types::GetOTAUpdateResponse

Gets an OTA update.

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.aws_job_executions_rollout_config.maximum_per_minute #=> 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_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"
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:



3184
3185
3186
3187
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3184

def get_ota_update(params = {}, options = {})
  req = build_request(:get_ota_update, 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.

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:



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

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.

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:



3267
3268
3269
3270
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3267

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 AWS IoT.

Examples:

Response structure


resp.registration_code #=> String

Parameters:

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

    ({})

Returns:



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

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

#get_topic_rule(params = {}) ⇒ Types::GetTopicRuleResponse

Gets information about the rule.

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

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the rule.

Returns:



3427
3428
3429
3430
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3427

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

#get_v2_logging_options(params = {}) ⇒ Types::GetV2LoggingOptionsResponse

Gets the fine grained logging options.

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:



3448
3449
3450
3451
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3448

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.

Examples:

Request syntax with placeholder values


resp = client.list_active_violations({
  thing_name: "ThingName",
  security_profile_name: "SecurityProfileName",
  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.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"
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.duration_seconds #=> Integer
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_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.

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



3509
3510
3511
3512
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3509

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.

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 for which the policies will be listed.

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



3551
3552
3553
3554
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3551

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

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",
  },
  max_results: 1,
  next_token: "NextToken",
  start_time: Time.now,
  end_time: Time.now,
})

Response structure


resp.findings #=> Array
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"
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.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"
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].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.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 non-compliant 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.

Returns:



3650
3651
3652
3653
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3650

def list_audit_findings(params = {}, options = {})
  req = build_request(:list_audit_findings, 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.

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. Note that audit information is retained for a limited time (180 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__AUDIT_TASK".

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



3708
3709
3710
3711
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3708

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.

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:



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

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

#list_ca_certificates(params = {}) ⇒ Types::ListCACertificatesResponse

Lists the CA certificates registered for your AWS account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

Examples:

Request syntax with placeholder values


resp = client.list_ca_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"
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.

Returns:



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

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

#list_certificates(params = {}) ⇒ Types::ListCertificatesResponse

Lists the certificates registered in your AWS account.

The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.

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



3837
3838
3839
3840
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3837

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.

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



3883
3884
3885
3886
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3883

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

#list_indices(params = {}) ⇒ Types::ListIndicesResponse

Lists the search indices.

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:



3917
3918
3919
3920
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3917

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.

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



3963
3964
3965
3966
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3963

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.

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

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

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



4010
4011
4012
4013
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4010

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

#list_jobs(params = {}) ⇒ Types::ListJobsResponse

Lists jobs.

Examples:

Request syntax with placeholder values


resp = client.list_jobs({
  status: "IN_PROGRESS", # accepts IN_PROGRESS, CANCELED, COMPLETED, DELETION_IN_PROGRESS
  target_selection: "CONTINUOUS", # accepts CONTINUOUS, SNAPSHOT
  max_results: 1,
  next_token: "NextToken",
  thing_group_name: "ThingGroupName",
  thing_group_id: "ThingGroupId",
})

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"
resp.jobs[0].created_at #=> Time
resp.jobs[0].last_updated_at #=> Time
resp.jobs[0].completed_at #=> Time
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.

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

Returns:



4074
4075
4076
4077
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4074

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

#list_ota_updates(params = {}) ⇒ Types::ListOTAUpdatesResponse

Lists OTA updates.

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

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:



4113
4114
4115
4116
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4113

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.

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:



4156
4157
4158
4159
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4156

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

#list_policies(params = {}) ⇒ Types::ListPoliciesResponse

Lists your policies.

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:



4195
4196
4197
4198
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4195

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 API is deprecated. Please use ListTargetsForPolicy instead.

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:



4240
4241
4242
4243
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4240

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.

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:



4270
4271
4272
4273
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4270

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 API is deprecated. Please use ListAttachedPolicies instead.

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.

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



4322
4323
4324
4325
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4322

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.

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)

    The token to retrieve the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in this operation.

  • :principal (required, String)

    The principal.

Returns:



4359
4360
4361
4362
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4359

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

#list_role_aliases(params = {}) ⇒ Types::ListRoleAliasesResponse

Lists the role aliases registered in your account.

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:



4396
4397
4398
4399
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4396

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

#list_scheduled_audits(params = {}) ⇒ Types::ListScheduledAuditsResponse

Lists all of your scheduled audits.

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:



4434
4435
4436
4437
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4434

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 have created. You can use filters to list only those security profiles associated with a thing group or only those associated with your account.

Examples:

Request syntax with placeholder values


resp = client.list_security_profiles({
  next_token: "NextToken",
  max_results: 1,
})

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.

Returns:



4470
4471
4472
4473
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4470

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

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 as well.

  • :security_profile_target_arn (required, String)

    The ARN of the target (thing group) whose attached security profiles you want to get.

Returns:



4515
4516
4517
4518
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4515

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 AWS account.

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:



4555
4556
4557
4558
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4555

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

#list_targets_for_policy(params = {}) ⇒ Types::ListTargetsForPolicyResponse

List targets for the specified policy.

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:



4592
4593
4594
4595
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4592

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.

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:



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

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.

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)

    The token to retrieve the next 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:



4678
4679
4680
4681
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4678

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.

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)

    The token to retrieve the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



4716
4717
4718
4719
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4716

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.

Examples:

Request syntax with placeholder values


resp = client.list_thing_principals({
  thing_name: "ThingName", # required
})

Response structure


resp.principals #=> Array
resp.principals[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing.

Returns:



4743
4744
4745
4746
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4743

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

#list_thing_registration_task_reports(params = {}) ⇒ Types::ListThingRegistrationTaskReportsResponse

Information about the thing registration tasks.

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)

    The token to retrieve the next set of results.

  • :max_results (Integer)

    The maximum number of results to return per request.

Returns:



4786
4787
4788
4789
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4786

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.

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)

    The token to retrieve the next 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:



4823
4824
4825
4826
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4823

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.

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

    The token to retrieve the next 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:



4867
4868
4869
4870
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4867

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.

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

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)

    The token to retrieve the next 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.

Returns:



4921
4922
4923
4924
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4921

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

#list_things_in_thing_group(params = {}) ⇒ Types::ListThingsInThingGroupResponse

Lists the things in the specified group.

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)

    The token to retrieve the next set of results.

  • :max_results (Integer)

    The maximum number of results to return at one time.

Returns:



4963
4964
4965
4966
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4963

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

#list_topic_rules(params = {}) ⇒ Types::ListTopicRulesResponse

Lists the rules for the specific topic.

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)

    A token used to retrieve the next value.

  • :rule_disabled (Boolean)

    Specifies whether the rule is disabled.

Returns:



5008
5009
5010
5011
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5008

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.

Examples:

Request syntax with placeholder values


resp = client.list_v2_logging_levels({
  target_type: "DEFAULT", # accepts DEFAULT, THING_GROUP
  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"
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)

    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:



5049
5050
5051
5052
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5049

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

Examples:

Request syntax with placeholder values


resp = client.list_violation_events({
  start_time: Time.now, # required
  end_time: Time.now, # required
  thing_name: "ThingName",
  security_profile_name: "SecurityProfileName",
  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.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"
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.duration_seconds #=> Integer
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].violation_event_type #=> String, one of "in-alarm", "alarm-cleared", "alarm-invalidated"
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.

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



5121
5122
5123
5124
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5121

def list_violation_events(params = {}, options = {})
  re