Class: Aws::IoT::Client

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

Overview

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

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

For details on configuring region and credentials see the developer guide.

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

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

  • :credentials (required, Aws::CredentialProvider)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

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

  • :client_side_monitoring (Boolean) — default: false

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

  • :client_side_monitoring_client_id (String) — default: ""

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

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

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

  • :client_side_monitoring_port (Integer) — default: 31000

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

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

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

  • :convert_params (Boolean) — default: true

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

  • :correct_clock_skew (Boolean) — default: true

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

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

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

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

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

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

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

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

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

  • :ignore_configured_endpoint_urls (Boolean)

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

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

    The log formatter.

  • :log_level (Symbol) — default: :info

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

  • :logger (Logger)

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

  • :max_attempts (Integer) — default: 3

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

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

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

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

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

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

  • :retry_limit (Integer) — default: 3

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

  • :retry_max_delay (Integer) — default: 0

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

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

    Specifies which retry algorithm to use. Values are:

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

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

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

  • :sdk_ua_app_id (String)

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

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

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

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :stub_responses (Boolean) — default: false

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

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

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

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

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

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

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

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

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

  • :use_dualstack_endpoint (Boolean)

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

  • :use_fips_endpoint (Boolean)

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

  • :validate_params (Boolean) — default: true

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

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

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

  • :http_continue_timeout (Float) — default: 1

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

  • :http_idle_timeout (Float) — default: 5

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

  • :http_open_timeout (Float) — default: 15

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

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

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

  • :http_wire_trace (Boolean) — default: false

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

  • :on_chunk_received (Proc)

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

  • :on_chunk_sent (Proc)

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

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

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

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

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



440
441
442
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 440

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.

Requires permission to access the AcceptCertificateTransfer action.

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.



477
478
479
480
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 477

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

#add_thing_to_billing_group(params = {}) ⇒ Struct

Adds a thing to a billing group.

Requires permission to access the AddThingToBillingGroup action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (String)

    The name of the billing group.

    This call is asynchronous. It might take several seconds for the detachment to propagate.

  • :billing_group_arn (String)

    The ARN of the billing group.

  • :thing_name (String)

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

  • :thing_arn (String)

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

Returns:

  • (Struct)

    Returns an empty response.



520
521
522
523
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 520

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

#add_thing_to_thing_group(params = {}) ⇒ Struct

Adds a thing to a thing group.

Requires permission to access the AddThingToThingGroup action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (String)

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

  • :thing_group_arn (String)

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

  • :thing_name (String)

    The name of the thing to add to a group.

  • :thing_arn (String)

    The ARN of the thing to add to a group.

  • :override_dynamic_groups (Boolean)

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

Returns:

  • (Struct)

    Returns an empty response.



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

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

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

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

Requires permission to access the AssociateSbomWithPackageVersion action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the new software package.

  • :version_name (required, String)

    The name of the new package version.

  • :sbom (required, Types::Sbom)

    The Amazon S3 location for the software bill of materials associated with a software package version.

  • :client_token (String)

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

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

Returns:



631
632
633
634
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 631

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

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

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

  • The job must have been created with the targetSelection field set to "CONTINUOUS".

  • The job status must currently be "IN_PROGRESS".

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

Requires permission to access the AssociateTargetsWithJob action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :targets (required, Array<String>)

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

  • :job_id (required, String)

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

  • :comment (String)

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

  • :namespace_id (String)

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

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

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

    The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.

Returns:



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

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

#attach_policy(params = {}) ⇒ Struct

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

Requires permission to access the AttachPolicy action.

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. For example, a thing group or a certificate.

Returns:

  • (Struct)

    Returns an empty response.



741
742
743
744
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 741

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

#attach_principal_policy(params = {}) ⇒ Struct

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

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

Requires permission to access the AttachPrincipalPolicy action.

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.



777
778
779
780
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 777

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

#attach_security_profile(params = {}) ⇒ Struct

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

Requires permission to access the AttachSecurityProfile action.

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.



810
811
812
813
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 810

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

#attach_thing_principal(params = {}) ⇒ Struct

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

Requires permission to access the AttachThingPrincipal action.

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, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.

Returns:

  • (Struct)

    Returns an empty response.



843
844
845
846
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 843

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

#cancel_audit_mitigation_actions_task(params = {}) ⇒ Struct

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

Requires permission to access the CancelAuditMitigationActionsTask action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.



871
872
873
874
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 871

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

#cancel_audit_task(params = {}) ⇒ Struct

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

Requires permission to access the CancelAuditTask action.

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.



900
901
902
903
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 900

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

#cancel_certificate_transfer(params = {}) ⇒ Struct

Cancels a pending transfer for the specified certificate.

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

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

Requires permission to access the CancelCertificateTransfer action.

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.



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

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

#cancel_detect_mitigation_actions_task(params = {}) ⇒ Struct

Cancels a Device Defender ML Detect mitigation action.

Requires permission to access the CancelDetectMitigationActionsTask action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier of the task.

Returns:

  • (Struct)

    Returns an empty response.



965
966
967
968
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 965

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

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

Cancels a job.

Requires permission to access the CancelJob action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

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

  • :reason_code (String) — default: Optional

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

  • :comment (String)

    An optional comment string describing why the job was canceled.

  • :force (Boolean) — default: Optional

    If true job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is false.

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

Returns:



1020
1021
1022
1023
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1020

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

#cancel_job_execution(params = {}) ⇒ Struct

Cancels the execution of a job for a given thing.

Requires permission to access the CancelJobExecution action.

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.



1081
1082
1083
1084
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1081

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.

Requires permission to access the ClearDefaultAuthorizer action.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.



1098
1099
1100
1101
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1098

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

#confirm_topic_rule_destination(params = {}) ⇒ Struct

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

