Class: Aws::LocationService::Client

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

Overview

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

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

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

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

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

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials used for authentication. This can be any class that includes and implements ‘Aws::CredentialProvider`, or instance of any one of the following classes:

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

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

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

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

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

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

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

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

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

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

    • Aws.config`

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

    • ENV`, `ENV`, `ENV`, and `ENV`.

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

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

  • :region (required, String)

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

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

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

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

  • :auth_scheme_preference (Array<String>)

    A list of preferred authentication schemes to use when making a request. Supported values are: ‘sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV` or in shared config as `auth_scheme_preference`, the value should be a comma-separated list.

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

    When ‘true`, the SDK will not prepend the modeled host prefix to the endpoint.

  • :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_checksum_calculation (String) — default: "when_supported"

    Determines when a checksum will be calculated for request payloads. Values are:

    • ‘when_supported` - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a `requestAlgorithmMember` is modeled.

    • ‘when_required` - When set, a checksum will only be calculated for request payloads of operations modeled with the `httpChecksum` trait where `requestChecksumRequired` is `true` or where a `requestAlgorithmMember` is modeled and supplied.

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

  • :response_checksum_validation (String) — default: "when_supported"

    Determines when checksum validation will be performed on response payloads. Values are:

    • ‘when_supported` - (default) When set, checksum validation is performed on all response payloads of operations modeled with the `httpChecksum` trait where `responseAlgorithms` is modeled, except when no modeled checksum algorithms are supported.

    • ‘when_required` - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the `requestValidationModeMember` member is set to `ENABLED`.

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

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

  • :retry_limit (Integer) — default: 3

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

  • :retry_max_delay (Integer) — default: 0

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

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

    Specifies which retry algorithm to use. Values are:

    • ‘legacy` - The pre-existing retry behavior. This is the 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` - A retry mode that includes all the functionality of `standard` mode along with automatic client side throttling.

  • :sdk_ua_app_id (String)

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

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

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

  • :stub_responses (Boolean) — default: false

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

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

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

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

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

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

  • :token_provider (Aws::TokenProvider)

    Your Bearer token used for authentication. This can be any class that includes and implements ‘Aws::TokenProvider`, or 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::LocationService::EndpointProvider)

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

  • :http_continue_timeout (Float) — default: 1

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

  • :http_idle_timeout (Float) — default: 5

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

  • :http_open_timeout (Float) — default: 15

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_read_timeout (Float) — default: 60

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

  • :http_wire_trace (Boolean) — default: false

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

  • :on_chunk_received (Proc)

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

  • :on_chunk_sent (Proc)

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

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

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

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

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



471
472
473
# File 'lib/aws-sdk-locationservice/client.rb', line 471

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

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



6088
6089
6090
# File 'lib/aws-sdk-locationservice/client.rb', line 6088

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

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



6091
6092
6093
# File 'lib/aws-sdk-locationservice/client.rb', line 6091

def errors_module
  Errors
end

Instance Method Details

#associate_tracker_consumer(params = {}) ⇒ Struct

Creates an association between a geofence collection and a tracker resource. This allows the tracker resource to communicate location data to the linked geofence collection.

You can associate up to five geofence collections to each tracker resource.

<note markdown=“1”> Currently not supported — Cross-account configurations, such as creating associations between a tracker resource in one account and a geofence collection in another account.

</note>

Examples:

Request syntax with placeholder values


