Class: Aws::LocationService::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-locationservice/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.

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

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

  • :client_side_monitoring (Boolean) — default: false

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

  • :client_side_monitoring_client_id (String) — default: ""

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

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

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

  • :client_side_monitoring_port (Integer) — default: 31000

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

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

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

  • :convert_params (Boolean) — default: true

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

  • :correct_clock_skew (Boolean) — default: true

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

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :endpoint (String)

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

  • :endpoint_cache_max_entries (Integer) — default: 1000

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

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

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

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

  • :retry_limit (Integer) — default: 3

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

  • :retry_max_delay (Integer) — default: 0

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

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

    Specifies which retry algorithm to use. Values are:

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

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

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

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

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

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

  • :validate_params (Boolean) — default: true

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. 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_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_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

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



324
325
326
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 324

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

Currently not supported — Cross-account configurations, such as creating associations between a tracker resource in one account and a geofence collection in another account.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

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

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

    ^

  • :tracker_name (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



367
368
369
370
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 367

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({
  device_ids: ["Id"], # required
  tracker_name: "ResourceName", # 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):

  • :device_ids (required, Array<String>)

    Devices whose position history you want to delete.

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

    ^

  • :tracker_name (required, String)

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

Returns:

See Also:



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

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.

This operation deletes the resource permanently.

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].error.code #=> String, one of "AccessDeniedError", "ConflictError", "InternalServerError", "ResourceNotFoundError", "ThrottlingError", "ValidationError"
resp.errors[0].error.message #=> String
resp.errors[0].geofence_id #=> 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:



447
448
449
450
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 447

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. The evaluation determines if the device has entered or exited a geofenced area, which publishes ENTER or EXIT geofence events to Amazon EventBridge.

The last geofence that a device was observed within, if any, is tracked for 30 days after the most recent device position update

Examples:

Request syntax with placeholder values


resp = client.batch_evaluate_geofences({
  collection_name: "ResourceName", # required
  device_position_updates: [ # required
    {
      device_id: "Id", # required
      position: [1.0], # required
      sample_time: Time.now, # 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.errors[0].sample_time #=> Time

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:



499
500
501
502
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 499

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

A batch request to retrieve all device positions.

Examples:

Request syntax with placeholder values


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

Response structure


resp.device_positions #=> Array
resp.device_positions[0].device_id #=> String
resp.device_positions[0].position #=> Array
resp.device_positions[0].position[0] #=> Float
resp.device_positions[0].received_time #=> Time
resp.device_positions[0].sample_time #=> Time
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):

  • :device_ids (required, Array<String>)

    Devices whose position you want to retrieve.

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

    ^

  • :tracker_name (required, String)

    The tracker resource retrieving the device position.

Returns:

See Also:



546
547
548
549
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 546

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

Response structure


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

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:



599
600
601
602
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 599

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. Amazon Location uses the data when reporting the last known device position and position history.

Only one position update is stored per sample time. Location data is sampled at a fixed rate of one position per 30-second interval and retained for 30 days before it's deleted.

Examples:

Request syntax with placeholder values


resp = client.batch_update_device_position({
  tracker_name: "ResourceName", # required
  updates: [ # required
    {
      device_id: "Id", # required
      position: [1.0], # required
      sample_time: Time.now, # 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.errors[0].sample_time #=> Time

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.

Returns:

See Also:



649
650
651
652
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 649

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

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

Calculates a route given the following required parameters: DeparturePostiton and DestinationPosition. Requires that you first create aroute 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 using either DepartureTime or DepartureNow. This calculates a route based on predictive traffic data at the given time.

    You can't specify both DepartureTime and DepartureNow in a single request. Specifying both parameters returns an error message.

  • Specifying a travel mode using TravelMode. This lets you specify additional route preference such as CarModeOptions if traveling by Car, or TruckModeOptions if traveling by Truck.

Examples:

Request syntax with placeholder values


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

Response structure


resp.legs #=> Array
resp.legs[0].distance #=> Float
resp.legs[0].duration_seconds #=> Float
resp.legs[0].end_position #=> Array
resp.legs[0].end_position[0] #=> 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].start_position #=> Array
resp.legs[0].start_position[0] #=> Float
resp.legs[0].steps #=> Array
resp.legs[0].steps[0].distance #=> Float
resp.legs[0].steps[0].duration_seconds #=> Float
resp.legs[0].steps[0].end_position #=> Array
resp.legs[0].steps[0].end_position[0] #=> Float
resp.legs[0].steps[0].geometry_offset #=> Integer
resp.legs[0].steps[0].start_position #=> Array
resp.legs[0].steps[0].start_position[0] #=> Float
resp.summary.data_source #=> String
resp.summary.distance #=> Float
resp.summary.distance_unit #=> String, one of "Kilometers", "Miles"
resp.summary.duration_seconds #=> Float
resp.summary.route_b_box #=> Array
resp.summary.route_b_box[0] #=> Float

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

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

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

  • :departure_position (required, Array<Float>)

    The start position for the route. Defined in WGS 84 format: [longitude, latitude].

    • For example, [-123.115, 49.285]

    ^

    If you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road.

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

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

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

    Setting a departure time in the past returns a 400 ValidationException error.

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

    ^

  • :destination_position (required, Array<Float>)

    The finish position for the route. Defined in WGS 84 format: [longitude, latitude].

    • For example, [-122.339, 47.615]

    ^

    If you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road.

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

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

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

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

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

    ^

    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.

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

Returns:

See Also:



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

def calculate_route(params = {}, options = {})
  req = build_request(:calculate_route, 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
  description: "ResourceDescription",
  kms_key_id: "KmsKeyId",
  pricing_plan: "RequestBasedUsage", # required, accepts RequestBasedUsage, MobileAssetTracking, MobileAssetManagement
  pricing_plan_data_source: "String",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.collection_arn #=> String
resp.collection_name #=> 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.

  • :description (String)

    An optional description for the geofence collection.

  • :kms_key_id (String)

    A key identifier for an AWS KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.

  • :pricing_plan (required, String)

    Specifies the pricing plan for the geofence collection.

    For additional details and restrictions on each pricing plan option, see the Amazon Location Service pricing page.

  • :pricing_plan_data_source (String)

    Specifies the data provider for the geofence collection.

    • Required value for the following pricing plans: MobileAssetTracking | MobileAssetManagement

    ^

    For more information about Data Providers, and Pricing plans, see the Amazon Location Service product page.

    Amazon Location Service only uses PricingPlanDataSource to calculate billing for your geofence collection. Your data won't be shared with the data provider, and will remain in your AWS account or Region unless you move it.

    Valid Values: Esri| Here

  • :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: + - = . _ : / @.

Returns:

See Also:



1006
1007
1008
1009
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1006

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

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

Creates a map resource in your AWS account, which provides map tiles of different styles sourced from global location data providers.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :configuration (required, Types::MapConfiguration)

    Specifies the map style selected from an available data provider.

  • :description (String)

    An optional description for the map resource.

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

  • :pricing_plan (required, String)

    Specifies the pricing plan for your map resource.

    For additional details and restrictions on each pricing plan option, see the Amazon Location Service pricing page.

  • :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: + - = . _ : / @.

Returns:

See Also:



1092
1093
1094
1095
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1092

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

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

Creates a place index resource in your AWS account, which supports functions with geospatial data sourced from your chosen data provider.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :data_source (required, String)

    Specifies the data provider of geospatial data.

    This field is case-sensitive. Enter the valid values as shown. For example, entering HERE will return an error.

    Valid values include:

    • Esri

    • Here

      Place index resources using HERE as a data provider can't be used to store results for locations in Japan. For more information, see the AWS Service Terms for Amazon Location Service.

    For additional details on data providers, see the Amazon Location Service data providers page.

  • :data_source_configuration (Types::DataSourceConfiguration)

    Specifies the data storage option for requesting Places.

  • :description (String)

    The optional description for the place index resource.

  • :index_name (required, String)

    The name of the place index resource.

    Requirements:

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

    • Must be a unique place index resource name.

    • No spaces allowed. For example, ExamplePlaceIndex.

  • :pricing_plan (required, String)

    Specifies the pricing plan for your place index resource.

    For additional details and restrictions on each pricing plan option, see the Amazon Location Service pricing page.

  • :tags (Hash<String,String>)

    Applies one or more tags to the place index 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: + - = . _ : / @.

Returns:

See Also:



1206
1207
1208
1209
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1206

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

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

Creates a route calculator resource in your AWS 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.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :calculator_name (required, String)

    The name of the route calculator resource.

    Requirements:

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

    • Must be a unique Route calculator resource name.

    • No spaces allowed. For example, ExampleRouteCalculator.

  • :data_source (required, String)

    Specifies the data provider of traffic and road network data.

    This field is case-sensitive. Enter the valid values as shown. For example, entering HERE returns an error.

    Valid Values: Esri | Here

    For more information about data providers, see Amazon Location Service data providers.

  • :description (String)

    The optional description for the route calculator resource.

  • :pricing_plan (required, String)

    Specifies the pricing plan for your route calculator resource.

    For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

  • :tags (Hash<String,String>)

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

    • For example: \{ "tag1" : "value1", "tag2" : "value2"\}

    ^

    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: + - = . _ : / @.

Returns:

See Also:



1311
1312
1313
1314
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1311

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 AWS account, which lets you retrieve current and historical location of devices.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :description (String)

    An optional description for the tracker resource.

  • :kms_key_id (String)

    A key identifier for an AWS KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.

  • :pricing_plan (required, String)

    Specifies the pricing plan for the tracker resource.

    For additional details and restrictions on each pricing plan option, see the Amazon Location Service pricing page.

  • :pricing_plan_data_source (String)

    Specifies the data provider for the tracker resource.

    • Required value for the following pricing plans: MobileAssetTracking | MobileAssetManagement

    ^

    For more information about Data Providers, and Pricing plans, see the Amazon Location Service product page.

    Amazon Location Service only uses PricingPlanDataSource to calculate billing for your tracker resource. Your data will not be shared with the data provider, and will remain in your AWS account or Region unless you move it.

    Valid Values: Esri | Here

  • :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: + - = . _ : / @.

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

Returns:

See Also:



1426
1427
1428
1429
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1426

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

This operation deletes the resource permanently. If the geofence collection is the target of a tracker resource, the devices will no longer be monitored.

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:



1454
1455
1456
1457
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1454

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

#delete_map(params = {}) ⇒ Struct

Deletes a map resource from your AWS account.

This operation deletes the resource permanently. If the map is being used in an application, the map may not render.

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:



1481
1482
1483
1484
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1481

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

#delete_place_index(params = {}) ⇒ Struct

Deletes a place index resource from your AWS account.

This operation deletes the resource permanently.

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:



1507
1508
1509
1510
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1507

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

#delete_route_calculator(params = {}) ⇒ Struct

Deletes a route calculator resource from your AWS account.

This operation deletes the resource permanently.

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:



1533
1534
1535
1536
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1533

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

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.

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:



1561
1562
1563
1564
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1561

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_arn #=> String
resp.collection_name #=> String
resp.create_time #=> Time
resp.description #=> String
resp.kms_key_id #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.pricing_plan_data_source #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :collection_name (required, String)

    The name of the geofence collection.

Returns:

See Also:



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

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

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

Retrieves the map resource details.

Examples:

Request syntax with placeholder values


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

Response structure


resp.configuration.style #=> String
resp.create_time #=> Time
resp.data_source #=> String
resp.description #=> String
resp.map_arn #=> String
resp.map_name #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
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:



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

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

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

Retrieves the place index resource details.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :index_name (required, String)

    The name of the place index resource.

Returns:

See Also:



1696
1697
1698
1699
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1696

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

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

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_arn #=> String
resp.calculator_name #=> String
resp.create_time #=> Time
resp.data_source #=> String
resp.description #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :calculator_name (required, String)

    The name of the route calculator resource.

Returns:

See Also:



1739
1740
1741
1742
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1739

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.create_time #=> Time
resp.description #=> String
resp.kms_key_id #=> String
resp.pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
resp.pricing_plan_data_source #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.tracker_arn #=> String
resp.tracker_name #=> String
resp.update_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :tracker_name (required, String)

    The name of the tracker resource.

Returns:

See Also:



1784
1785
1786
1787
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1784

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.

Once you unlink a tracker resource from a geofence collection, the tracker positions will no longer be automatically evaluated against geofences.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

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

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

    ^

  • :tracker_name (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

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

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

Device positions are deleted after 30 days.

Examples:

Request syntax with placeholder values


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

Response structure


resp.device_id #=> String
resp.position #=> Array
resp.position[0] #=> Float
resp.received_time #=> Time
resp.sample_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :device_id (required, String)

    The device whose position you want to retrieve.

  • :tracker_name (required, String)

    The tracker resource receiving the position update.

Returns:

See Also:



1868
1869
1870
1871
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1868

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.

Device positions are deleted after 30 days.

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({
  device_id: "Id", # required
  end_time_exclusive: Time.now,
  next_token: "Token",
  start_time_inclusive: Time.now,
  tracker_name: "ResourceName", # required
})

Response structure


resp.device_positions #=> Array
resp.device_positions[0].device_id #=> String
resp.device_positions[0].position #=> Array
resp.device_positions[0].position[0] #=> Float
resp.device_positions[0].received_time #=> Time
resp.device_positions[0].sample_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :device_id (required, String)

    The device whose position history you want to retrieve.

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

    ^

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

    ^

  • :tracker_name (required, String)

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

Returns:

See Also:



1956
1957
1958
1959
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1956

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.

Examples:

Request syntax with placeholder values


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

Response structure


resp.create_time #=> Time
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.status #=> String
resp.update_time #=> Time

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:



1999
2000
2001
2002
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 1999

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

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

Retrieves glyphs used to display labels on a map.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :font_stack (required, String)

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

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

  • :map_name (required, String)

    The map resource associated with the glyph file.

Returns:

See Also:



2041
2042
2043
2044
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2041

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

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.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :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 contain image offsets. Use the following file names:

    • sprites.json

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

  • :map_name (required, String)

    The map resource associated with the sprite file.

Returns:

See Also:



2089
2090
2091
2092
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2089

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

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.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The map resource to retrieve the style descriptor from.

Returns:

See Also:



2124
2125
2126
2127
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2124

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

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

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :map_name (required, String)

    The map resource to retrieve the map tiles from.

  • :x (required, String)

    The X axis value for the map tile.

  • :y (required, String)

    The Y axis value for the map tile.

  • :z (required, String)

    The zoom value for the map tile.

Returns:

See Also:



2173
2174
2175
2176
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2173

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

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

Lists the latest device positions for requested devices.

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({
  max_results: 1,
  next_token: "Token",
  tracker_name: "ResourceName", # required
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].device_id #=> String
resp.data.entries[0].position #=> Array
resp.data.entries[0].position[0] #=> Float
resp.data.entries[0].sample_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

  • :tracker_name (required, String)

    The tracker resource containing the requested devices.

Returns:

See Also:



2222
2223
2224
2225
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2222

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 AWS 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].create_time #=> Time
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].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:



2270
2271
2272
2273
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2270

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

Response structure


resp.data.entries #=> Array
resp.data.entries[0].create_time #=> Time
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].status #=> String
resp.data.entries[0].update_time #=> Time
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

Returns:

See Also:



2317
2318
2319
2320
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2317

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

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

Lists map resources in your AWS 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_maps({
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.data.entries #=> Array
resp.data.entries[0].create_time #=> Time
resp.data.entries[0].data_source #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].map_name #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
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:



2365
2366
2367
2368
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2365

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

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

Lists place index resources in your AWS 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].create_time #=> Time
resp.data.entries[0].data_source #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].index_name #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
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:

See Also:



2413
2414
2415
2416
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2413

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

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

Lists route calculator resources in your AWS 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].create_time #=> Time
resp.data.entries[0].data_source #=> String
resp.data.entries[0].description #=> String
resp.data.entries[0].pricing_plan #=> String, one of "RequestBasedUsage", "MobileAssetTracking", "MobileAssetManagement"
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:



2460
2461
2462
2463
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2460

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 the tags for the specified Amazon Location Service 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.

Returns:

See Also:



2490
2491
2492
2493
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2490

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({
  max_results: 1,
  next_token: "Token",
  tracker_name: "ResourceName", # required
})

Response structure


resp.consumer_arns #=> Array
resp.consumer_arns[0] #=> String
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

  • :tracker_name (required, String)

    The tracker resource whose associated geofence collections you want to list.

Returns:

See Also:



2539
2540
2541
2542
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2539

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 AWS 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].create_time #=> Time
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].tracker_name #=> String
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:



2587
2588
2589
2590
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2587

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

Response structure


resp.create_time #=> Time
resp.geofence_id #=> String
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 polygon details to specify the position of the geofence.

    Each geofence polygon can have a maximum of 1,000 vertices.

Returns:

See Also:



2643
2644
2645
2646
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2643

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

#search_place_index_for_position(params = {}) ⇒ Types::SearchPlaceIndexForPositionResponse

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
  max_results: 1,
  position: [1.0], # required
})

Response structure


resp.results #=> Array
resp.results[0].place.address_number #=> String
resp.results[0].place.country #=> String
resp.results[0].place.geometry.point #=> Array
resp.results[0].place.geometry.point[0] #=> Float
resp.results[0].place.label #=> String
resp.results[0].place.municipality #=> String
resp.results[0].place.neighborhood #=> String
resp.results[0].place.postal_code #=> String
resp.results[0].place.region #=> String
resp.results[0].place.street #=> String
resp.results[0].place.sub_region #=> String
resp.summary.data_source #=> String
resp.summary.max_results #=> Integer
resp.summary.position #=> Array
resp.summary.position[0] #=> Float

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.

  • :max_results (Integer)

    An optional paramer. The maximum number of results returned per request.

    Default value: 50

  • :position (required, Array<Float>)

    Specifies a coordinate for the query defined by a longitude, and latitude.

    • The first position is the X coordinate, or longitude.

    • The second position is the Y coordinate, or latitude.

    For example, position=xLongitude&position=yLatitude .

Returns:

See Also:



2707
2708
2709
2710
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2707

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_text(params = {}) ⇒ Types::SearchPlaceIndexForTextResponse

Geocodes free-form text, such as an address, name, city, or region to allow you to search for Places or points of interest.

Includes the option to apply additional parameters to narrow your list of results.

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.

Examples:

Request syntax with placeholder values


resp = client.search_place_index_for_text({
  bias_position: [1.0],
  filter_b_box: [1.0],
  filter_countries: ["CountryCode"],
  index_name: "ResourceName", # required
  max_results: 1,
  text: "SyntheticSearchPlaceIndexForTextRequestString", # required
})

Response structure


resp.results #=> Array
resp.results[0].place.address_number #=> String
resp.results[0].place.country #=> String
resp.results[0].place.geometry.point #=> Array
resp.results[0].place.geometry.point[0] #=> Float
resp.results[0].place.label #=> String
resp.results[0].place.municipality #=> String
resp.results[0].place.neighborhood #=> String
resp.results[0].place.postal_code #=> String
resp.results[0].place.region #=> String
resp.results[0].place.street #=> String
resp.results[0].place.sub_region #=> String
resp.summary.bias_position #=> Array
resp.summary.bias_position[0] #=> Float
resp.summary.data_source #=> String
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.text #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bias_position (Array<Float>)

    Searches for results closest to the given position. An optional parameter defined by longitude, and latitude.

    • The first bias position is the X coordinate, or longitude.

    • The second bias position is the Y coordinate, or latitude.

    For example, bias=xLongitude&bias=yLatitude.

  • :filter_b_box (Array<Float>)

    Filters the results by returning only Places within the provided bounding box. An optional parameter.

    The first 2 bbox parameters describe the lower southwest corner:

    • The first bbox position is the X coordinate or longitude of the lower southwest corner.

    • The second bbox position is the Y coordinate or latitude of the lower southwest corner.

    For example, bbox=xLongitudeSW&bbox=yLatitudeSW.

    The next bbox parameters describe the upper northeast corner:

    • The third bbox position is the X coordinate, or longitude of the upper northeast corner.

    • The fourth bbox position is the Y coordinate, or longitude of the upper northeast corner.

    For example, bbox=xLongitudeNE&bbox=yLatitudeNE

  • :filter_countries (Array<String>)

    Limits the search to the given a list of countries/regions. An optional parameter.

    • Use the ISO 3166 3-digit country code. For example, Australia uses three upper-case characters: AUS.

    ^

  • :index_name (required, String)

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

  • :max_results (Integer)

    An optional parameter. The maximum number of results returned per request.

    The default: 50

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

Returns:

See Also:



2830
2831
2832
2833
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2830

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

 <p>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.</p> <p>Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.</p> <p>You can use the <code>TagResource</code> action 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 is already associated with the resource, the new tag value that you specify replaces the previous value for that tag. </p> <p>You can associate as many as 50 tags with a resource.</p>

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.

  • :tags (required, Hash<String,String>)

    The mapping from tag key to tag value for each tag associated with the specified resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2863
2864
2865
2866
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2863

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

  • :tag_keys (required, Array<String>)

    The list of tag keys to remove from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2891
2892
2893
2894
# File 'gems/aws-sdk-locationservice/lib/aws-sdk-locationservice/client.rb', line 2891

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