Requires permission to access the ConfirmTopicRuleDestination action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :confirmation_token (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.



1130
1131
1132
1133
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1130

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

#create_audit_suppression(params = {}) ⇒ Struct

Creates a Device Defender audit suppression.

Requires permission to access the CreateAuditSuppression action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (required, String)

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

  • :resource_identifier (required, Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

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

    The epoch timestamp in seconds at which this suppression expires.

  • :suppress_indefinitely (Boolean)

    Indicates whether a suppression should exist indefinitely or not.

  • :description (String)

    The description of the audit suppression.

  • :client_request_token (required, String)

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

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

Returns:

  • (Struct)

    Returns an empty response.



1203
1204
1205
1206
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1203

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

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

Creates an authorizer.

Requires permission to access the CreateAuthorizer action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The authorizer name.

  • :authorizer_function_arn (required, String)

    The ARN of the authorizer's Lambda function.

  • :token_key_name (String)

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

  • :token_signing_public_keys (Hash<String,String>)

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

  • :status (String)

    The status of the create authorizer request.

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

    Metadata which can be used to manage the custom authorizer.

    For URI Request parameters use format: ...key1=value1&key2=value2...

    For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

    For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

  • :signing_disabled (Boolean)

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

  • :enable_caching_for_http (Boolean)

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

    The default value is false.

Returns:



1292
1293
1294
1295
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1292

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

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

Creates a billing group.

Requires permission to access the CreateBillingGroup action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name you wish to give to the billing group.

  • :billing_group_properties (Types::BillingGroupProperties)

    The properties of the billing group.

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

    Metadata which can be used to manage the billing group.

Returns:



1343
1344
1345
1346
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1343

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

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

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

Requires permission to access the CreateCertificateFromCsr action.

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

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. In the following commands, we assume that a set of CSRs are located inside of the directory my-csr-directory:

On Linux and OS X, the command is:

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

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

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

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

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

> ls -Name my-csr-directory | %\{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:



1436
1437
1438
1439
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1436

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

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

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

Requires permission to access the CreateCertificateProvider action.

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

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_provider_name (required, String)

    The name of the certificate provider.

  • :lambda_function_arn (required, String)

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

  • :account_default_for_operations (required, Array<String>)

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

  • :client_token (String)

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

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

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

    Metadata which can be used to manage the certificate provider.

Returns:



1512
1513
1514
1515
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1512

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

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

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

Requires permission to access the CreateCustomMetric action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

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

  • :display_name (String)

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

  • :metric_type (required, String)

    The type of the custom metric.

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

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

    Metadata that can be used to manage the custom metric.

  • :client_request_token (required, String)

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

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

Returns:



1583
1584
1585
1586
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1583

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

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

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

Requires permission to access the CreateDimension action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

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

  • :type (required, String)

    Specifies the type of dimension. Supported types: TOPIC_FILTER.

  • :string_values (required, Array<String>)

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

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

    Metadata that can be used to manage the dimension.

  • :client_request_token (required, String)

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

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

Returns:



1651
1652
1653
1654
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1651

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

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

Creates a domain configuration.

Requires permission to access the CreateDomainConfiguration action.

Examples:

Request syntax with placeholder values


resp = client.create_domain_configuration({
  domain_configuration_name: "DomainConfigurationName", # required
  domain_name: "DomainName",
  server_certificate_arns: ["AcmCertificateArn"],
  validation_certificate_arn: "AcmCertificateArn",
  authorizer_config: {
    default_authorizer_name: "AuthorizerName",
    allow_authorizer_override: false,
  },
  service_type: "DATA", # accepts DATA, CREDENTIAL_PROVIDER, JOBS
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  tls_config: {
    security_policy: "SecurityPolicy",
  },
  server_certificate_config: {
    enable_ocsp_check: false,
  },
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :domain_configuration_name (required, String)

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

  • :domain_name (String)

    The name of the domain.

  • :server_certificate_arns (Array<String>)

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

  • :validation_certificate_arn (String)

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

  • :authorizer_config (Types::AuthorizerConfig)

    An object that specifies the authorization service for a domain.

  • :service_type (String)

    The type of service delivered by the endpoint.

    Amazon Web Services IoT Core currently supports only the DATA service type.

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

    Metadata which can be used to manage the domain configuration.

    For URI Request parameters use format: ...key1=value1&key2=value2...

    For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

    For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

  • :tls_config (Types::TlsConfig)

    An object that specifies the TLS configuration for a domain.

  • :server_certificate_config (Types::ServerCertificateConfig)

    The server certificate configuration.

Returns:



1752
1753
1754
1755
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1752

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

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

Creates a dynamic thing group.

Requires permission to access the CreateDynamicThingGroup action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The dynamic thing group name to create.

  • :thing_group_properties (Types::ThingGroupProperties)

    The dynamic thing group properties.

  • :index_name (String)

    The dynamic thing group index name.

    Currently one index is supported: AWS_Things.

  • :query_string (required, String)

    The dynamic thing group search query string.

    See Query Syntax for information about query string syntax.

  • :query_version (String)

    The dynamic thing group query version.

    Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.

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

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

Returns:



1842
1843
1844
1845
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1842

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

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

Creates a fleet metric.

Requires permission to access the CreateFleetMetric action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the fleet metric to create.

  • :query_string (required, String)

    The search query string.

  • :aggregation_type (required, Types::AggregationType)

    The type of the aggregation query.

  • :period (required, Integer)

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

  • :aggregation_field (required, String)

    The field to aggregate.

  • :description (String)

    The fleet metric description.

  • :query_version (String)

    The query version.

  • :index_name (String)

    The name of the index to search.

  • :unit (String)

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

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

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

Returns:



1926
1927
1928
1929
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 1926

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

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

Creates a job.

Requires permission to access the CreateJob action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

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

  • :targets (required, Array<String>)

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

  • :document_source (String)

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

    For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0

    For more information, see Methods for accessing a bucket.

  • :document (String)

    The job document. Required if you don't specify a value for documentSource.

  • :description (String)

    A short text description of the job.

  • :presigned_url_config (Types::PresignedUrlConfig)

    Configuration information for pre-signed S3 URLs.

  • :target_selection (String)

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

    We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.

  • :job_executions_rollout_config (Types::JobExecutionsRolloutConfig)

    Allows you to create a staged rollout of the job.

  • :abort_config (Types::AbortConfig)

    Allows you to create the criteria to abort a job.

  • :timeout_config (Types::TimeoutConfig)

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

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

    Metadata which can be used to manage the job.

  • :namespace_id (String)

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

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

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

    The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.

  • :job_template_arn (String)

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

  • :job_executions_retry_config (Types::JobExecutionsRetryConfig)

    Allows you to create the criteria to retry a job.

  • :document_parameters (Hash<String,String>)

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

    documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.

  • :scheduling_config (Types::SchedulingConfig)

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

  • :destination_package_versions (Array<String>)

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

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

Returns:



2139
2140
2141
2142
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2139

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

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

Creates a job template.

Requires permission to access the CreateJobTemplate action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :job_template_id (required, String)

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

  • :job_arn (String)

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

  • :document_source (String)

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

    For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0

    For more information, see Methods for accessing a bucket.

  • :document (String)

    The job document. Required if you don't specify a value for documentSource.

  • :description (required, String)

    A description of the job document.

  • :presigned_url_config (Types::PresignedUrlConfig)

    Configuration for pre-signed S3 URLs.

  • :job_executions_rollout_config (Types::JobExecutionsRolloutConfig)

    Allows you to create a staged rollout of a job.

  • :abort_config (Types::AbortConfig)

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

  • :timeout_config (Types::TimeoutConfig)

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

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

    Metadata that can be used to manage the job template.

  • :job_executions_retry_config (Types::JobExecutionsRetryConfig)

    Allows you to create the criteria to retry a job.

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

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

  • :destination_package_versions (Array<String>)

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

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

Returns:



2290
2291
2292
2293
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2290

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

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

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

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

Requires permission to access the CreateKeysAndCertificate action.

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:



2337
2338
2339
2340
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2337

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

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

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

Requires permission to access the CreateMitigationAction action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :action_name (required, String)

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

  • :role_arn (required, String)

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

  • :action_params (required, Types::MitigationActionParams)

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

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

    Metadata that can be used to manage the mitigation action.

Returns:



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

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

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

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

Requires permission to access the CreateOTAUpdate action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :ota_update_id (required, String)

    The ID of the OTA update to be created.

  • :description (String)

    The description of the OTA update.

  • :targets (required, Array<String>)

    The devices targeted to receive OTA updates.

  • :protocols (Array<String>)

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

  • :target_selection (String)

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

  • :aws_job_executions_rollout_config (Types::AwsJobExecutionsRolloutConfig)

    Configuration for the rollout of OTA updates.

  • :aws_job_presigned_url_config (Types::AwsJobPresignedUrlConfig)

    Configuration information for pre-signed URLs.

  • :aws_job_abort_config (Types::AwsJobAbortConfig)

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

  • :aws_job_timeout_config (Types::AwsJobTimeoutConfig)

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

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

    The files to be streamed by the OTA update.

  • :role_arn (required, String)

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

  • :additional_parameters (Hash<String,String>)

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

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

    Metadata which can be used to manage updates.

Returns:



2596
2597
2598
2599
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2596

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

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

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

Requires permission to access the CreatePackage and GetIndexingConfiguration actions.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the new software package.

  • :description (String)

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

  • :tags (Hash<String,String>)

    Metadata that can be used to manage the package.

  • :client_token (String)

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

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

Returns:



2653
2654
2655
2656
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2653

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

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

Creates a new version for an existing IoT software package.

Requires permission to access the CreatePackageVersion and GetIndexingConfiguration actions.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the associated software package.

  • :version_name (required, String)

    The name of the new package version.

  • :description (String)

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

  • :attributes (Hash<String,String>)

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

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

  • :artifact (Types::PackageVersionArtifact)

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

  • :recipe (String)

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

  • :tags (Hash<String,String>)

    Metadata that can be used to manage the package version.

  • :client_token (String)

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

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

Returns:



2751
2752
2753
2754
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2751

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

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

Creates an IoT policy.

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

Requires permission to access the CreatePolicy action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :policy_name (required, String)

    The policy name.

  • :policy_document (required, String)

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

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

    Metadata which can be used to manage the policy.

    For URI Request parameters use format: ...key1=value1&key2=value2...

    For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

    For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

Returns:



2819
2820
2821
2822
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2819

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

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

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

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

Requires permission to access the CreatePolicyVersion action.

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:



2878
2879
2880
2881
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 2878

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

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

Creates a provisioning claim.

Requires permission to access the CreateProvisioningClaim action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template to use.

Returns:



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

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

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

Creates a provisioning template.

Requires permission to access the CreateProvisioningTemplate action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template.

  • :description (String)

    The description of the provisioning template.

  • :template_body (required, String)

    The JSON formatted contents of the provisioning template.

  • :enabled (Boolean)

    True to enable the provisioning template, otherwise false.

  • :provisioning_role_arn (required, String)

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

  • :pre_provisioning_hook (Types::ProvisioningHook)

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

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

    Metadata which can be used to manage the provisioning template.

    For URI Request parameters use format: ...key1=value1&key2=value2...

    For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

    For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

  • :type (String)

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

Returns:



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

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

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

Creates a new version of a provisioning template.

Requires permission to access the CreateProvisioningTemplateVersion action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template.

  • :template_body (required, String)

    The JSON formatted contents of the provisioning template.

  • :set_as_default (Boolean)

    Sets a fleet provision template version as the default version.

Returns:



3063
3064
3065
3066
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3063

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

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

Creates a role alias.

Requires permission to access the CreateRoleAlias action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :role_alias (required, String)

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

  • :role_arn (required, String)

    The role ARN.

  • :credential_duration_seconds (Integer)

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

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

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

    Metadata which can be used to manage the role alias.

    For URI Request parameters use format: ...key1=value1&key2=value2...

    For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

    For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

Returns:



3130
3131
3132
3133
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3130

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

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

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

Requires permission to access the CreateScheduledAudit action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.scheduled_audit_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :frequency (required, String)

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

  • :day_of_month (String)

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

  • :day_of_week (String)

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

  • :target_check_names (required, Array<String>)

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

  • :scheduled_audit_name (required, String)

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

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

    Metadata that can be used to manage the scheduled audit.

Returns:



3199
3200
3201
3202
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3199

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

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

Creates a Device Defender security profile.

Requires permission to access the CreateSecurityProfile action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The name you are giving to the security profile.

  • :security_profile_description (String)

    A description of the security profile.

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

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

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

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

  • :additional_metrics_to_retain (Array<String>)

    Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2 instead.

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

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

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

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

    Metadata that can be used to manage the security profile.

  • :metrics_export_config (Types::MetricsExportConfig)

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

Returns:



3326
3327
3328
3329
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3326

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

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

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

Requires permission to access the CreateStream action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :stream_id (required, String)

    The stream ID.

  • :description (String)

    A description of the stream.

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

    The files to stream.

  • :role_arn (required, String)

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

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

    Metadata which can be used to manage streams.

Returns:



3398
3399
3400
3401
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3398

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

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

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

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

Requires permission to access the CreateThing action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_name (required, String)

    The name of the thing to create.

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

  • :thing_type_name (String)

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

  • :attribute_payload (Types::AttributePayload)

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

    \{"attributes":\{"string1":"string2"\}\}

  • :billing_group_name (String)

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

Returns:



3467
3468
3469
3470
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3467

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.

If the ThingGroup that you create has the exact same attributes as an existing ThingGroup, you will get a 200 success response.

Requires permission to access the CreateThingGroup action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The thing group name to create.

  • :parent_group_name (String)

    The name of the parent thing group.

  • :thing_group_properties (Types::ThingGroupProperties)

    The thing group properties.

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

    Metadata which can be used to manage the thing group.

Returns:



3537
3538
3539
3540
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3537

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.

Requires permission to access the CreateThingType action.

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"],
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_type_name (required, String)

    The name of the thing type.

  • :thing_type_properties (Types::ThingTypeProperties)

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

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

    Metadata which can be used to manage the thing type.

Returns:



3591
3592
3593
3594
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 3591

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

#create_topic_rule(params = {}) ⇒ Struct

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

Requires permission to access the CreateTopicRule action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :rule_name (required, String)

    The name of the rule.

  • :topic_rule_payload (required, Types::TopicRulePayload)

    The rule payload.

  • :tags (String)

    Metadata which can be used to manage the topic rule.

    For URI Request parameters use format: ...key1=value1&key2=value2...

    For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..."

    For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

Returns:

  • (Struct)

    Returns an empty response.



4057
4058
4059
4060
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4057

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

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

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

Requires permission to access the CreateTopicRuleDestination action.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

Returns:



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

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

#delete_account_audit_configuration(params = {}) ⇒ Struct

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

Requires permission to access the DeleteAccountAuditConfiguration action.

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.



4141
4142
4143
4144
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4141

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

#delete_audit_suppression(params = {}) ⇒ Struct

Deletes a Device Defender audit suppression.

Requires permission to access the DeleteAuditSuppression action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (required, String)

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

  • :resource_identifier (required, Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

Returns:

  • (Struct)

    Returns an empty response.



4192
4193
4194
4195
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4192

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

#delete_authorizer(params = {}) ⇒ Struct

Deletes an authorizer.

Requires permission to access the DeleteAuthorizer action.

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.



4218
4219
4220
4221
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4218

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

#delete_billing_group(params = {}) ⇒ Struct

Deletes the billing group.

Requires permission to access the DeleteBillingGroup action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name of the billing group.

  • :expected_version (Integer)

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

Returns:

  • (Struct)

    Returns an empty response.



4251
4252
4253
4254
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4251

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

#delete_ca_certificate(params = {}) ⇒ Struct

Deletes a registered CA certificate.

Requires permission to access the DeleteCACertificate action.

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.



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

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

#delete_certificate(params = {}) ⇒ Struct

Deletes the specified certificate.

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

Requires permission to access the DeleteCertificate action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

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

  • :force_delete (Boolean)

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

Returns:

  • (Struct)

    Returns an empty response.



4316
4317
4318
4319
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4316

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

#delete_certificate_provider(params = {}) ⇒ Struct

Deletes a certificate provider.

Requires permission to access the DeleteCertificateProvider action.

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

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_provider_name (required, String)

    The name of the certificate provider.

Returns:

  • (Struct)

    Returns an empty response.



4347
4348
4349
4350
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4347

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

#delete_custom_metric(params = {}) ⇒ Struct

Deletes a Device Defender detect custom metric.

Requires permission to access the DeleteCustomMetric action.

Before you can delete a custom metric, you must first remove the custom metric from all security profiles it's a part of. The security profile associated with the custom metric can be found using the ListSecurityProfiles API with metricName set to your custom metric name.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the custom metric.

Returns:

  • (Struct)

    Returns an empty response.



4382
4383
4384
4385
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4382

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

#delete_dimension(params = {}) ⇒ Struct

Removes the specified dimension from your Amazon Web Services accounts.

Requires permission to access the DeleteDimension action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.



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

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

#delete_domain_configuration(params = {}) ⇒ Struct

Deletes the specified domain configuration.

Requires permission to access the DeleteDomainConfiguration action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :domain_configuration_name (required, String)

    The name of the domain configuration to be deleted.

Returns:

  • (Struct)

    Returns an empty response.



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

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

#delete_dynamic_thing_group(params = {}) ⇒ Struct

Deletes a dynamic thing group.

Requires permission to access the DeleteDynamicThingGroup action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :thing_group_name (required, String)

    The name of the dynamic thing group to delete.

  • :expected_version (Integer)

    The expected version of the dynamic thing group to delete.

Returns:

  • (Struct)

    Returns an empty response.



4466
4467
4468
4469
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4466

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

#delete_fleet_metric(params = {}) ⇒ Struct

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

Requires permission to access the DeleteFleetMetric action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the fleet metric to delete.

  • :expected_version (Integer)

    The expected version of the fleet metric to delete.

Returns:

  • (Struct)

    Returns an empty response.



4498
4499
4500
4501
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4498

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

#delete_job(params = {}) ⇒ Struct

Deletes a job and its related job executions.

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

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

Requires permission to access the DeleteJob action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The ID of the job to be deleted.

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

  • :force (Boolean) — default: Optional

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

    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.

  • :namespace_id (String)

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

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

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

    The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.

Returns:

  • (Struct)

    Returns an empty response.



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

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.

Requires permission to access the DeleteJobExecution action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

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

  • :thing_name (required, String)

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

  • :execution_number (required, Integer)

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

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

  • :force (Boolean) — default: Optional

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

    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.

  • :namespace_id (String)

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

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

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

    The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.

Returns:

  • (Struct)

    Returns an empty response.



4646
4647
4648
4649
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4646

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

#delete_job_template(params = {}) ⇒ Struct

Deletes the specified job template.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :job_template_id (required, String)

    The unique identifier of the job template to delete.

Returns:

  • (Struct)

    Returns an empty response.



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

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

#delete_mitigation_action(params = {}) ⇒ Struct

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

Requires permission to access the DeleteMitigationAction action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :action_name (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.



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

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

#delete_ota_update(params = {}) ⇒ Struct

Delete an OTA update.

Requires permission to access the DeleteOTAUpdate action.

Examples:

Request syntax with placeholder values


resp = client.delete_ota_update({
  ota_update_id: "OTAUpdateId", # required
  delete_stream: false,
  force_delete_aws_job: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :ota_update_id (required, String)

    The ID of the OTA update to delete.

  • :delete_stream (Boolean)

    When true, the stream created by the OTAUpdate process is deleted when the OTA update is deleted. Ignored if the stream specified in the OTAUpdate is supplied by the user.

  • :force_delete_aws_job (Boolean)

    When true, deletes the IoT job created by the OTAUpdate process even if it is "IN_PROGRESS". Otherwise, if the job is not in a terminal state ("COMPLETED" or "CANCELED") an exception will occur. The default is false.

Returns:

  • (Struct)

    Returns an empty response.



4732
4733
4734
4735
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4732

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

#delete_package(params = {}) ⇒ Struct

Deletes a specific version from a software package.

Note: All package versions must be deleted before deleting the software package.

Requires permission to access the DeletePackageVersion action.

Examples:

Request syntax with placeholder values


resp = client.delete_package({
  package_name: "PackageName", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the target software package.

  • :client_token (String)

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

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

Returns:

  • (Struct)

    Returns an empty response.



4770
4771
4772
4773
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4770

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

#delete_package_version(params = {}) ⇒ Struct

Deletes a specific version from a software package.

Note: If a package version is designated as default, you must remove the designation from the software package using the UpdatePackage action.

Examples:

Request syntax with placeholder values


resp = client.delete_package_version({
  package_name: "PackageName", # required
  version_name: "VersionName", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :package_name (required, String)

    The name of the associated software package.

  • :version_name (required, String)

    The name of the target package version.

  • :client_token (String)

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

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

Returns:

  • (Struct)

    Returns an empty response.



4807
4808
4809
4810
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4807

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

#delete_policy(params = {}) ⇒ Struct

Deletes the specified policy.

A policy cannot be deleted if it has non-default versions or it is attached to any certificate.

To delete a policy, use the DeletePolicyVersion action to delete all non-default versions of the policy; use the DetachPolicy action to detach the policy from any certificate; and then use the DeletePolicy action to delete the policy.

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

Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before it's ready to be deleted.

Requires permission to access the DeletePolicy action.

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.



4850
4851
4852
4853
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4850

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

#delete_policy_version(params = {}) ⇒ Struct

Deletes the specified version of the specified policy. You cannot delete the default version of a policy using this action. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.

Requires permission to access the DeletePolicyVersion action.

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.



4884
4885
4886
4887
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4884

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

#delete_provisioning_template(params = {}) ⇒ Struct

Deletes a provisioning template.

Requires permission to access the DeleteProvisioningTemplate action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the fleet provision template to delete.

Returns:

  • (Struct)

    Returns an empty response.



4911
4912
4913
4914
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4911

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

#delete_provisioning_template_version(params = {}) ⇒ Struct

Deletes a provisioning template version.

Requires permission to access the DeleteProvisioningTemplateVersion action.

Examples:

Request syntax with placeholder values


resp = client.delete_provisioning_template_version({
  template_name: "TemplateName", # required
  version_id: 1, # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :template_name (required, String)

    The name of the provisioning template version to delete.

  • :version_id (required, Integer)

    The provisioning template version ID to delete.

Returns:

  • (Struct)

    Returns an empty response.



4942
4943
4944
4945
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4942

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

#delete_registration_code(params = {}) ⇒ Struct

Deletes a CA certificate registration code.

Requires permission to access the DeleteRegistrationCode action.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.



4959
4960
4961
4962
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4959

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

Requires permission to access the DeleteRoleAlias action.

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.



4985
4986
4987
4988
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 4985

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.

Requires permission to access the DeleteScheduledAudit action.

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.



5011
5012
5013
5014
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5011

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

#delete_security_profile(params = {}) ⇒ Struct

Deletes a Device Defender security profile.

Requires permission to access the DeleteSecurityProfile action.

Examples:

Request syntax with placeholder values


resp = client.delete_security_profile({
  security_profile_name: "SecurityProfileName", # required
  expected_version: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :security_profile_name (required, String)

    The name of the security profile to be deleted.

  • :expected_version (Integer)

    The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a VersionConflictException is thrown.

Returns:

  • (Struct)

    Returns an empty response.



5044
5045
5046
5047
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5044

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.

Requires permission to access the DeleteStream action.

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.



5070
5071
5072
5073
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5070

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

#delete_thing(params = {}) ⇒ Struct

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

Requires permission to access the DeleteThing action.

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.



5104
5105
5106
5107
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5104

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.

Requires permission to access the DeleteThingGroup action.

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.



5134
5135
5136
5137
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5134

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

#delete_thing_type(params = {}) ⇒ Struct

Deletes the specified thing type. You cannot delete a thing type if it has things associated with it. To delete a thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things by calling UpdateThing to change the thing type on any associated thing, and finally use DeleteThingType to delete the thing type.

Requires permission to access the DeleteThingType action.

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.



5165
5166
5167
5168
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5165

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.

Requires permission to access the DeleteTopicRule action.

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.



5191
5192
5193
5194
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5191

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

#delete_topic_rule_destination(params = {}) ⇒ Struct

Deletes a topic rule destination.

Requires permission to access the DeleteTopicRuleDestination action.

Examples:

Request syntax with placeholder values


resp = client.delete_topic_rule_destination({
  arn: "AwsArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The ARN of the topic rule destination to delete.

Returns:

  • (Struct)

    Returns an empty response.



5218
5219
5220
5221
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5218

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

#delete_v2_logging_level(params = {}) ⇒ Struct

Deletes a logging level.

Requires permission to access the DeleteV2LoggingLevel action.

Examples:

Request syntax with placeholder values


resp = client.delete_v2_logging_level({
  target_type: "DEFAULT", # required, accepts DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP, PRINCIPAL_ID
  target_name: "LogTargetName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :target_type (required, String)

    The type of resource for which you are configuring logging. Must be THING_Group.

  • :target_name (required, String)

    The name of the resource for which you are configuring logging.

Returns:

  • (Struct)

    Returns an empty response.



5249
5250
5251
5252
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5249

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

#deprecate_thing_type(params = {}) ⇒ Struct

Deprecates a thing type. You can not associate new things with deprecated thing type.

Requires permission to access the DeprecateThingType action.

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.



5282
5283
5284
5285
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5282

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

#describe_account_audit_configuration(params = {}) ⇒ Types::DescribeAccountAuditConfigurationResponse

Gets information about the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.

Requires permission to access the DescribeAccountAuditConfiguration action.

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:



5316
5317
5318
5319
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5316

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

#describe_audit_finding(params = {}) ⇒ Types::DescribeAuditFindingResponse

Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of the issue, and the start time when the audit that returned the finding.

Requires permission to access the DescribeAuditFinding action.

Examples:

Request syntax with placeholder values


resp = client.describe_audit_finding({
  finding_id: "FindingId", # required
})

Response structure


resp.finding.finding_id #=> String
resp.finding.task_id #=> String
resp.finding.check_name #=> String
resp.finding.task_start_time #=> Time
resp.finding.finding_time #=> Time
resp.finding.severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW"
resp.finding.non_compliant_resource.resource_type #=> String, one of "DEVICE_CERTIFICATE", "CA_CERTIFICATE", "IOT_POLICY", "COGNITO_IDENTITY_POOL", "CLIENT_ID", "ACCOUNT_SETTINGS", "ROLE_ALIAS", "IAM_ROLE", "ISSUER_CERTIFICATE"
resp.finding.non_compliant_resource.resource_identifier.device_certificate_id #=> String
resp.finding.non_compliant_resource.resource_identifier.ca_certificate_id #=> String
resp.finding.non_compliant_resource.resource_identifier.cognito_identity_pool_id #=> String
resp.finding.non_compliant_resource.resource_identifier.client_id #=> String
resp.finding.non_compliant_resource.resource_identifier.policy_version_identifier.policy_name #=> String
resp.finding.non_compliant_resource.resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.finding.non_compliant_resource.resource_identifier. #=> String
resp.finding.non_compliant_resource.resource_identifier.iam_role_arn #=> String
resp.finding.non_compliant_resource.resource_identifier.role_alias_arn #=> String
resp.finding.non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.finding.non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.finding.non_compliant_resource.resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.finding.non_compliant_resource.resource_identifier.device_certificate_arn #=> String
resp.finding.non_compliant_resource.additional_info #=> Hash
resp.finding.non_compliant_resource.additional_info["String"] #=> String
resp.finding.related_resources #=> Array
resp.finding.related_resources[0].resource_type #=> String, one of "DEVICE_CERTIFICATE", "CA_CERTIFICATE", "IOT_POLICY", "COGNITO_IDENTITY_POOL", "CLIENT_ID", "ACCOUNT_SETTINGS", "ROLE_ALIAS", "IAM_ROLE", "ISSUER_CERTIFICATE"
resp.finding.related_resources[0].resource_identifier.device_certificate_id #=> String
resp.finding.related_resources[0].resource_identifier.ca_certificate_id #=> String
resp.finding.related_resources[0].resource_identifier.cognito_identity_pool_id #=> String
resp.finding.related_resources[0].resource_identifier.client_id #=> String
resp.finding.related_resources[0].resource_identifier.policy_version_identifier.policy_name #=> String
resp.finding.related_resources[0].resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.finding.related_resources[0].resource_identifier. #=> String
resp.finding.related_resources[0].resource_identifier.iam_role_arn #=> String
resp.finding.related_resources[0].resource_identifier.role_alias_arn #=> String
resp.finding.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.finding.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.finding.related_resources[0].resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.finding.related_resources[0].resource_identifier.device_certificate_arn #=> String
resp.finding.related_resources[0].additional_info #=> Hash
resp.finding.related_resources[0].additional_info["String"] #=> String
resp.finding.reason_for_non_compliance #=> String
resp.finding.reason_for_non_compliance_code #=> String
resp.finding.is_suppressed #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :finding_id (required, String)

    A unique identifier for a single audit finding. You can use this identifier to apply mitigation actions to the finding.

Returns:



5392
5393
5394
5395
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5392

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

#describe_audit_mitigation_actions_task(params = {}) ⇒ Types::DescribeAuditMitigationActionsTaskResponse

Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit findings. Properties include the actions being applied, the audit checks to which they're being applied, the task status, and aggregated task statistics.

Examples:

Request syntax with placeholder values


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

Response structure


resp.task_status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELED"
resp.start_time #=> Time
resp.end_time #=> Time
resp.task_statistics #=> Hash
resp.task_statistics["AuditCheckName"].total_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].failed_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].succeeded_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].skipped_findings_count #=> Integer
resp.task_statistics["AuditCheckName"].canceled_findings_count #=> Integer
resp.target.audit_task_id #=> String
resp.target.finding_ids #=> Array
resp.target.finding_ids[0] #=> String
resp.target.audit_check_to_reason_code_filter #=> Hash
resp.target.audit_check_to_reason_code_filter["AuditCheckName"] #=> Array
resp.target.audit_check_to_reason_code_filter["AuditCheckName"][0] #=> String
resp.audit_check_to_actions_mapping #=> Hash
resp.audit_check_to_actions_mapping["AuditCheckName"] #=> Array
resp.audit_check_to_actions_mapping["AuditCheckName"][0] #=> String
resp.actions_definition #=> Array
resp.actions_definition[0].name #=> String
resp.actions_definition[0].id #=> String
resp.actions_definition[0].role_arn #=> String
resp.actions_definition[0].action_params.update_device_certificate_params.action #=> String, one of "DEACTIVATE"
resp.actions_definition[0].action_params.update_ca_certificate_params.action #=> String, one of "DEACTIVATE"
resp.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names #=> Array
resp.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names[0] #=> String
resp.actions_definition[0].action_params.add_things_to_thing_group_params.override_dynamic_groups #=> Boolean
resp.actions_definition[0].action_params.replace_default_policy_version_params.template_name #=> String, one of "BLANK_POLICY"
resp.actions_definition[0].action_params.enable_io_t_logging_params.role_arn_for_logging #=> String
resp.actions_definition[0].action_params.enable_io_t_logging_params.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.actions_definition[0].action_params.publish_finding_to_sns_params.topic_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier for the audit mitigation task.

Returns:



5457
5458
5459
5460
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5457

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

#describe_audit_suppression(params = {}) ⇒ Types::DescribeAuditSuppressionResponse

Gets information about a Device Defender audit suppression.

Examples:

Request syntax with placeholder values


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

Response structure


resp.check_name #=> String
resp.resource_identifier.device_certificate_id #=> String
resp.resource_identifier.ca_certificate_id #=> String
resp.resource_identifier.cognito_identity_pool_id #=> String
resp.resource_identifier.client_id #=> String
resp.resource_identifier.policy_version_identifier.policy_name #=> String
resp.resource_identifier.policy_version_identifier.policy_version_id #=> String
resp.resource_identifier. #=> String
resp.resource_identifier.iam_role_arn #=> String
resp.resource_identifier.role_alias_arn #=> String
resp.resource_identifier.issuer_certificate_identifier.issuer_certificate_subject #=> String
resp.resource_identifier.issuer_certificate_identifier.issuer_id #=> String
resp.resource_identifier.issuer_certificate_identifier.issuer_certificate_serial_number #=> String
resp.resource_identifier.device_certificate_arn #=> String
resp.expiration_date #=> Time
resp.suppress_indefinitely #=> Boolean
resp.description #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :check_name (required, String)

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

  • :resource_identifier (required, Types::ResourceIdentifier)

    Information that identifies the noncompliant resource.

Returns:



5528
5529
5530
5531
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5528

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

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

Gets information about a Device Defender audit.

Requires permission to access the DescribeAuditTask action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.task_status #=> String, one of "IN_PROGRESS", "COMPLETED", "FAILED", "CANCELED"
resp.task_type #=> String, one of "ON_DEMAND_AUDIT_TASK", "SCHEDULED_AUDIT_TASK"
resp.task_start_time #=> Time
resp.task_statistics.total_checks #=> Integer
resp.task_statistics.in_progress_checks #=> Integer
resp.task_statistics.waiting_for_data_collection_checks #=> Integer
resp.task_statistics.compliant_checks #=> Integer
resp.task_statistics.non_compliant_checks #=> Integer
resp.task_statistics.failed_checks #=> Integer
resp.task_statistics.canceled_checks #=> Integer
resp.scheduled_audit_name #=> String
resp.audit_details #=> Hash
resp.audit_details["AuditCheckName"].check_run_status #=> String, one of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", "FAILED"
resp.audit_details["AuditCheckName"].check_compliant #=> Boolean
resp.audit_details["AuditCheckName"].total_resources_count #=> Integer
resp.audit_details["AuditCheckName"].non_compliant_resources_count #=> Integer
resp.audit_details["AuditCheckName"].suppressed_non_compliant_resources_count #=> Integer
resp.audit_details["AuditCheckName"].error_code #=> String
resp.audit_details["AuditCheckName"].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The ID of the audit whose information you want to get.

Returns:



5583
5584
5585
5586
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5583

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.

Requires permission to access the DescribeAuthorizer action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.authorizer_description.authorizer_name #=> String
resp.authorizer_description.authorizer_arn #=> String
resp.authorizer_description.authorizer_function_arn #=> String
resp.authorizer_description.token_key_name #=> String
resp.authorizer_description.token_signing_public_keys #=> Hash
resp.authorizer_description.token_signing_public_keys["KeyName"] #=> String
resp.authorizer_description.status #=> String, one of "ACTIVE", "INACTIVE"
resp.authorizer_description.creation_date #=> Time
resp.authorizer_description.last_modified_date #=> Time
resp.authorizer_description.signing_disabled #=> Boolean
resp.authorizer_description.enable_caching_for_http #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :authorizer_name (required, String)

    The name of the authorizer to describe.

Returns:



5625
5626
5627
5628
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5625

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

#describe_billing_group(params = {}) ⇒ Types::DescribeBillingGroupResponse

Returns information about a billing group.

Requires permission to access the DescribeBillingGroup action.

Examples:

Request syntax with placeholder values


resp = client.describe_billing_group({
  billing_group_name: "BillingGroupName", # required
})

Response structure


resp.billing_group_name #=> String
resp.billing_group_id #=> String
resp.billing_group_arn #=> String
resp.version #=> Integer
resp.billing_group_properties.billing_group_description #=> String
resp..creation_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :billing_group_name (required, String)

    The name of the billing group.

Returns:



5667
5668
5669
5670
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5667

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

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

Describes a registered CA certificate.

Requires permission to access the DescribeCACertificate action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.certificate_description.certificate_arn #=> String
resp.certificate_description.certificate_id #=> String
resp.certificate_description.status #=> String, one of "ACTIVE", "INACTIVE"
resp.certificate_description.certificate_pem #=> String
resp.certificate_description.owned_by #=> String
resp.certificate_description.creation_date #=> Time
resp.certificate_description.auto_registration_status #=> String, one of "ENABLE", "DISABLE"
resp.certificate_description.last_modified_date #=> Time
resp.certificate_description.customer_version #=> Integer
resp.certificate_description.generation_id #=> String
resp.certificate_description.validity.not_before #=> Time
resp.certificate_description.validity.not_after #=> Time
resp.certificate_description.certificate_mode #=> String, one of "DEFAULT", "SNI_ONLY"
resp.registration_config.template_body #=> String
resp.registration_config.role_arn #=> String
resp.registration_config.template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The CA certificate identifier.

Returns:



5715
5716
5717
5718
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5715

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

#describe_certificate(params = {}) ⇒ Types::DescribeCertificateResponse

Gets information about the specified certificate.

Requires permission to access the DescribeCertificate action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.certificate_description.certificate_arn #=> String
resp.certificate_description.certificate_id #=> String
resp.certificate_description.ca_certificate_id #=> String
resp.certificate_description.status #=> String, one of "ACTIVE", "INACTIVE", "REVOKED", "PENDING_TRANSFER", "REGISTER_INACTIVE", "PENDING_ACTIVATION"
resp.certificate_description.certificate_pem #=> String
resp.certificate_description.owned_by #=> String
resp.certificate_description.previous_owned_by #=> String
resp.certificate_description.creation_date #=> Time
resp.certificate_description.last_modified_date #=> Time
resp.certificate_description.customer_version #=> Integer
resp.certificate_description.transfer_data.transfer_message #=> String
resp.certificate_description.transfer_data.reject_reason #=> String
resp.certificate_description.transfer_data.transfer_date #=> Time
resp.certificate_description.transfer_data.accept_date #=> Time
resp.certificate_description.transfer_data.reject_date #=> Time
resp.certificate_description.generation_id #=> String
resp.certificate_description.validity.not_before #=> Time
resp.certificate_description.validity.not_after #=> Time
resp.certificate_description.certificate_mode #=> String, one of "DEFAULT", "SNI_ONLY"

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

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

Returns:



5766
5767
5768
5769
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5766

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

#describe_certificate_provider(params = {}) ⇒ Types::DescribeCertificateProviderResponse

Describes a certificate provider.

Requires permission to access the DescribeCertificateProvider action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.certificate_provider_name #=> String
resp.certificate_provider_arn #=> String
resp.lambda_function_arn #=> String
resp. #=> Array
resp.[0] #=> String, one of "CreateCertificateFromCsr"
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_provider_name (required, String)

    The name of the certificate provider.

Returns:



5810
5811
5812
5813
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5810

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

#describe_custom_metric(params = {}) ⇒ Types::DescribeCustomMetricResponse

Gets information about a Device Defender detect custom metric.

Requires permission to access the DescribeCustomMetric action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.metric_name #=> String
resp.metric_arn #=> String
resp.metric_type #=> String, one of "string-list", "ip-address-list", "number-list", "number"
resp.display_name #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the custom metric.

Returns:



5852
5853
5854
5855
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5852

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

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

Describes the default authorizer.

Requires permission to access the DescribeDefaultAuthorizer action.

Examples:

Response structure


resp.authorizer_description.authorizer_name #=> String
resp.authorizer_description.authorizer_arn #=> String
resp.authorizer_description.authorizer_function_arn #=> String
resp.authorizer_description.token_key_name #=> String
resp.authorizer_description.token_signing_public_keys #=> Hash
resp.authorizer_description.token_signing_public_keys["KeyName"] #=> String
resp.authorizer_description.status #=> String, one of "ACTIVE", "INACTIVE"
resp.authorizer_description.creation_date #=> Time
resp.authorizer_description.last_modified_date #=> Time
resp.authorizer_description.signing_disabled #=> Boolean
resp.authorizer_description.enable_caching_for_http #=> Boolean

Parameters:

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

    ({})

Returns:



5886
5887
5888
5889
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5886

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

#describe_detect_mitigation_actions_task(params = {}) ⇒ Types::DescribeDetectMitigationActionsTaskResponse

Gets information about a Device Defender ML Detect mitigation action.

Requires permission to access the DescribeDetectMitigationActionsTask action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.task_summary.task_id #=> String
resp.task_summary.task_status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED", "CANCELED"
resp.task_summary.task_start_time #=> Time
resp.task_summary.task_end_time #=> Time
resp.task_summary.target.violation_ids #=> Array
resp.task_summary.target.violation_ids[0] #=> String
resp.task_summary.target.security_profile_name #=> String
resp.task_summary.target.behavior_name #=> String
resp.task_summary.violation_event_occurrence_range.start_time #=> Time
resp.task_summary.violation_event_occurrence_range.end_time #=> Time
resp.task_summary.only_active_violations_included #=> Boolean
resp.task_summary.suppressed_alerts_included #=> Boolean
resp.task_summary.actions_definition #=> Array
resp.task_summary.actions_definition[0].name #=> String
resp.task_summary.actions_definition[0].id #=> String
resp.task_summary.actions_definition[0].role_arn #=> String
resp.task_summary.actions_definition[0].action_params.update_device_certificate_params.action #=> String, one of "DEACTIVATE"
resp.task_summary.actions_definition[0].action_params.update_ca_certificate_params.action #=> String, one of "DEACTIVATE"
resp.task_summary.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names #=> Array
resp.task_summary.actions_definition[0].action_params.add_things_to_thing_group_params.thing_group_names[0] #=> String
resp.task_summary.actions_definition[0].action_params.add_things_to_thing_group_params.override_dynamic_groups #=> Boolean
resp.task_summary.actions_definition[0].action_params.replace_default_policy_version_params.template_name #=> String, one of "BLANK_POLICY"
resp.task_summary.actions_definition[0].action_params.enable_io_t_logging_params.role_arn_for_logging #=> String
resp.task_summary.actions_definition[0].action_params.enable_io_t_logging_params.log_level #=> String, one of "DEBUG", "INFO", "ERROR", "WARN", "DISABLED"
resp.task_summary.actions_definition[0].action_params.publish_finding_to_sns_params.topic_arn #=> String
resp.task_summary.task_statistics.actions_executed #=> Integer
resp.task_summary.task_statistics.actions_skipped #=> Integer
resp.task_summary.task_statistics.actions_failed #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :task_id (required, String)

    The unique identifier of the task.

Returns:



5946
5947
5948
5949
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5946

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

#describe_dimension(params = {}) ⇒ Types::DescribeDimensionResponse

Provides details about a dimension that is defined in your Amazon Web Services accounts.

Requires permission to access the DescribeDimension action.

Examples:

Request syntax with placeholder values


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

Response structure


resp.name #=> String
resp.arn #=> String
resp.type #=> String, one of "TOPIC_FILTER"
resp.string_values #=> Array
resp.string_values[0] #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The unique identifier for the dimension.

Returns:



5990
5991
5992
5993
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 5990

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

#describe_domain_configuration(params = {}) ⇒ Types::DescribeDomainConfigurationResponse

Gets summary information about a domain configuration.

Requires permission to access the DescribeDomainConfiguration action.

Examples:

Request syntax with placeholder values


resp = client.describe_domain_configuration({
  domain_configuration_name: "ReservedDomainConfigurationName", # required
})

Response structure


resp.domain_configuration_name #=> String
resp.domain_configuration_arn #=> String
resp.domain_name #=> String
resp.server_certificates #=> Array
resp.server_certificates[0].server_certificate_arn #=> String
resp.server_certificates[0].server_certificate_status #=> String, one of "INVALID", "VALID"
resp.server_certificates[0].server_certificate_status_detail #=> String
resp.authorizer_config.default_authorizer_name #=> String
resp.authorizer_config.allow_authorizer_override #=> Boolean
resp.domain_configuration_status #=> String, one of "ENABLED", "DISABLED"
resp.service_type #=> String, one of "DATA", "CREDENTIAL_PROVIDER", "JOBS"
resp.domain_type #=> String, one of "ENDPOINT", "AWS_MANAGED", "CUSTOMER_MANAGED"
resp.last_status_change_date #=> Time
resp.tls_config.security_policy #=> String
resp.server_certificate_config.enable_ocsp_check #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :domain_configuration_name (required, String)

    The name of the domain configuration.

Returns:



6047
6048
6049
6050
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 6047

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

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

Returns or creates a unique endpoint specific to the Amazon Web Services account making the call.

The first time DescribeEndpoint is called, an endpoint is created. All subsequent calls to DescribeEndpoint return the same endpoint.

Requires permission to access the DescribeEndpoint action.

Examples:

Request syntax with placeholder values


resp = client.describe_endpoint({
  endpoint_type: "EndpointType",
})

Response structure


resp.endpoint_address #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :endpoint_type (String)

    The endpoint type. Valid endpoint types include:

    • iot:Data - Returns a VeriSign signed data endpoint.

    ^ ^

    • iot:Data-ATS - Returns an ATS signed data endpoint.

    ^ ^

    • iot:CredentialProvider - Returns an IoT credentials provider API endpoint.

    ^ ^

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

    ^

    We strongly recommend that customers use the newer iot:Data-ATS endpoint type to avoid issues related to the widespread distrust of Symantec certificate authorities. ATS Signed Certificates are more secure and are trusted by most popular browsers.

Returns:



6110
6111
6112
6113
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 6110

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.

Requires permission to access the DescribeEventConfigurations action.

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:



6139
6140
6141
6142
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 6139

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

#describe_fleet_metric(params = {}) ⇒ Types::DescribeFleetMetricResponse

Gets information about the specified fleet metric.

Requires permission to access the DescribeFleetMetric action.

Examples:

Request syntax with placeholder values


resp = client.describe_fleet_metric({
  metric_name: "FleetMetricName", # required
})

Response structure


resp.metric_name #=> String
resp.query_string #=> String
resp.aggregation_type.name #=> String, one of "Statistics", "Percentiles", "Cardinality"
resp.aggregation_type.values #=> Array
resp.aggregation_type.values[0] #=> String
resp.period #=> Integer
resp.aggregation_field #=> String
resp.description #=> String
resp.query_version #=> String
resp.index_name #=> String
resp.creation_date #=> Time
resp.last_modified_date #=> Time
resp.unit #=> String, one of "Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None"
resp.version #=> Integer
resp.metric_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :metric_name (required, String)

    The name of the fleet metric to describe.

Returns:



6197
6198
6199
6200
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/client.rb', line 6197

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

#describe_index(params = {}) ⇒