diff --git a/clients/client-geo-maps/.gitignore b/clients/client-geo-maps/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-geo-maps/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-geo-maps/LICENSE b/clients/client-geo-maps/LICENSE new file mode 100644 index 000000000000..1349aa7c9923 --- /dev/null +++ b/clients/client-geo-maps/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-geo-maps/README.md b/clients/client-geo-maps/README.md new file mode 100644 index 000000000000..5a193055458d --- /dev/null +++ b/clients/client-geo-maps/README.md @@ -0,0 +1,273 @@ + + +# @aws-sdk/client-geo-maps + +## Description + +AWS SDK for JavaScript GeoMaps Client for Node.js, Browser and React Native. + +

+Integrate high-quality base map data into your applications using +MapLibre. Capabilities include: +

+ + +## Installing + +To install this package, simply type add or install @aws-sdk/client-geo-maps +using your favorite package manager: + +- `npm install @aws-sdk/client-geo-maps` +- `yarn add @aws-sdk/client-geo-maps` +- `pnpm add @aws-sdk/client-geo-maps` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `GeoMapsClient` and +the commands you need, for example `GetGlyphsCommand`: + +```js +// ES5 example +const { GeoMapsClient, GetGlyphsCommand } = require("@aws-sdk/client-geo-maps"); +``` + +```ts +// ES6+ example +import { GeoMapsClient, GetGlyphsCommand } from "@aws-sdk/client-geo-maps"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new GeoMapsClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new GetGlyphsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-geo-maps"; +const client = new AWS.GeoMaps({ region: "REGION" }); + +// async/await. +try { + const data = await client.getGlyphs(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .getGlyphs(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.getGlyphs(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-geo-maps` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +GetGlyphs + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/geo-maps/command/GetGlyphsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetGlyphsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetGlyphsCommandOutput/) + +
+
+ +GetSprites + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/geo-maps/command/GetSpritesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetSpritesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetSpritesCommandOutput/) + +
+
+ +GetStaticMap + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/geo-maps/command/GetStaticMapCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetStaticMapCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetStaticMapCommandOutput/) + +
+
+ +GetStyleDescriptor + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/geo-maps/command/GetStyleDescriptorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetStyleDescriptorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetStyleDescriptorCommandOutput/) + +
+
+ +GetTile + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/geo-maps/command/GetTileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetTileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-geo-maps/Interface/GetTileCommandOutput/) + +
diff --git a/clients/client-geo-maps/api-extractor.json b/clients/client-geo-maps/api-extractor.json new file mode 100644 index 000000000000..d5bf5ffeee85 --- /dev/null +++ b/clients/client-geo-maps/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-geo-maps/package.json b/clients/client-geo-maps/package.json new file mode 100644 index 000000000000..d93e0897b635 --- /dev/null +++ b/clients/client-geo-maps/package.json @@ -0,0 +1,102 @@ +{ + "name": "@aws-sdk/client-geo-maps", + "description": "AWS SDK for JavaScript Geo Maps Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo geo-maps" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "*", + "@aws-sdk/client-sts": "*", + "@aws-sdk/core": "*", + "@aws-sdk/credential-provider-node": "*", + "@aws-sdk/middleware-host-header": "*", + "@aws-sdk/middleware-logger": "*", + "@aws-sdk/middleware-recursion-detection": "*", + "@aws-sdk/middleware-user-agent": "*", + "@aws-sdk/region-config-resolver": "*", + "@aws-sdk/types": "*", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-stream": "^3.1.9", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=16.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-geo-maps", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-geo-maps" + } +} diff --git a/clients/client-geo-maps/src/GeoMaps.ts b/clients/client-geo-maps/src/GeoMaps.ts new file mode 100644 index 000000000000..5b08559e8666 --- /dev/null +++ b/clients/client-geo-maps/src/GeoMaps.ts @@ -0,0 +1,124 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { GetGlyphsCommand, GetGlyphsCommandInput, GetGlyphsCommandOutput } from "./commands/GetGlyphsCommand"; +import { GetSpritesCommand, GetSpritesCommandInput, GetSpritesCommandOutput } from "./commands/GetSpritesCommand"; +import { + GetStaticMapCommand, + GetStaticMapCommandInput, + GetStaticMapCommandOutput, +} from "./commands/GetStaticMapCommand"; +import { + GetStyleDescriptorCommand, + GetStyleDescriptorCommandInput, + GetStyleDescriptorCommandOutput, +} from "./commands/GetStyleDescriptorCommand"; +import { GetTileCommand, GetTileCommandInput, GetTileCommandOutput } from "./commands/GetTileCommand"; +import { GeoMapsClient, GeoMapsClientConfig } from "./GeoMapsClient"; + +const commands = { + GetGlyphsCommand, + GetSpritesCommand, + GetStaticMapCommand, + GetStyleDescriptorCommand, + GetTileCommand, +}; + +export interface GeoMaps { + /** + * @see {@link GetGlyphsCommand} + */ + getGlyphs(args: GetGlyphsCommandInput, options?: __HttpHandlerOptions): Promise; + getGlyphs(args: GetGlyphsCommandInput, cb: (err: any, data?: GetGlyphsCommandOutput) => void): void; + getGlyphs( + args: GetGlyphsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetGlyphsCommandOutput) => void + ): void; + + /** + * @see {@link GetSpritesCommand} + */ + getSprites(args: GetSpritesCommandInput, options?: __HttpHandlerOptions): Promise; + getSprites(args: GetSpritesCommandInput, cb: (err: any, data?: GetSpritesCommandOutput) => void): void; + getSprites( + args: GetSpritesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSpritesCommandOutput) => void + ): void; + + /** + * @see {@link GetStaticMapCommand} + */ + getStaticMap(args: GetStaticMapCommandInput, options?: __HttpHandlerOptions): Promise; + getStaticMap(args: GetStaticMapCommandInput, cb: (err: any, data?: GetStaticMapCommandOutput) => void): void; + getStaticMap( + args: GetStaticMapCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetStaticMapCommandOutput) => void + ): void; + + /** + * @see {@link GetStyleDescriptorCommand} + */ + getStyleDescriptor( + args: GetStyleDescriptorCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getStyleDescriptor( + args: GetStyleDescriptorCommandInput, + cb: (err: any, data?: GetStyleDescriptorCommandOutput) => void + ): void; + getStyleDescriptor( + args: GetStyleDescriptorCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetStyleDescriptorCommandOutput) => void + ): void; + + /** + * @see {@link GetTileCommand} + */ + getTile(args: GetTileCommandInput, options?: __HttpHandlerOptions): Promise; + getTile(args: GetTileCommandInput, cb: (err: any, data?: GetTileCommandOutput) => void): void; + getTile( + args: GetTileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetTileCommandOutput) => void + ): void; +} + +/** + *

+ * Integrate high-quality base map data into your applications using + * MapLibre. Capabilities include: + *

+ *
    + *
  • + *

    Access to comprehensive base map data, allowing you to tailor the map display to your specific needs.

    + *
  • + *
  • + *

    Multiple pre-designed map styles suited for various application types, such as navigation, logistics, or data visualization.

    + *
  • + *
  • + *

    Generation of static map images for scenarios where interactive maps aren't suitable, such as:

    + *
      + *
    • + *

      Embedding in emails or documents

      + *
    • + *
    • + *

      Displaying in low-bandwidth environments

      + *
    • + *
    • + *

      Creating printable maps

      + *
    • + *
    • + *

      Enhancing application performance by reducing client-side rendering

      + *
    • + *
    + *
  • + *
+ * @public + */ +export class GeoMaps extends GeoMapsClient implements GeoMaps {} +createAggregatedClient(commands, GeoMaps); diff --git a/clients/client-geo-maps/src/GeoMapsClient.ts b/clients/client-geo-maps/src/GeoMapsClient.ts new file mode 100644 index 000000000000..c9be01f922ba --- /dev/null +++ b/clients/client-geo-maps/src/GeoMapsClient.ts @@ -0,0 +1,344 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { + DefaultIdentityProviderConfig, + getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpSigningPlugin, +} from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + AwsCredentialIdentityProvider, + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { + defaultGeoMapsHttpAuthSchemeParametersProvider, + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, + resolveHttpAuthSchemeConfig, +} from "./auth/httpAuthSchemeProvider"; +import { GetGlyphsCommandInput, GetGlyphsCommandOutput } from "./commands/GetGlyphsCommand"; +import { GetSpritesCommandInput, GetSpritesCommandOutput } from "./commands/GetSpritesCommand"; +import { GetStaticMapCommandInput, GetStaticMapCommandOutput } from "./commands/GetStaticMapCommand"; +import { GetStyleDescriptorCommandInput, GetStyleDescriptorCommandOutput } from "./commands/GetStyleDescriptorCommand"; +import { GetTileCommandInput, GetTileCommandOutput } from "./commands/GetTileCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | GetGlyphsCommandInput + | GetSpritesCommandInput + | GetStaticMapCommandInput + | GetStyleDescriptorCommandInput + | GetTileCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | GetGlyphsCommandOutput + | GetSpritesCommandOutput + | GetStaticMapCommandOutput + | GetStyleDescriptorCommandOutput + | GetTileCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + + /** + * Default credentials provider; Not available in browser runtime. + * @deprecated + * @internal + */ + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} + +/** + * @public + */ +export type GeoMapsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + UserAgentInputConfig & + RetryInputConfig & + RegionInputConfig & + HostHeaderInputConfig & + EndpointInputConfig & + HttpAuthSchemeInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of GeoMapsClient class constructor that set the region, credentials and other options. + */ +export interface GeoMapsClientConfig extends GeoMapsClientConfigType {} + +/** + * @public + */ +export type GeoMapsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + UserAgentResolvedConfig & + RetryResolvedConfig & + RegionResolvedConfig & + HostHeaderResolvedConfig & + EndpointResolvedConfig & + HttpAuthSchemeResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of GeoMapsClient class. This is resolved and normalized from the {@link GeoMapsClientConfig | constructor configuration interface}. + */ +export interface GeoMapsClientResolvedConfig extends GeoMapsClientResolvedConfigType {} + +/** + *

+ * Integrate high-quality base map data into your applications using + * MapLibre. Capabilities include: + *

+ *
    + *
  • + *

    Access to comprehensive base map data, allowing you to tailor the map display to your specific needs.

    + *
  • + *
  • + *

    Multiple pre-designed map styles suited for various application types, such as navigation, logistics, or data visualization.

    + *
  • + *
  • + *

    Generation of static map images for scenarios where interactive maps aren't suitable, such as:

    + *
      + *
    • + *

      Embedding in emails or documents

      + *
    • + *
    • + *

      Displaying in low-bandwidth environments

      + *
    • + *
    • + *

      Creating printable maps

      + *
    • + *
    • + *

      Enhancing application performance by reducing client-side rendering

      + *
    • + *
    + *
  • + *
+ * @public + */ +export class GeoMapsClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + GeoMapsClientResolvedConfig +> { + /** + * The resolved configuration of GeoMapsClient class. This is resolved and normalized from the {@link GeoMapsClientConfig | constructor configuration interface}. + */ + readonly config: GeoMapsClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfig) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use( + getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultGeoMapsHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config: GeoMapsClientResolvedConfig) => + new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + }) + ); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-geo-maps/src/auth/httpAuthExtensionConfiguration.ts b/clients/client-geo-maps/src/auth/httpAuthExtensionConfiguration.ts new file mode 100644 index 000000000000..2c04373361d9 --- /dev/null +++ b/clients/client-geo-maps/src/auth/httpAuthExtensionConfiguration.ts @@ -0,0 +1,72 @@ +// smithy-typescript generated code +import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types"; + +import { GeoMapsHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; + +/** + * @internal + */ +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider(httpAuthSchemeProvider: GeoMapsHttpAuthSchemeProvider): void; + httpAuthSchemeProvider(): GeoMapsHttpAuthSchemeProvider; + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; +} + +/** + * @internal + */ +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: GeoMapsHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; + +/** + * @internal + */ +export const getHttpAuthExtensionConfiguration = ( + runtimeConfig: HttpAuthRuntimeConfig +): HttpAuthExtensionConfiguration => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes!; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider!; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes(): HttpAuthScheme[] { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider: GeoMapsHttpAuthSchemeProvider): void { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider(): GeoMapsHttpAuthSchemeProvider { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void { + _credentials = credentials; + }, + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined { + return _credentials; + }, + }; +}; + +/** + * @internal + */ +export const resolveHttpAuthRuntimeConfig = (config: HttpAuthExtensionConfiguration): HttpAuthRuntimeConfig => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; diff --git a/clients/client-geo-maps/src/auth/httpAuthSchemeProvider.ts b/clients/client-geo-maps/src/auth/httpAuthSchemeProvider.ts new file mode 100644 index 000000000000..f2e54ffbff6a --- /dev/null +++ b/clients/client-geo-maps/src/auth/httpAuthSchemeProvider.ts @@ -0,0 +1,137 @@ +// smithy-typescript generated code +import { + AwsSdkSigV4AuthInputConfig, + AwsSdkSigV4AuthResolvedConfig, + AwsSdkSigV4PreviouslyResolved, + resolveAwsSdkSigV4Config, +} from "@aws-sdk/core"; +import { + HandlerExecutionContext, + HttpAuthOption, + HttpAuthScheme, + HttpAuthSchemeParameters, + HttpAuthSchemeParametersProvider, + HttpAuthSchemeProvider, +} from "@smithy/types"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; + +import { GeoMapsClientConfig, GeoMapsClientResolvedConfig } from "../GeoMapsClient"; + +/** + * @internal + */ +export interface GeoMapsHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} + +/** + * @internal + */ +export interface GeoMapsHttpAuthSchemeParametersProvider + extends HttpAuthSchemeParametersProvider< + GeoMapsClientResolvedConfig, + HandlerExecutionContext, + GeoMapsHttpAuthSchemeParameters, + object + > {} + +/** + * @internal + */ +export const defaultGeoMapsHttpAuthSchemeParametersProvider = async ( + config: GeoMapsClientResolvedConfig, + context: HandlerExecutionContext, + input: object +): Promise => { + return { + operation: getSmithyContext(context).operation as string, + region: + (await normalizeProvider(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; + +function createAwsAuthSigv4HttpAuthOption(authParameters: GeoMapsHttpAuthSchemeParameters): HttpAuthOption { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "geo-maps", + region: authParameters.region, + }, + propertiesExtractor: (config: Partial, context) => ({ + /** + * @internal + */ + signingProperties: { + config, + context, + }, + }), + }; +} + +/** + * @internal + */ +export interface GeoMapsHttpAuthSchemeProvider extends HttpAuthSchemeProvider {} + +/** + * @internal + */ +export const defaultGeoMapsHttpAuthSchemeProvider: GeoMapsHttpAuthSchemeProvider = (authParameters) => { + const options: HttpAuthOption[] = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; + +/** + * @internal + */ +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + /** + * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + httpAuthSchemes?: HttpAuthScheme[]; + + /** + * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + httpAuthSchemeProvider?: GeoMapsHttpAuthSchemeProvider; +} + +/** + * @internal + */ +export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { + /** + * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + readonly httpAuthSchemes: HttpAuthScheme[]; + + /** + * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + readonly httpAuthSchemeProvider: GeoMapsHttpAuthSchemeProvider; +} + +/** + * @internal + */ +export const resolveHttpAuthSchemeConfig = ( + config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved +): T & HttpAuthSchemeResolvedConfig => { + const config_0 = resolveAwsSdkSigV4Config(config); + return { + ...config_0, + } as T & HttpAuthSchemeResolvedConfig; +}; diff --git a/clients/client-geo-maps/src/commands/GetGlyphsCommand.ts b/clients/client-geo-maps/src/commands/GetGlyphsCommand.ts new file mode 100644 index 000000000000..f3cd3f63e639 --- /dev/null +++ b/clients/client-geo-maps/src/commands/GetGlyphsCommand.ts @@ -0,0 +1,104 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GeoMapsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GeoMapsClient"; +import { GetGlyphsRequest, GetGlyphsResponse } from "../models/models_0"; +import { de_GetGlyphsCommand, se_GetGlyphsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetGlyphsCommand}. + */ +export interface GetGlyphsCommandInput extends GetGlyphsRequest {} +/** + * @public + */ +export type GetGlyphsCommandOutputType = Omit & { + Blob?: Uint8ArrayBlobAdapter; +}; + +/** + * @public + * + * The output of {@link GetGlyphsCommand}. + */ +export interface GetGlyphsCommandOutput extends GetGlyphsCommandOutputType, __MetadataBearer {} + +/** + *