resp = client.associate_tracker_consumer({
  tracker_name: "ResourceName", # required
  consumer_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource to be associated with a geofence collection.

  • :consumer_arn (required, String)

    The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all Amazon Web Services.

    • Format example: ‘arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollectionConsumer`

    ^

Returns:

  • (Struct)

    Returns an empty response.

See Also:



517
518
519
520
# File 'lib/aws-sdk-locationservice/client.rb', line 517

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

#batch_delete_device_position_history(params = {}) ⇒ Types::BatchDeleteDevicePositionHistoryResponse

Deletes the position history of one or more devices from a tracker resource.

Examples:

Request syntax with placeholder values


resp = client.batch_delete_device_position_history({
  tracker_name: "ResourceName", # required
  device_ids: ["Id"], # required
})

Response structure


resp.errors #=> Array
resp.errors[0].device_id #=> String
resp.errors[0].error.code #=> String, one of "AccessDeniedError", "ConflictError", "InternalServerError", "ResourceNotFoundError", "ThrottlingError", "ValidationError"
resp.errors[0].error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource to delete the device position history from.

  • :device_ids (required, Array<String>)

    Devices whose position history you want to delete.

    • For example, for two devices: ‘“DeviceIds” : [DeviceId1,DeviceId2]`

    ^

Returns:

See Also:



558
559
560
561
# File 'lib/aws-sdk-locationservice/client.rb', line 558

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

#batch_delete_geofence(params = {}) ⇒ Types::BatchDeleteGeofenceResponse

Deletes a batch of geofences from a geofence collection.

<note markdown=“1”> This operation deletes the resource permanently.

</note>

Examples:

Request syntax with placeholder values


resp = client.batch_delete_geofence({
  collection_name: "ResourceName", # required
  geofence_ids: ["Id"], # required
})

Response structure


resp.errors #=> Array
resp.errors[0].geofence_id #=> String
resp.errors[0].error.code #=> String, one of "AccessDeniedError", "ConflictError", "InternalServerError", "ResourceNotFoundError", "ThrottlingError", "ValidationError"
resp.errors[0].error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The geofence collection storing the geofences to be deleted.

  • :geofence_ids (required, Array<String>)

    The batch of geofences to be deleted.

Returns:

See Also:



597
598
599
600
# File 'lib/aws-sdk-locationservice/client.rb', line 597

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

#batch_evaluate_geofences(params = {}) ⇒ Types::BatchEvaluateGeofencesResponse

Evaluates device positions against the geofence geometries from a given geofence collection.

This operation always returns an empty response because geofences are asynchronously evaluated. The evaluation determines if the device has entered or exited a geofenced area, and then publishes one of the following events to Amazon EventBridge:

  • ‘ENTER` if Amazon Location determines that the tracked device has entered a geofenced area.

  • ‘EXIT` if Amazon Location determines that the tracked device has exited a geofenced area.

<note markdown=“1”> The last geofence that a device was observed within is tracked for 30 days after the most recent device position update.

</note>

<note markdown=“1”> Geofence evaluation uses the given device position. It does not account for the optional ‘Accuracy` of a `DevicePositionUpdate`.

</note>

<note markdown=“1”> The ‘DeviceID` is used as a string to represent the device. You do not need to have a `Tracker` associated with the `DeviceID`.

</note>

Examples:

Request syntax with placeholder values


resp = client.batch_evaluate_geofences({
  collection_name: "ResourceName", # required
  device_position_updates: [ # required
    {
      device_id: "Id", # required
      sample_time: Time.now, # required
      position: [1.0], # required
      accuracy: {
        horizontal: 1.0, # required
      },
      position_properties: {
        "PositionPropertyMapKeyString" => "PositionPropertyMapValueString",
      },
    },
  ],
})

Response structure


resp.errors #=> Array
resp.errors[0].device_id #=> String
resp.errors[0].sample_time #=> Time
resp.errors[0].error.code #=> String, one of "AccessDeniedError", "ConflictError", "InternalServerError", "ResourceNotFoundError", "ThrottlingError", "ValidationError"
resp.errors[0].error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The geofence collection used in evaluating the position of devices against its geofences.

  • :device_position_updates (required, Array<Types::DevicePositionUpdate>)

    Contains device details for each device to be evaluated against the given geofence collection.

Returns:

See Also:



674
675
676
677
# File 'lib/aws-sdk-locationservice/client.rb', line 674

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

#batch_get_device_position(params = {}) ⇒ Types::BatchGetDevicePositionResponse

Lists the latest device positions for requested devices.

Examples:

Request syntax with placeholder values


resp = client.batch_get_device_position({
  tracker_name: "BatchGetDevicePositionRequestTrackerNameString", # required
  device_ids: ["Id"], # required
})

Response structure


resp.errors #=> Array
resp.errors[0].device_id #=> String
resp.errors[0].error.code #=> String, one of "AccessDeniedError", "ConflictError", "InternalServerError", "ResourceNotFoundError", "ThrottlingError", "ValidationError"
resp.errors[0].error.message #=> String
resp.device_positions #=> Array
resp.device_positions[0].device_id #=> String
resp.device_positions[0].sample_time #=> Time
resp.device_positions[0].received_time #=> Time
resp.device_positions[0].position #=> Array
resp.device_positions[0].position[0] #=> Float
resp.device_positions[0].accuracy.horizontal #=> Float
resp.device_positions[0].position_properties #=> Hash
resp.device_positions[0].position_properties["PositionPropertyMapKeyString"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The tracker resource retrieving the device position.

  • :device_ids (required, Array<String>)

    Devices whose position you want to retrieve.

    • For example, for two devices: ‘device-ids=DeviceId1&device-ids=DeviceId2`

    ^

Returns:

See Also:



724
725
726
727
# File 'lib/aws-sdk-locationservice/client.rb', line 724

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

#batch_put_geofence(params = {}) ⇒ Types::BatchPutGeofenceResponse

A batch request for storing geofence geometries into a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request.

Examples:

Request syntax with placeholder values


resp = client.batch_put_geofence({
  collection_name: "ResourceName", # required
  entries: [ # required
    {
      geofence_id: "Id", # required
      geometry: { # required
        polygon: [
          [
            [1.0],
          ],
        ],
        circle: {
          center: [1.0], # required
          radius: 1.0, # required
        },
        geobuf: "data",
        multi_polygon: [
          [
            [
              [1.0],
            ],
          ],
        ],
      },
      geofence_properties: {
        "PropertyMapKeyString" => "PropertyMapValueString",
      },
    },
  ],
})

Response structure


resp.successes #=> Array
resp.successes[0].geofence_id #=> String
resp.successes[0].create_time #=> Time
resp.successes[0].update_time #=> Time
resp.errors #=> Array
resp.errors[0].geofence_id #=> String
resp.errors[0].error.code #=> String, one of "AccessDeniedError", "ConflictError", "InternalServerError", "ResourceNotFoundError", "ThrottlingError", "ValidationError"
resp.errors[0].error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The geofence collection storing the geofences.

  • :entries (required, Array<Types::BatchPutGeofenceRequestEntry>)

    The batch of geofences to be stored in a geofence collection.

Returns:

See Also:



792
793
794
795
# File 'lib/aws-sdk-locationservice/client.rb', line 792

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

#batch_update_device_position(params = {}) ⇒ Types::BatchUpdateDevicePositionResponse

Uploads position update data for one or more devices to a tracker resource (up to 10 devices per batch). Amazon Location uses the data when it reports the last known device position and position history. Amazon Location retains location data for 30 days.

<note markdown=“1”> Position updates are handled based on the ‘PositionFiltering` property of the tracker. When `PositionFiltering` is set to `TimeBased`, updates are evaluated against linked geofence collections, and location data is stored at a maximum of one position per 30 second interval. If your update frequency is more often than every 30 seconds, only one update per 30 seconds is stored for each unique device ID.

When `PositionFiltering` is set to `DistanceBased` filtering, location

data is stored and evaluated against linked geofence collections only if the device has moved more than 30 m (98.4 ft).

When `PositionFiltering` is set to `AccuracyBased` filtering, location

data is stored and evaluated against linked geofence collections only if the device has moved more than the measured accuracy. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is neither stored or evaluated if the device has moved less than 15 m. If ‘PositionFiltering` is set to `AccuracyBased` filtering, Amazon Location uses the default value `{ “Horizontal”: 0}` when accuracy is not provided on a `DevicePositionUpdate`.

</note>

Examples:

Request syntax with placeholder values


resp = client.batch_update_device_position({
  tracker_name: "ResourceName", # required
  updates: [ # required
    {
      device_id: "Id", # required
      sample_time: Time.now, # required
      position: [1.0], # required
      accuracy: {
        horizontal: 1.0, # required
      },
      position_properties: {
        "PositionPropertyMapKeyString" => "PositionPropertyMapValueString",
      },
    },
  ],
})

Response structure


resp.errors #=> Array
resp.errors[0].device_id #=> String
resp.errors[0].sample_time #=> Time
resp.errors[0].error.code #=> String, one of "AccessDeniedError", "ConflictError", "InternalServerError", "ResourceNotFoundError", "ThrottlingError", "ValidationError"
resp.errors[0].error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource to update.

  • :updates (required, Array<Types::DevicePositionUpdate>)

    Contains the position update details for each device, up to 10 devices.

Returns:

See Also:



868
869
870
871
# File 'lib/aws-sdk-locationservice/client.rb', line 868

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

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

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

Parameters:

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


5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
# File 'lib/aws-sdk-locationservice/client.rb', line 5948

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

#calculate_route(params = {}) ⇒ Types::CalculateRouteResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to [ ‘CalculateRoutes` ](/location/latest/APIReference/API_CalculateRoutes.html) or [ `CalculateIsolines` ](/location/latest/APIReference/API_CalculateIsolines.html) unless you require Grab data.

* `CalculateRoute` is part of a previous Amazon Location Service
 Routes API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The version 2 ‘CalculateRoutes` operation gives better results for point-to-point routing, while the version 2 `CalculateIsolines` operation adds support for calculating service areas and travel time envelopes.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under ‘geo-routes` or `geo_routes`, not under `location`.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

[Calculates a route][1] given the following required parameters:

‘DeparturePosition` and `DestinationPosition`. Requires that you first [create a route calculator resource].

By default, a request that doesn't specify a departure time uses the

best time of day to travel with the best traffic conditions when calculating the route.

Additional options include:

* [Specifying a departure time][3] using either `DepartureTime` or
 `DepartNow`. This calculates a route based on predictive traffic
 data at the given time.

 <note markdown="1"> You can't specify both `DepartureTime` and

‘DepartNow` in a single

request. Specifying both parameters returns a validation error.

 </note>
  • Specifying a travel mode][4

    using TravelMode sets the

    transportation mode used to calculate the routes. This also lets you specify additional route preferences in ‘CarModeOptions` if traveling by `Car`, or `TruckModeOptions` if traveling by `Truck`.

    <note markdown=“1”> If you specify ‘walking` for the travel mode and

your data provider

is Esri, the start and destination must be within 40km.

 </note>

[1]: docs.aws.amazon.com/location/previous/developerguide/calculate-route.html [2]: docs.aws.amazon.com/location-routes/latest/APIReference/API_CreateRouteCalculator.html [3]: docs.aws.amazon.com/location/previous/developerguide/departure-time.html [4]: docs.aws.amazon.com/location/previous/developerguide/travel-mode.html

Examples:

Request syntax with placeholder values


resp = client.calculate_route({
  calculator_name: "ResourceName", # required
  departure_position: [1.0], # required
  destination_position: [1.0], # required
  waypoint_positions: [
    [1.0],
  ],
  travel_mode: "Car", # accepts Car, Truck, Walking, Bicycle, Motorcycle
  departure_time: Time.now,
  depart_now: false,
  distance_unit: "Kilometers", # accepts Kilometers, Miles
  include_leg_geometry: false,
  car_mode_options: {
    avoid_ferries: false,
    avoid_tolls: false,
  },
  truck_mode_options: {
    avoid_ferries: false,
    avoid_tolls: false,
    dimensions: {
      length: 1.0,
      height: 1.0,
      width: 1.0,
      unit: "Meters", # accepts Meters, Feet
    },
    weight: {
      total: 1.0,
      unit: "Kilograms", # accepts Kilograms, Pounds
    },
  },
  arrival_time: Time.now,
  optimize_for: "FastestRoute", # accepts FastestRoute, ShortestRoute
  key: "ApiKey",
})

Response structure


resp.legs #=> Array
resp.legs[0].start_position #=> Array
resp.legs[0].start_position[0] #=> Float
resp.legs[0].end_position #=> Array
resp.legs[0].end_position[0] #=> Float
resp.legs[0].distance #=> Float
resp.legs[0].duration_seconds #=> Float
resp.legs[0].geometry.line_string #=> Array
resp.legs[0].geometry.line_string[0] #=> Array
resp.legs[0].geometry.line_string[0][0] #=> Float
resp.legs[0].steps #=> Array
resp.legs[0].steps[0].start_position #=> Array
resp.legs[0].steps[0].start_position[0] #=> Float
resp.legs[0].steps[0].end_position #=> Array
resp.legs[0].steps[0].end_position[0] #=> Float
resp.legs[0].steps[0].distance #=> Float
resp.legs[0].steps[0].duration_seconds #=> Float
resp.legs[0].steps[0].geometry_offset #=> Integer
resp.summary.route_b_box #=> Array
resp.summary.route_b_box[0] #=> Float
resp.summary.data_source #=> String
resp.summary.distance #=> Float
resp.summary.duration_seconds #=> Float
resp.summary.distance_unit #=> String, one of "Kilometers", "Miles"

Parameters:

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

    ({})

Options Hash (params):

  • :calculator_name (required, String)

    The name of the route calculator resource that you want to use to calculate the route.

  • :departure_position (required, Array<Float>)

    The start position for the route. Defined in [World Geodetic System (WGS 84)] format: ‘[longitude, latitude]`.

    • For example, ‘[-123.115, 49.285]`

    ^

    <note markdown=“1”> If you specify a departure that’s not located on a road, Amazon Location [moves the position to the nearest road]. If Esri is the provider for your route calculator, specifying a route that is longer than 400 km returns a ‘400 RoutesValidationException` error.

    </note>
    

    Valid Values: ‘[-180 to 180,-90 to 90]`

    [1]: earth-info.nga.mil/index.php?dir=wgs84&amp;action=wgs84 [2]: docs.aws.amazon.com/location/previous/developerguide/snap-to-nearby-road.html

  • :destination_position (required, Array<Float>)

    The finish position for the route. Defined in [World Geodetic System (WGS 84)] format: ‘[longitude, latitude]`.

    • For example, ‘[-122.339, 47.615]`

    ^

    <note markdown=“1”> If you specify a destination that’s not located on a road, Amazon Location [moves the position to the nearest road].

    </note>
    

    Valid Values: ‘[-180 to 180,-90 to 90]`

    [1]: earth-info.nga.mil/index.php?dir=wgs84&amp;action=wgs84 [2]: docs.aws.amazon.com/location/previous/developerguide/snap-to-nearby-road.html

  • :waypoint_positions (Array<Array>)

    Specifies an ordered list of up to 23 intermediate positions to include along a route between the departure position and destination position.

    • For example, from the ‘DeparturePosition` `[-123.115, 49.285]`, the route follows the order that the waypoint positions are given `[[-122.757, 49.0021],[-122.349, 47.620]]`

    ^

    <note markdown=“1”> If you specify a waypoint position that’s not located on a road, Amazon Location [moves the position to the nearest road].

    Specifying more than 23 waypoints returns a `400 ValidationException`
    

    error.

    If Esri is the provider for your route calculator, specifying a route
    

    that is longer than 400 km returns a ‘400 RoutesValidationException` error.

    </note>
    

    Valid Values: ‘[-180 to 180,-90 to 90]`

    [1]: docs.aws.amazon.com/location/previous/developerguide/snap-to-nearby-road.html

  • :travel_mode (String)

    Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility. You can choose ‘Car`, `Truck`, `Walking`, `Bicycle` or `Motorcycle` as options for the `TravelMode`.

    <note markdown=“1”> ‘Bicycle` and `Motorcycle` are only valid when using Grab as a data provider, and only within Southeast Asia.

    `Truck` is not available for Grab.
    
    For more details on the using Grab for routing, including areas of
    

    coverage, see [GrabMaps] in the *Amazon Location Service Developer Guide*.

    </note>
    

    The ‘TravelMode` you specify also determines how you specify route preferences:

    • If traveling by ‘Car` use the `CarModeOptions` parameter.

    • If traveling by ‘Truck` use the `TruckModeOptions` parameter.

    Default Value: ‘Car`

    [1]: docs.aws.amazon.com/location/previous/developerguide/grab.html

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

    Specifies the desired time of departure. Uses the given time to calculate the route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

    • In [ISO 8601] format: ‘YYYY-MM-DDThh:mm:ss.sssZ`. For example, `2020–07-2T12:15:20.000Z+01:00`

    ^

    [1]: www.iso.org/iso-8601-date-and-time-format.html

  • :depart_now (Boolean)

    Sets the time of departure as the current time. Uses the current time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

    Default Value: ‘false`

    Valid Values: ‘false` | `true`

  • :distance_unit (String)

    Set the unit system to specify the distance.

    Default Value: ‘Kilometers`

  • :include_leg_geometry (Boolean)

    Set to include the geometry details in the result for each path between a pair of positions.

    Default Value: ‘false`

    Valid Values: ‘false` | `true`

  • :car_mode_options (Types::CalculateRouteCarModeOptions)

    Specifies route preferences when traveling by ‘Car`, such as avoiding routes that use ferries or tolls.

    Requirements: ‘TravelMode` must be specified as `Car`.

  • :truck_mode_options (Types::CalculateRouteTruckModeOptions)

    Specifies route preferences when traveling by ‘Truck`, such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road.

    Requirements: ‘TravelMode` must be specified as `Truck`.

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

    Specifies the desired time of arrival. Uses the given time to calculate the route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

    <note markdown=“1”> ArrivalTime is not supported Esri.

    </note>
    
  • :optimize_for (String)

    Specifies the distance to optimize for when calculating a route.

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



1180
1181
1182
1183
# File 'lib/aws-sdk-locationservice/client.rb', line 1180

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

#calculate_route_matrix(params = {}) ⇒ Types::CalculateRouteMatrixResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the [V2 ‘CalculateRouteMatrix` ](/location/latest/APIReference/API_CalculateRouteMatrix.html) unless you require Grab data.

* This version of `CalculateRouteMatrix` is part of a previous Amazon
 Location Service Routes API (version 1) which has been superseded by
 a more intuitive, powerful, and complete API (version 2).
  • The version 2 ‘CalculateRouteMatrix` operation gives better results for matrix routing calculations.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under ‘geo-routes` or `geo_routes`, not under `location`.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Routes V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Routes_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/routes.html).

[ Calculates a route matrix][1] given the following required

parameters: ‘DeparturePositions` and `DestinationPositions`. `CalculateRouteMatrix` calculates routes and returns the travel time and travel distance from each departure position to each destination position in the request. For example, given departure positions A and B, and destination positions X and Y, `CalculateRouteMatrix` will return time and distance for routes from A to X, A to Y, B to X, and B to Y (in that order). The number of results returned (and routes calculated) will be the number of `DeparturePositions` times the number of `DestinationPositions`.

<note markdown="1"> Your account is charged for each route

calculated, not the number of requests.

</note>

Requires that you first [create a route calculator resource][2].

By default, a request that doesn't specify a departure time uses the

best time of day to travel with the best traffic conditions when calculating routes.

Additional options include:

* [ Specifying a departure time][3] using either `DepartureTime` or
 `DepartNow`. This calculates routes based on predictive traffic data
 at the given time.

 <note markdown="1"> You can't specify both `DepartureTime` and

‘DepartNow` in a single

request. Specifying both parameters returns a validation error.

 </note>
  • Specifying a travel mode][4

    using TravelMode sets the

    transportation mode used to calculate the routes. This also lets you specify additional route preferences in ‘CarModeOptions` if traveling by `Car`, or `TruckModeOptions` if traveling by `Truck`.

[1]: docs.aws.amazon.com/location/previous/developerguide/calculate-route-matrix.html [2]: docs.aws.amazon.com/location-routes/latest/APIReference/API_CreateRouteCalculator.html [3]: docs.aws.amazon.com/location/previous/developerguide/departure-time.html [4]: docs.aws.amazon.com/location/previous/developerguide/travel-mode.html

Examples:

Request syntax with placeholder values


resp = client.calculate_route_matrix({
  calculator_name: "ResourceName", # required
  departure_positions: [ # required
    [1.0],
  ],
  destination_positions: [ # required
    [1.0],
  ],
  travel_mode: "Car", # accepts Car, Truck, Walking, Bicycle, Motorcycle
  departure_time: Time.now,
  depart_now: false,
  distance_unit: "Kilometers", # accepts Kilometers, Miles
  car_mode_options: {
    avoid_ferries: false,
    avoid_tolls: false,
  },
  truck_mode_options: {
    avoid_ferries: false,
    avoid_tolls: false,
    dimensions: {
      length: 1.0,
      height: 1.0,
      width: 1.0,
      unit: "Meters", # accepts Meters, Feet
    },
    weight: {
      total: 1.0,
      unit: "Kilograms", # accepts Kilograms, Pounds
    },
  },
  key: "ApiKey",
})

Response structure


resp.route_matrix #=> Array
resp.route_matrix[0] #=> Array
resp.route_matrix[0][0].distance #=> Float
resp.route_matrix[0][0].duration_seconds #=> Float
resp.route_matrix[0][0].error.code #=> String, one of "RouteNotFound", "RouteTooLong", "PositionsNotFound", "DestinationPositionNotFound", "DeparturePositionNotFound", "OtherValidationError"
resp.route_matrix[0][0].error.message #=> String
resp.snapped_departure_positions #=> Array
resp.snapped_departure_positions[0] #=> Array
resp.snapped_departure_positions[0][0] #=> Float
resp.snapped_destination_positions #=> Array
resp.snapped_destination_positions[0] #=> Array
resp.snapped_destination_positions[0][0] #=> Float
resp.summary.data_source #=> String
resp.summary.route_count #=> Integer
resp.summary.error_count #=> Integer
resp.summary.distance_unit #=> String, one of "Kilometers", "Miles"

Parameters:

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

    ({})

Options Hash (params):

  • :calculator_name (required, String)

    The name of the route calculator resource that you want to use to calculate the route matrix.

  • :departure_positions (required, Array<Array>)

    The list of departure (origin) positions for the route matrix. An array of points, each of which is itself a 2-value array defined in

    WGS 84][1

    format: ‘[longitude, latitude]`. For example, `[-123.115,

    49.285]‘.

    Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See [ Position restrictions] in the *Amazon Location Service Developer Guide*.

    <note markdown=“1”> For route calculators that use Esri as the data provider, if you specify a departure that’s not located on a road, Amazon Location [ moves the position to the nearest road]. The snapped value is available in the result in ‘SnappedDeparturePositions`.

    </note>
    

    Valid Values: ‘[-180 to 180,-90 to 90]`

    [1]: earth-info.nga.mil/GandG/wgs84/index.html [2]: docs.aws.amazon.com/location/previous/developerguide/calculate-route-matrix.html#matrix-routing-position-limits [3]: docs.aws.amazon.com/location/previous/developerguide/snap-to-nearby-road.html

  • :destination_positions (required, Array<Array>)

    The list of destination positions for the route matrix. An array of points, each of which is itself a 2-value array defined in [WGS 84] format: ‘[longitude, latitude]`. For example, `[-122.339, 47.615]`

    Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See [ Position restrictions] in the *Amazon Location Service Developer Guide*.

    <note markdown=“1”> For route calculators that use Esri as the data provider, if you specify a destination that’s not located on a road, Amazon Location [ moves the position to the nearest road]. The snapped value is available in the result in ‘SnappedDestinationPositions`.

    </note>
    

    Valid Values: ‘[-180 to 180,-90 to 90]`

    [1]: earth-info.nga.mil/GandG/wgs84/index.html [2]: docs.aws.amazon.com/location/previous/developerguide/calculate-route-matrix.html#matrix-routing-position-limits [3]: docs.aws.amazon.com/location/previous/developerguide/snap-to-nearby-road.html

  • :travel_mode (String)

    Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

    The ‘TravelMode` you specify also determines how you specify route preferences:

    • If traveling by ‘Car` use the `CarModeOptions` parameter.

    • If traveling by ‘Truck` use the `TruckModeOptions` parameter.

    <note markdown=“1”> ‘Bicycle` or `Motorcycle` are only valid when using `Grab` as a data provider, and only within Southeast Asia.

    `Truck` is not available for Grab.
    
    For more information about using Grab as a data provider, see
    
    GrabMaps][1

    in the *Amazon Location Service Developer Guide*.

    </note>
    

    Default Value: ‘Car`

    [1]: docs.aws.amazon.com/location/previous/developerguide/grab.html

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

    Specifies the desired time of departure. Uses the given time to calculate the route matrix. You can’t set both ‘DepartureTime` and `DepartNow`. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.

    <note markdown=“1”> Setting a departure time in the past returns a ‘400 ValidationException` error.

    </note>
    
    • In [ISO 8601] format: ‘YYYY-MM-DDThh:mm:ss.sssZ`. For example, `2020–07-2T12:15:20.000Z+01:00`

    ^

    [1]: www.iso.org/iso-8601-date-and-time-format.html

  • :depart_now (Boolean)

    Sets the time of departure as the current time. Uses the current time to calculate the route matrix. You can’t set both ‘DepartureTime` and `DepartNow`. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.

    Default Value: ‘false`

    Valid Values: ‘false` | `true`

  • :distance_unit (String)

    Set the unit system to specify the distance.

    Default Value: ‘Kilometers`

  • :car_mode_options (Types::CalculateRouteCarModeOptions)

    Specifies route preferences when traveling by ‘Car`, such as avoiding routes that use ferries or tolls.

    Requirements: ‘TravelMode` must be specified as `Car`.

  • :truck_mode_options (Types::CalculateRouteTruckModeOptions)

    Specifies route preferences when traveling by ‘Truck`, such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road.

    Requirements: ‘TravelMode` must be specified as `Truck`.

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



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

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

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

‘CancelJob` cancels a job that is currently running or pending. If the job is already in a terminal state (`Completed`, `Failed`, or `Cancelled`), the operation returns successfully with the current status.

For more information, see [Job concepts] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/jobs-concepts.html

Examples:

Request syntax with placeholder values


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

Response structure


resp.job_arn #=> String
resp.job_id #=> String
resp.status #=> String, one of "Pending", "Running", "Completed", "Failed", "Cancelling", "Cancelled"

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The unique identifier of the job to cancel.

Returns:

See Also:



1501
1502
1503
1504
# File 'lib/aws-sdk-locationservice/client.rb', line 1501

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

#create_geofence_collection(params = {}) ⇒ Types::CreateGeofenceCollectionResponse

Creates a geofence collection, which manages and stores geofences.

Examples:

Request syntax with placeholder values


resp = client.create_geofence_collection({
  collection_name: "ResourceName", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  pricing_plan_data_source: "String",
  description: "ResourceDescription",
  tags: {
    "TagKey" => "TagValue",
  },
  kms_key_id: "KmsKeyId",
})

Response structure


resp.collection_name #=> String
resp.collection_arn #=> String
resp.create_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    A custom name for the geofence collection.

    Requirements:

    • Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).

    • Must be a unique geofence collection name.

    • No spaces allowed. For example, ‘ExampleGeofenceCollection`.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :pricing_plan_data_source (String)

    This parameter is no longer used.

  • :description (String)

    An optional description for the geofence collection.

  • :tags (Hash<String,String>)

    Applies one or more tags to the geofence collection. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

    Format: ‘“key” : “value”`

    Restrictions:

    • Maximum 50 tags per resource

    • Each resource tag must be unique with a maximum of one value.

    • Maximum key length: 128 Unicode characters in UTF-8

    • Maximum value length: 256 Unicode characters in UTF-8

    • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

    • Cannot use “aws:” as a prefix for a key.

  • :kms_key_id (String)

    A key identifier for an [Amazon Web Services KMS customer managed key]. Enter a key ID, key ARN, alias name, or alias ARN.

    [1]: docs.aws.amazon.com/kms/latest/developerguide/create-keys.html

Returns:

See Also:



1589
1590
1591
1592
# File 'lib/aws-sdk-locationservice/client.rb', line 1589

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

#create_key(params = {}) ⇒ Types::CreateKeyResponse

Creates an API key resource in your Amazon Web Services account, which lets you grant actions for Amazon Location resources to the API key bearer.

For more information, see [Use API keys to authenticate] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html

Examples:

Request syntax with placeholder values


resp = client.create_key({
  key_name: "ResourceName", # required
  restrictions: { # required
    allow_actions: ["ApiKeyAction"], # required
    allow_resources: ["GeoArnV2"], # required
    allow_referers: ["RefererPattern"],
    allow_android_apps: [
      {
        package: "AndroidPackageName", # required
        certificate_fingerprint: "Sha1CertificateFingerprint", # required
      },
    ],
    allow_apple_apps: [
      {
        bundle_id: "AppleBundleId", # required
      },
    ],
  },
  description: "ResourceDescription",
  expire_time: Time.now,
  no_expiry: false,
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.key #=> String
resp.key_arn #=> String
resp.key_name #=> String
resp.create_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :key_name (required, String)

    A custom name for the API key resource.

    Requirements:

    • Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).

    • Must be a unique API key name.

    • No spaces allowed. For example, ‘ExampleAPIKey`.

  • :restrictions (required, Types::ApiKeyRestrictions)

    The API key restrictions for the API key resource.

  • :description (String)

    An optional description for the API key resource.

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

    The optional timestamp for when the API key resource will expire in [ ISO 8601] format: ‘YYYY-MM-DDThh:mm:ss.sssZ`. One of `NoExpiry` or `ExpireTime` must be set.

    [1]: www.iso.org/iso-8601-date-and-time-format.html

  • :no_expiry (Boolean)

    Optionally set to ‘true` to set no expiration time for the API key. One of `NoExpiry` or `ExpireTime` must be set.

  • :tags (Hash<String,String>)

    Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and filter your resources by labelling them.

    Format: ‘“key” : “value”`

    Restrictions:

    • Maximum 50 tags per resource

    • Each resource tag must be unique with a maximum of one value.

    • Maximum key length: 128 Unicode characters in UTF-8

    • Maximum value length: 256 Unicode characters in UTF-8

    • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

    • Cannot use “aws:” as a prefix for a key.

Returns:

See Also:



1704
1705
1706
1707
# File 'lib/aws-sdk-locationservice/client.rb', line 1704

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

#create_map(params = {}) ⇒ Types::CreateMapResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require ‘Grab` data.

* `CreateMap` is part of a previous Amazon Location Service Maps API
 (version 1) which has been superseded by a more intuitive, powerful,
 and complete API (version 2).
  • The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Creates a map resource in your Amazon Web Services account, which

provides map tiles of different styles sourced from global location data providers.

<note markdown="1"> If your application is tracking or routing assets

you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the [Amazon Web Services service terms] for more details.

</note>

[1]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [2]: docs.aws.amazon.com/location/latest/developerguide/maps.html [3]: aws.amazon.com/service-terms

Examples:

Request syntax with placeholder values


resp = client.create_map({
  map_name: "ResourceName", # required
  configuration: { # required
    style: "MapStyle", # required
    political_view: "CountryCode3",
    custom_layers: ["CustomLayer"],
  },
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  description: "ResourceDescription",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.map_name #=> String
resp.map_arn #=> String
resp.create_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The name for the map resource.

    Requirements:

    • Must contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).

    • Must be a unique map resource name.

    • No spaces allowed. For example, ‘ExampleMap`.

  • :configuration (required, Types::MapConfiguration)

    Specifies the ‘MapConfiguration`, including the map style, for the map resource that you create. The map style defines the look of maps and the data provider for your map resource.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :description (String)

    An optional description for the map resource.

  • :tags (Hash<String,String>)

    Applies one or more tags to the map resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

    Format: ‘“key” : “value”`

    Restrictions:

    • Maximum 50 tags per resource

    • Each resource tag must be unique with a maximum of one value.

    • Maximum key length: 128 Unicode characters in UTF-8

    • Maximum value length: 256 Unicode characters in UTF-8

    • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

    • Cannot use “aws:” as a prefix for a key.

Returns:

See Also:



1826
1827
1828
1829
# File 'lib/aws-sdk-locationservice/client.rb', line 1826

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

#create_place_index(params = {}) ⇒ Types::CreatePlaceIndexResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Places API V2 unless you require Grab data.

* `CreatePlaceIndex` is part of a previous Amazon Location Service
 Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Places API version 2 has a simplified interface that can be used without creating or managing place index resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Places V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Places_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/places.html).

Creates a place index resource in your Amazon Web Services account.

Use a place index resource to geocode addresses and other text queries by using the ‘SearchPlaceIndexForText` operation, and reverse geocode coordinates by using the `SearchPlaceIndexForPosition` operation, and enable autosuggestions by using the `SearchPlaceIndexForSuggestions` operation.

<note markdown="1"> If your application is tracking or routing assets

you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the [Amazon Web Services service terms] for more details.

</note>

[1]: aws.amazon.com/service-terms

Examples:

Request syntax with placeholder values


resp = client.create_place_index({
  index_name: "ResourceName", # required
  data_source: "String", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  description: "ResourceDescription",
  data_source_configuration: {
    intended_use: "SingleUse", # accepts SingleUse, Storage
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.index_name #=> String
resp.index_arn #=> String
resp.create_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



1992
1993
1994
1995
# File 'lib/aws-sdk-locationservice/client.rb', line 1992

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

#create_route_calculator(params = {}) ⇒ Types::CreateRouteCalculatorResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Routes API V2 unless you require Grab data.

* `CreateRouteCalculator` is part of a previous Amazon Location
 Service Routes API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Routes API version 2 has a simplified interface that can be used without creating or managing route calculator resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under ‘geo-routes` or `geo_routes`, not under `location`.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Routes V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Routes_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/routes.html).

Creates a route calculator resource in your Amazon Web Services

account.

You can send requests to a route calculator resource to estimate

travel time, distance, and get directions. A route calculator sources traffic and road network data from your chosen data provider.

<note markdown="1"> If your application is tracking or routing assets

you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the [Amazon Web Services service terms] for more details.

</note>

[1]: aws.amazon.com/service-terms

Examples:

Request syntax with placeholder values


resp = client.create_route_calculator({
  calculator_name: "ResourceName", # required
  data_source: "String", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  description: "ResourceDescription",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.calculator_name #=> String
resp.calculator_arn #=> String
resp.create_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



2152
2153
2154
2155
# File 'lib/aws-sdk-locationservice/client.rb', line 2152

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

#create_tracker(params = {}) ⇒ Types::CreateTrackerResponse

Creates a tracker resource in your Amazon Web Services account, which lets you retrieve current and historical location of devices.

Examples:

Request syntax with placeholder values


resp = client.create_tracker({
  tracker_name: "ResourceName", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  kms_key_id: "KmsKeyId",
  pricing_plan_data_source: "String",
  description: "ResourceDescription",
  tags: {
    "TagKey" => "TagValue",
  },
  position_filtering: "TimeBased", # accepts TimeBased, DistanceBased, AccuracyBased
  event_bridge_enabled: false,
  kms_key_enable_geospatial_queries: false,
})

Response structure


resp.tracker_name #=> String
resp.tracker_arn #=> String
resp.create_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name for the tracker resource.

    Requirements:

    • Contain only alphanumeric characters (A-Z, a-z, 0-9) , hyphens (-), periods (.), and underscores (_).

    • Must be a unique tracker resource name.

    • No spaces allowed. For example, ‘ExampleTracker`.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :kms_key_id (String)

    A key identifier for an [Amazon Web Services KMS customer managed key]. Enter a key ID, key ARN, alias name, or alias ARN.

    [1]: docs.aws.amazon.com/kms/latest/developerguide/create-keys.html

  • :pricing_plan_data_source (String)

    This parameter is no longer used.

  • :description (String)

    An optional description for the tracker resource.

  • :tags (Hash<String,String>)

    Applies one or more tags to the tracker resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

    Format: ‘“key” : “value”`

    Restrictions:

    • Maximum 50 tags per resource

    • Each resource tag must be unique with a maximum of one value.

    • Maximum key length: 128 Unicode characters in UTF-8

    • Maximum value length: 256 Unicode characters in UTF-8

    • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

    • Cannot use “aws:” as a prefix for a key.

  • :position_filtering (String)

    Specifies the position filtering for the tracker resource.

    Valid values:

    • ‘TimeBased` - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.

    • ‘DistanceBased` - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this area are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.

    • ‘AccuracyBased` - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This can reduce the effects of GPS noise when displaying device trajectories on a map, and can help control your costs by reducing the number of geofence evaluations.

    This field is optional. If not specified, the default value is ‘TimeBased`.

  • :event_bridge_enabled (Boolean)

    Whether to enable position ‘UPDATE` events from this tracker to be sent to EventBridge.

    <note markdown=“1”> You do not need enable this feature to get ‘ENTER` and `EXIT` events for geofences with this tracker. Those events are always sent to EventBridge.

    </note>
    
  • :kms_key_enable_geospatial_queries (Boolean)

    Enables ‘GeospatialQueries` for a tracker that uses a [Amazon Web Services KMS customer managed key].

    This parameter is only used if you are using a KMS customer managed key.

    <note markdown=“1”> If you wish to encrypt your data using your own KMS customer managed key, then the Bounding Polygon Queries feature will be disabled by default. This is because by using this feature, a representation of your device positions will not be encrypted using the your KMS managed key. The exact device position, however; is still encrypted using your managed key.

    You can choose to opt-in to the Bounding Polygon Quseries feature.
    

    This is done by setting the ‘KmsKeyEnableGeospatialQueries` parameter to true when creating or updating a Tracker.

    </note>
    

    [1]: docs.aws.amazon.com/kms/latest/developerguide/create-keys.html

Returns:

See Also:



2309
2310
2311
2312
# File 'lib/aws-sdk-locationservice/client.rb', line 2309

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

#delete_geofence_collection(params = {}) ⇒ Struct

Deletes a geofence collection from your Amazon Web Services account.

<note markdown=“1”> This operation deletes the resource permanently. If the geofence collection is the target of a tracker resource, the devices will no longer be monitored.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_geofence_collection({
  collection_name: "ResourceName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The name of the geofence collection to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

#delete_key(params = {}) ⇒ Struct

Deletes the specified API key. The API key must have been deactivated more than 90 days previously.

For more information, see [Use API keys to authenticate] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html

Examples:

Request syntax with placeholder values


resp = client.delete_key({
  key_name: "ResourceName", # required
  force_delete: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :key_name (required, String)

    The name of the API key to delete.

  • :force_delete (Boolean)

    ForceDelete bypasses an API key’s expiry conditions and deletes the key. Set the parameter ‘true` to delete the key or to `false` to not preemptively delete the API key.

    Valid values: ‘true`, or `false`.

    Required: No

    <note markdown=“1”> This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.

    </note>
    

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2382
2383
2384
2385
# File 'lib/aws-sdk-locationservice/client.rb', line 2382

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

#delete_map(params = {}) ⇒ Struct

This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require ‘Grab` data.

* `DeleteMap` is part of a previous Amazon Location Service Maps API
 (version 1) which has been superseded by a more intuitive, powerful,
 and complete API (version 2).
  • The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Deletes a map resource from your Amazon Web Services account.

<note markdown="1"> This operation deletes the resource permanently.

If the map is being used in an application, the map may not render.

</note>

[1]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [2]: docs.aws.amazon.com/location/latest/developerguide/maps.html

Examples:

Request syntax with placeholder values


resp = client.delete_map({
  map_name: "ResourceName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The name of the map resource to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2436
2437
2438
2439
# File 'lib/aws-sdk-locationservice/client.rb', line 2436

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

#delete_place_index(params = {}) ⇒ Struct

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Places API V2 unless you require Grab data.

* `DeletePlaceIndex` is part of a previous Amazon Location Service
 Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Places API version 2 has a simplified interface that can be used without creating or managing place index resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Places V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Places_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/places.html).

Deletes a place index resource from your Amazon Web Services account.

<note markdown="1"> This operation deletes the resource permanently.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_place_index({
  index_name: "ResourceName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2486
2487
2488
2489
# File 'lib/aws-sdk-locationservice/client.rb', line 2486

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

#delete_route_calculator(params = {}) ⇒ Struct

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Routes API V2 unless you require Grab data.

* `DeleteRouteCalculator` is part of a previous Amazon Location
 Service Routes API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Routes API version 2 has a simplified interface that can be used without creating or managing route calculator resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under ‘geo-routes` or `geo_routes`, not under `location`.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Routes V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Routes_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/routes.html).

Deletes a route calculator resource from your Amazon Web Services

account.

<note markdown="1"> This operation deletes the resource permanently.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_route_calculator({
  calculator_name: "ResourceName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :calculator_name (required, String)

    The name of the route calculator resource to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2537
2538
2539
2540
# File 'lib/aws-sdk-locationservice/client.rb', line 2537

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

#delete_tracker(params = {}) ⇒ Struct

Deletes a tracker resource from your Amazon Web Services account.

<note markdown=“1”> This operation deletes the resource permanently. If the tracker resource is in use, you may encounter an error. Make sure that the target resource isn’t a dependency for your applications.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_tracker({
  tracker_name: "ResourceName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2565
2566
2567
2568
# File 'lib/aws-sdk-locationservice/client.rb', line 2565

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

#describe_geofence_collection(params = {}) ⇒ Types::DescribeGeofenceCollectionResponse

Retrieves the geofence collection details.

Examples:

Request syntax with placeholder values


resp = client.describe_geofence_collection({
  collection_name: "ResourceName", # required
})

Response structure


resp.collection_name #=> String
resp.collection_arn #=> String
resp.description #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.pricing_plan_data_source #=> String
resp.kms_key_id #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.create_time #=> Time
resp.update_time #=> Time
resp.geofence_count #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The name of the geofence collection.

Returns:

See Also:



2612
2613
2614
2615
# File 'lib/aws-sdk-locationservice/client.rb', line 2612

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

#describe_key(params = {}) ⇒ Types::DescribeKeyResponse

Retrieves the API key resource details.

For more information, see [Use API keys to authenticate] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html

Examples:

Request syntax with placeholder values


resp = client.describe_key({
  key_name: "ResourceName", # required
})

Response structure


resp.key #=> String
resp.key_arn #=> String
resp.key_name #=> String
resp.restrictions.allow_actions #=> Array
resp.restrictions.allow_actions[0] #=> String
resp.restrictions.allow_resources #=> Array
resp.restrictions.allow_resources[0] #=> String
resp.restrictions.allow_referers #=> Array
resp.restrictions.allow_referers[0] #=> String
resp.restrictions.allow_android_apps #=> Array
resp.restrictions.allow_android_apps[0].package #=> String
resp.restrictions.allow_android_apps[0].certificate_fingerprint #=> String
resp.restrictions.allow_apple_apps #=> Array
resp.restrictions.allow_apple_apps[0].bundle_id #=> String
resp.create_time #=> Time
resp.expire_time #=> Time
resp.update_time #=> Time
resp.description #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :key_name (required, String)

    The name of the API key resource.

Returns:

See Also:



2674
2675
2676
2677
# File 'lib/aws-sdk-locationservice/client.rb', line 2674

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

#describe_map(params = {}) ⇒ Types::DescribeMapResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require ‘Grab` data.

* `DescribeMap` is part of a previous Amazon Location Service Maps

API

(version 1) which has been superseded by a more intuitive, powerful,
and complete API (version 2).
  • The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Retrieves the map resource details.

[1]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [2]: docs.aws.amazon.com/location/latest/developerguide/maps.html

Examples:

Request syntax with placeholder values


resp = client.describe_map({
  map_name: "ResourceName", # required
})

Response structure


resp.map_name #=> String
resp.map_arn #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.data_source #=> String
resp.configuration.style #=> String
resp.configuration.political_view #=> String
resp.configuration.custom_layers #=> Array
resp.configuration.custom_layers[0] #=> String
resp.description #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.create_time #=> Time
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The name of the map resource.

Returns:

See Also:



2749
2750
2751
2752
# File 'lib/aws-sdk-locationservice/client.rb', line 2749

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

#describe_place_index(params = {}) ⇒ Types::DescribePlaceIndexResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Places API V2 unless you require Grab data.

* `DescribePlaceIndex` is part of a previous Amazon Location Service
 Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Places API version 2 has a simplified interface that can be used without creating or managing place index resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Places V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Places_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/places.html).

Retrieves the place index resource details.

Examples:

Request syntax with placeholder values


resp = client.describe_place_index({
  index_name: "ResourceName", # required
})

Response structure


resp.index_name #=> String
resp.index_arn #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.description #=> String
resp.create_time #=> Time
resp.update_time #=> Time
resp.data_source #=> String
resp.data_source_configuration.intended_use #=> String, one of "SingleUse", "Storage"
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource.

Returns:

See Also:



2818
2819
2820
2821
# File 'lib/aws-sdk-locationservice/client.rb', line 2818

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

#describe_route_calculator(params = {}) ⇒ Types::DescribeRouteCalculatorResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Routes API V2 unless you require Grab data.

* `DescribeRouteCalculator` is part of a previous Amazon Location
 Service Routes API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Routes API version 2 has a simplified interface that can be used without creating or managing route calculator resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under ‘geo-routes` or `geo_routes`, not under `location`.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Routes V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Routes_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/routes.html).

Retrieves the route calculator resource details.

Examples:

Request syntax with placeholder values


resp = client.describe_route_calculator({
  calculator_name: "ResourceName", # required
})

Response structure


resp.calculator_name #=> String
resp.calculator_arn #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.description #=> String
resp.create_time #=> Time
resp.update_time #=> Time
resp.data_source #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :calculator_name (required, String)

    The name of the route calculator resource.

Returns:

See Also:



2885
2886
2887
2888
# File 'lib/aws-sdk-locationservice/client.rb', line 2885

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

#describe_tracker(params = {}) ⇒ Types::DescribeTrackerResponse

Retrieves the tracker resource details.

Examples:

Request syntax with placeholder values


resp = client.describe_tracker({
  tracker_name: "ResourceName", # required
})

Response structure


resp.tracker_name #=> String
resp.tracker_arn #=> String
resp.description #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.pricing_plan_data_source #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.create_time #=> Time
resp.update_time #=> Time
resp.kms_key_id #=> String
resp.position_filtering #=> String, one of "TimeBased", "DistanceBased", "AccuracyBased"
resp.event_bridge_enabled #=> Boolean
resp.kms_key_enable_geospatial_queries #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource.

Returns:

See Also:



2936
2937
2938
2939
# File 'lib/aws-sdk-locationservice/client.rb', line 2936

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

#disassociate_tracker_consumer(params = {}) ⇒ Struct

Removes the association between a tracker resource and a geofence collection.

<note markdown=“1”> Once you unlink a tracker resource from a geofence collection, the tracker positions will no longer be automatically evaluated against geofences.

</note>

Examples:

Request syntax with placeholder values


resp = client.disassociate_tracker_consumer({
  tracker_name: "ResourceName", # required
  consumer_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource to be dissociated from the consumer.

  • :consumer_arn (required, String)

    The Amazon Resource Name (ARN) for the geofence collection to be disassociated from the tracker resource. Used when you need to specify a resource across all Amazon Web Services.

    • Format example: ‘arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollectionConsumer`

    ^

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2976
2977
2978
2979
# File 'lib/aws-sdk-locationservice/client.rb', line 2976

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

#forecast_geofence_events(params = {}) ⇒ Types::ForecastGeofenceEventsResponse

This action forecasts future geofence events that are likely to occur within a specified time horizon if a device continues moving at its current speed. Each forecasted event is associated with a geofence from a provided geofence collection. A forecast event can have one of the following states:

‘ENTER`: The device position is outside the referenced geofence, but the device may cross into the geofence during the forecasting time horizon if it maintains its current speed.

‘EXIT`: The device position is inside the referenced geofence, but the device may leave the geofence during the forecasted time horizon if the device maintains it’s current speed.

‘IDLE`:The device is inside the geofence, and it will remain inside the geofence through the end of the time horizon if the device maintains it’s current speed.

<note markdown=“1”> Heading direction is not considered in the current version. The API takes a conservative approach and includes events that can occur for any heading.

</note>

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.forecast_geofence_events({
  collection_name: "ResourceName", # required
  device_state: { # required
    position: [1.0], # required
    speed: 1.0,
  },
  time_horizon_minutes: 1.0,
  distance_unit: "Kilometers", # accepts Kilometers, Miles
  speed_unit: "KilometersPerHour", # accepts KilometersPerHour, MilesPerHour
  next_token: "LargeToken",
  max_results: 1,
})

Response structure


resp.forecasted_events #=> Array
resp.forecasted_events[0].event_id #=> String
resp.forecasted_events[0].geofence_id #=> String
resp.forecasted_events[0].is_device_in_geofence #=> Boolean
resp.forecasted_events[0].nearest_distance #=> Float
resp.forecasted_events[0].event_type #=> String, one of "ENTER", "EXIT", "IDLE"
resp.forecasted_events[0].forecasted_breach_time #=> Time
resp.forecasted_events[0].geofence_properties #=> Hash
resp.forecasted_events[0].geofence_properties["PropertyMapKeyString"] #=> String
resp.next_token #=> String
resp.distance_unit #=> String, one of "Kilometers", "Miles"
resp.speed_unit #=> String, one of "KilometersPerHour", "MilesPerHour"

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The name of the geofence collection.

  • :device_state (required, Types::ForecastGeofenceEventsDeviceState)

    Represents the device’s state, including its current position and speed. When speed is omitted, this API performs a *containment check*. The *containment check* operation returns ‘IDLE` events for geofences where the device is currently inside of, but no other events.

  • :time_horizon_minutes (Float)

    The forward-looking time window for forecasting, specified in minutes. The API only returns events that are predicted to occur within this time horizon. When no value is specified, this API performs a *containment check*. The *containment check* operation returns ‘IDLE` events for geofences where the device is currently inside of, but no other events.

  • :distance_unit (String)

    The distance unit used for the ‘NearestDistance` property returned in a forecasted event. The measurement system must match for `DistanceUnit` and `SpeedUnit`; if `Kilometers` is specified for `DistanceUnit`, then `SpeedUnit` must be `KilometersPerHour`.

    Default Value: ‘Kilometers`

  • :speed_unit (String)

    The speed unit for the device captured by the device state. The measurement system must match for ‘DistanceUnit` and `SpeedUnit`; if `Kilometers` is specified for `DistanceUnit`, then `SpeedUnit` must be `KilometersPerHour`.

    Default Value: ‘KilometersPerHour`.

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

  • :max_results (Integer)

    An optional limit for the number of resources returned in a single call.

    Default value: ‘20`

Returns:

See Also:



3093
3094
3095
3096
# File 'lib/aws-sdk-locationservice/client.rb', line 3093

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

#get_device_position(params = {}) ⇒ Types::GetDevicePositionResponse

Retrieves a device’s most recent position according to its sample time.

<note markdown=“1”> Device positions are deleted after 30 days.

</note>

Examples:

Request syntax with placeholder values


resp = client.get_device_position({
  tracker_name: "ResourceName", # required
  device_id: "Id", # required
})

Response structure


resp.device_id #=> String
resp.sample_time #=> Time
resp.received_time #=> Time
resp.position #=> Array
resp.position[0] #=> Float
resp.accuracy.horizontal #=> Float
resp.position_properties #=> Hash
resp.position_properties["PositionPropertyMapKeyString"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The tracker resource receiving the position update.

  • :device_id (required, String)

    The device whose position you want to retrieve.

Returns:

See Also:



3142
3143
3144
3145
# File 'lib/aws-sdk-locationservice/client.rb', line 3142

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

#get_device_position_history(params = {}) ⇒ Types::GetDevicePositionHistoryResponse

Retrieves the device position history from a tracker resource within a specified range of time.

<note markdown=“1”> Device positions are deleted after 30 days.

</note>

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_device_position_history({
  tracker_name: "ResourceName", # required
  device_id: "Id", # required
  next_token: "Token",
  start_time_inclusive: Time.now,
  end_time_exclusive: Time.now,
  max_results: 1,
})

Response structure


resp.device_positions #=> Array
resp.device_positions[0].device_id #=> String
resp.device_positions[0].sample_time #=> Time
resp.device_positions[0].received_time #=> Time
resp.device_positions[0].position #=> Array
resp.device_positions[0].position[0] #=> Float
resp.device_positions[0].accuracy.horizontal #=> Float
resp.device_positions[0].position_properties #=> Hash
resp.device_positions[0].position_properties["PositionPropertyMapKeyString"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The tracker resource receiving the request for the device position history.

  • :device_id (required, String)

    The device whose position history you want to retrieve.

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

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

    Specify the start time for the position history in [ ISO 8601] format: ‘YYYY-MM-DDThh:mm:ss.sssZ`. By default, the value will be 24 hours prior to the time that the request is made.

    Requirement:

    • The time specified for ‘StartTimeInclusive` must be before `EndTimeExclusive`.

    ^

    [1]: www.iso.org/iso-8601-date-and-time-format.html

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

    Specify the end time for the position history in [ ISO 8601] format: ‘YYYY-MM-DDThh:mm:ss.sssZ`. By default, the value will be the time that the request is made.

    Requirement:

    • The time specified for ‘EndTimeExclusive` must be after the time for `StartTimeInclusive`.

    ^

    [1]: www.iso.org/iso-8601-date-and-time-format.html

  • :max_results (Integer)

    An optional limit for the number of device positions returned in a single call.

    Default value: ‘100`

Returns:

See Also:



3240
3241
3242
3243
# File 'lib/aws-sdk-locationservice/client.rb', line 3240

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

#get_geofence(params = {}) ⇒ Types::GetGeofenceResponse

Retrieves the geofence details from a geofence collection.

<note markdown=“1”> The returned geometry will always match the geometry format used when the geofence was created.

</note>

Examples:

Request syntax with placeholder values


resp = client.get_geofence({
  collection_name: "ResourceName", # required
  geofence_id: "Id", # required
})

Response structure


resp.geofence_id #=> String
resp.geometry.polygon #=> Array
resp.geometry.polygon[0] #=> Array
resp.geometry.polygon[0][0] #=> Array
resp.geometry.polygon[0][0][0] #=> Float
resp.geometry.circle.center #=> Array
resp.geometry.circle.center[0] #=> Float
resp.geometry.circle.radius #=> Float
resp.geometry.geobuf #=> String
resp.geometry.multi_polygon #=> Array
resp.geometry.multi_polygon[0] #=> Array
resp.geometry.multi_polygon[0][0] #=> Array
resp.geometry.multi_polygon[0][0][0] #=> Array
resp.geometry.multi_polygon[0][0][0][0] #=> Float
resp.status #=> String
resp.create_time #=> Time
resp.update_time #=> Time
resp.geofence_properties #=> Hash
resp.geofence_properties["PropertyMapKeyString"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The geofence collection storing the target geofence.

  • :geofence_id (required, String)

    The geofence you’re retrieving details for.

Returns:

See Also:



3300
3301
3302
3303
# File 'lib/aws-sdk-locationservice/client.rb', line 3300

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

#get_job(params = {}) ⇒ Types::GetJobResponse

‘GetJob` retrieves detailed information about a specific job, including its current status, configuration, and error information if the job failed.

For more information, see [Job concepts] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/jobs-concepts.html

The following waiters are defined for this operation (see #wait_until for detailed usage):

* job_completed

Examples:

Request syntax with placeholder values


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

Response structure


resp.action #=> String, one of "ValidateAddress"
resp.action_options.validate_address.additional_features #=> Array
resp.action_options.validate_address.additional_features[0] #=> String, one of "Position", "CountrySpecificAttributes"
resp.created_at #=> Time
resp.ended_at #=> Time
resp.error.code #=> String, one of "ValidationError", "InternalServerError"
resp.error.messages #=> Array
resp.error.messages[0] #=> String
resp.execution_role_arn #=> String
resp.input_options.location #=> String
resp.input_options.format #=> String, one of "Parquet"
resp.job_arn #=> String
resp.job_id #=> String
resp.name #=> String
resp.output_options.format #=> String, one of "Parquet"
resp.output_options.location #=> String
resp.status #=> String, one of "Pending", "Running", "Completed", "Failed", "Cancelling", "Cancelled"
resp.updated_at #=> Time
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The unique identifier of the job to retrieve.

Returns:

See Also:



3374
3375
3376
3377
# File 'lib/aws-sdk-locationservice/client.rb', line 3374

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

#get_map_glyphs(params = {}) ⇒ Types::GetMapGlyphsResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to [ ‘GetGlyphs` ][1] unless you require `Grab` data.

* `GetMapGlyphs` is part of a previous Amazon Location Service Maps
 API (version 1) which has been superseded by a more intuitive,
 powerful, and complete API (version 2).
  • The version 2 ‘GetGlyphs` operation gives a better user experience and is compatible with the remainder of the V2 Maps API.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Retrieves glyphs used to display labels on a map.

[1]: docs.aws.amazon.com/location/latest/APIReference/API_geomaps_GetGlyphs.html [2]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [3]: docs.aws.amazon.com/location/latest/developerguide/maps.html

Examples:

Request syntax with placeholder values


resp = client.get_map_glyphs({
  map_name: "ResourceName", # required
  font_stack: "String", # required
  font_unicode_range: "GetMapGlyphsRequestFontUnicodeRangeString", # required
  key: "ApiKey",
})

Response structure


resp.blob #=> IO
resp.content_type #=> String
resp.cache_control #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The map resource associated with the glyph file.

  • :font_stack (required, String)

    A comma-separated list of fonts to load glyphs from in order of preference. For example, ‘Noto Sans Regular, Arial Unicode`.

    Valid font stacks for [Esri] styles:

    • VectorEsriDarkGrayCanvas – ‘Ubuntu Medium Italic` | `Ubuntu Medium` | `Ubuntu Italic` | `Ubuntu Regular` | `Ubuntu Bold`

    • VectorEsriLightGrayCanvas – ‘Ubuntu Italic` | `Ubuntu Regular` | `Ubuntu Light` | `Ubuntu Bold`

    • VectorEsriTopographic – ‘Noto Sans Italic` | `Noto Sans Regular` | `Noto Sans Bold` | `Noto Serif Regular` | `Roboto Condensed Light Italic`

    • VectorEsriStreets – ‘Arial Regular` | `Arial Italic` | `Arial Bold`

    • VectorEsriNavigation – ‘Arial Regular` | `Arial Italic` | `Arial Bold`

    Valid font stacks for [HERE Technologies] styles:

    • VectorHereContrast – ‘Fira GO Regular` | `Fira GO Bold`

    • VectorHereExplore, VectorHereExploreTruck, HybridHereExploreSatellite – ‘Fira GO Italic` | `Fira GO Map` | `Fira GO Map Bold` | `Noto Sans CJK JP Bold` | `Noto Sans CJK JP Light` | `Noto Sans CJK JP Regular`

    Valid font stacks for [GrabMaps] styles:

    • VectorGrabStandardLight, VectorGrabStandardDark – ‘Noto Sans Regular` | `Noto Sans Medium` | `Noto Sans Bold`

    ^

    Valid font stacks for [Open Data] styles:

    • VectorOpenDataStandardLight, VectorOpenDataStandardDark, VectorOpenDataVisualizationLight, VectorOpenDataVisualizationDark –‘Amazon Ember Regular,Noto Sans Regular` | `Amazon Ember Bold,Noto Sans Bold` | `Amazon Ember Medium,Noto Sans Medium` | `Amazon Ember Regular Italic,Noto Sans Italic` | `Amazon Ember Condensed RC Regular,Noto Sans Regular` | `Amazon Ember Condensed RC Bold,Noto Sans Bold` | `Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular` | `Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold` | `Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold` | `Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular` | `Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular` | `Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium`

    ^

    <note markdown=“1”> The fonts used by the Open Data map styles are combined fonts that use ‘Amazon Ember` for most glyphs but `Noto Sans` for glyphs unsupported by `Amazon Ember`.

    </note>
    

    [1]: docs.aws.amazon.com/location/previous/developerguide/esri.html [2]: docs.aws.amazon.com/location/previous/developerguide/HERE.html [3]: docs.aws.amazon.com/location/previous/developerguide/grab.html [4]: docs.aws.amazon.com/location/previous/developerguide/open-data.html

  • :font_unicode_range (required, String)

    A Unicode range of characters to download glyphs for. Each response will contain 256 characters. For example, 0–255 includes all characters from range ‘U+0000` to `00FF`. Must be aligned to multiples of 256.

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



3519
3520
3521
3522
# File 'lib/aws-sdk-locationservice/client.rb', line 3519

def get_map_glyphs(params = {}, options = {}, &block)
  req = build_request(:get_map_glyphs, params)
  req.send_request(options, &block)
end

#get_map_sprites(params = {}) ⇒ Types::GetMapSpritesResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to [ ‘GetSprites` ][1] unless you require `Grab` data.

* `GetMapSprites` is part of a previous Amazon Location Service Maps
 API (version 1) which has been superseded by a more intuitive,
 powerful, and complete API (version 2).
  • The version 2 ‘GetSprites` operation gives a better user experience and is compatible with the remainder of the V2 Maps API.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Retrieves the sprite sheet corresponding to a map resource. The

sprite sheet is a PNG image paired with a JSON document describing the offsets of individual icons that will be displayed on a rendered map.

[1]: docs.aws.amazon.com/location/latest/APIReference/API_geomaps_GetSprites.html [2]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [3]: docs.aws.amazon.com/location/latest/developerguide/maps.html

Examples:

Request syntax with placeholder values


resp = client.get_map_sprites({
  map_name: "ResourceName", # required
  file_name: "GetMapSpritesRequestFileNameString", # required
  key: "ApiKey",
})

Response structure


resp.blob #=> IO
resp.content_type #=> String
resp.cache_control #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The map resource associated with the sprite file.

  • :file_name (required, String)

    The name of the sprite file. Use the following file names for the sprite sheet:

    • ‘sprites.png`

    • ‘sprites@2x.png` for high pixel density displays

    For the JSON document containing image offsets. Use the following file names:

    • ‘sprites.json`

    • ‘sprites@2x.json` for high pixel density displays

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



3605
3606
3607
3608
# File 'lib/aws-sdk-locationservice/client.rb', line 3605

def get_map_sprites(params = {}, options = {}, &block)
  req = build_request(:get_map_sprites, params)
  req.send_request(options, &block)
end

#get_map_style_descriptor(params = {}) ⇒ Types::GetMapStyleDescriptorResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to [ ‘GetStyleDescriptor` ][1] unless you require `Grab` data.

* `GetMapStyleDescriptor` is part of a previous Amazon Location
 Service Maps API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The version 2 ‘GetStyleDescriptor` operation gives a better user experience and is compatible with the remainder of the V2 Maps API.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Retrieves the map style descriptor from a map resource.

The style descriptor contains specifications on how features render on

a map. For example, what data to display, what order to display the data in, and the style for the data. Style descriptors follow the Mapbox Style Specification.

[1]: docs.aws.amazon.com/location/latest/APIReference/API_geomaps_GetStyleDescriptor.html [2]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [3]: docs.aws.amazon.com/location/latest/developerguide/maps.html

Examples:

Request syntax with placeholder values


resp = client.get_map_style_descriptor({
  map_name: "ResourceName", # required
  key: "ApiKey",
})

Response structure


resp.blob #=> IO
resp.content_type #=> String
resp.cache_control #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



3677
3678
3679
3680
# File 'lib/aws-sdk-locationservice/client.rb', line 3677

def get_map_style_descriptor(params = {}, options = {}, &block)
  req = build_request(:get_map_style_descriptor, params)
  req.send_request(options, &block)
end

#get_map_tile(params = {}) ⇒ Types::GetMapTileResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to [ ‘GetTile` ][1] unless you require `Grab` data.

* `GetMapTile` is part of a previous Amazon Location Service Maps API
 (version 1) which has been superseded by a more intuitive, powerful,
 and complete API (version 2).
  • The version 2 ‘GetTile` operation gives a better user experience and is compatible with the remainder of the V2 Maps API.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Retrieves a vector data tile from the map resource. Map tiles are

used by clients to render a map. they’re addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.

The origin (0, 0) is the top left of the map. Increasing the zoom

level by 1 doubles both the X and Y dimensions, so a tile containing data for the entire world at (0/0/0) will be split into 4 tiles at zoom 1 (1/0/0, 1/0/1, 1/1/0, 1/1/1).

[1]: docs.aws.amazon.com/location/latest/APIReference/API_geomaps_GetTile.html [2]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [3]: docs.aws.amazon.com/location/latest/developerguide/maps.html

Examples:

Request syntax with placeholder values


resp = client.get_map_tile({
  map_name: "ResourceName", # required
  z: "GetMapTileRequestZString", # required
  x: "GetMapTileRequestXString", # required
  y: "GetMapTileRequestYString", # required
  key: "ApiKey",
})

Response structure


resp.blob #=> IO
resp.content_type #=> String
resp.cache_control #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The map resource to retrieve the map tiles from.

  • :z (required, String)

    The zoom value for the map tile.

  • :x (required, String)

    The X axis value for the map tile.

  • :y (required, String)

    The Y axis value for the map tile.

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



3764
3765
3766
3767
# File 'lib/aws-sdk-locationservice/client.rb', line 3764

def get_map_tile(params = {}, options = {}, &block)
  req = build_request(:get_map_tile, params)
  req.send_request(options, &block)
end

#get_place(params = {}) ⇒ Types::GetPlaceResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the [V2 ‘GetPlace` ](/location/latest/APIReference/API_geoplaces_GetPlace.html) operation unless you require Grab data.

* This version of `GetPlace` is part of a previous Amazon Location
 Service Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • Version 2 of the ‘GetPlace` operation interoperates with the rest of the Places V2 API, while this version does not.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Places V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Places_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/places.html).

Finds a place by its unique ID. A `PlaceId` is returned by other

search operations.

<note markdown="1"> A PlaceId is valid only if all of the following

are the same in the original search request and the call to ‘GetPlace`.

* Customer Amazon Web Services account
  • Amazon Web Services Region

  • Data provider specified in the place index resource

</note>

<note markdown="1"> If your Place index resource is configured with

Grab as your geolocation provider and Storage as Intended use, the GetPlace operation is unavailable. For more information, see [AWS service terms].

</note>

[1]: aws.amazon.com/service-terms

Examples:

Request syntax with placeholder values


resp = client.get_place({
  index_name: "ResourceName", # required
  place_id: "PlaceId", # required
  language: "LanguageTag",
  key: "ApiKey",
})

Response structure


resp.place.label #=> String
resp.place.geometry.point #=> Array
resp.place.geometry.point[0] #=> Float
resp.place.address_number #=> String
resp.place.street #=> String
resp.place.neighborhood #=> String
resp.place.municipality #=> String
resp.place.sub_region #=> String
resp.place.region #=> String
resp.place.country #=> String
resp.place.postal_code #=> String
resp.place.interpolated #=> Boolean
resp.place.time_zone.name #=> String
resp.place.time_zone.offset #=> Integer
resp.place.unit_type #=> String
resp.place.unit_number #=> String
resp.place.categories #=> Array
resp.place.categories[0] #=> String
resp.place.supplemental_categories #=> Array
resp.place.supplemental_categories[0] #=> String
resp.place.sub_municipality #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource that you want to use for the search.

  • :place_id (required, String)

    The identifier of the place to find.

  • :language (String)

    The preferred language used to return results. The value must be a valid [BCP 47] language tag, for example, ‘en` for English.

    This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

    For an example, we’ll use the Greek language. You search for a location around Athens, Greece, with the ‘language` parameter set to `en`. The `city` in the results will most likely be returned as `Athens`.

    If you set the ‘language` parameter to `el`, for Greek, then the `city` in the results will more likely be returned as `Αθήνα`.

    If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    [1]: tools.ietf.org/search/bcp47

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



3900
3901
3902
3903
# File 'lib/aws-sdk-locationservice/client.rb', line 3900

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

#list_device_positions(params = {}) ⇒ Types::ListDevicePositionsResponse

A batch request to retrieve all device positions.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_device_positions({
  tracker_name: "ResourceName", # required
  max_results: 1,
  next_token: "Token",
  filter_geometry: {
    polygon: [
      [
        [1.0],
      ],
    ],
  },
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].device_id #=> String
resp.data.entries[0].sample_time #=> Time
resp.data.entries[0].position #=> Array
resp.data.entries[0].position[0] #=> Float
resp.data.entries[0].accuracy.horizontal #=> Float
resp.data.entries[0].position_properties #=> Hash
resp.data.entries[0].position_properties["PositionPropertyMapKeyString"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The tracker resource containing the requested devices.

  • :max_results (Integer)

    An optional limit for the number of entries returned in a single call.

    Default value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

  • :filter_geometry (Types::TrackingFilterGeometry)

    The geometry used to filter device positions.

Returns:

See Also:



3962
3963
3964
3965
# File 'lib/aws-sdk-locationservice/client.rb', line 3962

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

#list_geofence_collections(params = {}) ⇒ Types::ListGeofenceCollectionsResponse

Lists geofence collections in your Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_geofence_collections({
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].collection_name #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.data.entries[0].pricing_plan_data_source #=> String
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].update_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    An optional limit for the number of resources returned in a single call.

    Default value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

Returns:

See Also:



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

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

#list_geofences(params = {}) ⇒ Types::ListGeofencesResponse

Lists geofences stored in a given geofence collection.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_geofences({
  collection_name: "ResourceName", # required
  next_token: "LargeToken",
  max_results: 1,
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].geofence_id #=> String
resp.data.entries[0].geometry.polygon #=> Array
resp.data.entries[0].geometry.polygon[0] #=> Array
resp.data.entries[0].geometry.polygon[0][0] #=> Array
resp.data.entries[0].geometry.polygon[0][0][0] #=> Float
resp.data.entries[0].geometry.circle.center #=> Array
resp.data.entries[0].geometry.circle.center[0] #=> Float
resp.data.entries[0].geometry.circle.radius #=> Float
resp.data.entries[0].geometry.geobuf #=> String
resp.data.entries[0].geometry.multi_polygon #=> Array
resp.data.entries[0].geometry.multi_polygon[0] #=> Array
resp.data.entries[0].geometry.multi_polygon[0][0] #=> Array
resp.data.entries[0].geometry.multi_polygon[0][0][0] #=> Array
resp.data.entries[0].geometry.multi_polygon[0][0][0][0] #=> Float
resp.data.entries[0].status #=> String
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].update_time #=> Time
resp.data.entries[0].geofence_properties #=> Hash
resp.data.entries[0].geofence_properties["PropertyMapKeyString"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The name of the geofence collection storing the list of geofences.

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

  • :max_results (Integer)

    An optional limit for the number of geofences returned in a single call.

    Default value: ‘100`

Returns:

  • (Types::ListGeofencesResponse)

    Returns a response object which responds to the following methods:

    • #data.entries => Array&lt;Types::ListGeofenceResponseEntry&gt; (This method conflicts with a method on Response, call it through the data member)

    • #next_token => String

See Also:



4075
4076
4077
4078
# File 'lib/aws-sdk-locationservice/client.rb', line 4075

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

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

‘ListJobs` retrieves a list of jobs with optional filtering and pagination support.

For more information, see [Job concepts] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/jobs-concepts.html

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_jobs({
  filter: {
    job_status: "Pending", # accepts Pending, Running, Completed, Failed, Cancelling, Cancelled
  },
  max_results: 1,
  next_token: "LargeToken",
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].action #=> String, one of "ValidateAddress"
resp.data.entries[0].action_options.validate_address.additional_features #=> Array
resp.data.entries[0].action_options.validate_address.additional_features[0] #=> String, one of "Position", "CountrySpecificAttributes"
resp.data.entries[0].created_at #=> Time
resp.data.entries[0].execution_role_arn #=> String
resp.data.entries[0].ended_at #=> Time
resp.data.entries[0].error.code #=> String, one of "ValidationError", "InternalServerError"
resp.data.entries[0].error.messages #=> Array
resp.data.entries[0].error.messages[0] #=> String
resp.data.entries[0].input_options.location #=> String
resp.data.entries[0].input_options.format #=> String, one of "Parquet"
resp.data.entries[0].job_id #=> String
resp.data.entries[0].job_arn #=> String
resp.data.entries[0].name #=> String
resp.data.entries[0].output_options.format #=> String, one of "Parquet"
resp.data.entries[0].output_options.location #=> String
resp.data.entries[0].status #=> String, one of "Pending", "Running", "Completed", "Failed", "Cancelling", "Cancelled"
resp.data.entries[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter (Types::JobsFilter)

    An optional structure containing criteria by which to filter job results.

  • :max_results (Integer)

    Maximum number of jobs to return.

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

Returns:

  • (Types::ListJobsResponse)

    Returns a response object which responds to the following methods:

    • #data.entries => Array&lt;Types::ListJobsResponseEntry&gt; (This method conflicts with a method on Response, call it through the data member)

    • #next_token => String

See Also:



4145
4146
4147
4148
# File 'lib/aws-sdk-locationservice/client.rb', line 4145

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

#list_keys(params = {}) ⇒ Types::ListKeysResponse

Lists API key resources in your Amazon Web Services account.

For more information, see [Use API keys to authenticate] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_keys({
  max_results: 1,
  next_token: "Token",
  filter: {
    key_status: "Active", # accepts Active, Expired
  },
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].key_name #=> String
resp.data.entries[0].expire_time #=> Time
resp.data.entries[0].description #=> String
resp.data.entries[0].restrictions.allow_actions #=> Array
resp.data.entries[0].restrictions.allow_actions[0] #=> String
resp.data.entries[0].restrictions.allow_resources #=> Array
resp.data.entries[0].restrictions.allow_resources[0] #=> String
resp.data.entries[0].restrictions.allow_referers #=> Array
resp.data.entries[0].restrictions.allow_referers[0] #=> String
resp.data.entries[0].restrictions.allow_android_apps #=> Array
resp.data.entries[0].restrictions.allow_android_apps[0].package #=> String
resp.data.entries[0].restrictions.allow_android_apps[0].certificate_fingerprint #=> String
resp.data.entries[0].restrictions.allow_apple_apps #=> Array
resp.data.entries[0].restrictions.allow_apple_apps[0].bundle_id #=> String
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].update_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    An optional limit for the number of resources returned in a single call.

    Default value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

  • :filter (Types::ApiKeyFilter)

    Optionally filter the list to only ‘Active` or `Expired` API keys.

Returns:

  • (Types::ListKeysResponse)

    Returns a response object which responds to the following methods:

    • #data.entries => Array&lt;Types::ListKeysResponseEntry&gt; (This method conflicts with a method on Response, call it through the data member)

    • #next_token => String

See Also:



4216
4217
4218
4219
# File 'lib/aws-sdk-locationservice/client.rb', line 4216

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

#list_maps(params = {}) ⇒ Types::ListMapsResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require ‘Grab` data.

* `ListMaps` is part of a previous Amazon Location Service Maps API
 (version 1) which has been superseded by a more intuitive, powerful,
 and complete API (version 2).
  • The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Lists map resources in your Amazon Web Services account.

[1]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [2]: docs.aws.amazon.com/location/latest/developerguide/maps.html

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_maps({
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].map_name #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].data_source #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].update_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    An optional limit for the number of resources returned in a single call.

    Default value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

Returns:

  • (Types::ListMapsResponse)

    Returns a response object which responds to the following methods:

    • #data.entries => Array&lt;Types::ListMapsResponseEntry&gt; (This method conflicts with a method on Response, call it through the data member)

    • #next_token => String

See Also:



4290
4291
4292
4293
# File 'lib/aws-sdk-locationservice/client.rb', line 4290

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

#list_place_indexes(params = {}) ⇒ Types::ListPlaceIndexesResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Places API V2 unless you require Grab data.

* `ListPlaceIndexes` is part of a previous Amazon Location Service
 Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Places API version 2 has a simplified interface that can be used without creating or managing place index resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Places V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Places_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/places.html).

Lists place index resources in your Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_place_indexes({
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].index_name #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].data_source #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].update_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    An optional limit for the maximum number of results returned in a single call.

    Default value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

Returns:

  • (Types::ListPlaceIndexesResponse)

    Returns a response object which responds to the following methods:

    • #data.entries => Array&lt;Types::ListPlaceIndexesResponseEntry&gt; (This method conflicts with a method on Response, call it through the data member)

    • #next_token => String

See Also:



4362
4363
4364
4365
# File 'lib/aws-sdk-locationservice/client.rb', line 4362

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

#list_route_calculators(params = {}) ⇒ Types::ListRouteCalculatorsResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Routes API V2 unless you require Grab data.

* `ListRouteCalculators` is part of a previous Amazon Location

Service

Routes API (version 1) which has been superseded by a more
intuitive, powerful, and complete API (version 2).
  • The Routes API version 2 has a simplified interface that can be used without creating or managing route calculator resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under ‘geo-routes` or `geo_routes`, not under `location`.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Routes V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Routes_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/routes.html).

Lists route calculator resources in your Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_route_calculators({
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].calculator_name #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].data_source #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].update_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    An optional maximum number of results returned in a single call.

    Default Value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default Value: ‘null`

Returns:

See Also:



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

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

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

Returns a list of tags that are applied to the specified Amazon Location resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "Arn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.

    • Format example: ‘arn:aws:geo:region:account-id:resourcetype/ExampleResource`

    ^

Returns:

See Also:



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

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

#list_tracker_consumers(params = {}) ⇒ Types::ListTrackerConsumersResponse

Lists geofence collections currently associated to the given tracker resource.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_tracker_consumers({
  tracker_name: "ResourceName", # required
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.consumer_arns #=> Array
resp.consumer_arns[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The tracker resource whose associated geofence collections you want to list.

  • :max_results (Integer)

    An optional limit for the number of resources returned in a single call.

    Default value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

Returns:

See Also:



4519
4520
4521
4522
# File 'lib/aws-sdk-locationservice/client.rb', line 4519

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

#list_trackers(params = {}) ⇒ Types::ListTrackersResponse

Lists tracker resources in your Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_trackers({
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].tracker_name #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.data.entries[0].pricing_plan_data_source #=> String
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].update_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    An optional limit for the number of resources returned in a single call.

    Default value: ‘100`

  • :next_token (String)

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: ‘null`

Returns:

  • (Types::ListTrackersResponse)

    Returns a response object which responds to the following methods:

    • #data.entries => Array&lt;Types::ListTrackersResponseEntry&gt; (This method conflicts with a method on Response, call it through the data member)

    • #next_token => String

See Also:



4567
4568
4569
4570
# File 'lib/aws-sdk-locationservice/client.rb', line 4567

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

#put_geofence(params = {}) ⇒ Types::PutGeofenceResponse

Stores a geofence geometry in a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request.

Examples:

Request syntax with placeholder values


resp = client.put_geofence({
  collection_name: "ResourceName", # required
  geofence_id: "Id", # required
  geometry: { # required
    polygon: [
      [
        [1.0],
      ],
    ],
    circle: {
      center: [1.0], # required
      radius: 1.0, # required
    },
    geobuf: "data",
    multi_polygon: [
      [
        [
          [1.0],
        ],
      ],
    ],
  },
  geofence_properties: {
    "PropertyMapKeyString" => "PropertyMapValueString",
  },
})

Response structure


resp.geofence_id #=> String
resp.create_time #=> Time
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The geofence collection to store the geofence in.

  • :geofence_id (required, String)

    An identifier for the geofence. For example, ‘ExampleGeofence-1`.

  • :geometry (required, Types::GeofenceGeometry)

    Contains the details to specify the position of the geofence. Can be a circle, a polygon, or a multipolygon. ‘Polygon` and `MultiPolygon` geometries can be defined using their respective parameters, or encoded in Geobuf format using the `Geobuf` parameter. Including multiple geometry types in the same request will return a validation error.

    <note markdown=“1”> The geofence ‘Polygon` and `MultiPolygon` formats support a maximum of 1,000 total vertices. The `Geobuf` format supports a maximum of 100,000 vertices.

    </note>
    
  • :geofence_properties (Hash<String,String>)

    Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.

    Format: ‘“key” : “value”`

Returns:

See Also:



4648
4649
4650
4651
# File 'lib/aws-sdk-locationservice/client.rb', line 4648

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

#search_place_index_for_position(params = {}) ⇒ Types::SearchPlaceIndexForPositionResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to [ ‘ReverseGeocode` ](/location/latest/APIReference/API_geoplaces_ReverseGeocode.html) or [ `SearchNearby` ](/location/latest/APIReference/API_geoplaces_SearchNearby.html) unless you require Grab data.

* `SearchPlaceIndexForPosition` is part of a previous Amazon Location
 Service Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The version 2 ‘ReverseGeocode` operation gives better results in the address reverse-geocoding use case, while the version 2 `SearchNearby` operation gives better results when searching for businesses and points of interest near a specific location.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

Reverse geocodes a given coordinate and returns a legible address.

Allows you to search for Places or points of interest near a given position.

Examples:

Request syntax with placeholder values


resp = client.search_place_index_for_position({
  index_name: "ResourceName", # required
  position: [1.0], # required
  max_results: 1,
  language: "LanguageTag",
  key: "ApiKey",
})

Response structure


resp.summary.position #=> Array
resp.summary.position[0] #=> Float
resp.summary.max_results #=> Integer
resp.summary.data_source #=> String
resp.summary.language #=> String
resp.results #=> Array
resp.results[0].place.label #=> String
resp.results[0].place.geometry.point #=> Array
resp.results[0].place.geometry.point[0] #=> Float
resp.results[0].place.address_number #=> String
resp.results[0].place.street #=> String
resp.results[0].place.neighborhood #=> String
resp.results[0].place.municipality #=> String
resp.results[0].place.sub_region #=> String
resp.results[0].place.region #=> String
resp.results[0].place.country #=> String
resp.results[0].place.postal_code #=> String
resp.results[0].place.interpolated #=> Boolean
resp.results[0].place.time_zone.name #=> String
resp.results[0].place.time_zone.offset #=> Integer
resp.results[0].place.unit_type #=> String
resp.results[0].place.unit_number #=> String
resp.results[0].place.categories #=> Array
resp.results[0].place.categories[0] #=> String
resp.results[0].place.supplemental_categories #=> Array
resp.results[0].place.supplemental_categories[0] #=> String
resp.results[0].place.sub_municipality #=> String
resp.results[0].distance #=> Float
resp.results[0].place_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource you want to use for the search.

  • :position (required, Array<Float>)

    Specifies the longitude and latitude of the position to query.

    This parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

    For example, ‘[-123.1174, 49.2847]` represents a position with longitude `-123.1174` and latitude `49.2847`.

  • :max_results (Integer)

    An optional parameter. The maximum number of results returned per request.

    Default value: ‘50`

  • :language (String)

    The preferred language used to return results. The value must be a valid [BCP 47] language tag, for example, ‘en` for English.

    This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

    For an example, we’ll use the Greek language. You search for a location around Athens, Greece, with the ‘language` parameter set to `en`. The `city` in the results will most likely be returned as `Athens`.

    If you set the ‘language` parameter to `el`, for Greek, then the `city` in the results will more likely be returned as `Αθήνα`.

    If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    [1]: tools.ietf.org/search/bcp47

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



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

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

#search_place_index_for_suggestions(params = {}) ⇒ Types::SearchPlaceIndexForSuggestionsResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to [ ‘Suggest` ](/location/latest/APIReference/API_geoplaces_Suggest.html) or [ `Autocomplete` ](/location/latest/APIReference/API_geoplaces_Autocomplete.html) unless you require Grab data.

* `SearchPlaceIndexForSuggestions` is part of a previous Amazon
 Location Service Places API (version 1) which has been superseded by
 a more intuitive, powerful, and complete API (version 2).
  • The version 2 ‘Suggest` operation gives better results for typeahead place search suggestions with fuzzy matching, while the version 2 `Autocomplete` operation gives better results for address completion based on partial input.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

Generates suggestions for addresses and points of interest based on

partial or misspelled free-form text. This operation is also known as autocomplete, autosuggest, or fuzzy matching.

Optional parameters let you narrow your search results by bounding

box or country, or bias your search toward a specific position on the globe.

<note markdown="1"> You can search for suggested place names near a

specified position by using ‘BiasPosition`, or filter results within a bounding box by using `FilterBBox`. These parameters are mutually exclusive; using both `BiasPosition` and `FilterBBox` in the same command returns an error.

</note>

Examples:

Request syntax with placeholder values


resp = client.search_place_index_for_suggestions({
  index_name: "ResourceName", # required
  text: "SearchPlaceIndexForSuggestionsRequestTextString", # required
  bias_position: [1.0],
  filter_b_box: [1.0],
  filter_countries: ["CountryCode3"],
  max_results: 1,
  language: "LanguageTag",
  filter_categories: ["PlaceCategory"],
  key: "ApiKey",
})

Response structure


resp.summary.text #=> String
resp.summary.bias_position #=> Array
resp.summary.bias_position[0] #=> Float
resp.summary.filter_b_box #=> Array
resp.summary.filter_b_box[0] #=> Float
resp.summary.filter_countries #=> Array
resp.summary.filter_countries[0] #=> String
resp.summary.max_results #=> Integer
resp.summary.data_source #=> String
resp.summary.language #=> String
resp.summary.filter_categories #=> Array
resp.summary.filter_categories[0] #=> String
resp.results #=> Array
resp.results[0].text #=> String
resp.results[0].place_id #=> String
resp.results[0].categories #=> Array
resp.results[0].categories[0] #=> String
resp.results[0].supplemental_categories #=> Array
resp.results[0].supplemental_categories[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource you want to use for the search.

  • :text (required, String)

    The free-form partial text to use to generate place suggestions. For example, ‘eiffel tow`.

  • :bias_position (Array<Float>)

    An optional parameter that indicates a preference for place suggestions that are closer to a specified position.

    If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

    For example, ‘[-123.1174, 49.2847]` represents the position with longitude `-123.1174` and latitude `49.2847`.

    <note markdown=“1”> ‘BiasPosition` and `FilterBBox` are mutually exclusive. Specifying both options results in an error.

    </note>
    
  • :filter_b_box (Array<Float>)

    An optional parameter that limits the search results by returning only suggestions within a specified bounding box.

    If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the northeast corner of the bounding box.

    For example, ‘[-12.7935, -37.4835, -12.0684, -36.9542]` represents a bounding box where the southwest corner has longitude `-12.7935` and latitude `-37.4835`, and the northeast corner has longitude `-12.0684` and latitude `-36.9542`.

    <note markdown=“1”> ‘FilterBBox` and `BiasPosition` are mutually exclusive. Specifying both options results in an error.

    </note>
    
  • :filter_countries (Array<String>)

    An optional parameter that limits the search results by returning only suggestions within the provided list of countries.

    • Use the [ISO 3166] 3-digit country code. For example, Australia uses three upper-case characters: ‘AUS`.

    ^

    [1]: www.iso.org/iso-3166-country-codes.html

  • :max_results (Integer)

    An optional parameter. The maximum number of results returned per request.

    The default: ‘5`

  • :language (String)

    The preferred language used to return results. The value must be a valid [BCP 47] language tag, for example, ‘en` for English.

    This setting affects the languages used in the results. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

    For an example, we’ll use the Greek language. You search for ‘Athens, Gr` to get suggestions with the `language` parameter set to `en`. The results found will most likely be returned as `Athens, Greece`.

    If you set the ‘language` parameter to `el`, for Greek, then the result found will more likely be returned as `Αθήνα, Ελλάδα`.

    If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    [1]: tools.ietf.org/search/bcp47

  • :filter_categories (Array<String>)

    A list of one or more Amazon Location categories to filter the returned places. If you include more than one category, the results will include results that match any of the categories listed.

    For more information about using categories, including a list of Amazon Location categories, see [Categories and filtering], in the *Amazon Location Service developer guide*.

    [1]: docs.aws.amazon.com/location/previous/developerguide/category-filtering.html

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



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

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

#search_place_index_for_text(params = {}) ⇒ Types::SearchPlaceIndexForTextResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to [ ‘Geocode` ](/location/latest/APIReference/API_geoplaces_Geocode.html) or [ `SearchText` ](/location/latest/APIReference/API_geoplaces_SearchText.html) unless you require Grab data.

* `SearchPlaceIndexForText` is part of a previous Amazon Location
 Service Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The version 2 ‘Geocode` operation gives better results in the address geocoding use case, while the version 2 `SearchText` operation gives better results when searching for businesses and points of interest.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

Geocodes free-form text, such as an address, name, city, or region to

allow you to search for Places or points of interest.

Optional parameters let you narrow your search results by bounding

box or country, or bias your search toward a specific position on the globe.

<note markdown="1"> You can search for places near a given position

using ‘BiasPosition`, or filter results within a bounding box using `FilterBBox`. Providing both parameters simultaneously returns an error.

</note>

Search results are returned in order of highest to lowest relevance.

Examples:

Request syntax with placeholder values


resp = client.search_place_index_for_text({
  index_name: "ResourceName", # required
  text: "SearchPlaceIndexForTextRequestTextString", # required
  bias_position: [1.0],
  filter_b_box: [1.0],
  filter_countries: ["CountryCode3"],
  max_results: 1,
  language: "LanguageTag",
  filter_categories: ["PlaceCategory"],
  key: "ApiKey",
})

Response structure


resp.summary.text #=> String
resp.summary.bias_position #=> Array
resp.summary.bias_position[0] #=> Float
resp.summary.filter_b_box #=> Array
resp.summary.filter_b_box[0] #=> Float
resp.summary.filter_countries #=> Array
resp.summary.filter_countries[0] #=> String
resp.summary.max_results #=> Integer
resp.summary.result_b_box #=> Array
resp.summary.result_b_box[0] #=> Float
resp.summary.data_source #=> String
resp.summary.language #=> String
resp.summary.filter_categories #=> Array
resp.summary.filter_categories[0] #=> String
resp.results #=> Array
resp.results[0].place.label #=> String
resp.results[0].place.geometry.point #=> Array
resp.results[0].place.geometry.point[0] #=> Float
resp.results[0].place.address_number #=> String
resp.results[0].place.street #=> String
resp.results[0].place.neighborhood #=> String
resp.results[0].place.municipality #=> String
resp.results[0].place.sub_region #=> String
resp.results[0].place.region #=> String
resp.results[0].place.country #=> String
resp.results[0].place.postal_code #=> String
resp.results[0].place.interpolated #=> Boolean
resp.results[0].place.time_zone.name #=> String
resp.results[0].place.time_zone.offset #=> Integer
resp.results[0].place.unit_type #=> String
resp.results[0].place.unit_number #=> String
resp.results[0].place.categories #=> Array
resp.results[0].place.categories[0] #=> String
resp.results[0].place.supplemental_categories #=> Array
resp.results[0].place.supplemental_categories[0] #=> String
resp.results[0].place.sub_municipality #=> String
resp.results[0].distance #=> Float
resp.results[0].relevance #=> Float
resp.results[0].place_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource you want to use for the search.

  • :text (required, String)

    The address, name, city, or region to be used in the search in free-form text format. For example, ‘123 Any Street`.

  • :bias_position (Array<Float>)

    An optional parameter that indicates a preference for places that are closer to a specified position.

    If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

    For example, ‘[-123.1174, 49.2847]` represents the position with longitude `-123.1174` and latitude `49.2847`.

    <note markdown=“1”> ‘BiasPosition` and `FilterBBox` are mutually exclusive. Specifying both options results in an error.

    </note>
    
  • :filter_b_box (Array<Float>)

    An optional parameter that limits the search results by returning only places that are within the provided bounding box.

    If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the northeast corner of the bounding box.

    For example, ‘[-12.7935, -37.4835, -12.0684, -36.9542]` represents a bounding box where the southwest corner has longitude `-12.7935` and latitude `-37.4835`, and the northeast corner has longitude `-12.0684` and latitude `-36.9542`.

    <note markdown=“1”> ‘FilterBBox` and `BiasPosition` are mutually exclusive. Specifying both options results in an error.

    </note>
    
  • :filter_countries (Array<String>)

    An optional parameter that limits the search results by returning only places that are in a specified list of countries.

    • Valid values include [ISO 3166] 3-digit country codes. For example, Australia uses three upper-case characters: ‘AUS`.

    ^

    [1]: www.iso.org/iso-3166-country-codes.html

  • :max_results (Integer)

    An optional parameter. The maximum number of results returned per request.

    The default: ‘50`

  • :language (String)

    The preferred language used to return results. The value must be a valid [BCP 47] language tag, for example, ‘en` for English.

    This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

    For an example, we’ll use the Greek language. You search for ‘Athens, Greece`, with the `language` parameter set to `en`. The result found will most likely be returned as `Athens`.

    If you set the ‘language` parameter to `el`, for Greek, then the result found will more likely be returned as `Αθήνα`.

    If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    [1]: tools.ietf.org/search/bcp47

  • :filter_categories (Array<String>)

    A list of one or more Amazon Location categories to filter the returned places. If you include more than one category, the results will include results that match any of the categories listed.

    For more information about using categories, including a list of Amazon Location categories, see [Categories and filtering], in the *Amazon Location Service developer guide*.

    [1]: docs.aws.amazon.com/location/previous/developerguide/category-filtering.html

  • :key (String)

    The optional [API key] to authorize the request.

    [1]: docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html

Returns:

See Also:



5192
5193
5194
5195
# File 'lib/aws-sdk-locationservice/client.rb', line 5192

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

#start_job(params = {}) ⇒ Types::StartJobResponse

‘StartJob` starts a new asynchronous bulk processing job. You specify the input data location in Amazon S3, the action to perform, and the output location where results are written.

For more information, see [Job concepts] in the *Amazon Location Service Developer Guide*.

[1]: docs.aws.amazon.com/location/latest/developerguide/jobs-concepts.html

Examples:

Request syntax with placeholder values


resp = client.start_job({
  client_token: "ClientToken",
  action: "ValidateAddress", # required, accepts ValidateAddress
  action_options: {
    validate_address: {
      additional_features: ["Position"], # accepts Position, CountrySpecificAttributes
    },
  },
  execution_role_arn: "IamRoleArn", # required
  input_options: { # required
    location: "JobInputLocation", # required
    format: "Parquet", # required, accepts Parquet
  },
  name: "ResourceName",
  output_options: { # required
    format: "Parquet", # required, accepts Parquet
    location: "JobOutputLocation", # required
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.created_at #=> Time
resp.job_arn #=> String
resp.job_id #=> String
resp.status #=> String, one of "Pending", "Running", "Completed", "Failed", "Cancelling", "Cancelled"

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A unique identifier for this request to ensure idempotency.

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

  • :action (required, String)

    The action to perform on the input data.

  • :action_options (Types::JobActionOptions)

    Additional parameters that can be requested for each result.

  • :execution_role_arn (required, String)

    The Amazon Resource Name (ARN) of the IAM role that Amazon Location Service assumes during job processing. Amazon Location Service uses this role to access the input and output locations specified for the job.

    <note markdown=“1”> The IAM role must be created in the same Amazon Web Services account where you plan to run your job.

    </note>
    

    For more information about configuring IAM roles for Amazon Location jobs, see [Configure IAM permissions] in the *Amazon Location Service Developer Guide*.

    [1]: docs.aws.amazon.com/location/latest/developerguide/configure-iam-role-policy-credentials.html

  • :input_options (required, Types::JobInputOptions)

    Configuration for input data location and format.

    <note markdown=“1”> Input files have a limitation of 10gb per file, and 1gb per Parquet row-group within the file.

    </note>
    
  • :name (String)

    An optional name for the job resource.

  • :output_options (required, Types::JobOutputOptions)

    Configuration for output data location and format.

  • :tags (Hash<String,String>)

    Tags and corresponding values to be associated with the job.

Returns:

See Also:



5299
5300
5301
5302
# File 'lib/aws-sdk-locationservice/client.rb', line 5299

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

#tag_resource(params = {}) ⇒ Struct

Assigns one or more tags (key-value pairs) to the specified Amazon Location Service resource.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values.

You can use the ‘TagResource` operation with an Amazon Location Service resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the tags already associated with the resource. If you specify a tag key that’s already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

You can associate up to 50 tags with a resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "Arn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource whose tags you want to update.

    • Format example: ‘arn:aws:geo:region:account-id:resourcetype/ExampleResource`

    ^

  • :tags (required, Hash<String,String>)

    Applies one or more tags to specific resource. A tag is a key-value pair that helps you manage, identify, search, and filter your resources.

    Format: ‘“key” : “value”`

    Restrictions:

    • Maximum 50 tags per resource.

    • Each tag key must be unique and must have exactly one associated value.

    • Maximum key length: 128 Unicode characters in UTF-8.

    • Maximum value length: 256 Unicode characters in UTF-8.

    • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @

    • Cannot use “aws:” as a prefix for a key.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5367
5368
5369
5370
# File 'lib/aws-sdk-locationservice/client.rb', line 5367

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

#untag_resource(params = {}) ⇒ Struct

Removes one or more tags from the specified Amazon Location resource.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource from which you want to remove tags.

    • Format example: ‘arn:aws:geo:region:account-id:resourcetype/ExampleResource`

    ^

  • :tag_keys (required, Array<String>)

    The list of tag keys to remove from the specified resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5399
5400
5401
5402
# File 'lib/aws-sdk-locationservice/client.rb', line 5399

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

#update_geofence_collection(params = {}) ⇒ Types::UpdateGeofenceCollectionResponse

Updates the specified properties of a given geofence collection.

Examples:

Request syntax with placeholder values


resp = client.update_geofence_collection({
  collection_name: "ResourceName", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  pricing_plan_data_source: "String",
  description: "ResourceDescription",
})

Response structure


resp.collection_name #=> String
resp.collection_arn #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The name of the geofence collection to update.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :pricing_plan_data_source (String)

    This parameter is no longer used.

  • :description (String)

    Updates the description for the geofence collection.

Returns:

See Also:



5444
5445
5446
5447
# File 'lib/aws-sdk-locationservice/client.rb', line 5444

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

#update_key(params = {}) ⇒ Types::UpdateKeyResponse

Updates the specified properties of a given API key resource.

Examples:

Request syntax with placeholder values


resp = client.update_key({
  key_name: "ResourceName", # required
  description: "ResourceDescription",
  expire_time: Time.now,
  no_expiry: false,
  force_update: false,
  restrictions: {
    allow_actions: ["ApiKeyAction"], # required
    allow_resources: ["GeoArnV2"], # required
    allow_referers: ["RefererPattern"],
    allow_android_apps: [
      {
        package: "AndroidPackageName", # required
        certificate_fingerprint: "Sha1CertificateFingerprint", # required
      },
    ],
    allow_apple_apps: [
      {
        bundle_id: "AppleBundleId", # required
      },
    ],
  },
})

Response structure


resp.key_arn #=> String
resp.key_name #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :key_name (required, String)

    The name of the API key resource to update.

  • :description (String)

    Updates the description for the API key resource.

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

    Updates the timestamp for when the API key resource will expire in [ ISO 8601] format: ‘YYYY-MM-DDThh:mm:ss.sssZ`.

    [1]: www.iso.org/iso-8601-date-and-time-format.html

  • :no_expiry (Boolean)

    Whether the API key should expire. Set to ‘true` to set the API key to have no expiration time.

  • :force_update (Boolean)

    The boolean flag to be included for updating ‘ExpireTime` or `Restrictions` details.

    Must be set to ‘true` to update an API key resource that has been used in the past 7 days.

    ‘False` if force update is not preferred

    Default value: ‘False`

  • :restrictions (Types::ApiKeyRestrictions)

    Updates the API key restrictions for the API key resource.

Returns:

See Also:



5525
5526
5527
5528
# File 'lib/aws-sdk-locationservice/client.rb', line 5525

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

#update_map(params = {}) ⇒ Types::UpdateMapResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require ‘Grab` data.

* `UpdateMap` is part of a previous Amazon Location Service Maps API
 (version 1) which has been superseded by a more intuitive, powerful,
 and complete API (version 2).
  • The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under ‘geo-maps` or `geo_maps`, not under `location`.

  • Since ‘Grab` is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using `Grab`.

  • Start your version 2 API journey with the [Maps V2 API Reference] or the [Developer Guide].

Updates the specified properties of a given map resource.

[1]: docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html [2]: docs.aws.amazon.com/location/latest/developerguide/maps.html

Examples:

Request syntax with placeholder values


resp = client.update_map({
  map_name: "ResourceName", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  description: "ResourceDescription",
  configuration_update: {
    political_view: "CountryCode3OrEmpty",
    custom_layers: ["CustomLayer"],
  },
})

Response structure


resp.map_name #=> String
resp.map_arn #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The name of the map resource to update.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :description (String)

    Updates the description for the map resource.

  • :configuration_update (Types::MapConfigurationUpdate)

    Updates the parts of the map configuration that can be updated, including the political view.

Returns:

See Also:



5600
5601
5602
5603
# File 'lib/aws-sdk-locationservice/client.rb', line 5600

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

#update_place_index(params = {}) ⇒ Types::UpdatePlaceIndexResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Places API V2 unless you require Grab data.

* `UpdatePlaceIndex` is part of a previous Amazon Location Service
 Places API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Places API version 2 has a simplified interface that can be used without creating or managing place index resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under ‘geo-places` or `geo_places`, not under `location`.

  • Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Places V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Places_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/places.html).

Updates the specified properties of a given place index resource.

Examples:

Request syntax with placeholder values


resp = client.update_place_index({
  index_name: "ResourceName", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  description: "ResourceDescription",
  data_source_configuration: {
    intended_use: "SingleUse", # accepts SingleUse, Storage
  },
})

Response structure


resp.index_name #=> String
resp.index_arn #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource to update.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :description (String)

    Updates the description for the place index resource.

  • :data_source_configuration (Types::DataSourceConfiguration)

    Updates the data storage option for the place index resource.

Returns:

See Also:



5671
5672
5673
5674
# File 'lib/aws-sdk-locationservice/client.rb', line 5671

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

#update_route_calculator(params = {}) ⇒ Types::UpdateRouteCalculatorResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Routes API V2 unless you require Grab data.

* `UpdateRouteCalculator` is part of a previous Amazon Location
 Service Routes API (version 1) which has been superseded by a more
 intuitive, powerful, and complete API (version 2).
  • The Routes API version 2 has a simplified interface that can be used without creating or managing route calculator resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under ‘geo-routes` or `geo_routes`, not under `location`.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Routes V2 [API

Reference](/location/latest/APIReference/API_Operations_Amazon_Location_Service_Routes_V2.html)

 or the [Developer
 Guide](/location/latest/developerguide/routes.html).

Updates the specified properties for a given route calculator

resource.

Examples:

Request syntax with placeholder values


resp = client.update_route_calculator({
  calculator_name: "ResourceName", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  description: "ResourceDescription",
})

Response structure


resp.calculator_name #=> String
resp.calculator_arn #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :calculator_name (required, String)

    The name of the route calculator resource to update.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :description (String)

    Updates the description for the route calculator resource.

Returns:

See Also:



5737
5738
5739
5740
# File 'lib/aws-sdk-locationservice/client.rb', line 5737

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

#update_tracker(params = {}) ⇒ Types::UpdateTrackerResponse

Updates the specified properties of a given tracker resource.

Examples:

Request syntax with placeholder values


resp = client.update_tracker({
  tracker_name: "ResourceName", # required
  pricing_plan: "RequestBasedUsage", # accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  pricing_plan_data_source: "String",
  description: "ResourceDescription",
  position_filtering: "TimeBased", # accepts TimeBased, DistanceBased, AccuracyBased
  event_bridge_enabled: false,
  kms_key_enable_geospatial_queries: false,
})

Response structure


resp.tracker_name #=> String
resp.tracker_arn #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource to update.

  • :pricing_plan (String)

    No longer used. If included, the only allowed value is ‘RequestBasedUsage`.

  • :pricing_plan_data_source (String)

    This parameter is no longer used.

  • :description (String)

    Updates the description for the tracker resource.

  • :position_filtering (String)

    Updates the position filtering for the tracker resource.

    Valid values:

    • ‘TimeBased` - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.

    • ‘DistanceBased` - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.

    • ‘AccuracyBased` - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This helps educe the effects of GPS noise when displaying device trajectories on a map, and can help control costs by reducing the number of geofence evaluations.

  • :event_bridge_enabled (Boolean)

    Whether to enable position ‘UPDATE` events from this tracker to be sent to EventBridge.

    <note markdown=“1”> You do not need enable this feature to get ‘ENTER` and `EXIT` events for geofences with this tracker. Those events are always sent to EventBridge.

    </note>
    
  • :kms_key_enable_geospatial_queries (Boolean)

    Enables ‘GeospatialQueries` for a tracker that uses a [Amazon Web Services KMS customer managed key].

    This parameter is only used if you are using a KMS customer managed key.

    [1]: docs.aws.amazon.com/kms/latest/developerguide/create-keys.html

Returns:

See Also:



5834
5835
5836
5837
# File 'lib/aws-sdk-locationservice/client.rb', line 5834

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

#verify_device_position(params = {}) ⇒ Types::VerifyDevicePositionResponse

Verifies the integrity of the device’s position by determining if it was reported behind a proxy, and by comparing it to an inferred position estimated based on the device’s state.

<note markdown=“1”> The Location Integrity SDK provides enhanced features related to device verification, and it is available for use by request. To get access to the SDK, contact [Sales Support].

</note>

[1]: aws.amazon.com/contact-us/sales-support/?pg=locationprice&amp;cta=herobtn

Examples:

Request syntax with placeholder values


resp = client.verify_device_position({
  tracker_name: "ResourceName", # required
  device_state: { # required
    device_id: "Id", # required
    sample_time: Time.now, # required
    position: [1.0], # required
    accuracy: {
      horizontal: 1.0, # required
    },
    ipv_4_address: "DeviceStateIpv4AddressString",
    wi_fi_access_points: [
      {
        mac_address: "WiFiAccessPointMacAddressString", # required
        rss: 1, # required
      },
    ],
    cell_signals: {
      lte_cell_details: [ # required
        {
          cell_id: 1, # required
          mcc: 1, # required
          mnc: 1, # required
          local_id: {
            earfcn: 1, # required
            pci: 1, # required
          },
          network_measurements: [
            {
              earfcn: 1, # required
              cell_id: 1, # required
              pci: 1, # required
              rsrp: 1,
              rsrq: 1.0,
            },
          ],
          timing_advance: 1,
          nr_capable: false,
          rsrp: 1,
          rsrq: 1.0,
          tac: 1,
        },
      ],
    },
  },
  distance_unit: "Kilometers", # accepts Kilometers, Miles
})

Response structure


resp.inferred_state.position #=> Array
resp.inferred_state.position[0] #=> Float
resp.inferred_state.accuracy.horizontal #=> Float
resp.inferred_state.deviation_distance #=> Float
resp.inferred_state.proxy_detected #=> Boolean
resp.device_id #=> String
resp.sample_time #=> Time
resp.received_time #=> Time
resp.distance_unit #=> String, one of "Kilometers", "Miles"

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource to be associated with verification request.

  • :device_state (required, Types::DeviceState)

    The device’s state, including position, IP address, cell signals and Wi-Fi access points.

  • :distance_unit (String)

    The distance unit for the verification request.

    Default Value: ‘Kilometers`

Returns:

See Also:



5939
5940
5941
5942
# File 'lib/aws-sdk-locationservice/client.rb', line 5939

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

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

Polls an API operation until a resource enters a desired state.

## Basic Usage

A waiter will call an API operation until:

  • It is successful

  • It enters a terminal state

  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

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

## Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

## 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(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

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

## Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

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

## Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.

| waiter_name | params | :delay | :max_attempts | | ————- | —————- | ——– | ————- | | job_completed | #get_job | 60 | 5 |

Parameters:

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

    ({})

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

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

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.



6054
6055
6056
6057
6058
# File 'lib/aws-sdk-locationservice/client.rb', line 6054

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end

#waiter_namesObject

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

Deprecated.


6062
6063
6064
# File 'lib/aws-sdk-locationservice/client.rb', line 6062

def waiter_names
  waiters.keys
end