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

Class: Aws::Greengrass::Client

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

Overview

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

greengrass = Aws::Greengrass::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

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

Region

You can configure a default region in the following locations:

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

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

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

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

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

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

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

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

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

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

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

  • :convert_params (Boolean) — default: true

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

  • :credentials (required, Credentials)

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

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

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

  • :http_continue_timeout (Float) — default: 1

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

  • :http_idle_timeout (Integer) — default: 5

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

  • :http_open_timeout (Integer) — default: 15

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

  • :http_proxy (String)

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

  • :http_read_timeout (Integer) — default: 60

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

  • :http_wire_trace (Boolean) — default: false

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

  • :log_level (Symbol) — default: :info

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

  • :log_formatter (Logging::LogFormatter)

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

  • :logger (Logger) — default: nil

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

  • :profile (String)

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

  • :raise_response_errors (Boolean) — default: true

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

  • :region (required, String)

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

  • :retry_limit (Integer) — default: 3

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

  • :secret_access_key (String)

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

  • :session_token (String)

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

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

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

  • :ssl_verify_peer (Boolean) — default: true

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

  • :stub_responses (Boolean) — default: false

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

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

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

Instance Method Details

#associate_role_to_group(options = {}) ⇒ Types::AssociateRoleToGroupResponse

Associates a role with a group. The role will be used by the AWS Greengrass core in order to access AWS cloud services. The role's permissions will allow Greengrass core Lambda functions to perform actions against the cloud.

Examples:

Request syntax with placeholder values


resp = client.associate_role_to_group({
  group_id: "__string", # required
  role_arn: "__string",
})

Response structure


resp.associated_at #=> String

Options Hash (options):

  • :group_id (required, String)
  • :role_arn (String)

    Role arn you wish to associate with this group.

Returns:

See Also:

#associate_service_role_to_account(options = {}) ⇒ Types::AssociateServiceRoleToAccountResponse

Associates a role which is used by AWS Greengrass. AWS Greengrass uses the role to access your Lambda functions and AWS IoT resources. This is necessary for deployments to succeed. It needs to have minimum permissions in policy AWSGreengrassResourceAccessRolePolicy

Examples:

Request syntax with placeholder values


resp = client.({
  role_arn: "__string",
})

Response structure


resp.associated_at #=> String

Options Hash (options):

  • :role_arn (String)

    Role arn you wish to associate with this account.

Returns:

See Also:

#create_core_definition(options = {}) ⇒ Types::CreateCoreDefinitionResponse

Creates a core definition. You may optionally provide the initial version of the core definition or use ''CreateCoreDefinitionVersion'' at a later time. AWS Greengrass Groups must each contain exactly 1 AWS Greengrass Core.

Examples:

Request syntax with placeholder values