Returns the map's glyphs.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GeoMapsClient, GetGlyphsCommand } from "@aws-sdk/client-geo-maps"; // ES Modules import + * // const { GeoMapsClient, GetGlyphsCommand } = require("@aws-sdk/client-geo-maps"); // CommonJS import + * const client = new GeoMapsClient(config); + * const input = { // GetGlyphsRequest + * FontStack: "STRING_VALUE", // required + * FontUnicodeRange: "STRING_VALUE", // required + * }; + * const command = new GetGlyphsCommand(input); + * const response = await client.send(command); + * // { // GetGlyphsResponse + * // Blob: new Uint8Array(), + * // ContentType: "STRING_VALUE", + * // CacheControl: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetGlyphsCommandInput - {@link GetGlyphsCommandInput} + * @returns {@link GetGlyphsCommandOutput} + * @see {@link GetGlyphsCommandInput} for command's `input` shape. + * @see {@link GetGlyphsCommandOutput} for command's `response` shape. + * @see {@link GeoMapsClientResolvedConfig | config} for GeoMapsClient's `config` shape. + * + * @throws {@link GeoMapsServiceException} + *

Base exception class for all service exceptions from GeoMaps service.

+ * + * @public + */ +export class GetGlyphsCommand extends $Command + .classBuilder< + GetGlyphsCommandInput, + GetGlyphsCommandOutput, + GeoMapsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: GeoMapsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("MapsService", "GetGlyphs", {}) + .n("GeoMapsClient", "GetGlyphsCommand") + .f(void 0, void 0) + .ser(se_GetGlyphsCommand) + .de(de_GetGlyphsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetGlyphsRequest; + output: GetGlyphsResponse; + }; + sdk: { + input: GetGlyphsCommandInput; + output: GetGlyphsCommandOutput; + }; + }; +} diff --git a/clients/client-geo-maps/src/commands/GetSpritesCommand.ts b/clients/client-geo-maps/src/commands/GetSpritesCommand.ts new file mode 100644 index 000000000000..3a2e49e1ed48 --- /dev/null +++ b/clients/client-geo-maps/src/commands/GetSpritesCommand.ts @@ -0,0 +1,106 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GeoMapsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GeoMapsClient"; +import { GetSpritesRequest, GetSpritesResponse } from "../models/models_0"; +import { de_GetSpritesCommand, se_GetSpritesCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetSpritesCommand}. + */ +export interface GetSpritesCommandInput extends GetSpritesRequest {} +/** + * @public + */ +export type GetSpritesCommandOutputType = Omit & { + Blob?: Uint8ArrayBlobAdapter; +}; + +/** + * @public + * + * The output of {@link GetSpritesCommand}. + */ +export interface GetSpritesCommandOutput extends GetSpritesCommandOutputType, __MetadataBearer {} + +/** + *

Returns the map's sprites.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GeoMapsClient, GetSpritesCommand } from "@aws-sdk/client-geo-maps"; // ES Modules import + * // const { GeoMapsClient, GetSpritesCommand } = require("@aws-sdk/client-geo-maps"); // CommonJS import + * const client = new GeoMapsClient(config); + * const input = { // GetSpritesRequest + * FileName: "STRING_VALUE", // required + * Style: "STRING_VALUE", // required + * ColorScheme: "STRING_VALUE", // required + * Variant: "STRING_VALUE", // required + * }; + * const command = new GetSpritesCommand(input); + * const response = await client.send(command); + * // { // GetSpritesResponse + * // Blob: new Uint8Array(), + * // ContentType: "STRING_VALUE", + * // CacheControl: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetSpritesCommandInput - {@link GetSpritesCommandInput} + * @returns {@link GetSpritesCommandOutput} + * @see {@link GetSpritesCommandInput} for command's `input` shape. + * @see {@link GetSpritesCommandOutput} for command's `response` shape. + * @see {@link GeoMapsClientResolvedConfig | config} for GeoMapsClient's `config` shape. + * + * @throws {@link GeoMapsServiceException} + *

Base exception class for all service exceptions from GeoMaps service.

+ * + * @public + */ +export class GetSpritesCommand extends $Command + .classBuilder< + GetSpritesCommandInput, + GetSpritesCommandOutput, + GeoMapsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: GeoMapsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("MapsService", "GetSprites", {}) + .n("GeoMapsClient", "GetSpritesCommand") + .f(void 0, void 0) + .ser(se_GetSpritesCommand) + .de(de_GetSpritesCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetSpritesRequest; + output: GetSpritesResponse; + }; + sdk: { + input: GetSpritesCommandInput; + output: GetSpritesCommandOutput; + }; + }; +} diff --git a/clients/client-geo-maps/src/commands/GetStaticMapCommand.ts b/clients/client-geo-maps/src/commands/GetStaticMapCommand.ts new file mode 100644 index 000000000000..6cf868f3bc2b --- /dev/null +++ b/clients/client-geo-maps/src/commands/GetStaticMapCommand.ts @@ -0,0 +1,129 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GeoMapsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GeoMapsClient"; +import { GetStaticMapRequest, GetStaticMapRequestFilterSensitiveLog, GetStaticMapResponse } from "../models/models_0"; +import { de_GetStaticMapCommand, se_GetStaticMapCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetStaticMapCommand}. + */ +export interface GetStaticMapCommandInput extends GetStaticMapRequest {} +/** + * @public + */ +export type GetStaticMapCommandOutputType = Omit & { + Blob?: Uint8ArrayBlobAdapter; +}; + +/** + * @public + * + * The output of {@link GetStaticMapCommand}. + */ +export interface GetStaticMapCommandOutput extends GetStaticMapCommandOutputType, __MetadataBearer {} + +/** + *

Provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GeoMapsClient, GetStaticMapCommand } from "@aws-sdk/client-geo-maps"; // ES Modules import + * // const { GeoMapsClient, GetStaticMapCommand } = require("@aws-sdk/client-geo-maps"); // CommonJS import + * const client = new GeoMapsClient(config); + * const input = { // GetStaticMapRequest + * BoundingBox: "STRING_VALUE", + * BoundedPositions: "STRING_VALUE", + * Center: "STRING_VALUE", + * CompactOverlay: "STRING_VALUE", + * GeoJsonOverlay: "STRING_VALUE", + * Height: Number("int"), // required + * Key: "STRING_VALUE", + * Padding: Number("int"), + * Radius: Number("long"), + * FileName: "STRING_VALUE", // required + * ScaleBarUnit: "STRING_VALUE", + * Style: "STRING_VALUE", + * Width: Number("int"), // required + * Zoom: Number("float"), + * }; + * const command = new GetStaticMapCommand(input); + * const response = await client.send(command); + * // { // GetStaticMapResponse + * // Blob: new Uint8Array(), + * // ContentType: "STRING_VALUE", + * // CacheControl: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // PricingBucket: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param GetStaticMapCommandInput - {@link GetStaticMapCommandInput} + * @returns {@link GetStaticMapCommandOutput} + * @see {@link GetStaticMapCommandInput} for command's `input` shape. + * @see {@link GetStaticMapCommandOutput} for command's `response` shape. + * @see {@link GeoMapsClientResolvedConfig | config} for GeoMapsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