resp = client.create_core_definition({
  amzn_client_token: "__string",
  initial_version: {
    cores: [
      {
        certificate_arn: "__string",
        id: "__string",
        sync_shadow: false,
        thing_arn: "__string",
      },
    ],
  },
  name: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

Returns:

See Also:

#create_core_definition_version(options = {}) ⇒ Types::CreateCoreDefinitionVersionResponse

Creates a version of a core definition that has already been defined. AWS Greengrass Groups must each contain exactly 1 AWS Greengrass Core.

Examples:

Request syntax with placeholder values


resp = client.create_core_definition_version({
  amzn_client_token: "__string",
  core_definition_id: "__string", # required
  cores: [
    {
      certificate_arn: "__string",
      id: "__string",
      sync_shadow: false,
      thing_arn: "__string",
    },
  ],
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :core_definition_id (required, String)
  • :cores (Array<Types::Core>)

Returns:

See Also:

#create_deployment(options = {}) ⇒ Types::CreateDeploymentResponse

Creates a deployment.

Examples:

Request syntax with placeholder values


resp = client.create_deployment({
  amzn_client_token: "__string",
  deployment_id: "__string",
  deployment_type: "NewDeployment", # accepts NewDeployment, Redeployment, ResetDeployment, ForceResetDeployment
  group_id: "__string", # required
  group_version_id: "__string",
})

Response structure


resp.deployment_arn #=> String
resp.deployment_id #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :deployment_id (String)

    Id of the deployment if you wish to redeploy a previous deployment.

  • :deployment_type (String)

    Type of deployment. When used in CreateDeployment, only NewDeployment and Redeployment are valid.

  • :group_id (required, String)
  • :group_version_id (String)

    Group Version you wish to deploy.

Returns:

See Also:

#create_device_definition(options = {}) ⇒ Types::CreateDeviceDefinitionResponse

Creates a device definition. You may optinally provide the initial version of the device definition or use CreateDeviceDefinitionVersion at a later time.

Examples:

Request syntax with placeholder values


resp = client.create_device_definition({
  amzn_client_token: "__string",
  initial_version: {
    devices: [
      {
        certificate_arn: "__string",
        id: "__string",
        sync_shadow: false,
        thing_arn: "__string",
      },
    ],
  },
  name: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

Returns:

See Also:

#create_device_definition_version(options = {}) ⇒ Types::CreateDeviceDefinitionVersionResponse

Creates a version of a device definition that has already been defined.

Examples:

Request syntax with placeholder values


resp = client.create_device_definition_version({
  amzn_client_token: "__string",
  device_definition_id: "__string", # required
  devices: [
    {
      certificate_arn: "__string",
      id: "__string",
      sync_shadow: false,
      thing_arn: "__string",
    },
  ],
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :device_definition_id (required, String)
  • :devices (Array<Types::Device>)

Returns:

See Also:

#create_function_definition(options = {}) ⇒ Types::CreateFunctionDefinitionResponse

Creates a Lambda function definition which contains a list of Lambda functions and their configurations to be used in a group. You can create an initial version of the definition by providing a list of Lambda functions and their configurations now, or use CreateFunctionDefinitionVersion later.

Examples:

Request syntax with placeholder values


resp = client.create_function_definition({
  amzn_client_token: "__string",
  initial_version: {
    functions: [
      {
        function_arn: "__string",
        function_configuration: {
          environment: {
            access_sysfs: false,
            resource_access_policies: [
              {
                permission: "ro", # accepts ro, rw
                resource_id: "__string",
              },
            ],
            variables: {
              "__string" => "__string",
            },
          },
          exec_args: "__string",
          executable: "__string",
          memory_size: 1,
          pinned: false,
          timeout: 1,
        },
        id: "__string",
      },
    ],
  },
  name: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

Returns:

See Also:

#create_function_definition_version(options = {}) ⇒ Types::CreateFunctionDefinitionVersionResponse

Create a version of a Lambda function definition that has already been defined.

Examples:

Request syntax with placeholder values


resp = client.create_function_definition_version({
  amzn_client_token: "__string",
  function_definition_id: "__string", # required
  functions: [
    {
      function_arn: "__string",
      function_configuration: {
        environment: {
          access_sysfs: false,
          resource_access_policies: [
            {
              permission: "ro", # accepts ro, rw
              resource_id: "__string",
            },
          ],
          variables: {
            "__string" => "__string",
          },
        },
        exec_args: "__string",
        executable: "__string",
        memory_size: 1,
        pinned: false,
        timeout: 1,
      },
      id: "__string",
    },
  ],
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :function_definition_id (required, String)
  • :functions (Array<Types::Function>)

Returns:

See Also:

#create_group(options = {}) ⇒ Types::CreateGroupResponse

Creates a group. You may optionally provide the initial version of the group or use ''CreateGroupVersion'' at a later time.

Examples:

Request syntax with placeholder values


resp = client.create_group({
  amzn_client_token: "__string",
  initial_version: {
    core_definition_version_arn: "__string",
    device_definition_version_arn: "__string",
    function_definition_version_arn: "__string",
    logger_definition_version_arn: "__string",
    resource_definition_version_arn: "__string",
    subscription_definition_version_arn: "__string",
  },
  name: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :initial_version (Types::GroupVersion)

    Information on group version

  • :name (String)

Returns:

See Also:

#create_group_certificate_authority(options = {}) ⇒ Types::CreateGroupCertificateAuthorityResponse

Creates a CA for the group. If a CA already exists, it will rotate the existing CA.

Examples:

Request syntax with placeholder values


resp = client.create_group_certificate_authority({
  amzn_client_token: "__string",
  group_id: "__string", # required
})

Response structure


resp.group_certificate_authority_arn #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :group_id (required, String)

Returns:

See Also:

#create_group_version(options = {}) ⇒ Types::CreateGroupVersionResponse

Creates a version of a group which has already been defined.

Examples:

Request syntax with placeholder values


resp = client.create_group_version({
  amzn_client_token: "__string",
  core_definition_version_arn: "__string",
  device_definition_version_arn: "__string",
  function_definition_version_arn: "__string",
  group_id: "__string", # required
  logger_definition_version_arn: "__string",
  resource_definition_version_arn: "__string",
  subscription_definition_version_arn: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :core_definition_version_arn (String)
  • :device_definition_version_arn (String)
  • :function_definition_version_arn (String)
  • :group_id (required, String)
  • :logger_definition_version_arn (String)
  • :resource_definition_version_arn (String)
  • :subscription_definition_version_arn (String)

Returns:

See Also:

#create_logger_definition(options = {}) ⇒ Types::CreateLoggerDefinitionResponse

Creates a logger definition. You may optionally provide the initial version of the logger definition or use CreateLoggerDefinitionVersion at a later time.

Examples:

Request syntax with placeholder values


resp = client.create_logger_definition({
  amzn_client_token: "__string",
  initial_version: {
    loggers: [
      {
        component: "GreengrassSystem", # accepts GreengrassSystem, Lambda
        id: "__string",
        level: "DEBUG", # accepts DEBUG, INFO, WARN, ERROR, FATAL
        space: 1,
        type: "FileSystem", # accepts FileSystem, AWSCloudWatch
      },
    ],
  },
  name: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

Returns:

See Also:

#create_logger_definition_version(options = {}) ⇒ Types::CreateLoggerDefinitionVersionResponse

Creates a version of a logger definition that has already been defined.

Examples:

Request syntax with placeholder values


resp = client.create_logger_definition_version({
  amzn_client_token: "__string",
  logger_definition_id: "__string", # required
  loggers: [
    {
      component: "GreengrassSystem", # accepts GreengrassSystem, Lambda
      id: "__string",
      level: "DEBUG", # accepts DEBUG, INFO, WARN, ERROR, FATAL
      space: 1,
      type: "FileSystem", # accepts FileSystem, AWSCloudWatch
    },
  ],
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :logger_definition_id (required, String)
  • :loggers (Array<Types::Logger>)

Returns:

See Also:

#create_resource_definition(options = {}) ⇒ Types::CreateResourceDefinitionResponse

Creates a resource definition which contains a list of resources to be used in a group. You can create an initial version of the definition by providing a list of resources now, or use CreateResourceDefinitionVersion later.

Examples:

Request syntax with placeholder values


resp = client.create_resource_definition({
  amzn_client_token: "__string",
  initial_version: {
    resources: [
      {
        id: "__string",
        name: "__string",
        resource_data_container: {
          local_device_resource_data: {
            group_owner_setting: {
              auto_add_group_owner: false,
              group_owner: "__string",
            },
            source_path: "__string",
          },
          local_volume_resource_data: {
            destination_path: "__string",
            group_owner_setting: {
              auto_add_group_owner: false,
              group_owner: "__string",
            },
            source_path: "__string",
          },
        },
      },
    ],
  },
  name: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

Returns:

See Also:

#create_resource_definition_version(options = {}) ⇒ Types::CreateResourceDefinitionVersionResponse

Create a version of a resource definition that has already been defined.

Examples:

Request syntax with placeholder values


resp = client.create_resource_definition_version({
  amzn_client_token: "__string",
  resource_definition_id: "__string", # required
  resources: [
    {
      id: "__string",
      name: "__string",
      resource_data_container: {
        local_device_resource_data: {
          group_owner_setting: {
            auto_add_group_owner: false,
            group_owner: "__string",
          },
          source_path: "__string",
        },
        local_volume_resource_data: {
          destination_path: "__string",
          group_owner_setting: {
            auto_add_group_owner: false,
            group_owner: "__string",
          },
          source_path: "__string",
        },
      },
    },
  ],
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :resource_definition_id (required, String)
  • :resources (Array<Types::Resource>)

Returns:

See Also:

#create_software_update_job(options = {}) ⇒ Types::CreateSoftwareUpdateJobResponse

Creates an Iot Job that will trigger your Greengrass Cores to update the software they are running.

Examples:

Request syntax with placeholder values


resp = client.create_software_update_job({
  amzn_client_token: "__string",
  s3_url_signer_role: "S3UrlSignerRole",
  software_to_update: "core", # accepts core, ota_agent
  update_agent_log_level: "NONE", # accepts NONE, TRACE, DEBUG, VERBOSE, INFO, WARN, ERROR, FATAL
  update_targets: ["__string"],
  update_targets_architecture: "armv7l", # accepts armv7l, x86_64, aarch64
  update_targets_operating_system: "ubuntu", # accepts ubuntu, raspbian, amazon_linux
})

Response structure


resp.iot_job_arn #=> String
resp.iot_job_id #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :s3_url_signer_role (String)

    The IAM Role that Greengrass will use to create pre-signed URLs pointing towards the update artifact.

  • :software_to_update (String)

    The piece of software on the Greengrass Core that will be updated.

  • :update_agent_log_level (String)

    The minimum level of log statements that should be logged by the OTA Agent during an update.

  • :update_targets (Array<String>)

    The target arns that this update will be applied to.

  • :update_targets_architecture (String)

    The architecture of the Cores in the targets of an update

  • :update_targets_operating_system (String)

    The operating system of the Cores in the targets of an update

Returns:

See Also:

#create_subscription_definition(options = {}) ⇒ Types::CreateSubscriptionDefinitionResponse

Creates a subscription definition. You may optionally provide the initial version of the subscription definition or use CreateSubscriptionDefinitionVersion at a later time.

Examples:

Request syntax with placeholder values


resp = client.create_subscription_definition({
  amzn_client_token: "__string",
  initial_version: {
    subscriptions: [
      {
        id: "__string",
        source: "__string",
        subject: "__string",
        target: "__string",
      },
    ],
  },
  name: "__string",
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

Returns:

See Also:

#create_subscription_definition_version(options = {}) ⇒ Types::CreateSubscriptionDefinitionVersionResponse

Creates a version of a subscription definition which has already been defined.

Examples:

Request syntax with placeholder values


resp = client.create_subscription_definition_version({
  amzn_client_token: "__string",
  subscription_definition_id: "__string", # required
  subscriptions: [
    {
      id: "__string",
      source: "__string",
      subject: "__string",
      target: "__string",
    },
  ],
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :subscription_definition_id (required, String)
  • :subscriptions (Array<Types::Subscription>)

Returns:

See Also:

#delete_core_definition(options = {}) ⇒ Struct

Deletes a core definition. The core definition must not have been used in a deployment.

Examples:

Request syntax with placeholder values


resp = client.delete_core_definition({
  core_definition_id: "__string", # required
})

Options Hash (options):

  • :core_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_device_definition(options = {}) ⇒ Struct

Deletes a device definition. The device definition must not have been used in a deployment.

Examples:

Request syntax with placeholder values


resp = client.delete_device_definition({
  device_definition_id: "__string", # required
})

Options Hash (options):

  • :device_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_function_definition(options = {}) ⇒ Struct

Deletes a Lambda function definition. The Lambda function definition must not have been used in a deployment.

Examples:

Request syntax with placeholder values


resp = client.delete_function_definition({
  function_definition_id: "__string", # required
})

Options Hash (options):

  • :function_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_group(options = {}) ⇒ Struct

Deletes a group. The group must not have been used in deployment.

Examples:

Request syntax with placeholder values


resp = client.delete_group({
  group_id: "__string", # required
})

Options Hash (options):

  • :group_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_logger_definition(options = {}) ⇒ Struct

Deletes a logger definition. The logger definition must not have been used in a deployment.

Examples:

Request syntax with placeholder values


resp = client.delete_logger_definition({
  logger_definition_id: "__string", # required
})

Options Hash (options):

  • :logger_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_resource_definition(options = {}) ⇒ Struct

Deletes a resource definition.

Examples:

Request syntax with placeholder values


resp = client.delete_resource_definition({
  resource_definition_id: "__string", # required
})

Options Hash (options):

  • :resource_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_subscription_definition(options = {}) ⇒ Struct

Deletes a subscription definition. The subscription definition must not have been used in a deployment.

Examples:

Request syntax with placeholder values


resp = client.delete_subscription_definition({
  subscription_definition_id: "__string", # required
})

Options Hash (options):

  • :subscription_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_role_from_group(options = {}) ⇒ Types::DisassociateRoleFromGroupResponse

Disassociates the role from a group.

Examples:

Request syntax with placeholder values


resp = client.disassociate_role_from_group({
  group_id: "__string", # required
})

Response structure


resp.disassociated_at #=> String

Options Hash (options):

  • :group_id (required, String)

Returns:

See Also:

#disassociate_service_role_from_account(options = {}) ⇒ Types::DisassociateServiceRoleFromAccountResponse

Disassociates the service role from the account. Without a service role, deployments will not work.

Examples:

Request syntax with placeholder values


resp = client.()

Response structure


resp.disassociated_at #=> String

Returns:

See Also:

#get_associated_role(options = {}) ⇒ Types::GetAssociatedRoleResponse

Retrieves the role associated with a particular group.

Examples:

Request syntax with placeholder values


resp = client.get_associated_role({
  group_id: "__string", # required
})

Response structure


resp.associated_at #=> String
resp.role_arn #=> String

Options Hash (options):

  • :group_id (required, String)

Returns:

See Also:

#get_connectivity_info(options = {}) ⇒ Types::GetConnectivityInfoResponse

Retrieves the connectivity information for a core.

Examples:

Request syntax with placeholder values


resp = client.get_connectivity_info({
  thing_name: "__string", # required
})

Response structure


resp.connectivity_info #=> Array
resp.connectivity_info[0].host_address #=> String
resp.connectivity_info[0].id #=> String
resp.connectivity_info[0]. #=> String
resp.connectivity_info[0].port_number #=> Integer
resp.message #=> String

Options Hash (options):

  • :thing_name (required, String)

Returns:

See Also:

#get_core_definition(options = {}) ⇒ Types::GetCoreDefinitionResponse

Retrieves information about a core definition version.

Examples:

Request syntax with placeholder values


resp = client.get_core_definition({
  core_definition_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :core_definition_id (required, String)

Returns:

See Also:

#get_core_definition_version(options = {}) ⇒ Types::GetCoreDefinitionVersionResponse

Retrieves information about a core definition version.

Examples:

Request syntax with placeholder values


resp = client.get_core_definition_version({
  core_definition_id: "__string", # required
  core_definition_version_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.definition.cores #=> Array
resp.definition.cores[0].certificate_arn #=> String
resp.definition.cores[0].id #=> String
resp.definition.cores[0].sync_shadow #=> true/false
resp.definition.cores[0].thing_arn #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :core_definition_id (required, String)
  • :core_definition_version_id (required, String)

Returns:

See Also:

#get_deployment_status(options = {}) ⇒ Types::GetDeploymentStatusResponse

Returns the status of a deployment.

Examples:

Request syntax with placeholder values


resp = client.get_deployment_status({
  deployment_id: "__string", # required
  group_id: "__string", # required
})

Response structure


resp.deployment_status #=> String
resp.deployment_type #=> String, one of "NewDeployment", "Redeployment", "ResetDeployment", "ForceResetDeployment"
resp.error_details #=> Array
resp.error_details[0].detailed_error_code #=> String
resp.error_details[0].detailed_error_message #=> String
resp.error_message #=> String
resp.updated_at #=> String

Options Hash (options):

  • :deployment_id (required, String)
  • :group_id (required, String)

Returns:

See Also:

#get_device_definition(options = {}) ⇒ Types::GetDeviceDefinitionResponse

Retrieves information about a device definition.

Examples:

Request syntax with placeholder values


resp = client.get_device_definition({
  device_definition_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :device_definition_id (required, String)

Returns:

See Also:

#get_device_definition_version(options = {}) ⇒ Types::GetDeviceDefinitionVersionResponse

Retrieves information about a device definition version.

Examples:

Request syntax with placeholder values


resp = client.get_device_definition_version({
  device_definition_id: "__string", # required
  device_definition_version_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.definition.devices #=> Array
resp.definition.devices[0].certificate_arn #=> String
resp.definition.devices[0].id #=> String
resp.definition.devices[0].sync_shadow #=> true/false
resp.definition.devices[0].thing_arn #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :device_definition_id (required, String)
  • :device_definition_version_id (required, String)

Returns:

See Also:

#get_function_definition(options = {}) ⇒ Types::GetFunctionDefinitionResponse

Retrieves information about a Lambda function definition, such as its creation time and latest version.

Examples:

Request syntax with placeholder values


resp = client.get_function_definition({
  function_definition_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :function_definition_id (required, String)

Returns:

See Also:

#get_function_definition_version(options = {}) ⇒ Types::GetFunctionDefinitionVersionResponse

Retrieves information about a Lambda function definition version, such as which Lambda functions are included in the version and their configurations.

Examples:

Request syntax with placeholder values


resp = client.get_function_definition_version({
  function_definition_id: "__string", # required
  function_definition_version_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.definition.functions #=> Array
resp.definition.functions[0].function_arn #=> String
resp.definition.functions[0].function_configuration.environment.access_sysfs #=> true/false
resp.definition.functions[0].function_configuration.environment.resource_access_policies #=> Array
resp.definition.functions[0].function_configuration.environment.resource_access_policies[0].permission #=> String, one of "ro", "rw"
resp.definition.functions[0].function_configuration.environment.resource_access_policies[0].resource_id #=> String
resp.definition.functions[0].function_configuration.environment.variables #=> Hash
resp.definition.functions[0].function_configuration.environment.variables["__string"] #=> String
resp.definition.functions[0].function_configuration.exec_args #=> String
resp.definition.functions[0].function_configuration.executable #=> String
resp.definition.functions[0].function_configuration.memory_size #=> Integer
resp.definition.functions[0].function_configuration.pinned #=> true/false
resp.definition.functions[0].function_configuration.timeout #=> Integer
resp.definition.functions[0].id #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :function_definition_id (required, String)
  • :function_definition_version_id (required, String)

Returns:

See Also:

#get_group(options = {}) ⇒ Types::GetGroupResponse

Retrieves information about a group.

Examples:

Request syntax with placeholder values


resp = client.get_group({
  group_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :group_id (required, String)

Returns:

See Also:

#get_group_certificate_authority(options = {}) ⇒ Types::GetGroupCertificateAuthorityResponse

Retreives the CA associated with a group. Returns the public key of the CA.

Examples:

Request syntax with placeholder values


resp = client.get_group_certificate_authority({
  certificate_authority_id: "__string", # required
  group_id: "__string", # required
})

Response structure


resp.group_certificate_authority_arn #=> String
resp.group_certificate_authority_id #=> String
resp.pem_encoded_certificate #=> String

Options Hash (options):

  • :certificate_authority_id (required, String)
  • :group_id (required, String)

Returns:

See Also:

#get_group_certificate_configuration(options = {}) ⇒ Types::GetGroupCertificateConfigurationResponse

Retrieves the current configuration for the CA used by the group.

Examples:

Request syntax with placeholder values


resp = client.get_group_certificate_configuration({
  group_id: "__string", # required
})

Response structure


resp.certificate_authority_expiry_in_milliseconds #=> String
resp.certificate_expiry_in_milliseconds #=> String
resp.group_id #=> String

Options Hash (options):

  • :group_id (required, String)

Returns:

See Also:

#get_group_version(options = {}) ⇒ Types::GetGroupVersionResponse

Retrieves information about a group version.

Examples:

Request syntax with placeholder values


resp = client.get_group_version({
  group_id: "__string", # required
  group_version_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.definition.core_definition_version_arn #=> String
resp.definition.device_definition_version_arn #=> String
resp.definition.function_definition_version_arn #=> String
resp.definition.logger_definition_version_arn #=> String
resp.definition.resource_definition_version_arn #=> String
resp.definition.subscription_definition_version_arn #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :group_id (required, String)
  • :group_version_id (required, String)

Returns:

See Also:

#get_logger_definition(options = {}) ⇒ Types::GetLoggerDefinitionResponse

Retrieves information about a logger definition.

Examples:

Request syntax with placeholder values


resp = client.get_logger_definition({
  logger_definition_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :logger_definition_id (required, String)

Returns:

See Also:

#get_logger_definition_version(options = {}) ⇒ Types::GetLoggerDefinitionVersionResponse

Retrieves information about a logger definition version.

Examples:

Request syntax with placeholder values


resp = client.get_logger_definition_version({
  logger_definition_id: "__string", # required
  logger_definition_version_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.definition.loggers #=> Array
resp.definition.loggers[0].component #=> String, one of "GreengrassSystem", "Lambda"
resp.definition.loggers[0].id #=> String
resp.definition.loggers[0].level #=> String, one of "DEBUG", "INFO", "WARN", "ERROR", "FATAL"
resp.definition.loggers[0].space #=> Integer
resp.definition.loggers[0].type #=> String, one of "FileSystem", "AWSCloudWatch"
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :logger_definition_id (required, String)
  • :logger_definition_version_id (required, String)

Returns:

See Also:

#get_resource_definition(options = {}) ⇒ Types::GetResourceDefinitionResponse

Retrieves information about a resource definition, such as its creation time and latest version.

Examples:

Request syntax with placeholder values


resp = client.get_resource_definition({
  resource_definition_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :resource_definition_id (required, String)

Returns:

See Also:

#get_resource_definition_version(options = {}) ⇒ Types::GetResourceDefinitionVersionResponse

Retrieves information about a resource definition version, such as which resources are included in the version.

Examples:

Request syntax with placeholder values


resp = client.get_resource_definition_version({
  resource_definition_id: "__string", # required
  resource_definition_version_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.definition.resources #=> Array
resp.definition.resources[0].id #=> String
resp.definition.resources[0].name #=> String
resp.definition.resources[0].resource_data_container.local_device_resource_data.group_owner_setting.auto_add_group_owner #=> true/false
resp.definition.resources[0].resource_data_container.local_device_resource_data.group_owner_setting.group_owner #=> String
resp.definition.resources[0].resource_data_container.local_device_resource_data.source_path #=> String
resp.definition.resources[0].resource_data_container.local_volume_resource_data.destination_path #=> String
resp.definition.resources[0].resource_data_container.local_volume_resource_data.group_owner_setting.auto_add_group_owner #=> true/false
resp.definition.resources[0].resource_data_container.local_volume_resource_data.group_owner_setting.group_owner #=> String
resp.definition.resources[0].resource_data_container.local_volume_resource_data.source_path #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :resource_definition_id (required, String)
  • :resource_definition_version_id (required, String)

Returns:

See Also:

#get_service_role_for_account(options = {}) ⇒ Types::GetServiceRoleForAccountResponse

Retrieves the service role that is attached to the account.

Examples:

Request syntax with placeholder values


resp = client.()

Response structure


resp.associated_at #=> String
resp.role_arn #=> String

Returns:

See Also:

#get_subscription_definition(options = {}) ⇒ Types::GetSubscriptionDefinitionResponse

Retrieves information about a subscription definition.

Examples:

Request syntax with placeholder values


resp = client.get_subscription_definition({
  subscription_definition_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.id #=> String
resp.last_updated_timestamp #=> String
resp.latest_version #=> String
resp.latest_version_arn #=> String
resp.name #=> String

Options Hash (options):

  • :subscription_definition_id (required, String)

Returns:

See Also:

#get_subscription_definition_version(options = {}) ⇒ Types::GetSubscriptionDefinitionVersionResponse

Retrieves information about a subscription definition version.

Examples:

Request syntax with placeholder values


resp = client.get_subscription_definition_version({
  subscription_definition_id: "__string", # required
  subscription_definition_version_id: "__string", # required
})

Response structure


resp.arn #=> String
resp.creation_timestamp #=> String
resp.definition.subscriptions #=> Array
resp.definition.subscriptions[0].id #=> String
resp.definition.subscriptions[0].source #=> String
resp.definition.subscriptions[0].subject #=> String
resp.definition.subscriptions[0].target #=> String
resp.id #=> String
resp.version #=> String

Options Hash (options):

  • :subscription_definition_id (required, String)
  • :subscription_definition_version_id (required, String)

Returns:

See Also:

#list_core_definition_versions(options = {}) ⇒ Types::ListCoreDefinitionVersionsResponse

Lists versions of a core definition.

Examples:

Request syntax with placeholder values


resp = client.list_core_definition_versions({
  core_definition_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.next_token #=> String
resp.versions #=> Array
resp.versions[0].arn #=> String
resp.versions[0].creation_timestamp #=> String
resp.versions[0].id #=> String
resp.versions[0].version #=> String

Options Hash (options):

  • :core_definition_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_core_definitions(options = {}) ⇒ Types::ListCoreDefinitionsResponse

Retrieves a list of core definitions.

Examples:

Request syntax with placeholder values


resp = client.list_core_definitions({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.definitions #=> Array
resp.definitions[0].arn #=> String
resp.definitions[0].creation_timestamp #=> String
resp.definitions[0].id #=> String
resp.definitions[0].last_updated_timestamp #=> String
resp.definitions[0].latest_version #=> String
resp.definitions[0].latest_version_arn #=> String
resp.definitions[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_deployments(options = {}) ⇒ Types::ListDeploymentsResponse

Returns a history of deployments for the group.

Examples:

Request syntax with placeholder values


resp = client.list_deployments({
  group_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.deployments #=> Array
resp.deployments[0].created_at #=> String
resp.deployments[0].deployment_arn #=> String
resp.deployments[0].deployment_id #=> String
resp.deployments[0].deployment_type #=> String, one of "NewDeployment", "Redeployment", "ResetDeployment", "ForceResetDeployment"
resp.deployments[0].group_arn #=> String
resp.next_token #=> String

Options Hash (options):

  • :group_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_device_definition_versions(options = {}) ⇒ Types::ListDeviceDefinitionVersionsResponse

Lists the versions of a device definition.

Examples:

Request syntax with placeholder values


resp = client.list_device_definition_versions({
  device_definition_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.next_token #=> String
resp.versions #=> Array
resp.versions[0].arn #=> String
resp.versions[0].creation_timestamp #=> String
resp.versions[0].id #=> String
resp.versions[0].version #=> String

Options Hash (options):

  • :device_definition_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_device_definitions(options = {}) ⇒ Types::ListDeviceDefinitionsResponse

Retrieves a list of device definitions.

Examples:

Request syntax with placeholder values


resp = client.list_device_definitions({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.definitions #=> Array
resp.definitions[0].arn #=> String
resp.definitions[0].creation_timestamp #=> String
resp.definitions[0].id #=> String
resp.definitions[0].last_updated_timestamp #=> String
resp.definitions[0].latest_version #=> String
resp.definitions[0].latest_version_arn #=> String
resp.definitions[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_function_definition_versions(options = {}) ⇒ Types::ListFunctionDefinitionVersionsResponse

Lists the versions of a Lambda function definition.

Examples:

Request syntax with placeholder values


resp = client.list_function_definition_versions({
  function_definition_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.next_token #=> String
resp.versions #=> Array
resp.versions[0].arn #=> String
resp.versions[0].creation_timestamp #=> String
resp.versions[0].id #=> String
resp.versions[0].version #=> String

Options Hash (options):

  • :function_definition_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_function_definitions(options = {}) ⇒ Types::ListFunctionDefinitionsResponse

Retrieves a list of Lambda function definitions.

Examples:

Request syntax with placeholder values


resp = client.list_function_definitions({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.definitions #=> Array
resp.definitions[0].arn #=> String
resp.definitions[0].creation_timestamp #=> String
resp.definitions[0].id #=> String
resp.definitions[0].last_updated_timestamp #=> String
resp.definitions[0].latest_version #=> String
resp.definitions[0].latest_version_arn #=> String
resp.definitions[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_group_certificate_authorities(options = {}) ⇒ Types::ListGroupCertificateAuthoritiesResponse

Retrieves the current CAs for a group.

Examples:

Request syntax with placeholder values


resp = client.list_group_certificate_authorities({
  group_id: "__string", # required
})

Response structure


resp.group_certificate_authorities #=> Array
resp.group_certificate_authorities[0].group_certificate_authority_arn #=> String
resp.group_certificate_authorities[0].group_certificate_authority_id #=> String

Options Hash (options):

  • :group_id (required, String)

Returns:

See Also:

#list_group_versions(options = {}) ⇒ Types::ListGroupVersionsResponse

List the versions of a group.

Examples:

Request syntax with placeholder values


resp = client.list_group_versions({
  group_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.next_token #=> String
resp.versions #=> Array
resp.versions[0].arn #=> String
resp.versions[0].creation_timestamp #=> String
resp.versions[0].id #=> String
resp.versions[0].version #=> String

Options Hash (options):

  • :group_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_groups(options = {}) ⇒ Types::ListGroupsResponse

Retrieves a list of groups.

Examples:

Request syntax with placeholder values


resp = client.list_groups({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.groups #=> Array
resp.groups[0].arn #=> String
resp.groups[0].creation_timestamp #=> String
resp.groups[0].id #=> String
resp.groups[0].last_updated_timestamp #=> String
resp.groups[0].latest_version #=> String
resp.groups[0].latest_version_arn #=> String
resp.groups[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_logger_definition_versions(options = {}) ⇒ Types::ListLoggerDefinitionVersionsResponse

Lists the versions of a logger definition.

Examples:

Request syntax with placeholder values


resp = client.list_logger_definition_versions({
  logger_definition_id: "__string", # required
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.next_token #=> String
resp.versions #=> Array
resp.versions[0].arn #=> String
resp.versions[0].creation_timestamp #=> String
resp.versions[0].id #=> String
resp.versions[0].version #=> String

Options Hash (options):

  • :logger_definition_id (required, String)
  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_logger_definitions(options = {}) ⇒ Types::ListLoggerDefinitionsResponse

Retrieves a list of logger definitions.

Examples:

Request syntax with placeholder values


resp = client.list_logger_definitions({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.definitions #=> Array
resp.definitions[0].arn #=> String
resp.definitions[0].creation_timestamp #=> String
resp.definitions[0].id #=> String
resp.definitions[0].last_updated_timestamp #=> String
resp.definitions[0].latest_version #=> String
resp.definitions[0].latest_version_arn #=> String
resp.definitions[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_resource_definition_versions(options = {}) ⇒ Types::ListResourceDefinitionVersionsResponse

Lists the versions of a resource definition.

Examples:

Request syntax with placeholder values


resp = client.list_resource_definition_versions({
  max_results: "__string",
  next_token: "__string",
  resource_definition_id: "__string", # required
})

Response structure


resp.next_token #=> String
resp.versions #=> Array
resp.versions[0].arn #=> String
resp.versions[0].creation_timestamp #=> String
resp.versions[0].id #=> String
resp.versions[0].version #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)
  • :resource_definition_id (required, String)

Returns:

See Also:

#list_resource_definitions(options = {}) ⇒ Types::ListResourceDefinitionsResponse

Retrieves a list of resource definitions.

Examples:

Request syntax with placeholder values


resp = client.list_resource_definitions({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.definitions #=> Array
resp.definitions[0].arn #=> String
resp.definitions[0].creation_timestamp #=> String
resp.definitions[0].id #=> String
resp.definitions[0].last_updated_timestamp #=> String
resp.definitions[0].latest_version #=> String
resp.definitions[0].latest_version_arn #=> String
resp.definitions[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#list_subscription_definition_versions(options = {}) ⇒ Types::ListSubscriptionDefinitionVersionsResponse

Lists the versions of a subscription definition.

Examples:

Request syntax with placeholder values


resp = client.list_subscription_definition_versions({
  max_results: "__string",
  next_token: "__string",
  subscription_definition_id: "__string", # required
})

Response structure


resp.next_token #=> String
resp.versions #=> Array
resp.versions[0].arn #=> String
resp.versions[0].creation_timestamp #=> String
resp.versions[0].id #=> String
resp.versions[0].version #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)
  • :subscription_definition_id (required, String)

Returns:

See Also:

#list_subscription_definitions(options = {}) ⇒ Types::ListSubscriptionDefinitionsResponse

Retrieves a list of subscription definitions.

Examples:

Request syntax with placeholder values


resp = client.list_subscription_definitions({
  max_results: "__string",
  next_token: "__string",
})

Response structure


resp.definitions #=> Array
resp.definitions[0].arn #=> String
resp.definitions[0].creation_timestamp #=> String
resp.definitions[0].id #=> String
resp.definitions[0].last_updated_timestamp #=> String
resp.definitions[0].latest_version #=> String
resp.definitions[0].latest_version_arn #=> String
resp.definitions[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (String)
  • :next_token (String)

Returns:

See Also:

#reset_deployments(options = {}) ⇒ Types::ResetDeploymentsResponse

Resets a group's deployments.

Examples:

Request syntax with placeholder values


resp = client.reset_deployments({
  amzn_client_token: "__string",
  force: false,
  group_id: "__string", # required
})

Response structure


resp.deployment_arn #=> String
resp.deployment_id #=> String

Options Hash (options):

  • :amzn_client_token (String)
  • :force (Boolean)

    When set to true, perform a best-effort only core reset.

  • :group_id (required, String)

Returns:

See Also:

#update_connectivity_info(options = {}) ⇒ Types::UpdateConnectivityInfoResponse

Updates the connectivity information for the core. Any devices that belong to the group which has this core will receive this information in order to find the location of the core and connect to it.

Examples:

Request syntax with placeholder values


resp = client.update_connectivity_info({
  connectivity_info: [
    {
      host_address: "__string",
      id: "__string",
      metadata: "__string",
      port_number: 1,
    },
  ],
  thing_name: "__string", # required
})

Response structure


resp.message #=> String
resp.version #=> String

Options Hash (options):

Returns:

See Also:

#update_core_definition(options = {}) ⇒ Struct

Updates a core definition.

Examples:

Request syntax with placeholder values


resp = client.update_core_definition({
  core_definition_id: "__string", # required
  name: "__string",
})

Options Hash (options):

  • :core_definition_id (required, String)
  • :name (String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_device_definition(options = {}) ⇒ Struct

Updates a device definition.

Examples:

Request syntax with placeholder values


resp = client.update_device_definition({
  device_definition_id: "__string", # required
  name: "__string",
})

Options Hash (options):

  • :device_definition_id (required, String)
  • :name (String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_function_definition(options = {}) ⇒ Struct

Updates a Lambda function definition.

Examples:

Request syntax with placeholder values


resp = client.update_function_definition({
  function_definition_id: "__string", # required
  name: "__string",
})

Options Hash (options):

  • :function_definition_id (required, String)
  • :name (String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_group(options = {}) ⇒ Struct

Updates a group.

Examples:

Request syntax with placeholder values


resp = client.update_group({
  group_id: "__string", # required
  name: "__string",
})

Options Hash (options):

  • :group_id (required, String)
  • :name (String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_group_certificate_configuration(options = {}) ⇒ Types::UpdateGroupCertificateConfigurationResponse

Updates the Cert expiry time for a group.

Examples:

Request syntax with placeholder values


resp = client.update_group_certificate_configuration({
  certificate_expiry_in_milliseconds: "__string",
  group_id: "__string", # required
})

Response structure


resp.certificate_authority_expiry_in_milliseconds #=> String
resp.certificate_expiry_in_milliseconds #=> String
resp.group_id #=> String

Options Hash (options):

  • :certificate_expiry_in_milliseconds (String)

    Amount of time when the certificate expires in milliseconds.

  • :group_id (required, String)

Returns:

See Also:

#update_logger_definition(options = {}) ⇒ Struct

Updates a logger definition.

Examples:

Request syntax with placeholder values


resp = client.update_logger_definition({
  logger_definition_id: "__string", # required
  name: "__string",
})

Options Hash (options):

  • :logger_definition_id (required, String)
  • :name (String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_resource_definition(options = {}) ⇒ Struct

Updates a resource definition.

Examples:

Request syntax with placeholder values


resp = client.update_resource_definition({
  name: "__string",
  resource_definition_id: "__string", # required
})

Options Hash (options):

  • :name (String)
  • :resource_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_subscription_definition(options = {}) ⇒ Struct

Updates a subscription definition.

Examples:

Request syntax with placeholder values


resp = client.update_subscription_definition({
  name: "__string",
  subscription_definition_id: "__string", # required
})

Options Hash (options):

  • :name (String)
  • :subscription_definition_id (required, String)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

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

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

Basic Usage

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

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

Configuration

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

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

Callbacks

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

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

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

end

Handling Errors

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

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

Parameters:

  • waiter_name (Symbol)

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

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

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

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

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

  • (Errors::TooManyAttemptsError)

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

  • (Errors::UnexpectedError)

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

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

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

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.