+ * + * @throws {@link InternalServerException} (server fault) + *

The request processing has failed because of an unknown error, exception or failure.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by an AWS service.

+ * + * @throws {@link GeoMapsServiceException} + *

Base exception class for all service exceptions from GeoMaps service.

+ * + * @public + */ +export class GetStaticMapCommand extends $Command + .classBuilder< + GetStaticMapCommandInput, + GetStaticMapCommandOutput, + GeoMapsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: GeoMapsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("MapsService", "GetStaticMap", {}) + .n("GeoMapsClient", "GetStaticMapCommand") + .f(GetStaticMapRequestFilterSensitiveLog, void 0) + .ser(se_GetStaticMapCommand) + .de(de_GetStaticMapCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetStaticMapRequest; + output: GetStaticMapResponse; + }; + sdk: { + input: GetStaticMapCommandInput; + output: GetStaticMapCommandOutput; + }; + }; +} diff --git a/clients/client-geo-maps/src/commands/GetStyleDescriptorCommand.ts b/clients/client-geo-maps/src/commands/GetStyleDescriptorCommand.ts new file mode 100644 index 000000000000..c63d2da26df9 --- /dev/null +++ b/clients/client-geo-maps/src/commands/GetStyleDescriptorCommand.ts @@ -0,0 +1,110 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GeoMapsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GeoMapsClient"; +import { + GetStyleDescriptorRequest, + GetStyleDescriptorRequestFilterSensitiveLog, + GetStyleDescriptorResponse, +} from "../models/models_0"; +import { de_GetStyleDescriptorCommand, se_GetStyleDescriptorCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetStyleDescriptorCommand}. + */ +export interface GetStyleDescriptorCommandInput extends GetStyleDescriptorRequest {} +/** + * @public + */ +export type GetStyleDescriptorCommandOutputType = Omit & { + Blob?: Uint8ArrayBlobAdapter; +}; + +/** + * @public + * + * The output of {@link GetStyleDescriptorCommand}. + */ +export interface GetStyleDescriptorCommandOutput extends GetStyleDescriptorCommandOutputType, __MetadataBearer {} + +/** + *

Returns information about the style.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GeoMapsClient, GetStyleDescriptorCommand } from "@aws-sdk/client-geo-maps"; // ES Modules import + * // const { GeoMapsClient, GetStyleDescriptorCommand } = require("@aws-sdk/client-geo-maps"); // CommonJS import + * const client = new GeoMapsClient(config); + * const input = { // GetStyleDescriptorRequest + * Style: "STRING_VALUE", // required + * ColorScheme: "STRING_VALUE", + * PoliticalView: "STRING_VALUE", + * Key: "STRING_VALUE", + * }; + * const command = new GetStyleDescriptorCommand(input); + * const response = await client.send(command); + * // { // GetStyleDescriptorResponse + * // Blob: new Uint8Array(), + * // ContentType: "STRING_VALUE", + * // CacheControl: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetStyleDescriptorCommandInput - {@link GetStyleDescriptorCommandInput} + * @returns {@link GetStyleDescriptorCommandOutput} + * @see {@link GetStyleDescriptorCommandInput} for command's `input` shape. + * @see {@link GetStyleDescriptorCommandOutput} for command's `response` shape. + * @see {@link GeoMapsClientResolvedConfig | config} for GeoMapsClient's `config` shape. + * + * @throws {@link GeoMapsServiceException} + *

Base exception class for all service exceptions from GeoMaps service.

+ * + * @public + */ +export class GetStyleDescriptorCommand extends $Command + .classBuilder< + GetStyleDescriptorCommandInput, + GetStyleDescriptorCommandOutput, + GeoMapsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: GeoMapsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("MapsService", "GetStyleDescriptor", {}) + .n("GeoMapsClient", "GetStyleDescriptorCommand") + .f(GetStyleDescriptorRequestFilterSensitiveLog, void 0) + .ser(se_GetStyleDescriptorCommand) + .de(de_GetStyleDescriptorCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetStyleDescriptorRequest; + output: GetStyleDescriptorResponse; + }; + sdk: { + input: GetStyleDescriptorCommandInput; + output: GetStyleDescriptorCommandOutput; + }; + }; +} diff --git a/clients/client-geo-maps/src/commands/GetTileCommand.ts b/clients/client-geo-maps/src/commands/GetTileCommand.ts new file mode 100644 index 000000000000..abda0d9ebed9 --- /dev/null +++ b/clients/client-geo-maps/src/commands/GetTileCommand.ts @@ -0,0 +1,120 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GeoMapsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GeoMapsClient"; +import { GetTileRequest, GetTileRequestFilterSensitiveLog, GetTileResponse } from "../models/models_0"; +import { de_GetTileCommand, se_GetTileCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetTileCommand}. + */ +export interface GetTileCommandInput extends GetTileRequest {} +/** + * @public + */ +export type GetTileCommandOutputType = Omit & { + Blob?: Uint8ArrayBlobAdapter; +}; + +/** + * @public + * + * The output of {@link GetTileCommand}. + */ +export interface GetTileCommandOutput extends GetTileCommandOutputType, __MetadataBearer {} + +/** + *

Returns a tile. 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.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { GeoMapsClient, GetTileCommand } from "@aws-sdk/client-geo-maps"; // ES Modules import + * // const { GeoMapsClient, GetTileCommand } = require("@aws-sdk/client-geo-maps"); // CommonJS import + * const client = new GeoMapsClient(config); + * const input = { // GetTileRequest + * Tileset: "STRING_VALUE", // required + * Z: "STRING_VALUE", // required + * X: "STRING_VALUE", // required + * Y: "STRING_VALUE", // required + * Key: "STRING_VALUE", + * }; + * const command = new GetTileCommand(input); + * const response = await client.send(command); + * // { // GetTileResponse + * // Blob: new Uint8Array(), + * // ContentType: "STRING_VALUE", + * // CacheControl: "STRING_VALUE", + * // ETag: "STRING_VALUE", + * // PricingBucket: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param GetTileCommandInput - {@link GetTileCommandInput} + * @returns {@link GetTileCommandOutput} + * @see {@link GetTileCommandInput} for command's `input` shape. + * @see {@link GetTileCommandOutput} for command's `response` shape. + * @see {@link GeoMapsClientResolvedConfig | config} for GeoMapsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

+ * + * @throws {@link InternalServerException} (server fault) + *

The request processing has failed because of an unknown error, exception or failure.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to request throttling.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by an AWS service.

+ * + * @throws {@link GeoMapsServiceException} + *

Base exception class for all service exceptions from GeoMaps service.

+ * + * @public + */ +export class GetTileCommand extends $Command + .classBuilder< + GetTileCommandInput, + GetTileCommandOutput, + GeoMapsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: GeoMapsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("MapsService", "GetTile", {}) + .n("GeoMapsClient", "GetTileCommand") + .f(GetTileRequestFilterSensitiveLog, void 0) + .ser(se_GetTileCommand) + .de(de_GetTileCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetTileRequest; + output: GetTileResponse; + }; + sdk: { + input: GetTileCommandInput; + output: GetTileCommandOutput; + }; + }; +} diff --git a/clients/client-geo-maps/src/commands/index.ts b/clients/client-geo-maps/src/commands/index.ts new file mode 100644 index 000000000000..8d8596a3aa8a --- /dev/null +++ b/clients/client-geo-maps/src/commands/index.ts @@ -0,0 +1,6 @@ +// smithy-typescript generated code +export * from "./GetGlyphsCommand"; +export * from "./GetSpritesCommand"; +export * from "./GetStaticMapCommand"; +export * from "./GetStyleDescriptorCommand"; +export * from "./GetTileCommand"; diff --git a/clients/client-geo-maps/src/endpoint/EndpointParameters.ts b/clients/client-geo-maps/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..d00847cc0ef0 --- /dev/null +++ b/clients/client-geo-maps/src/endpoint/EndpointParameters.ts @@ -0,0 +1,41 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; + region?: string | Provider; +} + +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; + +export const resolveClientEndpointParameters = ( + options: T & ClientInputEndpointParameters +): T & ClientResolvedEndpointParameters => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "geo-maps", + }; +}; + +export const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +} as const; + +export interface EndpointParameters extends __EndpointParameters { + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; + Region?: string; +} diff --git a/clients/client-geo-maps/src/endpoint/endpointResolver.ts b/clients/client-geo-maps/src/endpoint/endpointResolver.ts new file mode 100644 index 000000000000..ccee107f30d6 --- /dev/null +++ b/clients/client-geo-maps/src/endpoint/endpointResolver.ts @@ -0,0 +1,26 @@ +// smithy-typescript generated code +import { awsEndpointFunctions } from "@aws-sdk/util-endpoints"; +import { EndpointV2, Logger } from "@smithy/types"; +import { customEndpointFunctions, EndpointCache, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints"; + +import { EndpointParameters } from "./EndpointParameters"; +import { ruleSet } from "./ruleset"; + +const cache = new EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], +}); + +export const defaultEndpointResolver = ( + endpointParams: EndpointParameters, + context: { logger?: Logger } = {} +): EndpointV2 => { + return cache.get(endpointParams as EndpointParams, () => + resolveEndpoint(ruleSet, { + endpointParams: endpointParams as EndpointParams, + logger: context.logger, + }) + ); +}; + +customEndpointFunctions.aws = awsEndpointFunctions; diff --git a/clients/client-geo-maps/src/endpoint/ruleset.ts b/clients/client-geo-maps/src/endpoint/ruleset.ts new file mode 100644 index 000000000000..f5690da46fdf --- /dev/null +++ b/clients/client-geo-maps/src/endpoint/ruleset.ts @@ -0,0 +1,34 @@ +// @ts-nocheck +// generated code, do not edit +import { RuleSetObject } from "@smithy/types"; + +/* This file is compressed. Log this object + or see "smithy.rules#endpointRuleSet" + in codegen/sdk-codegen/aws-models/geo-maps.json */ + +const u="required", +v="fn", +w="argv", +x="ref"; +const a=true, +b="isSet", +c="booleanEquals", +d="error", +e="endpoint", +f="tree", +g="PartitionResult", +h={[u]:true,"default":false,"type":"Boolean"}, +i={[u]:false,"type":"String"}, +j={[x]:"Endpoint"}, +k={[v]:c,[w]:[{[x]:"UseFIPS"},true]}, +l={[v]:c,[w]:[{[x]:"UseDualStack"},true]}, +m={}, +n={[v]:"stringEquals",[w]:[{[v]:"getAttr",[w]:[{[x]:g},"name"]},"aws"]}, +o={[v]:c,[w]:[{[x]:"UseFIPS"},false]}, +p={[v]:c,[w]:[{[x]:"UseDualStack"},false]}, +q={[v]:"stringEquals",[w]:[{[v]:"getAttr",[w]:[{[x]:g},"name"]},"aws-us-gov"]}, +r={[v]:"getAttr",[w]:[{[x]:g},"supportsFIPS"]}, +s={[v]:c,[w]:[true,{[v]:"getAttr",[w]:[{[x]:g},"supportsDualStack"]}]}, +t=[{[x]:"Region"}]; +const _data={version:"1.0",parameters:{UseDualStack:h,UseFIPS:h,Endpoint:i,Region:i},rules:[{conditions:[{[v]:b,[w]:[j]}],rules:[{conditions:[k],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:[l],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f}],type:f},{rules:[{conditions:[{[v]:b,[w]:t}],rules:[{conditions:[{[v]:"aws.partition",[w]:t,assign:g}],rules:[{conditions:[n,o,p],endpoint:{url:"https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[n,k,l],endpoint:{url:"https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[n,k,p],endpoint:{url:"https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[n,o,l],endpoint:{url:"https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[q,o,p],endpoint:{url:"https://maps.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[q,k,l],endpoint:{url:"https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[q,k,p],endpoint:{url:"https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[q,o,l],endpoint:{url:"https://maps.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:m,headers:m},type:e},{conditions:[k,l],rules:[{conditions:[{[v]:c,[w]:[a,r]},s],rules:[{endpoint:{url:"https://geo-maps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:[k,p],rules:[{conditions:[{[v]:c,[w]:[r,a]}],rules:[{endpoint:{url:"https://geo-maps-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:[o,l],rules:[{conditions:[s],rules:[{endpoint:{url:"https://geo-maps.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://geo-maps.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-geo-maps/src/extensionConfiguration.ts b/clients/client-geo-maps/src/extensionConfiguration.ts new file mode 100644 index 000000000000..b4947a572bb8 --- /dev/null +++ b/clients/client-geo-maps/src/extensionConfiguration.ts @@ -0,0 +1,15 @@ +// smithy-typescript generated code +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; + +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; + +/** + * @internal + */ +export interface GeoMapsExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/clients/client-geo-maps/src/index.ts b/clients/client-geo-maps/src/index.ts new file mode 100644 index 000000000000..3e19b6b146f0 --- /dev/null +++ b/clients/client-geo-maps/src/index.ts @@ -0,0 +1,44 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + *

+ * Integrate high-quality base map data into your applications using + * MapLibre. Capabilities include: + *

+ *
    + *
  • + *

    Access to comprehensive base map data, allowing you to tailor the map display to your specific needs.

    + *
  • + *
  • + *

    Multiple pre-designed map styles suited for various application types, such as navigation, logistics, or data visualization.

    + *
  • + *
  • + *

    Generation of static map images for scenarios where interactive maps aren't suitable, such as:

    + *
      + *
    • + *

      Embedding in emails or documents

      + *
    • + *
    • + *

      Displaying in low-bandwidth environments

      + *
    • + *
    • + *

      Creating printable maps

      + *
    • + *
    • + *

      Enhancing application performance by reducing client-side rendering

      + *
    • + *
    + *
  • + *
+ * + * @packageDocumentation + */ +export * from "./GeoMapsClient"; +export * from "./GeoMaps"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export type { RuntimeExtension } from "./runtimeExtensions"; +export type { GeoMapsExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./models"; + +export { GeoMapsServiceException } from "./models/GeoMapsServiceException"; diff --git a/clients/client-geo-maps/src/models/GeoMapsServiceException.ts b/clients/client-geo-maps/src/models/GeoMapsServiceException.ts new file mode 100644 index 000000000000..2097b52883f0 --- /dev/null +++ b/clients/client-geo-maps/src/models/GeoMapsServiceException.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export type { __ServiceExceptionOptions }; + +export { __ServiceException }; + +/** + * @public + * + * Base exception class for all service exceptions from GeoMaps service. + */ +export class GeoMapsServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, GeoMapsServiceException.prototype); + } +} diff --git a/clients/client-geo-maps/src/models/index.ts b/clients/client-geo-maps/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-geo-maps/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-geo-maps/src/models/models_0.ts b/clients/client-geo-maps/src/models/models_0.ts new file mode 100644 index 000000000000..dc52e844716d --- /dev/null +++ b/clients/client-geo-maps/src/models/models_0.ts @@ -0,0 +1,1010 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; + +import { GeoMapsServiceException as __BaseException } from "./GeoMapsServiceException"; + +/** + *

The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

+ * @public + */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + Message: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + * @enum + */ +export const ColorScheme = { + DARK: "Dark", + LIGHT: "Light", +} as const; + +/** + * @public + */ +export type ColorScheme = (typeof ColorScheme)[keyof typeof ColorScheme]; + +/** + * @public + */ +export interface GetGlyphsRequest { + /** + *

Name of the FontStack to retrieve.

+ *

Example: Amazon Ember Bold,Noto Sans Bold.

+ *

The supported font stacks are as follows:

+ *
    + *
  • + *

    Amazon Ember Bold

    + *
  • + *
  • + *

    Amazon Ember Bold Italic

    + *
  • + *
  • + *

    Amazon Ember Bold,Noto Sans Bold

    + *
  • + *
  • + *

    Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold

    + *
  • + *
  • + *

    Amazon Ember Condensed RC BdItalic

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Bold

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Bold Italic

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Bold,Noto Sans Bold

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Light

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Light Italic

    + *
  • + *
  • + *

    Amazon Ember Condensed RC LtItalic

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Regular

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Regular Italic

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Regular,Noto Sans Regular

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular

    + *
  • + *
  • + *

    Amazon Ember Condensed RC RgItalic

    + *
  • + *
  • + *

    Amazon Ember Condensed RC ThItalic

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Thin

    + *
  • + *
  • + *

    Amazon Ember Condensed RC Thin Italic

    + *
  • + *
  • + *

    Amazon Ember Heavy

    + *
  • + *
  • + *

    Amazon Ember Heavy Italic

    + *
  • + *
  • + *

    Amazon Ember Light

    + *
  • + *
  • + *

    Amazon Ember Light Italic

    + *
  • + *
  • + *

    Amazon Ember Medium

    + *
  • + *
  • + *

    Amazon Ember Medium Italic

    + *
  • + *
  • + *

    Amazon Ember Medium,Noto Sans Medium

    + *
  • + *
  • + *

    Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium

    + *
  • + *
  • + *

    Amazon Ember Regular

    + *
  • + *
  • + *

    Amazon Ember Regular Italic

    + *
  • + *
  • + *

    Amazon Ember Regular Italic,Noto Sans Italic

    + *
  • + *
  • + *

    Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular

    + *
  • + *
  • + *

    Amazon Ember Regular,Noto Sans Regular

    + *
  • + *
  • + *

    Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular

    + *
  • + *
  • + *

    Amazon Ember Thin

    + *
  • + *
  • + *

    Amazon Ember Thin Italic

    + *
  • + *
  • + *

    AmazonEmberCdRC_Bd

    + *
  • + *
  • + *

    AmazonEmberCdRC_BdIt

    + *
  • + *
  • + *

    AmazonEmberCdRC_Lt

    + *
  • + *
  • + *

    AmazonEmberCdRC_LtIt

    + *
  • + *
  • + *

    AmazonEmberCdRC_Rg

    + *
  • + *
  • + *

    AmazonEmberCdRC_RgIt

    + *
  • + *
  • + *

    AmazonEmberCdRC_Th

    + *
  • + *
  • + *

    AmazonEmberCdRC_ThIt

    + *
  • + *
  • + *

    AmazonEmber_Bd

    + *
  • + *
  • + *

    AmazonEmber_BdIt

    + *
  • + *
  • + *

    AmazonEmber_He

    + *
  • + *
  • + *

    AmazonEmber_HeIt

    + *
  • + *
  • + *

    AmazonEmber_Lt

    + *
  • + *
  • + *

    AmazonEmber_LtIt

    + *
  • + *
  • + *

    AmazonEmber_Md

    + *
  • + *
  • + *

    AmazonEmber_MdIt

    + *
  • + *
  • + *

    AmazonEmber_Rg

    + *
  • + *
  • + *

    AmazonEmber_RgIt

    + *
  • + *
  • + *

    AmazonEmber_Th

    + *
  • + *
  • + *

    AmazonEmber_ThIt

    + *
  • + *
  • + *

    Noto Sans Black

    + *
  • + *
  • + *

    Noto Sans Black Italic

    + *
  • + *
  • + *

    Noto Sans Bold

    + *
  • + *
  • + *

    Noto Sans Bold Italic

    + *
  • + *
  • + *

    Noto Sans Extra Bold

    + *
  • + *
  • + *

    Noto Sans Extra Bold Italic

    + *
  • + *
  • + *

    Noto Sans Extra Light

    + *
  • + *
  • + *

    Noto Sans Extra Light Italic

    + *
  • + *
  • + *

    Noto Sans Italic

    + *
  • + *
  • + *

    Noto Sans Light

    + *
  • + *
  • + *

    Noto Sans Light Italic

    + *
  • + *
  • + *

    Noto Sans Medium

    + *
  • + *
  • + *

    Noto Sans Medium Italic

    + *
  • + *
  • + *

    Noto Sans Regular

    + *
  • + *
  • + *

    Noto Sans Semi Bold

    + *
  • + *
  • + *

    Noto Sans Semi Bold Italic

    + *
  • + *
  • + *

    Noto Sans Thin

    + *
  • + *
  • + *

    Noto Sans Thin Italic

    + *
  • + *
  • + *

    NotoSans-Bold

    + *
  • + *
  • + *

    NotoSans-Italic

    + *
  • + *
  • + *

    NotoSans-Medium

    + *
  • + *
  • + *

    NotoSans-Regular

    + *
  • + *
  • + *

    Open Sans Regular,Arial Unicode MS Regular

    + *
  • + *
+ * @public + */ + FontStack: string | undefined; + + /** + *

A Unicode range of characters to download glyphs for. This must be aligned to multiples + * of 256.

+ *

Example: 0-255.pdf + *

+ * @public + */ + FontUnicodeRange: string | undefined; +} + +/** + * @public + */ +export interface GetGlyphsResponse { + /** + *

The Glyph, as a binary blob.

+ * @public + */ + Blob?: Uint8Array; + + /** + *

Header that represents the format of the response. The response returns the following as the HTTP body.

+ * @public + */ + ContentType?: string; + + /** + *

Header that instructs caching configuration for the client.

+ * @public + */ + CacheControl?: string; + + /** + *

The glyph's Etag.

+ * @public + */ + ETag?: string; +} + +/** + * @public + * @enum + */ +export const MapStyle = { + HYBRID: "Hybrid", + MONOCHROME: "Monochrome", + SATELLITE: "Satellite", + STANDARD: "Standard", +} as const; + +/** + * @public + */ +export type MapStyle = (typeof MapStyle)[keyof typeof MapStyle]; + +/** + * @public + * @enum + */ +export const Variant = { + DEFAULT: "Default", +} as const; + +/** + * @public + */ +export type Variant = (typeof Variant)[keyof typeof Variant]; + +/** + * @public + */ +export interface GetSpritesRequest { + /** + *

+ * Sprites API: The name of the sprite file to retrieve, following pattern + * sprites(@2x)?\.(png|json).

+ *

Example: sprites.png + *

+ * @public + */ + FileName: string | undefined; + + /** + *

Style specifies the desired map style for the Sprites APIs.

+ * @public + */ + Style: MapStyle | undefined; + + /** + *

Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.

+ *

Example: Light + *

+ *

Default value: Light + *

+ * + *

Valid values for ColorScheme are case sensitive.

+ *
+ * @public + */ + ColorScheme: ColorScheme | undefined; + + /** + *

Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.

+ *

Example: Default + *

+ * + *

Valid values for Variant are case sensitive.

+ *
+ * @public + */ + Variant: Variant | undefined; +} + +/** + * @public + */ +export interface GetSpritesResponse { + /** + *

The body of the sprite sheet or JSON offset file (image/png or application/json, + * depending on input).

+ * @public + */ + Blob?: Uint8Array; + + /** + *

Header that represents the format of the response. The response returns the following as the HTTP body.

+ * @public + */ + ContentType?: string; + + /** + *

Header that instructs caching configuration for the client.

+ * @public + */ + CacheControl?: string; + + /** + *

The sprite's Etag.

+ * @public + */ + ETag?: string; +} + +/** + * @public + * @enum + */ +export const ScaleBarUnit = { + KILOMETERS: "Kilometers", + KILOMETERS_MILES: "KilometersMiles", + MILES: "Miles", + MILES_KILOMETERS: "MilesKilometers", +} as const; + +/** + * @public + */ +export type ScaleBarUnit = (typeof ScaleBarUnit)[keyof typeof ScaleBarUnit]; + +/** + * @public + * @enum + */ +export const StaticMapStyle = { + SATELLITE: "Satellite", +} as const; + +/** + * @public + */ +export type StaticMapStyle = (typeof StaticMapStyle)[keyof typeof StaticMapStyle]; + +/** + * @public + */ +export interface GetStaticMapRequest { + /** + *

Takes in two pairs of coordinates, [Lon, Lat], denoting south-westerly and + * north-easterly edges of the image. The underlying area becomes the view of the image.

+ *

Example: -123.17075,49.26959,-123.08125,49.31429

+ * @public + */ + BoundingBox?: string; + + /** + *

Takes in two or more pair of coordinates, [Lon, Lat], with each coordinate separated by + * a comma. The API will generate an image to encompass all of the provided coordinates.

+ * + *

Cannot be used with Zoom and or Radius + *

+ *
+ *

Example: 97.170451,78.039098,99.045536,27.176178

+ * @public + */ + BoundedPositions?: string; + + /** + *

Takes in a pair of coordinates, [Lon, Lat], which becomes the center point of the image. + * This parameter requires that either zoom or radius is set.

+ * + *

Cannot be used with Zoom and or Radius + *

+ *
+ *

Example: 49.295,-123.108

+ * @public + */ + Center?: string; + + /** + *

Takes in a string to draw geometries on the image. The input is a comma separated format as follows format: + * [Lon, Lat] + *

+ *

Example: + * line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B + *

+ * + *

Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.

+ *
+ * @public + */ + CompactOverlay?: string; + + /** + *

Takes in a string to draw geometries on the image. The input is a valid GeoJSON + * collection object.

+ *

Example: + * \{"type":"FeatureCollection","features": [\{"type":"Feature","geometry":\{"type":"MultiPoint","coordinates": [[-90.076345,51.504107],[-0.074451,51.506892]]\},"properties": \{"color":"#00DD00"\}\}]\} + *

+ * @public + */ + GeoJsonOverlay?: string; + + /** + *

Specifies the height of the map image.

+ * @public + */ + Height: number | undefined; + + /** + *

Optional: The API key to be used for authorization. Either an API key or valid SigV4 + * signature must be provided when making a request.

+ * @public + */ + Key?: string; + + /** + *

Applies additional space (in pixels) around overlay feature to prevent them from being + * cut or obscured.

+ * + *

Value for max and min is determined by:

+ *

Min: 1 + *

+ *

Max: min(height, width)/4 + *

+ *
+ *

Example: 100 + *

+ * @public + */ + Padding?: number; + + /** + *

Used with center parameter, it specifies the zoom of the image where you can control it + * on a granular level. Takes in any value >= 1.

+ *

Example: 1500 + *

+ * + *

Cannot be used with Zoom.

+ *
+ *

+ * Unit: Meters + *

+ *

+ * @public + */ + Radius?: number; + + /** + *

The map scaling parameter to size the image, icons, and labels. It follows the pattern + * of ^map(@2x)?$.

+ *

Example: map, map@2x + *

+ * @public + */ + FileName: string | undefined; + + /** + *

Displays a scale on the bottom right of the map image with the unit specified in the + * input.

+ *

Example: KilometersMiles, Miles, Kilometers, MilesKilometers + *

+ * @public + */ + ScaleBarUnit?: ScaleBarUnit; + + /** + *

Style specifies the desired map style for the Style APIs.

+ * @public + */ + Style?: StaticMapStyle; + + /** + *

Specifies the width of the map image.

+ * @public + */ + Width: number | undefined; + + /** + *

Specifies the zoom level of the map image.

+ * + *

Cannot be used with Radius.

+ *
+ * @public + */ + Zoom?: number; +} + +/** + * @public + */ +export interface GetStaticMapResponse { + /** + *

The blob represents a map image as a jpeg for + * the GetStaticMap API.

+ * @public + */ + Blob?: Uint8Array; + + /** + *

Header that represents the format of the response. The response returns the following as the HTTP body.

+ * @public + */ + ContentType?: string; + + /** + *

Header that instructs caching configuration for the client.

+ * @public + */ + CacheControl?: string; + + /** + *

The static map's Etag.

+ * @public + */ + ETag?: string; + + /** + *

The pricing bucket for which the request is charged at.

+ * @public + */ + PricingBucket: string | undefined; +} + +/** + *

The request processing has failed because of an unknown error, exception or failure.

+ * @public + */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + $retryable = {}; + Message: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.Message = opts.Message; + } +} + +/** + *

The request was denied due to request throttling.

+ * @public + */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + $retryable = {}; + Message: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + this.Message = opts.Message; + } +} + +/** + *

The input fails to satisfy the constraints specified by the Amazon Location service.

+ * @public + */ +export interface ValidationExceptionField { + /** + *

The name of the resource.

+ * @public + */ + Name: string | undefined; + + /** + *

The error message.

+ * @public + */ + Message: string | undefined; +} + +/** + * @public + * @enum + */ +export const ValidationExceptionReason = { + /** + * The input cannot be parsed. For example a required JSON document, ARN identifier, + * date value, or numeric field cannot be parsed. + * + */ + CANNOT_PARSE: "CannotParse", + /** + * The input is present and parsable, but it is otherwise invalid. For example, a + * required numeric argument is outside the allowed range. + * + */ + FIELD_VALIDATION_FAILED: "FieldValidationFailed", + /** + * The required input is missing. + */ + MISSING: "Missing", + /** + * The input is invalid but no more specific reason is applicable. + */ + OTHER: "Other", + /** + * No such field is supported. + */ + UNKNOWN_FIELD: "UnknownField", + /** + * No such operation is supported. + */ + UNKNOWN_OPERATION: "UnknownOperation", +} as const; + +/** + * @public + */ +export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason]; + +/** + *

The input fails to satisfy the constraints specified by an AWS service.

+ * @public + */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + Message: string | undefined; + /** + *

The field where thebb invalid entry was detected.

+ * @public + */ + Reason: ValidationExceptionReason | undefined; + + /** + *

A message with the reason for the validation exception error.

+ * @public + */ + FieldList: ValidationExceptionField[] | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.Message = opts.Message; + this.Reason = opts.Reason; + this.FieldList = opts.FieldList; + } +} + +/** + * @public + */ +export interface GetStyleDescriptorRequest { + /** + *

Style specifies the desired map style.

+ * @public + */ + Style: MapStyle | undefined; + + /** + *

Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.

+ *

Example: Light + *

+ *

Default value: Light + *

+ * + *

Valid values for ColorScheme are case sensitive.

+ *
+ * @public + */ + ColorScheme?: ColorScheme; + + /** + *

Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.

+ *

The following political views are currently supported:

+ *
    + *
  • + *

    + * ARG: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands

    + *
  • + *
  • + *

    + * EGY: Egypt's view on Bir Tawil

    + *
  • + *
  • + *

    + * IND: India's view on Gilgit-Baltistan

    + *
  • + *
  • + *

    + * KEN: Kenya's view on the Ilemi Triangle

    + *
  • + *
  • + *

    + * MAR: Morocco's view on Western Sahara

    + *
  • + *
  • + *

    + * PAK: Pakistan's view on Jammu and Kashmir and the Junagadh Area

    + *
  • + *
  • + *

    + * RUS: Russia's view on Crimea

    + *
  • + *
  • + *

    + * SDN: Sudan's view on the Halaib Triangle

    + *
  • + *
  • + *

    + * SRB: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands

    + *
  • + *
  • + *

    + * SUR: Suriname's view on the Courantyne Headwaters and Lawa Headwaters

    + *
  • + *
  • + *

    + * SYR: Syria's view on the Golan Heights

    + *
  • + *
  • + *

    + * TUR: Turkey's view on Cyprus and Northern Cyprus

    + *
  • + *
  • + *

    + * TZA: Tanzania's view on Lake Malawi

    + *
  • + *
  • + *

    + * URY: Uruguay's view on Rincon de Artigas

    + *
  • + *
  • + *

    + * VNM: Vietnam's view on the Paracel Islands and Spratly Islands

    + *
  • + *
+ * @public + */ + PoliticalView?: string; + + /** + *

Optional: The API key to be used for authorization. Either an API key or valid SigV4 + * signature must be provided when making a request.

+ * @public + */ + Key?: string; +} + +/** + * @public + */ +export interface GetStyleDescriptorResponse { + /** + *

This Blob contains the body of the style descriptor which is in application/json format.

+ * @public + */ + Blob?: Uint8Array; + + /** + *

Header that represents the format of the response. The response returns the following as the HTTP body.

+ * @public + */ + ContentType?: string; + + /** + *

Header that instructs caching configuration for the client.

+ * @public + */ + CacheControl?: string; + + /** + *

The style descriptor's Etag.

+ * @public + */ + ETag?: string; +} + +/** + * @public + */ +export interface GetTileRequest { + /** + *

Specifies the desired tile set.

+ *

Valid Values: raster.satellite | vector.basemap + *

+ * @public + */ + Tileset: string | undefined; + + /** + *

The zoom value for the map tile.

+ * @public + */ + Z: string | undefined; + + /** + *

The X axis value for the map tile. Must be between 0 and 19.

+ * @public + */ + X: string | undefined; + + /** + *

The Y axis value for the map tile.

+ * @public + */ + Y: string | undefined; + + /** + *

Optional: The API key to be used for authorization. Either an API key or valid SigV4 + * signature must be provided when making a request.

+ * @public + */ + Key?: string; +} + +/** + * @public + */ +export interface GetTileResponse { + /** + *

The blob represents a vector tile in mvt format for the + * GetTile API.

+ * @public + */ + Blob?: Uint8Array; + + /** + *

Header that represents the format of the response. The response returns the following as the HTTP body.

+ * @public + */ + ContentType?: string; + + /** + *

Header that instructs caching configuration for the client.

+ * @public + */ + CacheControl?: string; + + /** + *

The pricing bucket for which the request is charged at.

+ * @public + */ + ETag?: string; + + /** + *

The pricing bucket for which the request is charged at.

+ * @public + */ + PricingBucket: string | undefined; +} + +/** + * @internal + */ +export const GetStaticMapRequestFilterSensitiveLog = (obj: GetStaticMapRequest): any => ({ + ...obj, + ...(obj.Key && { Key: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const GetStyleDescriptorRequestFilterSensitiveLog = (obj: GetStyleDescriptorRequest): any => ({ + ...obj, + ...(obj.Key && { Key: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const GetTileRequestFilterSensitiveLog = (obj: GetTileRequest): any => ({ + ...obj, + ...(obj.Key && { Key: SENSITIVE_STRING }), +}); diff --git a/clients/client-geo-maps/src/protocols/Aws_restJson1.ts b/clients/client-geo-maps/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..f23137b817a9 --- /dev/null +++ b/clients/client-geo-maps/src/protocols/Aws_restJson1.ts @@ -0,0 +1,434 @@ +// smithy-typescript generated code +import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { requestBuilder as rb } from "@smithy/core"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectNonNull as __expectNonNull, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + map, + resolvedPath as __resolvedPath, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { GetGlyphsCommandInput, GetGlyphsCommandOutput } from "../commands/GetGlyphsCommand"; +import { GetSpritesCommandInput, GetSpritesCommandOutput } from "../commands/GetSpritesCommand"; +import { GetStaticMapCommandInput, GetStaticMapCommandOutput } from "../commands/GetStaticMapCommand"; +import { GetStyleDescriptorCommandInput, GetStyleDescriptorCommandOutput } from "../commands/GetStyleDescriptorCommand"; +import { GetTileCommandInput, GetTileCommandOutput } from "../commands/GetTileCommand"; +import { GeoMapsServiceException as __BaseException } from "../models/GeoMapsServiceException"; +import { + AccessDeniedException, + InternalServerException, + ThrottlingException, + ValidationException, + ValidationExceptionField, +} from "../models/models_0"; + +/** + * serializeAws_restJson1GetGlyphsCommand + */ +export const se_GetGlyphsCommand = async ( + input: GetGlyphsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/glyphs/{FontStack}/{FontUnicodeRange}"); + b.p("FontStack", () => input.FontStack!, "{FontStack}", false); + b.p("FontUnicodeRange", () => input.FontUnicodeRange!, "{FontUnicodeRange}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetSpritesCommand + */ +export const se_GetSpritesCommand = async ( + input: GetSpritesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}"); + b.p("FileName", () => input.FileName!, "{FileName}", false); + b.p("Style", () => input.Style!, "{Style}", false); + b.p("ColorScheme", () => input.ColorScheme!, "{ColorScheme}", false); + b.p("Variant", () => input.Variant!, "{Variant}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetStaticMapCommand + */ +export const se_GetStaticMapCommand = async ( + input: GetStaticMapCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/static/{FileName}"); + b.p("FileName", () => input.FileName!, "{FileName}", false); + const query: any = map({ + [_bb]: [, input[_BB]!], + [_bp]: [, input[_BP]!], + [_c]: [, input[_C]!], + [_co]: [, input[_CO]!], + [_go]: [, input[_GJO]!], + [_h]: [__expectNonNull(input.Height, `Height`) != null, () => input[_H]!.toString()], + [_k]: [, input[_K]!], + [_p]: [() => input.Padding !== void 0, () => input[_P]!.toString()], + [_r]: [() => input.Radius !== void 0, () => input[_R]!.toString()], + [_su]: [, input[_SBU]!], + [_s]: [, input[_S]!], + [_w]: [__expectNonNull(input.Width, `Width`) != null, () => input[_W]!.toString()], + [_z]: [() => input.Zoom !== void 0, () => (input[_Z]! % 1 == 0 ? input[_Z]! + ".0" : input[_Z]!.toString())], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetStyleDescriptorCommand + */ +export const se_GetStyleDescriptorCommand = async ( + input: GetStyleDescriptorCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/styles/{Style}/descriptor"); + b.p("Style", () => input.Style!, "{Style}", false); + const query: any = map({ + [_cs]: [, input[_CS]!], + [_pv]: [, input[_PV]!], + [_k]: [, input[_K]!], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetTileCommand + */ +export const se_GetTileCommand = async ( + input: GetTileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/tiles/{Tileset}/{Z}/{X}/{Y}"); + b.p("Tileset", () => input.Tileset!, "{Tileset}", false); + b.p("Z", () => input.Z!, "{Z}", false); + b.p("X", () => input.X!, "{X}", false); + b.p("Y", () => input.Y!, "{Y}", false); + const query: any = map({ + [_k]: [, input[_K]!], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * deserializeAws_restJson1GetGlyphsCommand + */ +export const de_GetGlyphsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + [_CT]: [, output.headers[_ct]], + [_CC]: [, output.headers[_cc]], + [_ET]: [, output.headers[_e]], + }); + const data: any = await collectBody(output.body, context); + contents.Blob = data; + return contents; +}; + +/** + * deserializeAws_restJson1GetSpritesCommand + */ +export const de_GetSpritesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + [_CT]: [, output.headers[_ct]], + [_CC]: [, output.headers[_cc]], + [_ET]: [, output.headers[_e]], + }); + const data: any = await collectBody(output.body, context); + contents.Blob = data; + return contents; +}; + +/** + * deserializeAws_restJson1GetStaticMapCommand + */ +export const de_GetStaticMapCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + [_CT]: [, output.headers[_ct]], + [_CC]: [, output.headers[_cc]], + [_ET]: [, output.headers[_e]], + [_PB]: [, output.headers[_xagpb]], + }); + const data: any = await collectBody(output.body, context); + contents.Blob = data; + return contents; +}; + +/** + * deserializeAws_restJson1GetStyleDescriptorCommand + */ +export const de_GetStyleDescriptorCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + [_CT]: [, output.headers[_ct]], + [_CC]: [, output.headers[_cc]], + [_ET]: [, output.headers[_e]], + }); + const data: any = await collectBody(output.body, context); + contents.Blob = data; + return contents; +}; + +/** + * deserializeAws_restJson1GetTileCommand + */ +export const de_GetTileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + [_CT]: [, output.headers[_ct]], + [_CC]: [, output.headers[_cc]], + [_ET]: [, output.headers[_e]], + [_PB]: [, output.headers[_xagpb]], + }); + const data: any = await collectBody(output.body, context); + contents.Blob = data; + return contents; +}; + +/** + * deserialize_Aws_restJson1CommandError + */ +const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.geomaps#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.geomaps#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.geomaps#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.geomaps#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }) as never; + } +}; + +const throwDefaultError = withBaseException(__BaseException); +/** + * deserializeAws_restJson1AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1InternalServerExceptionRes + */ +const de_InternalServerExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ThrottlingExceptionRes + */ +const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ValidationExceptionRes + */ +const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + FieldList: [, (_) => de_ValidationExceptionFieldList(_, context), `fieldList`], + Message: [, __expectString, `message`], + Reason: [, __expectString, `reason`], + }); + Object.assign(contents, doc); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ValidationExceptionField + */ +const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { + return take(output, { + Message: [, __expectString, `message`], + Name: [, __expectString, `name`], + }) as any; +}; + +/** + * deserializeAws_restJson1ValidationExceptionFieldList + */ +const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ValidationExceptionField(entry, context); + }); + return retVal; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const _BB = "BoundingBox"; +const _BP = "BoundedPositions"; +const _C = "Center"; +const _CC = "CacheControl"; +const _CO = "CompactOverlay"; +const _CS = "ColorScheme"; +const _CT = "ContentType"; +const _ET = "ETag"; +const _GJO = "GeoJsonOverlay"; +const _H = "Height"; +const _K = "Key"; +const _P = "Padding"; +const _PB = "PricingBucket"; +const _PV = "PoliticalView"; +const _R = "Radius"; +const _S = "Style"; +const _SBU = "ScaleBarUnit"; +const _W = "Width"; +const _Z = "Zoom"; +const _bb = "bounding-box"; +const _bp = "bounded-positions"; +const _c = "center"; +const _cc = "cache-control"; +const _co = "compact-overlay"; +const _cs = "color-scheme"; +const _ct = "content-type"; +const _e = "etag"; +const _go = "geojson-overlay"; +const _h = "height"; +const _k = "key"; +const _p = "padding"; +const _pv = "political-view"; +const _r = "radius"; +const _s = "style"; +const _su = "scale-unit"; +const _w = "width"; +const _xagpb = "x-amz-geo-pricing-bucket"; +const _z = "zoom"; diff --git a/clients/client-geo-maps/src/runtimeConfig.browser.ts b/clients/client-geo-maps/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..12b1f5e86244 --- /dev/null +++ b/clients/client-geo-maps/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { GeoMapsClientConfig } from "./GeoMapsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: GeoMapsClientConfig) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/clients/client-geo-maps/src/runtimeConfig.native.ts b/clients/client-geo-maps/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..18ba5617f0c5 --- /dev/null +++ b/clients/client-geo-maps/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { GeoMapsClientConfig } from "./GeoMapsClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: GeoMapsClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-geo-maps/src/runtimeConfig.shared.ts b/clients/client-geo-maps/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..2f9bda5468c4 --- /dev/null +++ b/clients/client-geo-maps/src/runtimeConfig.shared.ts @@ -0,0 +1,38 @@ +// smithy-typescript generated code +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { IdentityProviderConfig } from "@smithy/types"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; + +import { defaultGeoMapsHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +import { GeoMapsClientConfig } from "./GeoMapsClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: GeoMapsClientConfig) => { + return { + apiVersion: "2020-11-19", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultGeoMapsHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc: IdentityProviderConfig) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer(), + }, + ], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "Geo Maps", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-geo-maps/src/runtimeConfig.ts b/clients/client-geo-maps/src/runtimeConfig.ts new file mode 100644 index 000000000000..add2135134e7 --- /dev/null +++ b/clients/client-geo-maps/src/runtimeConfig.ts @@ -0,0 +1,60 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { GeoMapsClientConfig } from "./GeoMapsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: GeoMapsClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider, + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: + config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS), + }; +}; diff --git a/clients/client-geo-maps/src/runtimeExtensions.ts b/clients/client-geo-maps/src/runtimeExtensions.ts new file mode 100644 index 000000000000..faf1a3119fe3 --- /dev/null +++ b/clients/client-geo-maps/src/runtimeExtensions.ts @@ -0,0 +1,48 @@ +// smithy-typescript generated code +import { + getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration, +} from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; + +import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration"; +import { GeoMapsExtensionConfiguration } from "./extensionConfiguration"; + +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: GeoMapsExtensionConfiguration): void; +} + +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} + +const asPartial = >(t: T) => t; + +/** + * @internal + */ +export const resolveRuntimeExtensions = (runtimeConfig: any, extensions: RuntimeExtension[]) => { + const extensionConfiguration: GeoMapsExtensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), + }; + + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/clients/client-geo-maps/tsconfig.cjs.json b/clients/client-geo-maps/tsconfig.cjs.json new file mode 100644 index 000000000000..3567d85ba846 --- /dev/null +++ b/clients/client-geo-maps/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-geo-maps/tsconfig.es.json b/clients/client-geo-maps/tsconfig.es.json new file mode 100644 index 000000000000..809f57bde65e --- /dev/null +++ b/clients/client-geo-maps/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-geo-maps/tsconfig.json b/clients/client-geo-maps/tsconfig.json new file mode 100644 index 000000000000..e7f5ec56b742 --- /dev/null +++ b/clients/client-geo-maps/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/node16/tsconfig.json", + "compilerOptions": { + "downlevelIteration": true, + "importHelpers": true, + "incremental": true, + "removeComments": true, + "resolveJsonModule": true, + "rootDir": "src", + "useUnknownInCatchVariables": false + }, + "exclude": ["test/"] +} diff --git a/clients/client-geo-maps/tsconfig.types.json b/clients/client-geo-maps/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-geo-maps/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/codegen/sdk-codegen/aws-models/geo-maps.json b/codegen/sdk-codegen/aws-models/geo-maps.json new file mode 100644 index 000000000000..75f8c8f19941 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/geo-maps.json @@ -0,0 +1,2177 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.geomaps#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.geomaps#ApiKey": { + "type": "string", + "traits": { + "smithy.api#externalDocumentation": { + "Implementation Guide": "https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md" + }, + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.geomaps#ColorScheme": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LIGHT", + "value": "Light" + }, + { + "name": "DARK", + "value": "Dark" + } + ] + } + }, + "com.amazonaws.geomaps#CompactOverlay": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 7000 + } + } + }, + "com.amazonaws.geomaps#CountryCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 3 + }, + "smithy.api#pattern": "^([A-Z]{2}|[A-Z]{3})$" + } + }, + "com.amazonaws.geomaps#DistanceMeters": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.geomaps#GeoJsonOverlay": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 7000 + } + } + }, + "com.amazonaws.geomaps#GetGlyphs": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetGlyphsRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetGlyphsResponse" + }, + "traits": { + "smithy.api#documentation": "

Returns the map's glyphs.

", + "smithy.api#http": { + "uri": "/glyphs/{FontStack}/{FontUnicodeRange}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetGlyphsSuccess", + "params": { + "FontStack": "Amazon Ember Regular", + "FontUnicodeRange": "0-255.pbf" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetGlyphsRequest": { + "type": "structure", + "members": { + "FontStack": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name of the FontStack to retrieve.

\n

Example: Amazon Ember Bold,Noto Sans Bold.

\n

The supported font stacks are as follows:

\n
    \n
  • \n

    Amazon Ember Bold

    \n
  • \n
  • \n

    Amazon Ember Bold Italic

    \n
  • \n
  • \n

    Amazon Ember Bold,Noto Sans Bold

    \n
  • \n
  • \n

    Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC BdItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold Italic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold,Noto Sans Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Light

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Light Italic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC LtItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular Italic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular,Noto Sans Regular

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular

    \n
  • \n
  • \n

    Amazon Ember Condensed RC RgItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC ThItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Thin

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Thin Italic

    \n
  • \n
  • \n

    Amazon Ember Heavy

    \n
  • \n
  • \n

    Amazon Ember Heavy Italic

    \n
  • \n
  • \n

    Amazon Ember Light

    \n
  • \n
  • \n

    Amazon Ember Light Italic

    \n
  • \n
  • \n

    Amazon Ember Medium

    \n
  • \n
  • \n

    Amazon Ember Medium Italic

    \n
  • \n
  • \n

    Amazon Ember Medium,Noto Sans Medium

    \n
  • \n
  • \n

    Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium

    \n
  • \n
  • \n

    Amazon Ember Regular

    \n
  • \n
  • \n

    Amazon Ember Regular Italic

    \n
  • \n
  • \n

    Amazon Ember Regular Italic,Noto Sans Italic

    \n
  • \n
  • \n

    Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular

    \n
  • \n
  • \n

    Amazon Ember Regular,Noto Sans Regular

    \n
  • \n
  • \n

    Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular

    \n
  • \n
  • \n

    Amazon Ember Thin

    \n
  • \n
  • \n

    Amazon Ember Thin Italic

    \n
  • \n
  • \n

    AmazonEmberCdRC_Bd

    \n
  • \n
  • \n

    AmazonEmberCdRC_BdIt

    \n
  • \n
  • \n

    AmazonEmberCdRC_Lt

    \n
  • \n
  • \n

    AmazonEmberCdRC_LtIt

    \n
  • \n
  • \n

    AmazonEmberCdRC_Rg

    \n
  • \n
  • \n

    AmazonEmberCdRC_RgIt

    \n
  • \n
  • \n

    AmazonEmberCdRC_Th

    \n
  • \n
  • \n

    AmazonEmberCdRC_ThIt

    \n
  • \n
  • \n

    AmazonEmber_Bd

    \n
  • \n
  • \n

    AmazonEmber_BdIt

    \n
  • \n
  • \n

    AmazonEmber_He

    \n
  • \n
  • \n

    AmazonEmber_HeIt

    \n
  • \n
  • \n

    AmazonEmber_Lt

    \n
  • \n
  • \n

    AmazonEmber_LtIt

    \n
  • \n
  • \n

    AmazonEmber_Md

    \n
  • \n
  • \n

    AmazonEmber_MdIt

    \n
  • \n
  • \n

    AmazonEmber_Rg

    \n
  • \n
  • \n

    AmazonEmber_RgIt

    \n
  • \n
  • \n

    AmazonEmber_Th

    \n
  • \n
  • \n

    AmazonEmber_ThIt

    \n
  • \n
  • \n

    Noto Sans Black

    \n
  • \n
  • \n

    Noto Sans Black Italic

    \n
  • \n
  • \n

    Noto Sans Bold

    \n
  • \n
  • \n

    Noto Sans Bold Italic

    \n
  • \n
  • \n

    Noto Sans Extra Bold

    \n
  • \n
  • \n

    Noto Sans Extra Bold Italic

    \n
  • \n
  • \n

    Noto Sans Extra Light

    \n
  • \n
  • \n

    Noto Sans Extra Light Italic

    \n
  • \n
  • \n

    Noto Sans Italic

    \n
  • \n
  • \n

    Noto Sans Light

    \n
  • \n
  • \n

    Noto Sans Light Italic

    \n
  • \n
  • \n

    Noto Sans Medium

    \n
  • \n
  • \n

    Noto Sans Medium Italic

    \n
  • \n
  • \n

    Noto Sans Regular

    \n
  • \n
  • \n

    Noto Sans Semi Bold

    \n
  • \n
  • \n

    Noto Sans Semi Bold Italic

    \n
  • \n
  • \n

    Noto Sans Thin

    \n
  • \n
  • \n

    Noto Sans Thin Italic

    \n
  • \n
  • \n

    NotoSans-Bold

    \n
  • \n
  • \n

    NotoSans-Italic

    \n
  • \n
  • \n

    NotoSans-Medium

    \n
  • \n
  • \n

    NotoSans-Regular

    \n
  • \n
  • \n

    Open Sans Regular,Arial Unicode MS Regular

    \n
  • \n
", + "smithy.api#httpLabel": {}, + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#required": {} + } + }, + "FontUnicodeRange": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A Unicode range of characters to download glyphs for. This must be aligned to multiples\n of 256.

\n

Example: 0-255.pdf\n

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "^[0-9]+-[0-9]+\\.pbf$", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetGlyphsResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The Glyph, as a binary blob.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The glyph's Etag.

", + "smithy.api#httpHeader": "ETag" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetSprites": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetSpritesRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetSpritesResponse" + }, + "traits": { + "smithy.api#documentation": "

Returns the map's sprites.

", + "smithy.api#http": { + "uri": "/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetSpritesSuccess", + "params": { + "Style": "Standard", + "ColorScheme": "Light", + "Variant": "Default", + "FileName": "sprites.json" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetSpritesRequest": { + "type": "structure", + "members": { + "FileName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n Sprites API: The name of the sprite file to retrieve, following pattern\n sprites(@2x)?\\.(png|json).

\n

Example: sprites.png\n

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "^sprites(@2x)?\\.(png|json)$", + "smithy.api#required": {} + } + }, + "Style": { + "target": "com.amazonaws.geomaps#MapStyle", + "traits": { + "smithy.api#documentation": "

Style specifies the desired map style for the Sprites APIs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ColorScheme": { + "target": "com.amazonaws.geomaps#ColorScheme", + "traits": { + "smithy.api#documentation": "

Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.

\n

Example: Light\n

\n

Default value: Light\n

\n \n

Valid values for ColorScheme are case sensitive.

\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Variant": { + "target": "com.amazonaws.geomaps#Variant", + "traits": { + "smithy.api#documentation": "

Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.

\n

Example: Default\n

\n \n

Valid values for Variant are case sensitive.

\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetSpritesResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The body of the sprite sheet or JSON offset file (image/png or application/json,\n depending on input).

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The sprite's Etag.

", + "smithy.api#httpHeader": "ETag" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetStaticMap": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetStaticMapRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetStaticMapResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geomaps#AccessDeniedException" + }, + { + "target": "com.amazonaws.geomaps#InternalServerException" + }, + { + "target": "com.amazonaws.geomaps#ThrottlingException" + }, + { + "target": "com.amazonaws.geomaps#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.

", + "smithy.api#http": { + "uri": "/static/{FileName}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetStaticMapSuccess", + "params": { + "FileName": "map", + "Width": 800, + "Height": 900, + "Center": "-123.144847,49.303609", + "Style": "Satellite", + "Zoom": 10.0 + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetStaticMapRequest": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.geomaps#PositionListString", + "traits": { + "smithy.api#documentation": "

Takes in two pairs of coordinates, [Lon, Lat], denoting south-westerly and\n north-easterly edges of the image. The underlying area becomes the view of the image.

\n

Example: -123.17075,49.26959,-123.08125,49.31429

", + "smithy.api#httpQuery": "bounding-box" + } + }, + "BoundedPositions": { + "target": "com.amazonaws.geomaps#PositionListString", + "traits": { + "smithy.api#documentation": "

Takes in two or more pair of coordinates, [Lon, Lat], with each coordinate separated by\n a comma. The API will generate an image to encompass all of the provided coordinates.

\n \n

Cannot be used with Zoom and or Radius\n

\n
\n

Example: 97.170451,78.039098,99.045536,27.176178

", + "smithy.api#httpQuery": "bounded-positions" + } + }, + "Center": { + "target": "com.amazonaws.geomaps#PositionString", + "traits": { + "smithy.api#documentation": "

Takes in a pair of coordinates, [Lon, Lat], which becomes the center point of the image.\n This parameter requires that either zoom or radius is set.

\n \n

Cannot be used with Zoom and or Radius\n

\n
\n

Example: 49.295,-123.108

", + "smithy.api#httpQuery": "center" + } + }, + "CompactOverlay": { + "target": "com.amazonaws.geomaps#CompactOverlay", + "traits": { + "smithy.api#documentation": "

Takes in a string to draw geometries on the image. The input is a comma separated format as follows format:\n [Lon, Lat]\n

\n

Example:\n line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B\n

\n \n

Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.

\n
", + "smithy.api#httpQuery": "compact-overlay" + } + }, + "GeoJsonOverlay": { + "target": "com.amazonaws.geomaps#GeoJsonOverlay", + "traits": { + "smithy.api#documentation": "

Takes in a string to draw geometries on the image. The input is a valid GeoJSON\n collection object.

\n

Example:\n {\"type\":\"FeatureCollection\",\"features\": [{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\": [[-90.076345,51.504107],[-0.074451,51.506892]]},\"properties\": {\"color\":\"#00DD00\"}}]}\n

", + "smithy.api#httpQuery": "geojson-overlay" + } + }, + "Height": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Specifies the height of the map image.

", + "smithy.api#httpQuery": "height", + "smithy.api#range": { + "min": 64, + "max": 1400 + }, + "smithy.api#required": {} + } + }, + "Key": { + "target": "com.amazonaws.geomaps#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + }, + "Padding": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Applies additional space (in pixels) around overlay feature to prevent them from being\n cut or obscured.

\n \n

Value for max and min is determined by:

\n

Min: 1\n

\n

Max: min(height, width)/4\n

\n
\n

Example: 100\n

", + "smithy.api#httpQuery": "padding" + } + }, + "Radius": { + "target": "com.amazonaws.geomaps#DistanceMeters", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Used with center parameter, it specifies the zoom of the image where you can control it\n on a granular level. Takes in any value >= 1.

\n

Example: 1500\n

\n \n

Cannot be used with Zoom.

\n
\n

\n Unit: Meters\n

\n

", + "smithy.api#httpQuery": "radius" + } + }, + "FileName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The map scaling parameter to size the image, icons, and labels. It follows the pattern\n of ^map(@2x)?$.

\n

Example: map, map@2x\n

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "^map(@2x)?$", + "smithy.api#required": {} + } + }, + "ScaleBarUnit": { + "target": "com.amazonaws.geomaps#ScaleBarUnit", + "traits": { + "smithy.api#documentation": "

Displays a scale on the bottom right of the map image with the unit specified in the\n input.

\n

Example: KilometersMiles, Miles, Kilometers, MilesKilometers\n

", + "smithy.api#httpQuery": "scale-unit" + } + }, + "Style": { + "target": "com.amazonaws.geomaps#StaticMapStyle", + "traits": { + "smithy.api#documentation": "

Style specifies the desired map style for the Style APIs.

", + "smithy.api#httpQuery": "style" + } + }, + "Width": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Specifies the width of the map image.

", + "smithy.api#httpQuery": "width", + "smithy.api#range": { + "min": 64, + "max": 1400 + }, + "smithy.api#required": {} + } + }, + "Zoom": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Specifies the zoom level of the map image.

\n \n

Cannot be used with Radius.

\n
", + "smithy.api#httpQuery": "zoom", + "smithy.api#range": { + "min": 0, + "max": 20 + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetStaticMapResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The blob represents a map image as a jpeg for\n the GetStaticMap API.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The static map's Etag.

", + "smithy.api#httpHeader": "ETag" + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the request is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetStyleDescriptor": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetStyleDescriptorRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetStyleDescriptorResponse" + }, + "traits": { + "smithy.api#documentation": "

Returns information about the style.

", + "smithy.api#http": { + "uri": "/styles/{Style}/descriptor", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetStyleDescriptorSuccess", + "params": { + "Style": "Standard" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetStyleDescriptorRequest": { + "type": "structure", + "members": { + "Style": { + "target": "com.amazonaws.geomaps#MapStyle", + "traits": { + "smithy.api#documentation": "

Style specifies the desired map style.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ColorScheme": { + "target": "com.amazonaws.geomaps#ColorScheme", + "traits": { + "smithy.api#documentation": "

Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.

\n

Example: Light\n

\n

Default value: Light\n

\n \n

Valid values for ColorScheme are case sensitive.

\n
", + "smithy.api#httpQuery": "color-scheme" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geomaps#CountryCode", + "traits": { + "smithy.api#documentation": "

Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.

\n

The following political views are currently supported:

\n
    \n
  • \n

    \n ARG: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands

    \n
  • \n
  • \n

    \n EGY: Egypt's view on Bir Tawil

    \n
  • \n
  • \n

    \n IND: India's view on Gilgit-Baltistan

    \n
  • \n
  • \n

    \n KEN: Kenya's view on the Ilemi Triangle

    \n
  • \n
  • \n

    \n MAR: Morocco's view on Western Sahara

    \n
  • \n
  • \n

    \n PAK: Pakistan's view on Jammu and Kashmir and the Junagadh Area

    \n
  • \n
  • \n

    \n RUS: Russia's view on Crimea

    \n
  • \n
  • \n

    \n SDN: Sudan's view on the Halaib Triangle

    \n
  • \n
  • \n

    \n SRB: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands

    \n
  • \n
  • \n

    \n SUR: Suriname's view on the Courantyne Headwaters and Lawa Headwaters

    \n
  • \n
  • \n

    \n SYR: Syria's view on the Golan Heights

    \n
  • \n
  • \n

    \n TUR: Turkey's view on Cyprus and Northern Cyprus

    \n
  • \n
  • \n

    \n TZA: Tanzania's view on Lake Malawi

    \n
  • \n
  • \n

    \n URY: Uruguay's view on Rincon de Artigas

    \n
  • \n
  • \n

    \n VNM: Vietnam's view on the Paracel Islands and Spratly Islands

    \n
  • \n
", + "smithy.api#httpQuery": "political-view" + } + }, + "Key": { + "target": "com.amazonaws.geomaps#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetStyleDescriptorResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

This Blob contains the body of the style descriptor which is in application/json format.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The style descriptor's Etag.

", + "smithy.api#httpHeader": "ETag" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetTile": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetTileRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetTileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geomaps#AccessDeniedException" + }, + { + "target": "com.amazonaws.geomaps#InternalServerException" + }, + { + "target": "com.amazonaws.geomaps#ThrottlingException" + }, + { + "target": "com.amazonaws.geomaps#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Returns a tile. 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.

", + "smithy.api#http": { + "uri": "/tiles/{Tileset}/{Z}/{X}/{Y}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetTileSuccess", + "params": { + "Tileset": "vector.basemap", + "X": "5190", + "Y": "11218", + "Z": "15" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetTileRequest": { + "type": "structure", + "members": { + "Tileset": { + "target": "com.amazonaws.geomaps#Tileset", + "traits": { + "smithy.api#documentation": "

Specifies the desired tile set.

\n

Valid Values: raster.satellite | vector.basemap\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Z": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The zoom value for the map tile.

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "\\d+", + "smithy.api#required": {} + } + }, + "X": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The X axis value for the map tile. Must be between 0 and 19.

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "\\d+", + "smithy.api#required": {} + } + }, + "Y": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Y axis value for the map tile.

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "\\d+", + "smithy.api#required": {} + } + }, + "Key": { + "target": "com.amazonaws.geomaps#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetTileResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The blob represents a vector tile in mvt format for the\n GetTile API.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the request is charged at.

", + "smithy.api#httpHeader": "ETag" + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the request is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request processing has failed because of an unknown error, exception or failure.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.geomaps#MapStyle": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "STANDARD", + "value": "Standard" + }, + { + "name": "MONOCHROME", + "value": "Monochrome" + }, + { + "name": "HYBRID", + "value": "Hybrid" + }, + { + "name": "SATELLITE", + "value": "Satellite" + } + ] + } + }, + "com.amazonaws.geomaps#MapsService": { + "type": "service", + "version": "2020-11-19", + "resources": [ + { + "target": "com.amazonaws.geomaps#ProviderResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Geo Maps", + "arnNamespace": "geo-maps", + "cloudTrailEventSource": "geo-maps.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "geo-maps" + }, + "aws.endpoints#standardRegionalEndpoints": { + "partitionSpecialCases": { + "aws": [ + { + "endpoint": "https://maps.geo.{region}.{dnsSuffix}/v2" + }, + { + "endpoint": "https://maps.geo-fips.{region}.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://maps.geo-fips.{region}.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://maps.geo.{region}.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ], + "aws-us-gov": [ + { + "endpoint": "https://maps.geo.{region}.us-gov.{dnsSuffix}/v2" + }, + { + "endpoint": "https://maps.geo-fips.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://maps.geo-fips.{region}.us-gov.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://maps.geo.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ] + } + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": ["x-amz-content-sha256", "x-amz-user-agent", "content-type"], + "additionalExposedHeaders": [ + "age", + "date", + "x-amz-apigw-id", + "x-amz-cf-id", + "x-amz-cf-pop", + "x-amzn-requestid", + "x-amzn-trace-id", + "x-cache" + ] + }, + "smithy.api#documentation": "

\n Integrate high-quality base map data into your applications using \n MapLibre. Capabilities include:\n

\n
    \n
  • \n

    Access to comprehensive base map data, allowing you to tailor the map display to your specific needs.

    \n
  • \n
  • \n

    Multiple pre-designed map styles suited for various application types, such as navigation, logistics, or data visualization.

    \n
  • \n
  • \n

    Generation of static map images for scenarios where interactive maps aren't suitable, such as:

    \n
      \n
    • \n

      Embedding in emails or documents

      \n
    • \n
    • \n

      Displaying in low-bandwidth environments

      \n
    • \n
    • \n

      Creating printable maps

      \n
    • \n
    • \n

      Enhancing application performance by reducing client-side rendering

      \n
    • \n
    \n
  • \n
", + "smithy.api#title": "Amazon Location Service Maps V2", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + }, + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-maps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-maps-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-maps.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://geo-maps.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For custom endpoint with region not set and fips disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://maps.geo-fips.us-east-1.api.aws/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://maps.geo-fips.us-east-1.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://maps.geo.us-east-1.api.aws/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://maps.geo.us-east-1.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://maps.geo-fips.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://maps.geo-fips.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://maps.geo.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://maps.geo.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.geomaps#PositionListString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 7 + }, + "smithy.api#pattern": "^(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?)(,(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?))*$" + } + }, + "com.amazonaws.geomaps#PositionString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 36 + }, + "smithy.api#pattern": "^-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?$" + } + }, + "com.amazonaws.geomaps#ProviderResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.geomaps#GetGlyphs" + }, + { + "target": "com.amazonaws.geomaps#GetSprites" + }, + { + "target": "com.amazonaws.geomaps#GetStaticMap" + }, + { + "target": "com.amazonaws.geomaps#GetStyleDescriptor" + }, + { + "target": "com.amazonaws.geomaps#GetTile" + } + ] + }, + "com.amazonaws.geomaps#ScaleBarUnit": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "KILOMETERS", + "value": "Kilometers" + }, + { + "name": "KILOMETERS_MILES", + "value": "KilometersMiles" + }, + { + "name": "MILES", + "value": "Miles" + }, + { + "name": "MILES_KILOMETERS", + "value": "MilesKilometers" + } + ] + } + }, + "com.amazonaws.geomaps#StaticMapStyle": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SATELLITE", + "value": "Satellite" + } + ] + } + }, + "com.amazonaws.geomaps#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.geomaps#Tileset": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[-.\\w]+$" + } + }, + "com.amazonaws.geomaps#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + }, + "Reason": { + "target": "com.amazonaws.geomaps#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

The field where thebb invalid entry was detected.

", + "smithy.api#jsonName": "reason", + "smithy.api#required": {} + } + }, + "FieldList": { + "target": "com.amazonaws.geomaps#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "

A message with the reason for the validation exception error.

", + "smithy.api#jsonName": "fieldList", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.geomaps#ValidationExceptionField": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the resource.

", + "smithy.api#jsonName": "name", + "smithy.api#required": {} + } + }, + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The error message.

", + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by the Amazon Location service.

" + } + }, + "com.amazonaws.geomaps#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.geomaps#ValidationExceptionField" + } + }, + "com.amazonaws.geomaps#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "UNKNOWN_OPERATION", + "value": "UnknownOperation", + "documentation": "No such operation is supported." + }, + { + "name": "MISSING", + "value": "Missing", + "documentation": "The required input is missing." + }, + { + "name": "CANNOT_PARSE", + "value": "CannotParse", + "documentation": " The input cannot be parsed. For example a required JSON document, ARN identifier,\n date value, or numeric field cannot be parsed.\n" + }, + { + "name": "FIELD_VALIDATION_FAILED", + "value": "FieldValidationFailed", + "documentation": " The input is present and parsable, but it is otherwise invalid. For example, a\n required numeric argument is outside the allowed range.\n" + }, + { + "name": "OTHER", + "value": "Other", + "documentation": "The input is invalid but no more specific reason is applicable." + }, + { + "name": "UNKNOWN_FIELD", + "value": "UnknownField", + "documentation": "No such field is supported." + } + ] + } + }, + "com.amazonaws.geomaps#Variant": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "DEFAULT", + "value": "Default" + } + ] + } + } + } +}