├── .eslintignore
├── .eslintrc.js
├── .github
├── FUNDING.yml
└── workflows
│ └── nodejs.yml
├── .gitignore
├── .markdownlint.json
├── .npmignore
├── .prettierrc
├── .vscode
├── launch.json
└── settings.json
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── examples
├── fullApi
│ ├── index.ts
│ └── schema.ts
├── introspection
│ ├── generate.ts
│ └── schema.txt
├── partialApi
│ ├── index.ts
│ └── schema.ts
└── tsconfig.json
├── jest.config.js
├── package.json
├── src
├── AwsApiParser.ts
├── AwsParam.ts
├── AwsService.ts
├── AwsServiceMetadata.ts
├── AwsServiceOperation.ts
├── AwsShapes.ts
├── __mocks__
│ └── s3-2006-03-01.json
├── __tests__
│ ├── AwsApiParser-test.ts
│ ├── AwsParam-test.ts
│ ├── AwsService-test.ts
│ ├── AwsServiceMetadata-test.ts
│ ├── AwsServiceOperation-test.ts
│ ├── AwsShapes-test.ts
│ ├── __snapshots__
│ │ ├── AwsService-test.ts.snap
│ │ └── AwsServiceMetadata-test.ts.snap
│ └── aws-sdk-test.ts
├── index.ts
├── types
│ └── AwsConfigITC.ts
└── utils.ts
├── tsconfig.build.json
├── tsconfig.json
└── yarn.lock
/.eslintignore:
--------------------------------------------------------------------------------
1 | lib
2 | .eslintrc.js
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | parser: '@typescript-eslint/parser',
5 | plugins: ['@typescript-eslint', 'prettier'],
6 | extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'],
7 | parserOptions: {
8 | sourceType: 'module',
9 | useJSXTextNode: true,
10 | project: [
11 | path.resolve(__dirname, 'tsconfig.json'),
12 | path.resolve(__dirname, 'examples/tsconfig.json'),
13 | ],
14 | },
15 | rules: {
16 | 'no-underscore-dangle': 0,
17 | 'arrow-body-style': 0,
18 | 'no-unused-expressions': 0,
19 | 'no-plusplus': 0,
20 | 'no-console': 0,
21 | 'func-names': 0,
22 | 'comma-dangle': [
23 | 'error',
24 | {
25 | arrays: 'always-multiline',
26 | objects: 'always-multiline',
27 | imports: 'always-multiline',
28 | exports: 'always-multiline',
29 | functions: 'ignore',
30 | },
31 | ],
32 | 'no-prototype-builtins': 0,
33 | 'prefer-destructuring': 0,
34 | 'no-else-return': 0,
35 | 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
36 | '@typescript-eslint/explicit-member-accessibility': 0,
37 | '@typescript-eslint/no-explicit-any': 0,
38 | '@typescript-eslint/no-inferrable-types': 0,
39 | '@typescript-eslint/explicit-function-return-type': 0,
40 | '@typescript-eslint/no-use-before-define': 0,
41 | '@typescript-eslint/no-empty-function': 0,
42 | '@typescript-eslint/camelcase': 0,
43 | '@typescript-eslint/ban-ts-comment': 0,
44 | '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
45 | },
46 | env: {
47 | jasmine: true,
48 | jest: true,
49 | },
50 | };
51 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [nodkz]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: graphql-compose
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
--------------------------------------------------------------------------------
/.github/workflows/nodejs.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: Node.js CI
5 |
6 | on: [push, pull_request]
7 |
8 | jobs:
9 | tests:
10 | runs-on: ubuntu-latest
11 | strategy:
12 | matrix:
13 | node-version: [12.x, 14.x, 16.x]
14 | steps:
15 | - uses: actions/checkout@v2
16 | - name: Use Node.js ${{ matrix.node-version }}
17 | uses: actions/setup-node@v1
18 | with:
19 | node-version: ${{ matrix.node-version }}
20 | - name: Install node_modules
21 | run: yarn
22 | - name: Test & lint
23 | run: yarn test
24 | env:
25 | CI: true
26 | - name: Send codecov.io stats
27 | if: matrix.node-version == '12.x'
28 | run: bash <(curl -s https://codecov.io/bash) || echo ''
29 |
30 | publish:
31 | if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
32 | needs: [tests]
33 | runs-on: ubuntu-latest
34 | steps:
35 | - uses: actions/checkout@v2
36 | - name: Use Node.js 12
37 | uses: actions/setup-node@v1
38 | with:
39 | node-version: 12.x
40 | - name: Install node_modules
41 | run: yarn install
42 | - name: Build
43 | run: yarn build
44 | - name: Semantic Release (publish to npm)
45 | run: yarn semantic-release
46 | env:
47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49 |
50 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 |
15 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
16 | .grunt
17 |
18 | # node-waf configuration
19 | .lock-wscript
20 |
21 | # Compiled binary addons (http://nodejs.org/api/addons.html)
22 | build/Release
23 |
24 | # IntelliJ Files
25 | *.iml
26 | *.ipr
27 | *.iws
28 | /out/
29 | .idea/
30 | .idea_modules/
31 |
32 | # Dependency directory
33 | node_modules
34 |
35 | # Optional npm cache directory
36 | .npm
37 |
38 | # Optional REPL history
39 | .node_repl_history
40 |
41 | # Transpiled code
42 | /es
43 | /lib
44 | /mjs
45 |
46 | coverage
47 | .nyc_output
48 |
--------------------------------------------------------------------------------
/.markdownlint.json:
--------------------------------------------------------------------------------
1 | {
2 | "line-length": false,
3 | "no-trailing-punctuation": {
4 | "punctuation": ",;"
5 | },
6 | "no-inline-html": false,
7 | "ol-prefix": false,
8 | "first-line-h1": false,
9 | "first-heading-h1": false
10 | }
11 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.log
3 | src
4 | example
5 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "tabWidth": 2,
4 | "useTabs": false,
5 | "printWidth": 100,
6 | "trailingComma": "es5"
7 | }
8 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Jest",
9 | "type": "node",
10 | "request": "launch",
11 | "program": "${workspaceFolder}/node_modules/.bin/jest",
12 | "args": ["--runInBand", "--watch"],
13 | "cwd": "${workspaceFolder}",
14 | "console": "integratedTerminal",
15 | "internalConsoleOptions": "neverOpen",
16 | "disableOptimisticBPs": true
17 | },
18 | {
19 | "name": "Jest Current File",
20 | "type": "node",
21 | "request": "launch",
22 | "program": "${workspaceFolder}/node_modules/.bin/jest",
23 | "args": [
24 | "${fileBasenameNoExtension}",
25 | "--config",
26 | "jest.config.js"
27 | ],
28 | "console": "integratedTerminal",
29 | "internalConsoleOptions": "neverOpen",
30 | "disableOptimisticBPs": true
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "eslint.validate": ["javascript"],
3 | "javascript.validate.enable": false,
4 | "javascript.autoClosingTags": false,
5 | "eslint.autoFixOnSave": true,
6 | "editor.codeActionsOnSave": {
7 | "source.fixAll.eslint": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.0-semantically-released (November 29, 2017)
2 | This package publishing automated by [semantic-release](https://github.com/semantic-release/semantic-release).
3 | [Changelog](https://github.com/graphql-compose/graphql-compose-aws/releases) is generated automatically and can be found here: https://github.com/graphql-compose/graphql-compose-aws/releases
4 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2017-present Pavel Chertorogov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # graphql-compose-aws
2 |
3 | [](https://www.npmjs.com/package/graphql-compose-aws)
4 | [](http://www.npmtrends.com/graphql-compose-aws)
5 | [](https://travis-ci.org/graphql-compose/graphql-compose-aws)
6 | [](http://commitizen.github.io/cz-cli/)
7 | [](https://github.com/semantic-release/semantic-release)
8 | [](https://greenkeeper.io/)
9 |
10 | This module expose AWS Cloud API via GraphQL.
11 |
12 | - **Live demo of [AWS SDK API via GraphiQL](https://graphql-compose.herokuapp.com/aws/?query=%0A%0A%23%20%E2%9C%8B%20%F0%9F%9B%91%20Please%20provide%20you%20credentials%20for%20obtaining%20working%20demo.%0A%23%20%E2%9C%8B%20%F0%9F%9B%91%20You%20need%20to%20wait%20about%2030%20seconds%2C%20before%20documentation%20and%0A%23%20autocompletion%20became%20avaliable.%20Needs%20to%20download%20about%0A%23%209MB%20schema%20introspection.%20Free%20Heroku%20account%20is%20not%20so%20fast%2C%20sorry.%0A%0Aquery%20%7B%0A%20%20aws%28config%3A%20%7B%0A%20%20%20%20accessKeyId%3A%20%22---%3E%20YOUR_KEY%20%3C---%22%2C%0A%20%20%20%20secretAccessKey%3A%20%22---%3E%20YOUR_SECRET%20%3C---%22%2C%0A%20%20%7D%29%20%7B%0A%20%20%20%20s3%20%7B%0A%20%20%20%20%20%20listBuckets%20%7B%0A%20%20%20%20%20%20%20%20Buckets%20%7B%0A%20%20%20%20%20%20%20%20%20%20Name%0A%20%20%20%20%20%20%20%20%20%20CreationDate%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20ec2%20%7B%0A%20%20%20%20%20%20euCentralVolumes%3A%20describeVolumes%28%0A%20%20%20%20%20%20%20%20config%3A%20%7B%20region%3A%20%22eu-central-1%22%20%7D%0A%20%20%20%20%20%20%29%20%7B%0A%20%20%20%20%20%20%20%20...VolumeData%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20euWestVolumes%3A%20describeVolumes%28%0A%20%20%20%20%20%20%20%20config%3A%20%7B%20region%3A%20%22eu-west-1%22%20%7D%0A%20%20%20%20%20%20%29%20%7B%0A%20%20%20%20%20%20%20%20...VolumeData%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%0Afragment%20VolumeData%20on%20AwsEC2DescribeVolumesOutput%20%7B%0A%20%20Volumes%20%7B%0A%20%20%20%20AvailabilityZone%0A%20%20%20%20CreateTime%0A%20%20%20%20Size%0A%20%20%20%20SnapshotId%0A%20%20%20%20State%0A%20%20%20%20VolumeId%0A%20%20%20%20Iops%0A%20%20%20%20VolumeType%0A%20%20%7D%0A%7D%0A%20%20%20%20%20%20)**
13 | - **Live demo via [GraphQL Playground](https://graphqlbin.com/plqhO) (improved GraphiQL)**
14 |
15 | Generated Schema Introspection in SDL format can be found [here](https://raw.githubusercontent.com/graphql-compose/graphql-compose-aws/master/examples/introspection/schema.txt) (more than 10k types, ~2MB).
16 |
17 | ## AWS SDK GraphQL
18 |
19 | Supported all AWS SDK versions via official [aws-sdk](https://github.com/aws/aws-sdk-js) js client. Internally it generates Types and FieldConfigs from AWS SDK configs. You may put this generated types to any GraphQL Schema.
20 |
21 | ```js
22 | import { GraphQLSchema, GraphQLObjectType } from 'graphql';
23 | import awsSDK from 'aws-sdk';
24 | import { AwsApiParser } from 'graphql-compose-aws';
25 |
26 | const awsApiParser = new AwsApiParser({
27 | awsSDK,
28 | });
29 |
30 | const schema = new GraphQLSchema({
31 | query: new GraphQLObjectType({
32 | name: 'Query',
33 | fields: {
34 | // Full API
35 | aws: awsApiParser.getFieldConfig(),
36 |
37 | // Partial API with desired services
38 | s3: awsApiParser.getService('s3').getFieldConfig(),
39 | ec2: awsApiParser.getService('ec2').getFieldConfig(),
40 | },
41 | }),
42 | });
43 |
44 | export default schema;
45 | ```
46 |
47 | Full [code examples](https://github.com/graphql-compose/graphql-compose-aws/tree/master/examples/)
48 |
49 | ## Installation
50 |
51 | ```bash
52 | yarn add graphql graphql-compose aws-sdk graphql-compose-aws
53 | // or
54 | npm install graphql graphql-compose aws-sdk graphql-compose-aws --save
55 | ```
56 |
57 | Modules `graphql`, `graphql-compose`, `aws-sdk` are in `peerDependencies`, so should be installed explicitly in your app.
58 |
59 | ## Screenshots
60 |
61 | ### Get List of EC2 instances from `eu-west-1` region
62 |
63 |
64 |
65 | ### Several AWS API calls in one query with different services and regions
66 |
67 |
68 |
69 | ## License
70 |
71 | [MIT](https://github.com/graphql-compose/graphql-compose-aws/blob/master/LICENSE.md)
72 |
--------------------------------------------------------------------------------
/examples/fullApi/index.ts:
--------------------------------------------------------------------------------
1 | import express from 'express';
2 | import { graphqlHTTP } from 'express-graphql';
3 | import schema from './schema';
4 |
5 | const expressPort = process.env.port || process.env.PORT || 4000;
6 |
7 | const server = express();
8 | server.use(
9 | '/',
10 | graphqlHTTP({
11 | schema,
12 | graphiql: true,
13 | customFormatErrorFn: (error) => ({
14 | message: error.message,
15 | stack: error?.stack?.split('\n'),
16 | }),
17 | })
18 | );
19 |
20 | server.listen(expressPort, () => {
21 | console.log(`The server is running at http://localhost:${expressPort}/`);
22 | });
23 |
--------------------------------------------------------------------------------
/examples/fullApi/schema.ts:
--------------------------------------------------------------------------------
1 | import { GraphQLSchema, GraphQLObjectType } from 'graphql';
2 | import awsSDK from 'aws-sdk';
3 | import { AwsApiParser } from '../../src'; // from 'graphql-compose-aws';
4 |
5 | const awsApiParser = new AwsApiParser({
6 | awsSDK,
7 | });
8 |
9 | const schema = new GraphQLSchema({
10 | query: new GraphQLObjectType({
11 | name: 'Query',
12 | fields: {
13 | aws: awsApiParser.getFieldConfig(),
14 | },
15 | }),
16 | });
17 |
18 | export default schema;
19 |
--------------------------------------------------------------------------------
/examples/introspection/generate.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs';
2 | import path from 'path';
3 | import { printSchema } from 'graphql';
4 | import schema from '../fullApi/schema';
5 |
6 | const output = path.resolve(__dirname, './schema.txt');
7 | fs.writeFileSync(output, printSchema(schema));
8 |
--------------------------------------------------------------------------------
/examples/partialApi/index.ts:
--------------------------------------------------------------------------------
1 | import express from 'express';
2 | import graphqlHTTP from 'express-graphql';
3 | import schema from './schema';
4 |
5 | const expressPort = process.env.port || process.env.PORT || 4000;
6 |
7 | const server = express();
8 | server.use(
9 | '/',
10 | graphqlHTTP({
11 | schema,
12 | graphiql: true,
13 | customFormatErrorFn: (error) => ({
14 | message: error.message,
15 | stack: error?.stack?.split('\n'),
16 | }),
17 | })
18 | );
19 |
20 | server.listen(expressPort, () => {
21 | console.log(`The server is running at http://localhost:${expressPort}/`);
22 | });
23 |
--------------------------------------------------------------------------------
/examples/partialApi/schema.ts:
--------------------------------------------------------------------------------
1 | import { GraphQLSchema, GraphQLObjectType } from 'graphql';
2 | import awsSDK from 'aws-sdk';
3 | import { AwsApiParser } from '../../src'; // from 'graphql-compose-aws';
4 |
5 | const awsApiParser = new AwsApiParser({
6 | awsSDK,
7 | });
8 |
9 | const schema = new GraphQLSchema({
10 | query: new GraphQLObjectType({
11 | name: 'Query',
12 | fields: {
13 | s3: awsApiParser.getService('s3').getFieldConfig(),
14 | ec2: awsApiParser.getService('ec2').getFieldConfig(),
15 | },
16 | }),
17 | });
18 |
19 | export default schema;
20 |
--------------------------------------------------------------------------------
/examples/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2016",
4 | "module": "commonjs",
5 | "moduleResolution": "node",
6 | "esModuleInterop": true,
7 | "sourceMap": true,
8 | "declaration": true,
9 | "declarationMap": true,
10 | "removeComments": true,
11 | "resolveJsonModule": true,
12 | "strict": true,
13 | "noImplicitAny": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "noUnusedParameters": true,
17 | "noUnusedLocals": true,
18 | "forceConsistentCasingInFileNames": true,
19 | "lib": ["es2017", "esnext.asynciterable"],
20 | "types": ["node", "jest"],
21 | "baseUrl": ".",
22 | "paths": {
23 | "*" : ["types/*"]
24 | },
25 | "rootDir": "../",
26 | },
27 | "include": ["./**/*"],
28 | "exclude": [
29 | "node_modules"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'ts-jest',
3 | testEnvironment: 'node',
4 | globals: {
5 | 'ts-jest': {
6 | tsConfig: '/tsconfig.json',
7 | isolatedModules: true,
8 | diagnostics: false,
9 | },
10 | },
11 | moduleFileExtensions: ['ts', 'js'],
12 | transform: {
13 | '^.+\\.ts$': 'ts-jest',
14 | '^.+\\.js$': 'babel-jest',
15 | },
16 | roots: ['/src'],
17 | testPathIgnorePatterns: ['/node_modules/', '/lib/'],
18 | };
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "graphql-compose-aws",
3 | "version": "0.0.0-semantically-released",
4 | "description": "AWS Cloud API via GraphQL",
5 | "files": [
6 | "lib"
7 | ],
8 | "main": "lib/index.js",
9 | "types": "lib/index.d.ts",
10 | "repository": {
11 | "type": "git",
12 | "url": "https://github.com/graphql-compose/graphql-compose-aws.git"
13 | },
14 | "keywords": [
15 | "graphql",
16 | "aws",
17 | "amazon cloud",
18 | "aws sdk",
19 | "graphql-compose"
20 | ],
21 | "license": "MIT",
22 | "bugs": {
23 | "url": "https://github.com/graphql-compose/graphql-compose-aws/issues"
24 | },
25 | "homepage": "https://github.com/graphql-compose/graphql-compose-aws#readme",
26 | "peerDependencies": {
27 | "graphql-compose": "^7.0.4 || ^8.0.0 || ^9.0.0"
28 | },
29 | "devDependencies": {
30 | "@types/express": "4.17.12",
31 | "@types/jest": "26.0.23",
32 | "@typescript-eslint/eslint-plugin": "4.25.0",
33 | "@typescript-eslint/parser": "4.25.0",
34 | "aws-sdk": "2.924.0",
35 | "eslint": "7.27.0",
36 | "eslint-config-airbnb-base": "14.2.1",
37 | "eslint-config-prettier": "8.3.0",
38 | "eslint-plugin-import": "2.23.4",
39 | "eslint-plugin-prettier": "3.4.0",
40 | "express": "^4.17.1",
41 | "express-graphql": "0.12.0",
42 | "graphql": "15.5.0",
43 | "graphql-compose": "9.0.0",
44 | "jest": "27.0.3",
45 | "nodemon": "2.0.7",
46 | "prettier": "2.3.0",
47 | "rimraf": "3.0.2",
48 | "semantic-release": "17.4.3",
49 | "ts-jest": "27.0.1",
50 | "ts-node-dev": "1.1.6",
51 | "typescript": "4.3.2"
52 | },
53 | "scripts": {
54 | "build": "rimraf lib && tsc -p ./tsconfig.build.json",
55 | "demo": "npm run demo-fullApi",
56 | "demo-fullApi": "ts-node-dev --no-notify ./examples/fullApi/index.ts",
57 | "demo-introspection": "ts-node-dev --no-notify ./examples/introspection/generate.ts",
58 | "demo-partialApi": "ts-node-dev --no-notify ./examples/partialApi/index.ts",
59 | "watch": "jest --watch",
60 | "coverage": "jest --coverage",
61 | "lint": "yarn eslint && yarn tscheck",
62 | "eslint": "eslint --ext .ts ./src",
63 | "tscheck": "tsc --noEmit",
64 | "test": "npm run coverage && npm run lint",
65 | "semantic-release": "semantic-release"
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/AwsApiParser.ts:
--------------------------------------------------------------------------------
1 | import { schemaComposer, ObjectTypeComposer } from 'graphql-compose';
2 | import type { GraphQLObjectType, GraphQLFieldConfig } from 'graphql-compose/lib/graphql';
3 | import { AwsService, ServiceConfig } from './AwsService';
4 | import AwsConfigITC from './types/AwsConfigITC';
5 |
6 | export type AwsSDK = any;
7 |
8 | type AwsOpts = {
9 | name?: string;
10 | awsSDK?: AwsSDK;
11 | };
12 |
13 | export class AwsApiParser {
14 | name: string;
15 | awsSDK: AwsSDK;
16 | tc?: ObjectTypeComposer;
17 | _serviceMap: { [serviceIdentifier: string]: string };
18 |
19 | constructor(opts: AwsOpts) {
20 | this.name = opts.name || 'Aws';
21 | this.awsSDK = opts.awsSDK;
22 |
23 | this._serviceMap = {};
24 | this.getServicesNames();
25 | }
26 |
27 | getServicesNames(): string[] {
28 | const serviceNames = Object.keys(this.awsSDK).reduce((res, name) => {
29 | if (this.awsSDK[name].serviceIdentifier) {
30 | this._serviceMap[this.awsSDK[name].serviceIdentifier] = name;
31 | res.push(name);
32 | }
33 | return res;
34 | }, [] as string[]);
35 | serviceNames.sort();
36 | return serviceNames;
37 | }
38 |
39 | getServiceIdentifier(name: string): string {
40 | if (this._serviceMap[name]) return name;
41 |
42 | if (!this.awsSDK[name]) {
43 | throw new Error(`Service with name '${name}' does not exist. Run AwsApiParser.`);
44 | }
45 | return this.awsSDK[name].serviceIdentifier;
46 | }
47 |
48 | getServiceConfig(name: string): ServiceConfig {
49 | const cfg = this.awsSDK.apiLoader.services[this.getServiceIdentifier(name)];
50 | if (!cfg) {
51 | throw new Error(`Service with name '${name}' does not exist.`);
52 | }
53 | const versions = Object.keys(cfg);
54 | if (versions.length === 1) {
55 | return cfg[versions[0]];
56 | }
57 |
58 | versions.sort();
59 | return cfg[versions[versions.length - 1]];
60 | }
61 |
62 | getService(name: string): AwsService {
63 | const config = this.getServiceConfig(name);
64 | // console.log(config);
65 | return new AwsService({
66 | serviceId: this._serviceMap[name] || name,
67 | prefix: this.name,
68 | config,
69 | awsSDK: this.awsSDK,
70 | });
71 | }
72 |
73 | getTypeComposer(): ObjectTypeComposer {
74 | if (!this.tc) {
75 | const fields = this.getServicesNames().reduce((res, name) => {
76 | res[this.getServiceIdentifier(name)] = this.getService(name).getFieldConfig();
77 | return res;
78 | }, {} as any);
79 |
80 | this.tc = schemaComposer.createObjectTC({
81 | name: this.name,
82 | fields,
83 | description: `AWS SDK ${this.awsSDK.VERSION}`,
84 | });
85 | }
86 | return this.tc;
87 | }
88 |
89 | getType(): GraphQLObjectType {
90 | return this.getTypeComposer().getType();
91 | }
92 |
93 | getFieldConfig(): GraphQLFieldConfig {
94 | return {
95 | type: this.getType(),
96 | args: {
97 | config: {
98 | type: AwsConfigITC.getType(),
99 | description: 'Will override default configs for aws-sdk.',
100 | },
101 | },
102 | resolve: (source, args) => ({
103 | awsConfig: { ...(source && source.awsConfig), ...(args && args.config) },
104 | }),
105 | description: this.getTypeComposer().getDescription(),
106 | };
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/src/AwsParam.ts:
--------------------------------------------------------------------------------
1 | import {
2 | schemaComposer,
3 | ObjectTypeComposer,
4 | InputTypeComposer,
5 | upperFirst,
6 | ComposeOutputTypeDefinition,
7 | ComposeInputTypeDefinition,
8 | InputTypeComposerFieldConfigMapDefinition,
9 | ObjectTypeComposerFieldConfigMapDefinition,
10 | } from 'graphql-compose';
11 |
12 | type ParamsMap = {
13 | [name: string]: Param;
14 | };
15 |
16 | export type Param =
17 | | ParamLocation
18 | | ParamStructure
19 | | ParamList
20 | | ParamMap
21 | | ParamBoolean
22 | | ParamTimestamp
23 | | ParamFloat
24 | | ParamInteger
25 | | ParamString
26 | | ParamEmpty
27 | | ParamShape;
28 |
29 | type ParamList = {
30 | type: 'list';
31 | member: Param;
32 | locationName?: string;
33 | flattened?: boolean;
34 | };
35 |
36 | type ParamMap = {
37 | type: 'map';
38 | key: Record;
39 | value: Param;
40 | };
41 |
42 | type ParamEmpty = Record;
43 |
44 | type ParamShape = {
45 | type?: 'shape';
46 | shape: string;
47 | locationName?: string;
48 | };
49 |
50 | type ParamBoolean = {
51 | type: 'boolean';
52 | locationName?: string;
53 | };
54 |
55 | type ParamString = {
56 | type: 'string';
57 | locationName?: string;
58 | sensitive?: boolean;
59 | };
60 |
61 | type ParamInteger = {
62 | type: 'integer';
63 | locationName?: string;
64 | };
65 |
66 | type ParamFloat = {
67 | type: 'float';
68 | locationName?: string;
69 | };
70 |
71 | type ParamTimestamp = {
72 | type: 'timestamp';
73 | locationName?: string;
74 | };
75 |
76 | type ParamLocation = {
77 | type?: 'location';
78 | location: string;
79 | locationName: string;
80 | };
81 |
82 | export type ParamStructure = {
83 | type: 'structure';
84 | members: ParamsMap;
85 | locationName?: string;
86 | xmlNamespace?: {
87 | uri: string;
88 | };
89 | required?: string[];
90 | payload?: string;
91 | };
92 |
93 | type AwsShapes = any;
94 |
95 | export class AwsParam {
96 | static convertInputStructure(
97 | param: ParamStructure,
98 | name: string,
99 | shapes?: AwsShapes
100 | ): InputTypeComposer {
101 | const fields = {} as InputTypeComposerFieldConfigMapDefinition;
102 |
103 | if (param.members) {
104 | Object.keys(param.members).forEach((fname) => {
105 | fields[fname] = this.convertParamInput(
106 | param.members[fname],
107 | `${name}${upperFirst(fname)}`,
108 | shapes
109 | );
110 | });
111 | }
112 |
113 | const typename = `${name}Input`;
114 |
115 | if (schemaComposer.has(typename)) {
116 | console.warn(
117 | `Type ${typename} already exists. It seems that aws-sdk has types with same names. Reusing already existed type for GraphQL schema.`
118 | );
119 | return schemaComposer.get(typename) as any;
120 | }
121 |
122 | const itc = schemaComposer.createInputTC({
123 | name: typename,
124 | fields,
125 | });
126 |
127 | if (Array.isArray(param.required)) {
128 | itc.makeRequired(param.required);
129 | }
130 |
131 | return itc;
132 | }
133 |
134 | static convertOutputStructure(
135 | param: ParamStructure,
136 | name: string,
137 | shapes?: AwsShapes
138 | ): ObjectTypeComposer {
139 | const fields = {} as ObjectTypeComposerFieldConfigMapDefinition;
140 |
141 | if (param.members) {
142 | Object.keys(param.members).forEach((fname) => {
143 | fields[fname] = this.convertParamOutput(
144 | param.members[fname],
145 | `${name}${upperFirst(fname)}`,
146 | shapes
147 | );
148 | });
149 | }
150 |
151 | const tc = schemaComposer.createObjectTC({
152 | name,
153 | fields,
154 | });
155 |
156 | if (Array.isArray(param.required)) {
157 | tc.makeFieldNonNull(param.required);
158 | }
159 |
160 | return tc;
161 | }
162 |
163 | static convertParamInput(
164 | param: Param,
165 | name: string,
166 | shapes?: AwsShapes
167 | ): ComposeInputTypeDefinition {
168 | return this._convertParam(param, name, true, shapes) as any;
169 | }
170 |
171 | static convertParamOutput(
172 | param: Param,
173 | name: string,
174 | shapes?: AwsShapes
175 | ): ComposeOutputTypeDefinition {
176 | return this._convertParam(param, name, false, shapes) as any;
177 | }
178 |
179 | static _convertParam(
180 | param: Param,
181 | name: string,
182 | isInput?: boolean,
183 | shapes?: AwsShapes
184 | ): ComposeOutputTypeDefinition | ComposeInputTypeDefinition {
185 | if (param.type) {
186 | switch (param.type) {
187 | case 'boolean':
188 | return 'Boolean';
189 | case 'string':
190 | return 'String';
191 | case 'integer':
192 | return 'Int';
193 | case 'float':
194 | return 'Float';
195 | case 'timestamp':
196 | return 'Date';
197 | case 'structure': {
198 | const tc = isInput
199 | ? this.convertInputStructure(param as ParamStructure, name, shapes)
200 | : this.convertOutputStructure(param as ParamStructure, name, shapes);
201 | // If bugous structure without fields, then return JSON
202 | if (Object.keys(tc.getFields()).length === 0) {
203 | return 'JSON';
204 | }
205 | return tc;
206 | }
207 | case 'map':
208 | return 'JSON';
209 | case 'list':
210 | return [this._convertParam((param as ParamList).member, name, isInput, shapes) as any];
211 | default:
212 | return 'JSON';
213 | }
214 | }
215 | if ((param as ParamShape).shape) {
216 | return this.convertShape(param as ParamShape, isInput, shapes);
217 | }
218 |
219 | return 'String';
220 | }
221 |
222 | static convertShape(
223 | param: ParamShape,
224 | isInput?: boolean,
225 | shapes?: AwsShapes
226 | ): ComposeOutputTypeDefinition | ComposeInputTypeDefinition {
227 | if (shapes) {
228 | return isInput ? shapes.getInputShape(param.shape) : shapes.getOutputShape(param.shape);
229 | }
230 | return 'JSON';
231 | }
232 | }
233 |
--------------------------------------------------------------------------------
/src/AwsService.ts:
--------------------------------------------------------------------------------
1 | import { schemaComposer, ObjectTypeComposer, upperFirst } from 'graphql-compose';
2 | import type { GraphQLObjectType, GraphQLFieldConfig } from 'graphql-compose/lib/graphql';
3 | import { AwsServiceMetadata, ServiceMetadataConfig } from './AwsServiceMetadata';
4 | import { AwsServiceOperation, ServiceOperationConfig } from './AwsServiceOperation';
5 | import { AwsShapes, ShapesMap } from './AwsShapes';
6 | import type { AwsSDK } from './AwsApiParser';
7 | import AwsConfigITC from './types/AwsConfigITC';
8 |
9 | export type ServiceConfig = {
10 | version: string;
11 | metadata: ServiceMetadataConfig;
12 | operations: {
13 | [name: string]: ServiceOperationConfig;
14 | };
15 | shapes: ShapesMap;
16 | paginators: any;
17 | waiters: any;
18 | };
19 |
20 | type ServiceOpts = {
21 | serviceId: string;
22 | prefix: string;
23 | config: ServiceConfig;
24 | awsSDK: AwsSDK;
25 | };
26 |
27 | export class AwsService {
28 | prefix: string;
29 | serviceId: string;
30 | awsSDK: AwsSDK;
31 | tc?: ObjectTypeComposer;
32 | config: ServiceConfig;
33 | metadata: AwsServiceMetadata;
34 | shapes: AwsShapes;
35 |
36 | constructor(opts: ServiceOpts) {
37 | this.prefix = opts.prefix;
38 | this.serviceId = opts.serviceId;
39 | this.awsSDK = opts.awsSDK;
40 | this.config = opts.config;
41 |
42 | this.metadata = new AwsServiceMetadata(this.config.metadata);
43 | this.shapes = new AwsShapes(this.config.shapes, this.getTypeName());
44 | }
45 |
46 | getTypeName(): string {
47 | return `${this.prefix}${upperFirst(this.serviceId)}`;
48 | }
49 |
50 | static lowerFirst(name: string): string {
51 | return name.charAt(0).toLowerCase() + name.slice(1);
52 | }
53 |
54 | getOperationNames(): string[] {
55 | return Object.keys(this.config.operations);
56 | }
57 |
58 | getOperation(name: string): AwsServiceOperation {
59 | const operConfig = this.config.operations[name];
60 | if (!operConfig) {
61 | throw new Error(`Operation with name ${name} does not exist.`);
62 | }
63 | return new AwsServiceOperation({
64 | serviceId: this.serviceId,
65 | name: AwsService.lowerFirst(name),
66 | prefix: this.prefix,
67 | config: operConfig,
68 | shapes: this.shapes,
69 | awsSDK: this.awsSDK,
70 | });
71 | }
72 |
73 | getTypeComposer(): ObjectTypeComposer {
74 | if (!this.tc) {
75 | const fields = this.getOperationNames().reduce((res, name) => {
76 | res[AwsService.lowerFirst(name)] = this.getOperation(name).getFieldConfig();
77 | return res;
78 | }, {} as any);
79 |
80 | this.tc = schemaComposer.createObjectTC({
81 | name: this.getTypeName(),
82 | fields,
83 | description: this.metadata.getDescription(),
84 | });
85 | }
86 | return this.tc;
87 | }
88 |
89 | getType(): GraphQLObjectType {
90 | return this.getTypeComposer().getType();
91 | }
92 |
93 | getFieldConfig(): GraphQLFieldConfig {
94 | return {
95 | type: this.getType(),
96 | args: {
97 | config: {
98 | type: AwsConfigITC.getType(),
99 | description: 'Will override default configs for aws-sdk.',
100 | },
101 | },
102 | resolve: (source, args) => ({
103 | awsConfig: { ...(source && source.awsConfig), ...(args && args.config) },
104 | }),
105 | };
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/src/AwsServiceMetadata.ts:
--------------------------------------------------------------------------------
1 | import { schemaComposer, ObjectTypeComposer, upperFirst } from 'graphql-compose';
2 | import type { GraphQLFieldConfig } from 'graphql-compose/lib/graphql';
3 |
4 | export type ServiceMetadataConfig = {
5 | apiVersion: string;
6 | endpointPrefix: string;
7 | globalEndpoint: string;
8 | serviceAbbreviation: string;
9 | serviceFullName: string;
10 | signatureVersion: string;
11 | uid: string;
12 | };
13 |
14 | export class AwsServiceMetadata {
15 | metadata: ServiceMetadataConfig;
16 | tc?: ObjectTypeComposer;
17 |
18 | constructor(metadata: ServiceMetadataConfig) {
19 | this.metadata = metadata;
20 | }
21 |
22 | getPrefix(): string {
23 | return `Aws${upperFirst(this.metadata.endpointPrefix)}`;
24 | }
25 |
26 | getDescription(): string {
27 | // { apiVersion: '2006-03-01',
28 | // checksumFormat: 'md5',
29 | // endpointPrefix: 's3',
30 | //
31 | // globalEndpoint: 's3.amazonaws.com',
32 | // protocol: 'rest-xml',
33 | // serviceAbbreviation: 'Amazon S3',
34 | // serviceFullName: 'Amazon Simple Storage Service',
35 | // serviceId: 'S3',
36 | // signatureVersion: 's3',
37 | // timestampFormat: 'rfc822',
38 | // uid: 's3-2006-03-01' }
39 | const { serviceFullName, apiVersion } = this.metadata;
40 | return `${serviceFullName} (${apiVersion})`;
41 | }
42 |
43 | getTypeComposer(): ObjectTypeComposer {
44 | if (!this.tc) {
45 | this.tc = schemaComposer.createObjectTC(`
46 | type ${this.getPrefix()}Metadata {
47 | apiVersion: String
48 | endpointPrefix: String
49 | globalEndpoint: String
50 | serviceAbbreviation: String
51 | serviceFullName: String
52 | signatureVersion: String
53 | uid: String
54 | raw: JSON
55 | }
56 | `);
57 | }
58 | return this.tc;
59 | }
60 |
61 | getFieldConfig(): GraphQLFieldConfig {
62 | return {
63 | type: this.getTypeComposer().getType(),
64 | resolve: () => {
65 | return {
66 | ...this.metadata,
67 | raw: this.metadata,
68 | };
69 | },
70 | };
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/AwsServiceOperation.ts:
--------------------------------------------------------------------------------
1 | import { upperFirst, GraphQLJSON } from 'graphql-compose';
2 | import type {
3 | GraphQLFieldConfig,
4 | GraphQLFieldConfigArgumentMap,
5 | GraphQLFieldResolver,
6 | GraphQLOutputType,
7 | GraphQLInputType,
8 | } from 'graphql-compose/lib/graphql';
9 | import { AwsParam, ParamStructure } from './AwsParam';
10 | import type { AwsShapes } from './AwsShapes';
11 | import type { AwsSDK } from './AwsApiParser';
12 | import AwsConfigITC from './types/AwsConfigITC';
13 |
14 | export type ServiceOperationConfig = {
15 | http?: {
16 | method: string;
17 | requestUri: string;
18 | };
19 | input?: ParamStructure;
20 | output?: ParamStructure;
21 | alias?: string;
22 | };
23 |
24 | type OperationOpts = {
25 | serviceId: string;
26 | name: string;
27 | prefix: string;
28 | config: ServiceOperationConfig;
29 | shapes: AwsShapes;
30 | awsSDK: AwsSDK;
31 | };
32 |
33 | export class AwsServiceOperation {
34 | prefix: string;
35 | name: string;
36 | serviceId: string;
37 | awsSDK: AwsSDK;
38 | args?: GraphQLFieldConfigArgumentMap;
39 | config: ServiceOperationConfig;
40 | shapes: AwsShapes;
41 |
42 | constructor(opts: OperationOpts) {
43 | this.prefix = opts.prefix;
44 | this.name = opts.name;
45 | this.serviceId = opts.serviceId;
46 | this.awsSDK = opts.awsSDK;
47 | this.config = opts.config;
48 | this.shapes = opts.shapes;
49 | }
50 |
51 | getTypeName(): string {
52 | return `${this.prefix}${upperFirst(this.serviceId)}${upperFirst(this.name)}`;
53 | }
54 |
55 | getType(): GraphQLOutputType {
56 | if (this.config.output && this.config.output.type === 'structure') {
57 | const tc = AwsParam.convertOutputStructure(
58 | this.config.output,
59 | `${this.getTypeName()}Output`,
60 | this.shapes
61 | );
62 |
63 | // If bugous structure without fields, then return JSON
64 | if (Object.keys(tc.getFields()).length === 0) {
65 | return GraphQLJSON;
66 | }
67 |
68 | return tc.getType();
69 | }
70 |
71 | return GraphQLJSON;
72 | }
73 |
74 | getArgs(): GraphQLFieldConfigArgumentMap {
75 | if (!this.args) {
76 | if (!this.config.input) {
77 | this.args = {} as GraphQLFieldConfigArgumentMap;
78 | } else {
79 | const itc = AwsParam.convertInputStructure(
80 | this.config.input,
81 | this.getTypeName(),
82 | this.shapes
83 | );
84 |
85 | let type: GraphQLInputType;
86 | // If bugous structure without fields, then return JSON
87 | if (Object.keys(itc.getFields()).length === 0) {
88 | type = GraphQLJSON;
89 | } else {
90 | const hasRequiredFields = itc.getFieldNames().some((f) => itc.isFieldNonNull(f));
91 | type = hasRequiredFields ? itc.getTypeNonNull().getType() : itc.getType();
92 | }
93 |
94 | this.args = {
95 | input: {
96 | type,
97 | },
98 | };
99 | }
100 |
101 | this.args.config = {
102 | type: AwsConfigITC.getType(),
103 | };
104 | }
105 |
106 | return this.args;
107 | }
108 |
109 | getResolve(): GraphQLFieldResolver {
110 | return (source: any, args: { [argument: string]: any }) => {
111 | return new Promise((resolve, reject) => {
112 | const awsConfig = {
113 | ...(source && source.awsConfig),
114 | ...(args && args.config),
115 | };
116 | const service = new this.awsSDK[this.serviceId](awsConfig);
117 | service[this.name](args.input, (err: any, data: any) => {
118 | if (err) {
119 | reject(err);
120 | }
121 | resolve(data);
122 | });
123 | });
124 | };
125 | }
126 |
127 | getFieldConfig(): GraphQLFieldConfig {
128 | return {
129 | type: this.getType(),
130 | args: this.getArgs(),
131 | resolve: this.getResolve(),
132 | };
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/src/AwsShapes.ts:
--------------------------------------------------------------------------------
1 | import { ComposeOutputTypeDefinition, ComposeInputTypeDefinition } from 'graphql-compose';
2 | import { AwsParam, Param } from './AwsParam';
3 |
4 | export type ShapesMap = {
5 | [name: string]: Param;
6 | };
7 |
8 | export class AwsShapes {
9 | shapes: ShapesMap;
10 | prefix: string;
11 | shapesInput: { [name: string]: ComposeInputTypeDefinition };
12 | shapesOutput: { [name: string]: ComposeOutputTypeDefinition };
13 |
14 | constructor(shapes: ShapesMap, prefix: string) {
15 | this.shapes = shapes;
16 | this.prefix = prefix;
17 | this.shapesInput = {};
18 | this.shapesOutput = {};
19 | }
20 |
21 | getInputShape(name: string): ComposeInputTypeDefinition {
22 | if (!this.shapesInput[name]) {
23 | if (!this.shapes[name]) {
24 | throw new Error(`Shape with name '${name}' not found in service config ${this.prefix}`);
25 | }
26 |
27 | // store firstly as JSON, for solving recursion calls
28 | this.shapesInput[name] = 'JSON';
29 | this.shapesInput[name] = AwsParam.convertParamInput(
30 | this.shapes[name],
31 | `${this.prefix}${name}`,
32 | this
33 | );
34 | }
35 |
36 | return this.shapesInput[name];
37 | }
38 |
39 | getOutputShape(name: string): ComposeOutputTypeDefinition {
40 | if (!this.shapesOutput[name]) {
41 | if (!this.shapes[name]) {
42 | throw new Error(`Shape with name '${name}' not found in service config ${this.prefix}`);
43 | }
44 |
45 | // store firstly as JSON, for solving recursion calls
46 | this.shapesOutput[name] = 'JSON';
47 | this.shapesOutput[name] = AwsParam.convertParamOutput(
48 | this.shapes[name],
49 | `${this.prefix}${name}`,
50 | this
51 | );
52 | }
53 |
54 | return this.shapesOutput[name];
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/__mocks__/s3-2006-03-01.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "metadata": {
4 | "apiVersion": "2006-03-01",
5 | "checksumFormat": "md5",
6 | "endpointPrefix": "s3",
7 | "globalEndpoint": "s3.amazonaws.com",
8 | "protocol": "rest-xml",
9 | "serviceAbbreviation": "Amazon S3",
10 | "serviceFullName": "Amazon Simple Storage Service",
11 | "serviceId": "S3",
12 | "signatureVersion": "s3",
13 | "timestampFormat": "rfc822",
14 | "uid": "s3-2006-03-01"
15 | },
16 | "operations": {
17 | "AbortMultipartUpload": {
18 | "http": {
19 | "method": "DELETE",
20 | "requestUri": "/{Bucket}/{Key+}"
21 | },
22 | "input": {
23 | "type": "structure",
24 | "required": [
25 | "Bucket",
26 | "Key",
27 | "UploadId"
28 | ],
29 | "members": {
30 | "Bucket": {
31 | "location": "uri",
32 | "locationName": "Bucket"
33 | },
34 | "Key": {
35 | "location": "uri",
36 | "locationName": "Key"
37 | },
38 | "UploadId": {
39 | "location": "querystring",
40 | "locationName": "uploadId"
41 | },
42 | "RequestPayer": {
43 | "location": "header",
44 | "locationName": "x-amz-request-payer"
45 | }
46 | }
47 | },
48 | "output": {
49 | "type": "structure",
50 | "members": {
51 | "RequestCharged": {
52 | "location": "header",
53 | "locationName": "x-amz-request-charged"
54 | }
55 | }
56 | }
57 | },
58 | "CompleteMultipartUpload": {
59 | "http": {
60 | "requestUri": "/{Bucket}/{Key+}"
61 | },
62 | "input": {
63 | "type": "structure",
64 | "required": [
65 | "Bucket",
66 | "Key",
67 | "UploadId"
68 | ],
69 | "members": {
70 | "Bucket": {
71 | "location": "uri",
72 | "locationName": "Bucket"
73 | },
74 | "Key": {
75 | "location": "uri",
76 | "locationName": "Key"
77 | },
78 | "MultipartUpload": {
79 | "locationName": "CompleteMultipartUpload",
80 | "xmlNamespace": {
81 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
82 | },
83 | "type": "structure",
84 | "members": {
85 | "Parts": {
86 | "locationName": "Part",
87 | "type": "list",
88 | "member": {
89 | "type": "structure",
90 | "members": {
91 | "ETag": {},
92 | "PartNumber": {
93 | "type": "integer"
94 | }
95 | }
96 | },
97 | "flattened": true
98 | }
99 | }
100 | },
101 | "UploadId": {
102 | "location": "querystring",
103 | "locationName": "uploadId"
104 | },
105 | "RequestPayer": {
106 | "location": "header",
107 | "locationName": "x-amz-request-payer"
108 | }
109 | },
110 | "payload": "MultipartUpload"
111 | },
112 | "output": {
113 | "type": "structure",
114 | "members": {
115 | "Location": {},
116 | "Bucket": {},
117 | "Key": {},
118 | "Expiration": {
119 | "location": "header",
120 | "locationName": "x-amz-expiration"
121 | },
122 | "ETag": {},
123 | "ServerSideEncryption": {
124 | "location": "header",
125 | "locationName": "x-amz-server-side-encryption"
126 | },
127 | "VersionId": {
128 | "location": "header",
129 | "locationName": "x-amz-version-id"
130 | },
131 | "SSEKMSKeyId": {
132 | "shape": "Sj",
133 | "location": "header",
134 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
135 | },
136 | "RequestCharged": {
137 | "location": "header",
138 | "locationName": "x-amz-request-charged"
139 | }
140 | }
141 | }
142 | },
143 | "CopyObject": {
144 | "http": {
145 | "method": "PUT",
146 | "requestUri": "/{Bucket}/{Key+}"
147 | },
148 | "input": {
149 | "type": "structure",
150 | "required": [
151 | "Bucket",
152 | "CopySource",
153 | "Key"
154 | ],
155 | "members": {
156 | "ACL": {
157 | "location": "header",
158 | "locationName": "x-amz-acl"
159 | },
160 | "Bucket": {
161 | "location": "uri",
162 | "locationName": "Bucket"
163 | },
164 | "CacheControl": {
165 | "location": "header",
166 | "locationName": "Cache-Control"
167 | },
168 | "ContentDisposition": {
169 | "location": "header",
170 | "locationName": "Content-Disposition"
171 | },
172 | "ContentEncoding": {
173 | "location": "header",
174 | "locationName": "Content-Encoding"
175 | },
176 | "ContentLanguage": {
177 | "location": "header",
178 | "locationName": "Content-Language"
179 | },
180 | "ContentType": {
181 | "location": "header",
182 | "locationName": "Content-Type"
183 | },
184 | "CopySource": {
185 | "location": "header",
186 | "locationName": "x-amz-copy-source"
187 | },
188 | "CopySourceIfMatch": {
189 | "location": "header",
190 | "locationName": "x-amz-copy-source-if-match"
191 | },
192 | "CopySourceIfModifiedSince": {
193 | "location": "header",
194 | "locationName": "x-amz-copy-source-if-modified-since",
195 | "type": "timestamp"
196 | },
197 | "CopySourceIfNoneMatch": {
198 | "location": "header",
199 | "locationName": "x-amz-copy-source-if-none-match"
200 | },
201 | "CopySourceIfUnmodifiedSince": {
202 | "location": "header",
203 | "locationName": "x-amz-copy-source-if-unmodified-since",
204 | "type": "timestamp"
205 | },
206 | "Expires": {
207 | "location": "header",
208 | "locationName": "Expires",
209 | "type": "timestamp"
210 | },
211 | "GrantFullControl": {
212 | "location": "header",
213 | "locationName": "x-amz-grant-full-control"
214 | },
215 | "GrantRead": {
216 | "location": "header",
217 | "locationName": "x-amz-grant-read"
218 | },
219 | "GrantReadACP": {
220 | "location": "header",
221 | "locationName": "x-amz-grant-read-acp"
222 | },
223 | "GrantWriteACP": {
224 | "location": "header",
225 | "locationName": "x-amz-grant-write-acp"
226 | },
227 | "Key": {
228 | "location": "uri",
229 | "locationName": "Key"
230 | },
231 | "Metadata": {
232 | "shape": "S11",
233 | "location": "headers",
234 | "locationName": "x-amz-meta-"
235 | },
236 | "MetadataDirective": {
237 | "location": "header",
238 | "locationName": "x-amz-metadata-directive"
239 | },
240 | "TaggingDirective": {
241 | "location": "header",
242 | "locationName": "x-amz-tagging-directive"
243 | },
244 | "ServerSideEncryption": {
245 | "location": "header",
246 | "locationName": "x-amz-server-side-encryption"
247 | },
248 | "StorageClass": {
249 | "location": "header",
250 | "locationName": "x-amz-storage-class"
251 | },
252 | "WebsiteRedirectLocation": {
253 | "location": "header",
254 | "locationName": "x-amz-website-redirect-location"
255 | },
256 | "SSECustomerAlgorithm": {
257 | "location": "header",
258 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
259 | },
260 | "SSECustomerKey": {
261 | "shape": "S19",
262 | "location": "header",
263 | "locationName": "x-amz-server-side-encryption-customer-key"
264 | },
265 | "SSECustomerKeyMD5": {
266 | "location": "header",
267 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
268 | },
269 | "SSEKMSKeyId": {
270 | "shape": "Sj",
271 | "location": "header",
272 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
273 | },
274 | "CopySourceSSECustomerAlgorithm": {
275 | "location": "header",
276 | "locationName": "x-amz-copy-source-server-side-encryption-customer-algorithm"
277 | },
278 | "CopySourceSSECustomerKey": {
279 | "shape": "S1c",
280 | "location": "header",
281 | "locationName": "x-amz-copy-source-server-side-encryption-customer-key"
282 | },
283 | "CopySourceSSECustomerKeyMD5": {
284 | "location": "header",
285 | "locationName": "x-amz-copy-source-server-side-encryption-customer-key-MD5"
286 | },
287 | "RequestPayer": {
288 | "location": "header",
289 | "locationName": "x-amz-request-payer"
290 | },
291 | "Tagging": {
292 | "location": "header",
293 | "locationName": "x-amz-tagging"
294 | }
295 | }
296 | },
297 | "output": {
298 | "type": "structure",
299 | "members": {
300 | "CopyObjectResult": {
301 | "type": "structure",
302 | "members": {
303 | "ETag": {},
304 | "LastModified": {
305 | "type": "timestamp"
306 | }
307 | }
308 | },
309 | "Expiration": {
310 | "location": "header",
311 | "locationName": "x-amz-expiration"
312 | },
313 | "CopySourceVersionId": {
314 | "location": "header",
315 | "locationName": "x-amz-copy-source-version-id"
316 | },
317 | "VersionId": {
318 | "location": "header",
319 | "locationName": "x-amz-version-id"
320 | },
321 | "ServerSideEncryption": {
322 | "location": "header",
323 | "locationName": "x-amz-server-side-encryption"
324 | },
325 | "SSECustomerAlgorithm": {
326 | "location": "header",
327 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
328 | },
329 | "SSECustomerKeyMD5": {
330 | "location": "header",
331 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
332 | },
333 | "SSEKMSKeyId": {
334 | "shape": "Sj",
335 | "location": "header",
336 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
337 | },
338 | "RequestCharged": {
339 | "location": "header",
340 | "locationName": "x-amz-request-charged"
341 | }
342 | },
343 | "payload": "CopyObjectResult"
344 | },
345 | "alias": "PutObjectCopy"
346 | },
347 | "CreateBucket": {
348 | "http": {
349 | "method": "PUT",
350 | "requestUri": "/{Bucket}"
351 | },
352 | "input": {
353 | "type": "structure",
354 | "required": [
355 | "Bucket"
356 | ],
357 | "members": {
358 | "ACL": {
359 | "location": "header",
360 | "locationName": "x-amz-acl"
361 | },
362 | "Bucket": {
363 | "location": "uri",
364 | "locationName": "Bucket"
365 | },
366 | "CreateBucketConfiguration": {
367 | "locationName": "CreateBucketConfiguration",
368 | "xmlNamespace": {
369 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
370 | },
371 | "type": "structure",
372 | "members": {
373 | "LocationConstraint": {}
374 | }
375 | },
376 | "GrantFullControl": {
377 | "location": "header",
378 | "locationName": "x-amz-grant-full-control"
379 | },
380 | "GrantRead": {
381 | "location": "header",
382 | "locationName": "x-amz-grant-read"
383 | },
384 | "GrantReadACP": {
385 | "location": "header",
386 | "locationName": "x-amz-grant-read-acp"
387 | },
388 | "GrantWrite": {
389 | "location": "header",
390 | "locationName": "x-amz-grant-write"
391 | },
392 | "GrantWriteACP": {
393 | "location": "header",
394 | "locationName": "x-amz-grant-write-acp"
395 | }
396 | },
397 | "payload": "CreateBucketConfiguration"
398 | },
399 | "output": {
400 | "type": "structure",
401 | "members": {
402 | "Location": {
403 | "location": "header",
404 | "locationName": "Location"
405 | }
406 | }
407 | },
408 | "alias": "PutBucket"
409 | },
410 | "CreateMultipartUpload": {
411 | "http": {
412 | "requestUri": "/{Bucket}/{Key+}?uploads"
413 | },
414 | "input": {
415 | "type": "structure",
416 | "required": [
417 | "Bucket",
418 | "Key"
419 | ],
420 | "members": {
421 | "ACL": {
422 | "location": "header",
423 | "locationName": "x-amz-acl"
424 | },
425 | "Bucket": {
426 | "location": "uri",
427 | "locationName": "Bucket"
428 | },
429 | "CacheControl": {
430 | "location": "header",
431 | "locationName": "Cache-Control"
432 | },
433 | "ContentDisposition": {
434 | "location": "header",
435 | "locationName": "Content-Disposition"
436 | },
437 | "ContentEncoding": {
438 | "location": "header",
439 | "locationName": "Content-Encoding"
440 | },
441 | "ContentLanguage": {
442 | "location": "header",
443 | "locationName": "Content-Language"
444 | },
445 | "ContentType": {
446 | "location": "header",
447 | "locationName": "Content-Type"
448 | },
449 | "Expires": {
450 | "location": "header",
451 | "locationName": "Expires",
452 | "type": "timestamp"
453 | },
454 | "GrantFullControl": {
455 | "location": "header",
456 | "locationName": "x-amz-grant-full-control"
457 | },
458 | "GrantRead": {
459 | "location": "header",
460 | "locationName": "x-amz-grant-read"
461 | },
462 | "GrantReadACP": {
463 | "location": "header",
464 | "locationName": "x-amz-grant-read-acp"
465 | },
466 | "GrantWriteACP": {
467 | "location": "header",
468 | "locationName": "x-amz-grant-write-acp"
469 | },
470 | "Key": {
471 | "location": "uri",
472 | "locationName": "Key"
473 | },
474 | "Metadata": {
475 | "shape": "S11",
476 | "location": "headers",
477 | "locationName": "x-amz-meta-"
478 | },
479 | "ServerSideEncryption": {
480 | "location": "header",
481 | "locationName": "x-amz-server-side-encryption"
482 | },
483 | "StorageClass": {
484 | "location": "header",
485 | "locationName": "x-amz-storage-class"
486 | },
487 | "WebsiteRedirectLocation": {
488 | "location": "header",
489 | "locationName": "x-amz-website-redirect-location"
490 | },
491 | "SSECustomerAlgorithm": {
492 | "location": "header",
493 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
494 | },
495 | "SSECustomerKey": {
496 | "shape": "S19",
497 | "location": "header",
498 | "locationName": "x-amz-server-side-encryption-customer-key"
499 | },
500 | "SSECustomerKeyMD5": {
501 | "location": "header",
502 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
503 | },
504 | "SSEKMSKeyId": {
505 | "shape": "Sj",
506 | "location": "header",
507 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
508 | },
509 | "RequestPayer": {
510 | "location": "header",
511 | "locationName": "x-amz-request-payer"
512 | },
513 | "Tagging": {
514 | "location": "header",
515 | "locationName": "x-amz-tagging"
516 | }
517 | }
518 | },
519 | "output": {
520 | "type": "structure",
521 | "members": {
522 | "AbortDate": {
523 | "location": "header",
524 | "locationName": "x-amz-abort-date",
525 | "type": "timestamp"
526 | },
527 | "AbortRuleId": {
528 | "location": "header",
529 | "locationName": "x-amz-abort-rule-id"
530 | },
531 | "Bucket": {
532 | "locationName": "Bucket"
533 | },
534 | "Key": {},
535 | "UploadId": {},
536 | "ServerSideEncryption": {
537 | "location": "header",
538 | "locationName": "x-amz-server-side-encryption"
539 | },
540 | "SSECustomerAlgorithm": {
541 | "location": "header",
542 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
543 | },
544 | "SSECustomerKeyMD5": {
545 | "location": "header",
546 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
547 | },
548 | "SSEKMSKeyId": {
549 | "shape": "Sj",
550 | "location": "header",
551 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
552 | },
553 | "RequestCharged": {
554 | "location": "header",
555 | "locationName": "x-amz-request-charged"
556 | }
557 | }
558 | },
559 | "alias": "InitiateMultipartUpload"
560 | },
561 | "DeleteBucket": {
562 | "http": {
563 | "method": "DELETE",
564 | "requestUri": "/{Bucket}"
565 | },
566 | "input": {
567 | "type": "structure",
568 | "required": [
569 | "Bucket"
570 | ],
571 | "members": {
572 | "Bucket": {
573 | "location": "uri",
574 | "locationName": "Bucket"
575 | }
576 | }
577 | }
578 | },
579 | "DeleteBucketAnalyticsConfiguration": {
580 | "http": {
581 | "method": "DELETE",
582 | "requestUri": "/{Bucket}?analytics"
583 | },
584 | "input": {
585 | "type": "structure",
586 | "required": [
587 | "Bucket",
588 | "Id"
589 | ],
590 | "members": {
591 | "Bucket": {
592 | "location": "uri",
593 | "locationName": "Bucket"
594 | },
595 | "Id": {
596 | "location": "querystring",
597 | "locationName": "id"
598 | }
599 | }
600 | }
601 | },
602 | "DeleteBucketCors": {
603 | "http": {
604 | "method": "DELETE",
605 | "requestUri": "/{Bucket}?cors"
606 | },
607 | "input": {
608 | "type": "structure",
609 | "required": [
610 | "Bucket"
611 | ],
612 | "members": {
613 | "Bucket": {
614 | "location": "uri",
615 | "locationName": "Bucket"
616 | }
617 | }
618 | }
619 | },
620 | "DeleteBucketEncryption": {
621 | "http": {
622 | "method": "DELETE",
623 | "requestUri": "/{Bucket}?encryption"
624 | },
625 | "input": {
626 | "type": "structure",
627 | "required": [
628 | "Bucket"
629 | ],
630 | "members": {
631 | "Bucket": {
632 | "location": "uri",
633 | "locationName": "Bucket"
634 | }
635 | }
636 | }
637 | },
638 | "DeleteBucketInventoryConfiguration": {
639 | "http": {
640 | "method": "DELETE",
641 | "requestUri": "/{Bucket}?inventory"
642 | },
643 | "input": {
644 | "type": "structure",
645 | "required": [
646 | "Bucket",
647 | "Id"
648 | ],
649 | "members": {
650 | "Bucket": {
651 | "location": "uri",
652 | "locationName": "Bucket"
653 | },
654 | "Id": {
655 | "location": "querystring",
656 | "locationName": "id"
657 | }
658 | }
659 | }
660 | },
661 | "DeleteBucketLifecycle": {
662 | "http": {
663 | "method": "DELETE",
664 | "requestUri": "/{Bucket}?lifecycle"
665 | },
666 | "input": {
667 | "type": "structure",
668 | "required": [
669 | "Bucket"
670 | ],
671 | "members": {
672 | "Bucket": {
673 | "location": "uri",
674 | "locationName": "Bucket"
675 | }
676 | }
677 | }
678 | },
679 | "DeleteBucketMetricsConfiguration": {
680 | "http": {
681 | "method": "DELETE",
682 | "requestUri": "/{Bucket}?metrics"
683 | },
684 | "input": {
685 | "type": "structure",
686 | "required": [
687 | "Bucket",
688 | "Id"
689 | ],
690 | "members": {
691 | "Bucket": {
692 | "location": "uri",
693 | "locationName": "Bucket"
694 | },
695 | "Id": {
696 | "location": "querystring",
697 | "locationName": "id"
698 | }
699 | }
700 | }
701 | },
702 | "DeleteBucketPolicy": {
703 | "http": {
704 | "method": "DELETE",
705 | "requestUri": "/{Bucket}?policy"
706 | },
707 | "input": {
708 | "type": "structure",
709 | "required": [
710 | "Bucket"
711 | ],
712 | "members": {
713 | "Bucket": {
714 | "location": "uri",
715 | "locationName": "Bucket"
716 | }
717 | }
718 | }
719 | },
720 | "DeleteBucketReplication": {
721 | "http": {
722 | "method": "DELETE",
723 | "requestUri": "/{Bucket}?replication"
724 | },
725 | "input": {
726 | "type": "structure",
727 | "required": [
728 | "Bucket"
729 | ],
730 | "members": {
731 | "Bucket": {
732 | "location": "uri",
733 | "locationName": "Bucket"
734 | }
735 | }
736 | }
737 | },
738 | "DeleteBucketTagging": {
739 | "http": {
740 | "method": "DELETE",
741 | "requestUri": "/{Bucket}?tagging"
742 | },
743 | "input": {
744 | "type": "structure",
745 | "required": [
746 | "Bucket"
747 | ],
748 | "members": {
749 | "Bucket": {
750 | "location": "uri",
751 | "locationName": "Bucket"
752 | }
753 | }
754 | }
755 | },
756 | "DeleteBucketWebsite": {
757 | "http": {
758 | "method": "DELETE",
759 | "requestUri": "/{Bucket}?website"
760 | },
761 | "input": {
762 | "type": "structure",
763 | "required": [
764 | "Bucket"
765 | ],
766 | "members": {
767 | "Bucket": {
768 | "location": "uri",
769 | "locationName": "Bucket"
770 | }
771 | }
772 | }
773 | },
774 | "DeleteObject": {
775 | "http": {
776 | "method": "DELETE",
777 | "requestUri": "/{Bucket}/{Key+}"
778 | },
779 | "input": {
780 | "type": "structure",
781 | "required": [
782 | "Bucket",
783 | "Key"
784 | ],
785 | "members": {
786 | "Bucket": {
787 | "location": "uri",
788 | "locationName": "Bucket"
789 | },
790 | "Key": {
791 | "location": "uri",
792 | "locationName": "Key"
793 | },
794 | "MFA": {
795 | "location": "header",
796 | "locationName": "x-amz-mfa"
797 | },
798 | "VersionId": {
799 | "location": "querystring",
800 | "locationName": "versionId"
801 | },
802 | "RequestPayer": {
803 | "location": "header",
804 | "locationName": "x-amz-request-payer"
805 | }
806 | }
807 | },
808 | "output": {
809 | "type": "structure",
810 | "members": {
811 | "DeleteMarker": {
812 | "location": "header",
813 | "locationName": "x-amz-delete-marker",
814 | "type": "boolean"
815 | },
816 | "VersionId": {
817 | "location": "header",
818 | "locationName": "x-amz-version-id"
819 | },
820 | "RequestCharged": {
821 | "location": "header",
822 | "locationName": "x-amz-request-charged"
823 | }
824 | }
825 | }
826 | },
827 | "DeleteObjectTagging": {
828 | "http": {
829 | "method": "DELETE",
830 | "requestUri": "/{Bucket}/{Key+}?tagging"
831 | },
832 | "input": {
833 | "type": "structure",
834 | "required": [
835 | "Bucket",
836 | "Key"
837 | ],
838 | "members": {
839 | "Bucket": {
840 | "location": "uri",
841 | "locationName": "Bucket"
842 | },
843 | "Key": {
844 | "location": "uri",
845 | "locationName": "Key"
846 | },
847 | "VersionId": {
848 | "location": "querystring",
849 | "locationName": "versionId"
850 | }
851 | }
852 | },
853 | "output": {
854 | "type": "structure",
855 | "members": {
856 | "VersionId": {
857 | "location": "header",
858 | "locationName": "x-amz-version-id"
859 | }
860 | }
861 | }
862 | },
863 | "DeleteObjects": {
864 | "http": {
865 | "requestUri": "/{Bucket}?delete"
866 | },
867 | "input": {
868 | "type": "structure",
869 | "required": [
870 | "Bucket",
871 | "Delete"
872 | ],
873 | "members": {
874 | "Bucket": {
875 | "location": "uri",
876 | "locationName": "Bucket"
877 | },
878 | "Delete": {
879 | "locationName": "Delete",
880 | "xmlNamespace": {
881 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
882 | },
883 | "type": "structure",
884 | "required": [
885 | "Objects"
886 | ],
887 | "members": {
888 | "Objects": {
889 | "locationName": "Object",
890 | "type": "list",
891 | "member": {
892 | "type": "structure",
893 | "required": [
894 | "Key"
895 | ],
896 | "members": {
897 | "Key": {},
898 | "VersionId": {}
899 | }
900 | },
901 | "flattened": true
902 | },
903 | "Quiet": {
904 | "type": "boolean"
905 | }
906 | }
907 | },
908 | "MFA": {
909 | "location": "header",
910 | "locationName": "x-amz-mfa"
911 | },
912 | "RequestPayer": {
913 | "location": "header",
914 | "locationName": "x-amz-request-payer"
915 | }
916 | },
917 | "payload": "Delete"
918 | },
919 | "output": {
920 | "type": "structure",
921 | "members": {
922 | "Deleted": {
923 | "type": "list",
924 | "member": {
925 | "type": "structure",
926 | "members": {
927 | "Key": {},
928 | "VersionId": {},
929 | "DeleteMarker": {
930 | "type": "boolean"
931 | },
932 | "DeleteMarkerVersionId": {}
933 | }
934 | },
935 | "flattened": true
936 | },
937 | "RequestCharged": {
938 | "location": "header",
939 | "locationName": "x-amz-request-charged"
940 | },
941 | "Errors": {
942 | "locationName": "Error",
943 | "type": "list",
944 | "member": {
945 | "type": "structure",
946 | "members": {
947 | "Key": {},
948 | "VersionId": {},
949 | "Code": {},
950 | "Message": {}
951 | }
952 | },
953 | "flattened": true
954 | }
955 | }
956 | },
957 | "alias": "DeleteMultipleObjects"
958 | },
959 | "GetBucketAccelerateConfiguration": {
960 | "http": {
961 | "method": "GET",
962 | "requestUri": "/{Bucket}?accelerate"
963 | },
964 | "input": {
965 | "type": "structure",
966 | "required": [
967 | "Bucket"
968 | ],
969 | "members": {
970 | "Bucket": {
971 | "location": "uri",
972 | "locationName": "Bucket"
973 | }
974 | }
975 | },
976 | "output": {
977 | "type": "structure",
978 | "members": {
979 | "Status": {}
980 | }
981 | }
982 | },
983 | "GetBucketAcl": {
984 | "http": {
985 | "method": "GET",
986 | "requestUri": "/{Bucket}?acl"
987 | },
988 | "input": {
989 | "type": "structure",
990 | "required": [
991 | "Bucket"
992 | ],
993 | "members": {
994 | "Bucket": {
995 | "location": "uri",
996 | "locationName": "Bucket"
997 | }
998 | }
999 | },
1000 | "output": {
1001 | "type": "structure",
1002 | "members": {
1003 | "Owner": {
1004 | "shape": "S2v"
1005 | },
1006 | "Grants": {
1007 | "shape": "S2y",
1008 | "locationName": "AccessControlList"
1009 | }
1010 | }
1011 | }
1012 | },
1013 | "GetBucketAnalyticsConfiguration": {
1014 | "http": {
1015 | "method": "GET",
1016 | "requestUri": "/{Bucket}?analytics"
1017 | },
1018 | "input": {
1019 | "type": "structure",
1020 | "required": [
1021 | "Bucket",
1022 | "Id"
1023 | ],
1024 | "members": {
1025 | "Bucket": {
1026 | "location": "uri",
1027 | "locationName": "Bucket"
1028 | },
1029 | "Id": {
1030 | "location": "querystring",
1031 | "locationName": "id"
1032 | }
1033 | }
1034 | },
1035 | "output": {
1036 | "type": "structure",
1037 | "members": {
1038 | "AnalyticsConfiguration": {
1039 | "shape": "S37"
1040 | }
1041 | },
1042 | "payload": "AnalyticsConfiguration"
1043 | }
1044 | },
1045 | "GetBucketCors": {
1046 | "http": {
1047 | "method": "GET",
1048 | "requestUri": "/{Bucket}?cors"
1049 | },
1050 | "input": {
1051 | "type": "structure",
1052 | "required": [
1053 | "Bucket"
1054 | ],
1055 | "members": {
1056 | "Bucket": {
1057 | "location": "uri",
1058 | "locationName": "Bucket"
1059 | }
1060 | }
1061 | },
1062 | "output": {
1063 | "type": "structure",
1064 | "members": {
1065 | "CORSRules": {
1066 | "shape": "S3n",
1067 | "locationName": "CORSRule"
1068 | }
1069 | }
1070 | }
1071 | },
1072 | "GetBucketEncryption": {
1073 | "http": {
1074 | "method": "GET",
1075 | "requestUri": "/{Bucket}?encryption"
1076 | },
1077 | "input": {
1078 | "type": "structure",
1079 | "required": [
1080 | "Bucket"
1081 | ],
1082 | "members": {
1083 | "Bucket": {
1084 | "location": "uri",
1085 | "locationName": "Bucket"
1086 | }
1087 | }
1088 | },
1089 | "output": {
1090 | "type": "structure",
1091 | "members": {
1092 | "ServerSideEncryptionConfiguration": {
1093 | "shape": "S40"
1094 | }
1095 | },
1096 | "payload": "ServerSideEncryptionConfiguration"
1097 | }
1098 | },
1099 | "GetBucketInventoryConfiguration": {
1100 | "http": {
1101 | "method": "GET",
1102 | "requestUri": "/{Bucket}?inventory"
1103 | },
1104 | "input": {
1105 | "type": "structure",
1106 | "required": [
1107 | "Bucket",
1108 | "Id"
1109 | ],
1110 | "members": {
1111 | "Bucket": {
1112 | "location": "uri",
1113 | "locationName": "Bucket"
1114 | },
1115 | "Id": {
1116 | "location": "querystring",
1117 | "locationName": "id"
1118 | }
1119 | }
1120 | },
1121 | "output": {
1122 | "type": "structure",
1123 | "members": {
1124 | "InventoryConfiguration": {
1125 | "shape": "S46"
1126 | }
1127 | },
1128 | "payload": "InventoryConfiguration"
1129 | }
1130 | },
1131 | "GetBucketLifecycle": {
1132 | "http": {
1133 | "method": "GET",
1134 | "requestUri": "/{Bucket}?lifecycle"
1135 | },
1136 | "input": {
1137 | "type": "structure",
1138 | "required": [
1139 | "Bucket"
1140 | ],
1141 | "members": {
1142 | "Bucket": {
1143 | "location": "uri",
1144 | "locationName": "Bucket"
1145 | }
1146 | }
1147 | },
1148 | "output": {
1149 | "type": "structure",
1150 | "members": {
1151 | "Rules": {
1152 | "shape": "S4m",
1153 | "locationName": "Rule"
1154 | }
1155 | }
1156 | },
1157 | "deprecated": true
1158 | },
1159 | "GetBucketLifecycleConfiguration": {
1160 | "http": {
1161 | "method": "GET",
1162 | "requestUri": "/{Bucket}?lifecycle"
1163 | },
1164 | "input": {
1165 | "type": "structure",
1166 | "required": [
1167 | "Bucket"
1168 | ],
1169 | "members": {
1170 | "Bucket": {
1171 | "location": "uri",
1172 | "locationName": "Bucket"
1173 | }
1174 | }
1175 | },
1176 | "output": {
1177 | "type": "structure",
1178 | "members": {
1179 | "Rules": {
1180 | "shape": "S51",
1181 | "locationName": "Rule"
1182 | }
1183 | }
1184 | }
1185 | },
1186 | "GetBucketLocation": {
1187 | "http": {
1188 | "method": "GET",
1189 | "requestUri": "/{Bucket}?location"
1190 | },
1191 | "input": {
1192 | "type": "structure",
1193 | "required": [
1194 | "Bucket"
1195 | ],
1196 | "members": {
1197 | "Bucket": {
1198 | "location": "uri",
1199 | "locationName": "Bucket"
1200 | }
1201 | }
1202 | },
1203 | "output": {
1204 | "type": "structure",
1205 | "members": {
1206 | "LocationConstraint": {}
1207 | }
1208 | }
1209 | },
1210 | "GetBucketLogging": {
1211 | "http": {
1212 | "method": "GET",
1213 | "requestUri": "/{Bucket}?logging"
1214 | },
1215 | "input": {
1216 | "type": "structure",
1217 | "required": [
1218 | "Bucket"
1219 | ],
1220 | "members": {
1221 | "Bucket": {
1222 | "location": "uri",
1223 | "locationName": "Bucket"
1224 | }
1225 | }
1226 | },
1227 | "output": {
1228 | "type": "structure",
1229 | "members": {
1230 | "LoggingEnabled": {
1231 | "shape": "S5b"
1232 | }
1233 | }
1234 | }
1235 | },
1236 | "GetBucketMetricsConfiguration": {
1237 | "http": {
1238 | "method": "GET",
1239 | "requestUri": "/{Bucket}?metrics"
1240 | },
1241 | "input": {
1242 | "type": "structure",
1243 | "required": [
1244 | "Bucket",
1245 | "Id"
1246 | ],
1247 | "members": {
1248 | "Bucket": {
1249 | "location": "uri",
1250 | "locationName": "Bucket"
1251 | },
1252 | "Id": {
1253 | "location": "querystring",
1254 | "locationName": "id"
1255 | }
1256 | }
1257 | },
1258 | "output": {
1259 | "type": "structure",
1260 | "members": {
1261 | "MetricsConfiguration": {
1262 | "shape": "S5j"
1263 | }
1264 | },
1265 | "payload": "MetricsConfiguration"
1266 | }
1267 | },
1268 | "GetBucketNotification": {
1269 | "http": {
1270 | "method": "GET",
1271 | "requestUri": "/{Bucket}?notification"
1272 | },
1273 | "input": {
1274 | "shape": "S5m"
1275 | },
1276 | "output": {
1277 | "shape": "S5n"
1278 | },
1279 | "deprecated": true
1280 | },
1281 | "GetBucketNotificationConfiguration": {
1282 | "http": {
1283 | "method": "GET",
1284 | "requestUri": "/{Bucket}?notification"
1285 | },
1286 | "input": {
1287 | "shape": "S5m"
1288 | },
1289 | "output": {
1290 | "shape": "S5y"
1291 | }
1292 | },
1293 | "GetBucketPolicy": {
1294 | "http": {
1295 | "method": "GET",
1296 | "requestUri": "/{Bucket}?policy"
1297 | },
1298 | "input": {
1299 | "type": "structure",
1300 | "required": [
1301 | "Bucket"
1302 | ],
1303 | "members": {
1304 | "Bucket": {
1305 | "location": "uri",
1306 | "locationName": "Bucket"
1307 | }
1308 | }
1309 | },
1310 | "output": {
1311 | "type": "structure",
1312 | "members": {
1313 | "Policy": {}
1314 | },
1315 | "payload": "Policy"
1316 | }
1317 | },
1318 | "GetBucketReplication": {
1319 | "http": {
1320 | "method": "GET",
1321 | "requestUri": "/{Bucket}?replication"
1322 | },
1323 | "input": {
1324 | "type": "structure",
1325 | "required": [
1326 | "Bucket"
1327 | ],
1328 | "members": {
1329 | "Bucket": {
1330 | "location": "uri",
1331 | "locationName": "Bucket"
1332 | }
1333 | }
1334 | },
1335 | "output": {
1336 | "type": "structure",
1337 | "members": {
1338 | "ReplicationConfiguration": {
1339 | "shape": "S6h"
1340 | }
1341 | },
1342 | "payload": "ReplicationConfiguration"
1343 | }
1344 | },
1345 | "GetBucketRequestPayment": {
1346 | "http": {
1347 | "method": "GET",
1348 | "requestUri": "/{Bucket}?requestPayment"
1349 | },
1350 | "input": {
1351 | "type": "structure",
1352 | "required": [
1353 | "Bucket"
1354 | ],
1355 | "members": {
1356 | "Bucket": {
1357 | "location": "uri",
1358 | "locationName": "Bucket"
1359 | }
1360 | }
1361 | },
1362 | "output": {
1363 | "type": "structure",
1364 | "members": {
1365 | "Payer": {}
1366 | }
1367 | }
1368 | },
1369 | "GetBucketTagging": {
1370 | "http": {
1371 | "method": "GET",
1372 | "requestUri": "/{Bucket}?tagging"
1373 | },
1374 | "input": {
1375 | "type": "structure",
1376 | "required": [
1377 | "Bucket"
1378 | ],
1379 | "members": {
1380 | "Bucket": {
1381 | "location": "uri",
1382 | "locationName": "Bucket"
1383 | }
1384 | }
1385 | },
1386 | "output": {
1387 | "type": "structure",
1388 | "required": [
1389 | "TagSet"
1390 | ],
1391 | "members": {
1392 | "TagSet": {
1393 | "shape": "S3d"
1394 | }
1395 | }
1396 | }
1397 | },
1398 | "GetBucketVersioning": {
1399 | "http": {
1400 | "method": "GET",
1401 | "requestUri": "/{Bucket}?versioning"
1402 | },
1403 | "input": {
1404 | "type": "structure",
1405 | "required": [
1406 | "Bucket"
1407 | ],
1408 | "members": {
1409 | "Bucket": {
1410 | "location": "uri",
1411 | "locationName": "Bucket"
1412 | }
1413 | }
1414 | },
1415 | "output": {
1416 | "type": "structure",
1417 | "members": {
1418 | "Status": {},
1419 | "MFADelete": {
1420 | "locationName": "MfaDelete"
1421 | }
1422 | }
1423 | }
1424 | },
1425 | "GetBucketWebsite": {
1426 | "http": {
1427 | "method": "GET",
1428 | "requestUri": "/{Bucket}?website"
1429 | },
1430 | "input": {
1431 | "type": "structure",
1432 | "required": [
1433 | "Bucket"
1434 | ],
1435 | "members": {
1436 | "Bucket": {
1437 | "location": "uri",
1438 | "locationName": "Bucket"
1439 | }
1440 | }
1441 | },
1442 | "output": {
1443 | "type": "structure",
1444 | "members": {
1445 | "RedirectAllRequestsTo": {
1446 | "shape": "S75"
1447 | },
1448 | "IndexDocument": {
1449 | "shape": "S78"
1450 | },
1451 | "ErrorDocument": {
1452 | "shape": "S7a"
1453 | },
1454 | "RoutingRules": {
1455 | "shape": "S7b"
1456 | }
1457 | }
1458 | }
1459 | },
1460 | "GetObject": {
1461 | "http": {
1462 | "method": "GET",
1463 | "requestUri": "/{Bucket}/{Key+}"
1464 | },
1465 | "input": {
1466 | "type": "structure",
1467 | "required": [
1468 | "Bucket",
1469 | "Key"
1470 | ],
1471 | "members": {
1472 | "Bucket": {
1473 | "location": "uri",
1474 | "locationName": "Bucket"
1475 | },
1476 | "IfMatch": {
1477 | "location": "header",
1478 | "locationName": "If-Match"
1479 | },
1480 | "IfModifiedSince": {
1481 | "location": "header",
1482 | "locationName": "If-Modified-Since",
1483 | "type": "timestamp"
1484 | },
1485 | "IfNoneMatch": {
1486 | "location": "header",
1487 | "locationName": "If-None-Match"
1488 | },
1489 | "IfUnmodifiedSince": {
1490 | "location": "header",
1491 | "locationName": "If-Unmodified-Since",
1492 | "type": "timestamp"
1493 | },
1494 | "Key": {
1495 | "location": "uri",
1496 | "locationName": "Key"
1497 | },
1498 | "Range": {
1499 | "location": "header",
1500 | "locationName": "Range"
1501 | },
1502 | "ResponseCacheControl": {
1503 | "location": "querystring",
1504 | "locationName": "response-cache-control"
1505 | },
1506 | "ResponseContentDisposition": {
1507 | "location": "querystring",
1508 | "locationName": "response-content-disposition"
1509 | },
1510 | "ResponseContentEncoding": {
1511 | "location": "querystring",
1512 | "locationName": "response-content-encoding"
1513 | },
1514 | "ResponseContentLanguage": {
1515 | "location": "querystring",
1516 | "locationName": "response-content-language"
1517 | },
1518 | "ResponseContentType": {
1519 | "location": "querystring",
1520 | "locationName": "response-content-type"
1521 | },
1522 | "ResponseExpires": {
1523 | "location": "querystring",
1524 | "locationName": "response-expires",
1525 | "type": "timestamp"
1526 | },
1527 | "VersionId": {
1528 | "location": "querystring",
1529 | "locationName": "versionId"
1530 | },
1531 | "SSECustomerAlgorithm": {
1532 | "location": "header",
1533 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
1534 | },
1535 | "SSECustomerKey": {
1536 | "shape": "S19",
1537 | "location": "header",
1538 | "locationName": "x-amz-server-side-encryption-customer-key"
1539 | },
1540 | "SSECustomerKeyMD5": {
1541 | "location": "header",
1542 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
1543 | },
1544 | "RequestPayer": {
1545 | "location": "header",
1546 | "locationName": "x-amz-request-payer"
1547 | },
1548 | "PartNumber": {
1549 | "location": "querystring",
1550 | "locationName": "partNumber",
1551 | "type": "integer"
1552 | }
1553 | }
1554 | },
1555 | "output": {
1556 | "type": "structure",
1557 | "members": {
1558 | "Body": {
1559 | "streaming": true,
1560 | "type": "blob"
1561 | },
1562 | "DeleteMarker": {
1563 | "location": "header",
1564 | "locationName": "x-amz-delete-marker",
1565 | "type": "boolean"
1566 | },
1567 | "AcceptRanges": {
1568 | "location": "header",
1569 | "locationName": "accept-ranges"
1570 | },
1571 | "Expiration": {
1572 | "location": "header",
1573 | "locationName": "x-amz-expiration"
1574 | },
1575 | "Restore": {
1576 | "location": "header",
1577 | "locationName": "x-amz-restore"
1578 | },
1579 | "LastModified": {
1580 | "location": "header",
1581 | "locationName": "Last-Modified",
1582 | "type": "timestamp"
1583 | },
1584 | "ContentLength": {
1585 | "location": "header",
1586 | "locationName": "Content-Length",
1587 | "type": "long"
1588 | },
1589 | "ETag": {
1590 | "location": "header",
1591 | "locationName": "ETag"
1592 | },
1593 | "MissingMeta": {
1594 | "location": "header",
1595 | "locationName": "x-amz-missing-meta",
1596 | "type": "integer"
1597 | },
1598 | "VersionId": {
1599 | "location": "header",
1600 | "locationName": "x-amz-version-id"
1601 | },
1602 | "CacheControl": {
1603 | "location": "header",
1604 | "locationName": "Cache-Control"
1605 | },
1606 | "ContentDisposition": {
1607 | "location": "header",
1608 | "locationName": "Content-Disposition"
1609 | },
1610 | "ContentEncoding": {
1611 | "location": "header",
1612 | "locationName": "Content-Encoding"
1613 | },
1614 | "ContentLanguage": {
1615 | "location": "header",
1616 | "locationName": "Content-Language"
1617 | },
1618 | "ContentRange": {
1619 | "location": "header",
1620 | "locationName": "Content-Range"
1621 | },
1622 | "ContentType": {
1623 | "location": "header",
1624 | "locationName": "Content-Type"
1625 | },
1626 | "Expires": {
1627 | "location": "header",
1628 | "locationName": "Expires",
1629 | "type": "timestamp"
1630 | },
1631 | "WebsiteRedirectLocation": {
1632 | "location": "header",
1633 | "locationName": "x-amz-website-redirect-location"
1634 | },
1635 | "ServerSideEncryption": {
1636 | "location": "header",
1637 | "locationName": "x-amz-server-side-encryption"
1638 | },
1639 | "Metadata": {
1640 | "shape": "S11",
1641 | "location": "headers",
1642 | "locationName": "x-amz-meta-"
1643 | },
1644 | "SSECustomerAlgorithm": {
1645 | "location": "header",
1646 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
1647 | },
1648 | "SSECustomerKeyMD5": {
1649 | "location": "header",
1650 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
1651 | },
1652 | "SSEKMSKeyId": {
1653 | "shape": "Sj",
1654 | "location": "header",
1655 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
1656 | },
1657 | "StorageClass": {
1658 | "location": "header",
1659 | "locationName": "x-amz-storage-class"
1660 | },
1661 | "RequestCharged": {
1662 | "location": "header",
1663 | "locationName": "x-amz-request-charged"
1664 | },
1665 | "ReplicationStatus": {
1666 | "location": "header",
1667 | "locationName": "x-amz-replication-status"
1668 | },
1669 | "PartsCount": {
1670 | "location": "header",
1671 | "locationName": "x-amz-mp-parts-count",
1672 | "type": "integer"
1673 | },
1674 | "TagCount": {
1675 | "location": "header",
1676 | "locationName": "x-amz-tagging-count",
1677 | "type": "integer"
1678 | }
1679 | },
1680 | "payload": "Body"
1681 | }
1682 | },
1683 | "GetObjectAcl": {
1684 | "http": {
1685 | "method": "GET",
1686 | "requestUri": "/{Bucket}/{Key+}?acl"
1687 | },
1688 | "input": {
1689 | "type": "structure",
1690 | "required": [
1691 | "Bucket",
1692 | "Key"
1693 | ],
1694 | "members": {
1695 | "Bucket": {
1696 | "location": "uri",
1697 | "locationName": "Bucket"
1698 | },
1699 | "Key": {
1700 | "location": "uri",
1701 | "locationName": "Key"
1702 | },
1703 | "VersionId": {
1704 | "location": "querystring",
1705 | "locationName": "versionId"
1706 | },
1707 | "RequestPayer": {
1708 | "location": "header",
1709 | "locationName": "x-amz-request-payer"
1710 | }
1711 | }
1712 | },
1713 | "output": {
1714 | "type": "structure",
1715 | "members": {
1716 | "Owner": {
1717 | "shape": "S2v"
1718 | },
1719 | "Grants": {
1720 | "shape": "S2y",
1721 | "locationName": "AccessControlList"
1722 | },
1723 | "RequestCharged": {
1724 | "location": "header",
1725 | "locationName": "x-amz-request-charged"
1726 | }
1727 | }
1728 | }
1729 | },
1730 | "GetObjectTagging": {
1731 | "http": {
1732 | "method": "GET",
1733 | "requestUri": "/{Bucket}/{Key+}?tagging"
1734 | },
1735 | "input": {
1736 | "type": "structure",
1737 | "required": [
1738 | "Bucket",
1739 | "Key"
1740 | ],
1741 | "members": {
1742 | "Bucket": {
1743 | "location": "uri",
1744 | "locationName": "Bucket"
1745 | },
1746 | "Key": {
1747 | "location": "uri",
1748 | "locationName": "Key"
1749 | },
1750 | "VersionId": {
1751 | "location": "querystring",
1752 | "locationName": "versionId"
1753 | }
1754 | }
1755 | },
1756 | "output": {
1757 | "type": "structure",
1758 | "required": [
1759 | "TagSet"
1760 | ],
1761 | "members": {
1762 | "VersionId": {
1763 | "location": "header",
1764 | "locationName": "x-amz-version-id"
1765 | },
1766 | "TagSet": {
1767 | "shape": "S3d"
1768 | }
1769 | }
1770 | }
1771 | },
1772 | "GetObjectTorrent": {
1773 | "http": {
1774 | "method": "GET",
1775 | "requestUri": "/{Bucket}/{Key+}?torrent"
1776 | },
1777 | "input": {
1778 | "type": "structure",
1779 | "required": [
1780 | "Bucket",
1781 | "Key"
1782 | ],
1783 | "members": {
1784 | "Bucket": {
1785 | "location": "uri",
1786 | "locationName": "Bucket"
1787 | },
1788 | "Key": {
1789 | "location": "uri",
1790 | "locationName": "Key"
1791 | },
1792 | "RequestPayer": {
1793 | "location": "header",
1794 | "locationName": "x-amz-request-payer"
1795 | }
1796 | }
1797 | },
1798 | "output": {
1799 | "type": "structure",
1800 | "members": {
1801 | "Body": {
1802 | "streaming": true,
1803 | "type": "blob"
1804 | },
1805 | "RequestCharged": {
1806 | "location": "header",
1807 | "locationName": "x-amz-request-charged"
1808 | }
1809 | },
1810 | "payload": "Body"
1811 | }
1812 | },
1813 | "HeadBucket": {
1814 | "http": {
1815 | "method": "HEAD",
1816 | "requestUri": "/{Bucket}"
1817 | },
1818 | "input": {
1819 | "type": "structure",
1820 | "required": [
1821 | "Bucket"
1822 | ],
1823 | "members": {
1824 | "Bucket": {
1825 | "location": "uri",
1826 | "locationName": "Bucket"
1827 | }
1828 | }
1829 | }
1830 | },
1831 | "HeadObject": {
1832 | "http": {
1833 | "method": "HEAD",
1834 | "requestUri": "/{Bucket}/{Key+}"
1835 | },
1836 | "input": {
1837 | "type": "structure",
1838 | "required": [
1839 | "Bucket",
1840 | "Key"
1841 | ],
1842 | "members": {
1843 | "Bucket": {
1844 | "location": "uri",
1845 | "locationName": "Bucket"
1846 | },
1847 | "IfMatch": {
1848 | "location": "header",
1849 | "locationName": "If-Match"
1850 | },
1851 | "IfModifiedSince": {
1852 | "location": "header",
1853 | "locationName": "If-Modified-Since",
1854 | "type": "timestamp"
1855 | },
1856 | "IfNoneMatch": {
1857 | "location": "header",
1858 | "locationName": "If-None-Match"
1859 | },
1860 | "IfUnmodifiedSince": {
1861 | "location": "header",
1862 | "locationName": "If-Unmodified-Since",
1863 | "type": "timestamp"
1864 | },
1865 | "Key": {
1866 | "location": "uri",
1867 | "locationName": "Key"
1868 | },
1869 | "Range": {
1870 | "location": "header",
1871 | "locationName": "Range"
1872 | },
1873 | "VersionId": {
1874 | "location": "querystring",
1875 | "locationName": "versionId"
1876 | },
1877 | "SSECustomerAlgorithm": {
1878 | "location": "header",
1879 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
1880 | },
1881 | "SSECustomerKey": {
1882 | "shape": "S19",
1883 | "location": "header",
1884 | "locationName": "x-amz-server-side-encryption-customer-key"
1885 | },
1886 | "SSECustomerKeyMD5": {
1887 | "location": "header",
1888 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
1889 | },
1890 | "RequestPayer": {
1891 | "location": "header",
1892 | "locationName": "x-amz-request-payer"
1893 | },
1894 | "PartNumber": {
1895 | "location": "querystring",
1896 | "locationName": "partNumber",
1897 | "type": "integer"
1898 | }
1899 | }
1900 | },
1901 | "output": {
1902 | "type": "structure",
1903 | "members": {
1904 | "DeleteMarker": {
1905 | "location": "header",
1906 | "locationName": "x-amz-delete-marker",
1907 | "type": "boolean"
1908 | },
1909 | "AcceptRanges": {
1910 | "location": "header",
1911 | "locationName": "accept-ranges"
1912 | },
1913 | "Expiration": {
1914 | "location": "header",
1915 | "locationName": "x-amz-expiration"
1916 | },
1917 | "Restore": {
1918 | "location": "header",
1919 | "locationName": "x-amz-restore"
1920 | },
1921 | "LastModified": {
1922 | "location": "header",
1923 | "locationName": "Last-Modified",
1924 | "type": "timestamp"
1925 | },
1926 | "ContentLength": {
1927 | "location": "header",
1928 | "locationName": "Content-Length",
1929 | "type": "long"
1930 | },
1931 | "ETag": {
1932 | "location": "header",
1933 | "locationName": "ETag"
1934 | },
1935 | "MissingMeta": {
1936 | "location": "header",
1937 | "locationName": "x-amz-missing-meta",
1938 | "type": "integer"
1939 | },
1940 | "VersionId": {
1941 | "location": "header",
1942 | "locationName": "x-amz-version-id"
1943 | },
1944 | "CacheControl": {
1945 | "location": "header",
1946 | "locationName": "Cache-Control"
1947 | },
1948 | "ContentDisposition": {
1949 | "location": "header",
1950 | "locationName": "Content-Disposition"
1951 | },
1952 | "ContentEncoding": {
1953 | "location": "header",
1954 | "locationName": "Content-Encoding"
1955 | },
1956 | "ContentLanguage": {
1957 | "location": "header",
1958 | "locationName": "Content-Language"
1959 | },
1960 | "ContentType": {
1961 | "location": "header",
1962 | "locationName": "Content-Type"
1963 | },
1964 | "Expires": {
1965 | "location": "header",
1966 | "locationName": "Expires",
1967 | "type": "timestamp"
1968 | },
1969 | "WebsiteRedirectLocation": {
1970 | "location": "header",
1971 | "locationName": "x-amz-website-redirect-location"
1972 | },
1973 | "ServerSideEncryption": {
1974 | "location": "header",
1975 | "locationName": "x-amz-server-side-encryption"
1976 | },
1977 | "Metadata": {
1978 | "shape": "S11",
1979 | "location": "headers",
1980 | "locationName": "x-amz-meta-"
1981 | },
1982 | "SSECustomerAlgorithm": {
1983 | "location": "header",
1984 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
1985 | },
1986 | "SSECustomerKeyMD5": {
1987 | "location": "header",
1988 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
1989 | },
1990 | "SSEKMSKeyId": {
1991 | "shape": "Sj",
1992 | "location": "header",
1993 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
1994 | },
1995 | "StorageClass": {
1996 | "location": "header",
1997 | "locationName": "x-amz-storage-class"
1998 | },
1999 | "RequestCharged": {
2000 | "location": "header",
2001 | "locationName": "x-amz-request-charged"
2002 | },
2003 | "ReplicationStatus": {
2004 | "location": "header",
2005 | "locationName": "x-amz-replication-status"
2006 | },
2007 | "PartsCount": {
2008 | "location": "header",
2009 | "locationName": "x-amz-mp-parts-count",
2010 | "type": "integer"
2011 | }
2012 | }
2013 | }
2014 | },
2015 | "ListBucketAnalyticsConfigurations": {
2016 | "http": {
2017 | "method": "GET",
2018 | "requestUri": "/{Bucket}?analytics"
2019 | },
2020 | "input": {
2021 | "type": "structure",
2022 | "required": [
2023 | "Bucket"
2024 | ],
2025 | "members": {
2026 | "Bucket": {
2027 | "location": "uri",
2028 | "locationName": "Bucket"
2029 | },
2030 | "ContinuationToken": {
2031 | "location": "querystring",
2032 | "locationName": "continuation-token"
2033 | }
2034 | }
2035 | },
2036 | "output": {
2037 | "type": "structure",
2038 | "members": {
2039 | "IsTruncated": {
2040 | "type": "boolean"
2041 | },
2042 | "ContinuationToken": {},
2043 | "NextContinuationToken": {},
2044 | "AnalyticsConfigurationList": {
2045 | "locationName": "AnalyticsConfiguration",
2046 | "type": "list",
2047 | "member": {
2048 | "shape": "S37"
2049 | },
2050 | "flattened": true
2051 | }
2052 | }
2053 | }
2054 | },
2055 | "ListBucketInventoryConfigurations": {
2056 | "http": {
2057 | "method": "GET",
2058 | "requestUri": "/{Bucket}?inventory"
2059 | },
2060 | "input": {
2061 | "type": "structure",
2062 | "required": [
2063 | "Bucket"
2064 | ],
2065 | "members": {
2066 | "Bucket": {
2067 | "location": "uri",
2068 | "locationName": "Bucket"
2069 | },
2070 | "ContinuationToken": {
2071 | "location": "querystring",
2072 | "locationName": "continuation-token"
2073 | }
2074 | }
2075 | },
2076 | "output": {
2077 | "type": "structure",
2078 | "members": {
2079 | "ContinuationToken": {},
2080 | "InventoryConfigurationList": {
2081 | "locationName": "InventoryConfiguration",
2082 | "type": "list",
2083 | "member": {
2084 | "shape": "S46"
2085 | },
2086 | "flattened": true
2087 | },
2088 | "IsTruncated": {
2089 | "type": "boolean"
2090 | },
2091 | "NextContinuationToken": {}
2092 | }
2093 | }
2094 | },
2095 | "ListBucketMetricsConfigurations": {
2096 | "http": {
2097 | "method": "GET",
2098 | "requestUri": "/{Bucket}?metrics"
2099 | },
2100 | "input": {
2101 | "type": "structure",
2102 | "required": [
2103 | "Bucket"
2104 | ],
2105 | "members": {
2106 | "Bucket": {
2107 | "location": "uri",
2108 | "locationName": "Bucket"
2109 | },
2110 | "ContinuationToken": {
2111 | "location": "querystring",
2112 | "locationName": "continuation-token"
2113 | }
2114 | }
2115 | },
2116 | "output": {
2117 | "type": "structure",
2118 | "members": {
2119 | "IsTruncated": {
2120 | "type": "boolean"
2121 | },
2122 | "ContinuationToken": {},
2123 | "NextContinuationToken": {},
2124 | "MetricsConfigurationList": {
2125 | "locationName": "MetricsConfiguration",
2126 | "type": "list",
2127 | "member": {
2128 | "shape": "S5j"
2129 | },
2130 | "flattened": true
2131 | }
2132 | }
2133 | }
2134 | },
2135 | "ListBuckets": {
2136 | "http": {
2137 | "method": "GET"
2138 | },
2139 | "output": {
2140 | "type": "structure",
2141 | "members": {
2142 | "Buckets": {
2143 | "type": "list",
2144 | "member": {
2145 | "locationName": "Bucket",
2146 | "type": "structure",
2147 | "members": {
2148 | "Name": {},
2149 | "CreationDate": {
2150 | "type": "timestamp"
2151 | }
2152 | }
2153 | }
2154 | },
2155 | "Owner": {
2156 | "shape": "S2v"
2157 | }
2158 | }
2159 | },
2160 | "alias": "GetService"
2161 | },
2162 | "ListMultipartUploads": {
2163 | "http": {
2164 | "method": "GET",
2165 | "requestUri": "/{Bucket}?uploads"
2166 | },
2167 | "input": {
2168 | "type": "structure",
2169 | "required": [
2170 | "Bucket"
2171 | ],
2172 | "members": {
2173 | "Bucket": {
2174 | "location": "uri",
2175 | "locationName": "Bucket"
2176 | },
2177 | "Delimiter": {
2178 | "location": "querystring",
2179 | "locationName": "delimiter"
2180 | },
2181 | "EncodingType": {
2182 | "location": "querystring",
2183 | "locationName": "encoding-type"
2184 | },
2185 | "KeyMarker": {
2186 | "location": "querystring",
2187 | "locationName": "key-marker"
2188 | },
2189 | "MaxUploads": {
2190 | "location": "querystring",
2191 | "locationName": "max-uploads",
2192 | "type": "integer"
2193 | },
2194 | "Prefix": {
2195 | "location": "querystring",
2196 | "locationName": "prefix"
2197 | },
2198 | "UploadIdMarker": {
2199 | "location": "querystring",
2200 | "locationName": "upload-id-marker"
2201 | }
2202 | }
2203 | },
2204 | "output": {
2205 | "type": "structure",
2206 | "members": {
2207 | "Bucket": {},
2208 | "KeyMarker": {},
2209 | "UploadIdMarker": {},
2210 | "NextKeyMarker": {},
2211 | "Prefix": {},
2212 | "Delimiter": {},
2213 | "NextUploadIdMarker": {},
2214 | "MaxUploads": {
2215 | "type": "integer"
2216 | },
2217 | "IsTruncated": {
2218 | "type": "boolean"
2219 | },
2220 | "Uploads": {
2221 | "locationName": "Upload",
2222 | "type": "list",
2223 | "member": {
2224 | "type": "structure",
2225 | "members": {
2226 | "UploadId": {},
2227 | "Key": {},
2228 | "Initiated": {
2229 | "type": "timestamp"
2230 | },
2231 | "StorageClass": {},
2232 | "Owner": {
2233 | "shape": "S2v"
2234 | },
2235 | "Initiator": {
2236 | "shape": "S97"
2237 | }
2238 | }
2239 | },
2240 | "flattened": true
2241 | },
2242 | "CommonPrefixes": {
2243 | "shape": "S98"
2244 | },
2245 | "EncodingType": {}
2246 | }
2247 | }
2248 | },
2249 | "ListObjectVersions": {
2250 | "http": {
2251 | "method": "GET",
2252 | "requestUri": "/{Bucket}?versions"
2253 | },
2254 | "input": {
2255 | "type": "structure",
2256 | "required": [
2257 | "Bucket"
2258 | ],
2259 | "members": {
2260 | "Bucket": {
2261 | "location": "uri",
2262 | "locationName": "Bucket"
2263 | },
2264 | "Delimiter": {
2265 | "location": "querystring",
2266 | "locationName": "delimiter"
2267 | },
2268 | "EncodingType": {
2269 | "location": "querystring",
2270 | "locationName": "encoding-type"
2271 | },
2272 | "KeyMarker": {
2273 | "location": "querystring",
2274 | "locationName": "key-marker"
2275 | },
2276 | "MaxKeys": {
2277 | "location": "querystring",
2278 | "locationName": "max-keys",
2279 | "type": "integer"
2280 | },
2281 | "Prefix": {
2282 | "location": "querystring",
2283 | "locationName": "prefix"
2284 | },
2285 | "VersionIdMarker": {
2286 | "location": "querystring",
2287 | "locationName": "version-id-marker"
2288 | }
2289 | }
2290 | },
2291 | "output": {
2292 | "type": "structure",
2293 | "members": {
2294 | "IsTruncated": {
2295 | "type": "boolean"
2296 | },
2297 | "KeyMarker": {},
2298 | "VersionIdMarker": {},
2299 | "NextKeyMarker": {},
2300 | "NextVersionIdMarker": {},
2301 | "Versions": {
2302 | "locationName": "Version",
2303 | "type": "list",
2304 | "member": {
2305 | "type": "structure",
2306 | "members": {
2307 | "ETag": {},
2308 | "Size": {
2309 | "type": "integer"
2310 | },
2311 | "StorageClass": {},
2312 | "Key": {},
2313 | "VersionId": {},
2314 | "IsLatest": {
2315 | "type": "boolean"
2316 | },
2317 | "LastModified": {
2318 | "type": "timestamp"
2319 | },
2320 | "Owner": {
2321 | "shape": "S2v"
2322 | }
2323 | }
2324 | },
2325 | "flattened": true
2326 | },
2327 | "DeleteMarkers": {
2328 | "locationName": "DeleteMarker",
2329 | "type": "list",
2330 | "member": {
2331 | "type": "structure",
2332 | "members": {
2333 | "Owner": {
2334 | "shape": "S2v"
2335 | },
2336 | "Key": {},
2337 | "VersionId": {},
2338 | "IsLatest": {
2339 | "type": "boolean"
2340 | },
2341 | "LastModified": {
2342 | "type": "timestamp"
2343 | }
2344 | }
2345 | },
2346 | "flattened": true
2347 | },
2348 | "Name": {},
2349 | "Prefix": {},
2350 | "Delimiter": {},
2351 | "MaxKeys": {
2352 | "type": "integer"
2353 | },
2354 | "CommonPrefixes": {
2355 | "shape": "S98"
2356 | },
2357 | "EncodingType": {}
2358 | }
2359 | },
2360 | "alias": "GetBucketObjectVersions"
2361 | },
2362 | "ListObjects": {
2363 | "http": {
2364 | "method": "GET",
2365 | "requestUri": "/{Bucket}"
2366 | },
2367 | "input": {
2368 | "type": "structure",
2369 | "required": [
2370 | "Bucket"
2371 | ],
2372 | "members": {
2373 | "Bucket": {
2374 | "location": "uri",
2375 | "locationName": "Bucket"
2376 | },
2377 | "Delimiter": {
2378 | "location": "querystring",
2379 | "locationName": "delimiter"
2380 | },
2381 | "EncodingType": {
2382 | "location": "querystring",
2383 | "locationName": "encoding-type"
2384 | },
2385 | "Marker": {
2386 | "location": "querystring",
2387 | "locationName": "marker"
2388 | },
2389 | "MaxKeys": {
2390 | "location": "querystring",
2391 | "locationName": "max-keys",
2392 | "type": "integer"
2393 | },
2394 | "Prefix": {
2395 | "location": "querystring",
2396 | "locationName": "prefix"
2397 | },
2398 | "RequestPayer": {
2399 | "location": "header",
2400 | "locationName": "x-amz-request-payer"
2401 | }
2402 | }
2403 | },
2404 | "output": {
2405 | "type": "structure",
2406 | "members": {
2407 | "IsTruncated": {
2408 | "type": "boolean"
2409 | },
2410 | "Marker": {},
2411 | "NextMarker": {},
2412 | "Contents": {
2413 | "shape": "S9q"
2414 | },
2415 | "Name": {},
2416 | "Prefix": {},
2417 | "Delimiter": {},
2418 | "MaxKeys": {
2419 | "type": "integer"
2420 | },
2421 | "CommonPrefixes": {
2422 | "shape": "S98"
2423 | },
2424 | "EncodingType": {}
2425 | }
2426 | },
2427 | "alias": "GetBucket"
2428 | },
2429 | "ListObjectsV2": {
2430 | "http": {
2431 | "method": "GET",
2432 | "requestUri": "/{Bucket}?list-type=2"
2433 | },
2434 | "input": {
2435 | "type": "structure",
2436 | "required": [
2437 | "Bucket"
2438 | ],
2439 | "members": {
2440 | "Bucket": {
2441 | "location": "uri",
2442 | "locationName": "Bucket"
2443 | },
2444 | "Delimiter": {
2445 | "location": "querystring",
2446 | "locationName": "delimiter"
2447 | },
2448 | "EncodingType": {
2449 | "location": "querystring",
2450 | "locationName": "encoding-type"
2451 | },
2452 | "MaxKeys": {
2453 | "location": "querystring",
2454 | "locationName": "max-keys",
2455 | "type": "integer"
2456 | },
2457 | "Prefix": {
2458 | "location": "querystring",
2459 | "locationName": "prefix"
2460 | },
2461 | "ContinuationToken": {
2462 | "location": "querystring",
2463 | "locationName": "continuation-token"
2464 | },
2465 | "FetchOwner": {
2466 | "location": "querystring",
2467 | "locationName": "fetch-owner",
2468 | "type": "boolean"
2469 | },
2470 | "StartAfter": {
2471 | "location": "querystring",
2472 | "locationName": "start-after"
2473 | },
2474 | "RequestPayer": {
2475 | "location": "header",
2476 | "locationName": "x-amz-request-payer"
2477 | }
2478 | }
2479 | },
2480 | "output": {
2481 | "type": "structure",
2482 | "members": {
2483 | "IsTruncated": {
2484 | "type": "boolean"
2485 | },
2486 | "Contents": {
2487 | "shape": "S9q"
2488 | },
2489 | "Name": {},
2490 | "Prefix": {},
2491 | "Delimiter": {},
2492 | "MaxKeys": {
2493 | "type": "integer"
2494 | },
2495 | "CommonPrefixes": {
2496 | "shape": "S98"
2497 | },
2498 | "EncodingType": {},
2499 | "KeyCount": {
2500 | "type": "integer"
2501 | },
2502 | "ContinuationToken": {},
2503 | "NextContinuationToken": {},
2504 | "StartAfter": {}
2505 | }
2506 | }
2507 | },
2508 | "ListParts": {
2509 | "http": {
2510 | "method": "GET",
2511 | "requestUri": "/{Bucket}/{Key+}"
2512 | },
2513 | "input": {
2514 | "type": "structure",
2515 | "required": [
2516 | "Bucket",
2517 | "Key",
2518 | "UploadId"
2519 | ],
2520 | "members": {
2521 | "Bucket": {
2522 | "location": "uri",
2523 | "locationName": "Bucket"
2524 | },
2525 | "Key": {
2526 | "location": "uri",
2527 | "locationName": "Key"
2528 | },
2529 | "MaxParts": {
2530 | "location": "querystring",
2531 | "locationName": "max-parts",
2532 | "type": "integer"
2533 | },
2534 | "PartNumberMarker": {
2535 | "location": "querystring",
2536 | "locationName": "part-number-marker",
2537 | "type": "integer"
2538 | },
2539 | "UploadId": {
2540 | "location": "querystring",
2541 | "locationName": "uploadId"
2542 | },
2543 | "RequestPayer": {
2544 | "location": "header",
2545 | "locationName": "x-amz-request-payer"
2546 | }
2547 | }
2548 | },
2549 | "output": {
2550 | "type": "structure",
2551 | "members": {
2552 | "AbortDate": {
2553 | "location": "header",
2554 | "locationName": "x-amz-abort-date",
2555 | "type": "timestamp"
2556 | },
2557 | "AbortRuleId": {
2558 | "location": "header",
2559 | "locationName": "x-amz-abort-rule-id"
2560 | },
2561 | "Bucket": {},
2562 | "Key": {},
2563 | "UploadId": {},
2564 | "PartNumberMarker": {
2565 | "type": "integer"
2566 | },
2567 | "NextPartNumberMarker": {
2568 | "type": "integer"
2569 | },
2570 | "MaxParts": {
2571 | "type": "integer"
2572 | },
2573 | "IsTruncated": {
2574 | "type": "boolean"
2575 | },
2576 | "Parts": {
2577 | "locationName": "Part",
2578 | "type": "list",
2579 | "member": {
2580 | "type": "structure",
2581 | "members": {
2582 | "PartNumber": {
2583 | "type": "integer"
2584 | },
2585 | "LastModified": {
2586 | "type": "timestamp"
2587 | },
2588 | "ETag": {},
2589 | "Size": {
2590 | "type": "integer"
2591 | }
2592 | }
2593 | },
2594 | "flattened": true
2595 | },
2596 | "Initiator": {
2597 | "shape": "S97"
2598 | },
2599 | "Owner": {
2600 | "shape": "S2v"
2601 | },
2602 | "StorageClass": {},
2603 | "RequestCharged": {
2604 | "location": "header",
2605 | "locationName": "x-amz-request-charged"
2606 | }
2607 | }
2608 | }
2609 | },
2610 | "PutBucketAccelerateConfiguration": {
2611 | "http": {
2612 | "method": "PUT",
2613 | "requestUri": "/{Bucket}?accelerate"
2614 | },
2615 | "input": {
2616 | "type": "structure",
2617 | "required": [
2618 | "Bucket",
2619 | "AccelerateConfiguration"
2620 | ],
2621 | "members": {
2622 | "Bucket": {
2623 | "location": "uri",
2624 | "locationName": "Bucket"
2625 | },
2626 | "AccelerateConfiguration": {
2627 | "locationName": "AccelerateConfiguration",
2628 | "xmlNamespace": {
2629 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2630 | },
2631 | "type": "structure",
2632 | "members": {
2633 | "Status": {}
2634 | }
2635 | }
2636 | },
2637 | "payload": "AccelerateConfiguration"
2638 | }
2639 | },
2640 | "PutBucketAcl": {
2641 | "http": {
2642 | "method": "PUT",
2643 | "requestUri": "/{Bucket}?acl"
2644 | },
2645 | "input": {
2646 | "type": "structure",
2647 | "required": [
2648 | "Bucket"
2649 | ],
2650 | "members": {
2651 | "ACL": {
2652 | "location": "header",
2653 | "locationName": "x-amz-acl"
2654 | },
2655 | "AccessControlPolicy": {
2656 | "shape": "Sa8",
2657 | "locationName": "AccessControlPolicy",
2658 | "xmlNamespace": {
2659 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2660 | }
2661 | },
2662 | "Bucket": {
2663 | "location": "uri",
2664 | "locationName": "Bucket"
2665 | },
2666 | "ContentMD5": {
2667 | "location": "header",
2668 | "locationName": "Content-MD5"
2669 | },
2670 | "GrantFullControl": {
2671 | "location": "header",
2672 | "locationName": "x-amz-grant-full-control"
2673 | },
2674 | "GrantRead": {
2675 | "location": "header",
2676 | "locationName": "x-amz-grant-read"
2677 | },
2678 | "GrantReadACP": {
2679 | "location": "header",
2680 | "locationName": "x-amz-grant-read-acp"
2681 | },
2682 | "GrantWrite": {
2683 | "location": "header",
2684 | "locationName": "x-amz-grant-write"
2685 | },
2686 | "GrantWriteACP": {
2687 | "location": "header",
2688 | "locationName": "x-amz-grant-write-acp"
2689 | }
2690 | },
2691 | "payload": "AccessControlPolicy"
2692 | }
2693 | },
2694 | "PutBucketAnalyticsConfiguration": {
2695 | "http": {
2696 | "method": "PUT",
2697 | "requestUri": "/{Bucket}?analytics"
2698 | },
2699 | "input": {
2700 | "type": "structure",
2701 | "required": [
2702 | "Bucket",
2703 | "Id",
2704 | "AnalyticsConfiguration"
2705 | ],
2706 | "members": {
2707 | "Bucket": {
2708 | "location": "uri",
2709 | "locationName": "Bucket"
2710 | },
2711 | "Id": {
2712 | "location": "querystring",
2713 | "locationName": "id"
2714 | },
2715 | "AnalyticsConfiguration": {
2716 | "shape": "S37",
2717 | "locationName": "AnalyticsConfiguration",
2718 | "xmlNamespace": {
2719 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2720 | }
2721 | }
2722 | },
2723 | "payload": "AnalyticsConfiguration"
2724 | }
2725 | },
2726 | "PutBucketCors": {
2727 | "http": {
2728 | "method": "PUT",
2729 | "requestUri": "/{Bucket}?cors"
2730 | },
2731 | "input": {
2732 | "type": "structure",
2733 | "required": [
2734 | "Bucket",
2735 | "CORSConfiguration"
2736 | ],
2737 | "members": {
2738 | "Bucket": {
2739 | "location": "uri",
2740 | "locationName": "Bucket"
2741 | },
2742 | "CORSConfiguration": {
2743 | "locationName": "CORSConfiguration",
2744 | "xmlNamespace": {
2745 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2746 | },
2747 | "type": "structure",
2748 | "required": [
2749 | "CORSRules"
2750 | ],
2751 | "members": {
2752 | "CORSRules": {
2753 | "shape": "S3n",
2754 | "locationName": "CORSRule"
2755 | }
2756 | }
2757 | },
2758 | "ContentMD5": {
2759 | "location": "header",
2760 | "locationName": "Content-MD5"
2761 | }
2762 | },
2763 | "payload": "CORSConfiguration"
2764 | }
2765 | },
2766 | "PutBucketEncryption": {
2767 | "http": {
2768 | "method": "PUT",
2769 | "requestUri": "/{Bucket}?encryption"
2770 | },
2771 | "input": {
2772 | "type": "structure",
2773 | "required": [
2774 | "Bucket",
2775 | "ServerSideEncryptionConfiguration"
2776 | ],
2777 | "members": {
2778 | "Bucket": {
2779 | "location": "uri",
2780 | "locationName": "Bucket"
2781 | },
2782 | "ContentMD5": {
2783 | "location": "header",
2784 | "locationName": "Content-MD5"
2785 | },
2786 | "ServerSideEncryptionConfiguration": {
2787 | "shape": "S40",
2788 | "locationName": "ServerSideEncryptionConfiguration",
2789 | "xmlNamespace": {
2790 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2791 | }
2792 | }
2793 | },
2794 | "payload": "ServerSideEncryptionConfiguration"
2795 | }
2796 | },
2797 | "PutBucketInventoryConfiguration": {
2798 | "http": {
2799 | "method": "PUT",
2800 | "requestUri": "/{Bucket}?inventory"
2801 | },
2802 | "input": {
2803 | "type": "structure",
2804 | "required": [
2805 | "Bucket",
2806 | "Id",
2807 | "InventoryConfiguration"
2808 | ],
2809 | "members": {
2810 | "Bucket": {
2811 | "location": "uri",
2812 | "locationName": "Bucket"
2813 | },
2814 | "Id": {
2815 | "location": "querystring",
2816 | "locationName": "id"
2817 | },
2818 | "InventoryConfiguration": {
2819 | "shape": "S46",
2820 | "locationName": "InventoryConfiguration",
2821 | "xmlNamespace": {
2822 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2823 | }
2824 | }
2825 | },
2826 | "payload": "InventoryConfiguration"
2827 | }
2828 | },
2829 | "PutBucketLifecycle": {
2830 | "http": {
2831 | "method": "PUT",
2832 | "requestUri": "/{Bucket}?lifecycle"
2833 | },
2834 | "input": {
2835 | "type": "structure",
2836 | "required": [
2837 | "Bucket"
2838 | ],
2839 | "members": {
2840 | "Bucket": {
2841 | "location": "uri",
2842 | "locationName": "Bucket"
2843 | },
2844 | "ContentMD5": {
2845 | "location": "header",
2846 | "locationName": "Content-MD5"
2847 | },
2848 | "LifecycleConfiguration": {
2849 | "locationName": "LifecycleConfiguration",
2850 | "xmlNamespace": {
2851 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2852 | },
2853 | "type": "structure",
2854 | "required": [
2855 | "Rules"
2856 | ],
2857 | "members": {
2858 | "Rules": {
2859 | "shape": "S4m",
2860 | "locationName": "Rule"
2861 | }
2862 | }
2863 | }
2864 | },
2865 | "payload": "LifecycleConfiguration"
2866 | },
2867 | "deprecated": true
2868 | },
2869 | "PutBucketLifecycleConfiguration": {
2870 | "http": {
2871 | "method": "PUT",
2872 | "requestUri": "/{Bucket}?lifecycle"
2873 | },
2874 | "input": {
2875 | "type": "structure",
2876 | "required": [
2877 | "Bucket"
2878 | ],
2879 | "members": {
2880 | "Bucket": {
2881 | "location": "uri",
2882 | "locationName": "Bucket"
2883 | },
2884 | "LifecycleConfiguration": {
2885 | "locationName": "LifecycleConfiguration",
2886 | "xmlNamespace": {
2887 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2888 | },
2889 | "type": "structure",
2890 | "required": [
2891 | "Rules"
2892 | ],
2893 | "members": {
2894 | "Rules": {
2895 | "shape": "S51",
2896 | "locationName": "Rule"
2897 | }
2898 | }
2899 | }
2900 | },
2901 | "payload": "LifecycleConfiguration"
2902 | }
2903 | },
2904 | "PutBucketLogging": {
2905 | "http": {
2906 | "method": "PUT",
2907 | "requestUri": "/{Bucket}?logging"
2908 | },
2909 | "input": {
2910 | "type": "structure",
2911 | "required": [
2912 | "Bucket",
2913 | "BucketLoggingStatus"
2914 | ],
2915 | "members": {
2916 | "Bucket": {
2917 | "location": "uri",
2918 | "locationName": "Bucket"
2919 | },
2920 | "BucketLoggingStatus": {
2921 | "locationName": "BucketLoggingStatus",
2922 | "xmlNamespace": {
2923 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2924 | },
2925 | "type": "structure",
2926 | "members": {
2927 | "LoggingEnabled": {
2928 | "shape": "S5b"
2929 | }
2930 | }
2931 | },
2932 | "ContentMD5": {
2933 | "location": "header",
2934 | "locationName": "Content-MD5"
2935 | }
2936 | },
2937 | "payload": "BucketLoggingStatus"
2938 | }
2939 | },
2940 | "PutBucketMetricsConfiguration": {
2941 | "http": {
2942 | "method": "PUT",
2943 | "requestUri": "/{Bucket}?metrics"
2944 | },
2945 | "input": {
2946 | "type": "structure",
2947 | "required": [
2948 | "Bucket",
2949 | "Id",
2950 | "MetricsConfiguration"
2951 | ],
2952 | "members": {
2953 | "Bucket": {
2954 | "location": "uri",
2955 | "locationName": "Bucket"
2956 | },
2957 | "Id": {
2958 | "location": "querystring",
2959 | "locationName": "id"
2960 | },
2961 | "MetricsConfiguration": {
2962 | "shape": "S5j",
2963 | "locationName": "MetricsConfiguration",
2964 | "xmlNamespace": {
2965 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2966 | }
2967 | }
2968 | },
2969 | "payload": "MetricsConfiguration"
2970 | }
2971 | },
2972 | "PutBucketNotification": {
2973 | "http": {
2974 | "method": "PUT",
2975 | "requestUri": "/{Bucket}?notification"
2976 | },
2977 | "input": {
2978 | "type": "structure",
2979 | "required": [
2980 | "Bucket",
2981 | "NotificationConfiguration"
2982 | ],
2983 | "members": {
2984 | "Bucket": {
2985 | "location": "uri",
2986 | "locationName": "Bucket"
2987 | },
2988 | "ContentMD5": {
2989 | "location": "header",
2990 | "locationName": "Content-MD5"
2991 | },
2992 | "NotificationConfiguration": {
2993 | "shape": "S5n",
2994 | "locationName": "NotificationConfiguration",
2995 | "xmlNamespace": {
2996 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
2997 | }
2998 | }
2999 | },
3000 | "payload": "NotificationConfiguration"
3001 | },
3002 | "deprecated": true
3003 | },
3004 | "PutBucketNotificationConfiguration": {
3005 | "http": {
3006 | "method": "PUT",
3007 | "requestUri": "/{Bucket}?notification"
3008 | },
3009 | "input": {
3010 | "type": "structure",
3011 | "required": [
3012 | "Bucket",
3013 | "NotificationConfiguration"
3014 | ],
3015 | "members": {
3016 | "Bucket": {
3017 | "location": "uri",
3018 | "locationName": "Bucket"
3019 | },
3020 | "NotificationConfiguration": {
3021 | "shape": "S5y",
3022 | "locationName": "NotificationConfiguration",
3023 | "xmlNamespace": {
3024 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3025 | }
3026 | }
3027 | },
3028 | "payload": "NotificationConfiguration"
3029 | }
3030 | },
3031 | "PutBucketPolicy": {
3032 | "http": {
3033 | "method": "PUT",
3034 | "requestUri": "/{Bucket}?policy"
3035 | },
3036 | "input": {
3037 | "type": "structure",
3038 | "required": [
3039 | "Bucket",
3040 | "Policy"
3041 | ],
3042 | "members": {
3043 | "Bucket": {
3044 | "location": "uri",
3045 | "locationName": "Bucket"
3046 | },
3047 | "ContentMD5": {
3048 | "location": "header",
3049 | "locationName": "Content-MD5"
3050 | },
3051 | "ConfirmRemoveSelfBucketAccess": {
3052 | "location": "header",
3053 | "locationName": "x-amz-confirm-remove-self-bucket-access",
3054 | "type": "boolean"
3055 | },
3056 | "Policy": {}
3057 | },
3058 | "payload": "Policy"
3059 | }
3060 | },
3061 | "PutBucketReplication": {
3062 | "http": {
3063 | "method": "PUT",
3064 | "requestUri": "/{Bucket}?replication"
3065 | },
3066 | "input": {
3067 | "type": "structure",
3068 | "required": [
3069 | "Bucket",
3070 | "ReplicationConfiguration"
3071 | ],
3072 | "members": {
3073 | "Bucket": {
3074 | "location": "uri",
3075 | "locationName": "Bucket"
3076 | },
3077 | "ContentMD5": {
3078 | "location": "header",
3079 | "locationName": "Content-MD5"
3080 | },
3081 | "ReplicationConfiguration": {
3082 | "shape": "S6h",
3083 | "locationName": "ReplicationConfiguration",
3084 | "xmlNamespace": {
3085 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3086 | }
3087 | }
3088 | },
3089 | "payload": "ReplicationConfiguration"
3090 | }
3091 | },
3092 | "PutBucketRequestPayment": {
3093 | "http": {
3094 | "method": "PUT",
3095 | "requestUri": "/{Bucket}?requestPayment"
3096 | },
3097 | "input": {
3098 | "type": "structure",
3099 | "required": [
3100 | "Bucket",
3101 | "RequestPaymentConfiguration"
3102 | ],
3103 | "members": {
3104 | "Bucket": {
3105 | "location": "uri",
3106 | "locationName": "Bucket"
3107 | },
3108 | "ContentMD5": {
3109 | "location": "header",
3110 | "locationName": "Content-MD5"
3111 | },
3112 | "RequestPaymentConfiguration": {
3113 | "locationName": "RequestPaymentConfiguration",
3114 | "xmlNamespace": {
3115 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3116 | },
3117 | "type": "structure",
3118 | "required": [
3119 | "Payer"
3120 | ],
3121 | "members": {
3122 | "Payer": {}
3123 | }
3124 | }
3125 | },
3126 | "payload": "RequestPaymentConfiguration"
3127 | }
3128 | },
3129 | "PutBucketTagging": {
3130 | "http": {
3131 | "method": "PUT",
3132 | "requestUri": "/{Bucket}?tagging"
3133 | },
3134 | "input": {
3135 | "type": "structure",
3136 | "required": [
3137 | "Bucket",
3138 | "Tagging"
3139 | ],
3140 | "members": {
3141 | "Bucket": {
3142 | "location": "uri",
3143 | "locationName": "Bucket"
3144 | },
3145 | "ContentMD5": {
3146 | "location": "header",
3147 | "locationName": "Content-MD5"
3148 | },
3149 | "Tagging": {
3150 | "shape": "Sau",
3151 | "locationName": "Tagging",
3152 | "xmlNamespace": {
3153 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3154 | }
3155 | }
3156 | },
3157 | "payload": "Tagging"
3158 | }
3159 | },
3160 | "PutBucketVersioning": {
3161 | "http": {
3162 | "method": "PUT",
3163 | "requestUri": "/{Bucket}?versioning"
3164 | },
3165 | "input": {
3166 | "type": "structure",
3167 | "required": [
3168 | "Bucket",
3169 | "VersioningConfiguration"
3170 | ],
3171 | "members": {
3172 | "Bucket": {
3173 | "location": "uri",
3174 | "locationName": "Bucket"
3175 | },
3176 | "ContentMD5": {
3177 | "location": "header",
3178 | "locationName": "Content-MD5"
3179 | },
3180 | "MFA": {
3181 | "location": "header",
3182 | "locationName": "x-amz-mfa"
3183 | },
3184 | "VersioningConfiguration": {
3185 | "locationName": "VersioningConfiguration",
3186 | "xmlNamespace": {
3187 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3188 | },
3189 | "type": "structure",
3190 | "members": {
3191 | "MFADelete": {
3192 | "locationName": "MfaDelete"
3193 | },
3194 | "Status": {}
3195 | }
3196 | }
3197 | },
3198 | "payload": "VersioningConfiguration"
3199 | }
3200 | },
3201 | "PutBucketWebsite": {
3202 | "http": {
3203 | "method": "PUT",
3204 | "requestUri": "/{Bucket}?website"
3205 | },
3206 | "input": {
3207 | "type": "structure",
3208 | "required": [
3209 | "Bucket",
3210 | "WebsiteConfiguration"
3211 | ],
3212 | "members": {
3213 | "Bucket": {
3214 | "location": "uri",
3215 | "locationName": "Bucket"
3216 | },
3217 | "ContentMD5": {
3218 | "location": "header",
3219 | "locationName": "Content-MD5"
3220 | },
3221 | "WebsiteConfiguration": {
3222 | "locationName": "WebsiteConfiguration",
3223 | "xmlNamespace": {
3224 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3225 | },
3226 | "type": "structure",
3227 | "members": {
3228 | "ErrorDocument": {
3229 | "shape": "S7a"
3230 | },
3231 | "IndexDocument": {
3232 | "shape": "S78"
3233 | },
3234 | "RedirectAllRequestsTo": {
3235 | "shape": "S75"
3236 | },
3237 | "RoutingRules": {
3238 | "shape": "S7b"
3239 | }
3240 | }
3241 | }
3242 | },
3243 | "payload": "WebsiteConfiguration"
3244 | }
3245 | },
3246 | "PutObject": {
3247 | "http": {
3248 | "method": "PUT",
3249 | "requestUri": "/{Bucket}/{Key+}"
3250 | },
3251 | "input": {
3252 | "type": "structure",
3253 | "required": [
3254 | "Bucket",
3255 | "Key"
3256 | ],
3257 | "members": {
3258 | "ACL": {
3259 | "location": "header",
3260 | "locationName": "x-amz-acl"
3261 | },
3262 | "Body": {
3263 | "streaming": true,
3264 | "type": "blob"
3265 | },
3266 | "Bucket": {
3267 | "location": "uri",
3268 | "locationName": "Bucket"
3269 | },
3270 | "CacheControl": {
3271 | "location": "header",
3272 | "locationName": "Cache-Control"
3273 | },
3274 | "ContentDisposition": {
3275 | "location": "header",
3276 | "locationName": "Content-Disposition"
3277 | },
3278 | "ContentEncoding": {
3279 | "location": "header",
3280 | "locationName": "Content-Encoding"
3281 | },
3282 | "ContentLanguage": {
3283 | "location": "header",
3284 | "locationName": "Content-Language"
3285 | },
3286 | "ContentLength": {
3287 | "location": "header",
3288 | "locationName": "Content-Length",
3289 | "type": "long"
3290 | },
3291 | "ContentMD5": {
3292 | "location": "header",
3293 | "locationName": "Content-MD5"
3294 | },
3295 | "ContentType": {
3296 | "location": "header",
3297 | "locationName": "Content-Type"
3298 | },
3299 | "Expires": {
3300 | "location": "header",
3301 | "locationName": "Expires",
3302 | "type": "timestamp"
3303 | },
3304 | "GrantFullControl": {
3305 | "location": "header",
3306 | "locationName": "x-amz-grant-full-control"
3307 | },
3308 | "GrantRead": {
3309 | "location": "header",
3310 | "locationName": "x-amz-grant-read"
3311 | },
3312 | "GrantReadACP": {
3313 | "location": "header",
3314 | "locationName": "x-amz-grant-read-acp"
3315 | },
3316 | "GrantWriteACP": {
3317 | "location": "header",
3318 | "locationName": "x-amz-grant-write-acp"
3319 | },
3320 | "Key": {
3321 | "location": "uri",
3322 | "locationName": "Key"
3323 | },
3324 | "Metadata": {
3325 | "shape": "S11",
3326 | "location": "headers",
3327 | "locationName": "x-amz-meta-"
3328 | },
3329 | "ServerSideEncryption": {
3330 | "location": "header",
3331 | "locationName": "x-amz-server-side-encryption"
3332 | },
3333 | "StorageClass": {
3334 | "location": "header",
3335 | "locationName": "x-amz-storage-class"
3336 | },
3337 | "WebsiteRedirectLocation": {
3338 | "location": "header",
3339 | "locationName": "x-amz-website-redirect-location"
3340 | },
3341 | "SSECustomerAlgorithm": {
3342 | "location": "header",
3343 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
3344 | },
3345 | "SSECustomerKey": {
3346 | "shape": "S19",
3347 | "location": "header",
3348 | "locationName": "x-amz-server-side-encryption-customer-key"
3349 | },
3350 | "SSECustomerKeyMD5": {
3351 | "location": "header",
3352 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
3353 | },
3354 | "SSEKMSKeyId": {
3355 | "shape": "Sj",
3356 | "location": "header",
3357 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
3358 | },
3359 | "RequestPayer": {
3360 | "location": "header",
3361 | "locationName": "x-amz-request-payer"
3362 | },
3363 | "Tagging": {
3364 | "location": "header",
3365 | "locationName": "x-amz-tagging"
3366 | }
3367 | },
3368 | "payload": "Body"
3369 | },
3370 | "output": {
3371 | "type": "structure",
3372 | "members": {
3373 | "Expiration": {
3374 | "location": "header",
3375 | "locationName": "x-amz-expiration"
3376 | },
3377 | "ETag": {
3378 | "location": "header",
3379 | "locationName": "ETag"
3380 | },
3381 | "ServerSideEncryption": {
3382 | "location": "header",
3383 | "locationName": "x-amz-server-side-encryption"
3384 | },
3385 | "VersionId": {
3386 | "location": "header",
3387 | "locationName": "x-amz-version-id"
3388 | },
3389 | "SSECustomerAlgorithm": {
3390 | "location": "header",
3391 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
3392 | },
3393 | "SSECustomerKeyMD5": {
3394 | "location": "header",
3395 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
3396 | },
3397 | "SSEKMSKeyId": {
3398 | "shape": "Sj",
3399 | "location": "header",
3400 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
3401 | },
3402 | "RequestCharged": {
3403 | "location": "header",
3404 | "locationName": "x-amz-request-charged"
3405 | }
3406 | }
3407 | }
3408 | },
3409 | "PutObjectAcl": {
3410 | "http": {
3411 | "method": "PUT",
3412 | "requestUri": "/{Bucket}/{Key+}?acl"
3413 | },
3414 | "input": {
3415 | "type": "structure",
3416 | "required": [
3417 | "Bucket",
3418 | "Key"
3419 | ],
3420 | "members": {
3421 | "ACL": {
3422 | "location": "header",
3423 | "locationName": "x-amz-acl"
3424 | },
3425 | "AccessControlPolicy": {
3426 | "shape": "Sa8",
3427 | "locationName": "AccessControlPolicy",
3428 | "xmlNamespace": {
3429 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3430 | }
3431 | },
3432 | "Bucket": {
3433 | "location": "uri",
3434 | "locationName": "Bucket"
3435 | },
3436 | "ContentMD5": {
3437 | "location": "header",
3438 | "locationName": "Content-MD5"
3439 | },
3440 | "GrantFullControl": {
3441 | "location": "header",
3442 | "locationName": "x-amz-grant-full-control"
3443 | },
3444 | "GrantRead": {
3445 | "location": "header",
3446 | "locationName": "x-amz-grant-read"
3447 | },
3448 | "GrantReadACP": {
3449 | "location": "header",
3450 | "locationName": "x-amz-grant-read-acp"
3451 | },
3452 | "GrantWrite": {
3453 | "location": "header",
3454 | "locationName": "x-amz-grant-write"
3455 | },
3456 | "GrantWriteACP": {
3457 | "location": "header",
3458 | "locationName": "x-amz-grant-write-acp"
3459 | },
3460 | "Key": {
3461 | "location": "uri",
3462 | "locationName": "Key"
3463 | },
3464 | "RequestPayer": {
3465 | "location": "header",
3466 | "locationName": "x-amz-request-payer"
3467 | },
3468 | "VersionId": {
3469 | "location": "querystring",
3470 | "locationName": "versionId"
3471 | }
3472 | },
3473 | "payload": "AccessControlPolicy"
3474 | },
3475 | "output": {
3476 | "type": "structure",
3477 | "members": {
3478 | "RequestCharged": {
3479 | "location": "header",
3480 | "locationName": "x-amz-request-charged"
3481 | }
3482 | }
3483 | }
3484 | },
3485 | "PutObjectTagging": {
3486 | "http": {
3487 | "method": "PUT",
3488 | "requestUri": "/{Bucket}/{Key+}?tagging"
3489 | },
3490 | "input": {
3491 | "type": "structure",
3492 | "required": [
3493 | "Bucket",
3494 | "Key",
3495 | "Tagging"
3496 | ],
3497 | "members": {
3498 | "Bucket": {
3499 | "location": "uri",
3500 | "locationName": "Bucket"
3501 | },
3502 | "Key": {
3503 | "location": "uri",
3504 | "locationName": "Key"
3505 | },
3506 | "VersionId": {
3507 | "location": "querystring",
3508 | "locationName": "versionId"
3509 | },
3510 | "ContentMD5": {
3511 | "location": "header",
3512 | "locationName": "Content-MD5"
3513 | },
3514 | "Tagging": {
3515 | "shape": "Sau",
3516 | "locationName": "Tagging",
3517 | "xmlNamespace": {
3518 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3519 | }
3520 | }
3521 | },
3522 | "payload": "Tagging"
3523 | },
3524 | "output": {
3525 | "type": "structure",
3526 | "members": {
3527 | "VersionId": {
3528 | "location": "header",
3529 | "locationName": "x-amz-version-id"
3530 | }
3531 | }
3532 | }
3533 | },
3534 | "RestoreObject": {
3535 | "http": {
3536 | "requestUri": "/{Bucket}/{Key+}?restore"
3537 | },
3538 | "input": {
3539 | "type": "structure",
3540 | "required": [
3541 | "Bucket",
3542 | "Key"
3543 | ],
3544 | "members": {
3545 | "Bucket": {
3546 | "location": "uri",
3547 | "locationName": "Bucket"
3548 | },
3549 | "Key": {
3550 | "location": "uri",
3551 | "locationName": "Key"
3552 | },
3553 | "VersionId": {
3554 | "location": "querystring",
3555 | "locationName": "versionId"
3556 | },
3557 | "RestoreRequest": {
3558 | "locationName": "RestoreRequest",
3559 | "xmlNamespace": {
3560 | "uri": "http://s3.amazonaws.com/doc/2006-03-01/"
3561 | },
3562 | "type": "structure",
3563 | "required": [
3564 | "Days"
3565 | ],
3566 | "members": {
3567 | "Days": {
3568 | "type": "integer"
3569 | },
3570 | "GlacierJobParameters": {
3571 | "type": "structure",
3572 | "required": [
3573 | "Tier"
3574 | ],
3575 | "members": {
3576 | "Tier": {}
3577 | }
3578 | }
3579 | }
3580 | },
3581 | "RequestPayer": {
3582 | "location": "header",
3583 | "locationName": "x-amz-request-payer"
3584 | }
3585 | },
3586 | "payload": "RestoreRequest"
3587 | },
3588 | "output": {
3589 | "type": "structure",
3590 | "members": {
3591 | "RequestCharged": {
3592 | "location": "header",
3593 | "locationName": "x-amz-request-charged"
3594 | }
3595 | }
3596 | },
3597 | "alias": "PostObjectRestore"
3598 | },
3599 | "UploadPart": {
3600 | "http": {
3601 | "method": "PUT",
3602 | "requestUri": "/{Bucket}/{Key+}"
3603 | },
3604 | "input": {
3605 | "type": "structure",
3606 | "required": [
3607 | "Bucket",
3608 | "Key",
3609 | "PartNumber",
3610 | "UploadId"
3611 | ],
3612 | "members": {
3613 | "Body": {
3614 | "streaming": true,
3615 | "type": "blob"
3616 | },
3617 | "Bucket": {
3618 | "location": "uri",
3619 | "locationName": "Bucket"
3620 | },
3621 | "ContentLength": {
3622 | "location": "header",
3623 | "locationName": "Content-Length",
3624 | "type": "long"
3625 | },
3626 | "ContentMD5": {
3627 | "location": "header",
3628 | "locationName": "Content-MD5"
3629 | },
3630 | "Key": {
3631 | "location": "uri",
3632 | "locationName": "Key"
3633 | },
3634 | "PartNumber": {
3635 | "location": "querystring",
3636 | "locationName": "partNumber",
3637 | "type": "integer"
3638 | },
3639 | "UploadId": {
3640 | "location": "querystring",
3641 | "locationName": "uploadId"
3642 | },
3643 | "SSECustomerAlgorithm": {
3644 | "location": "header",
3645 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
3646 | },
3647 | "SSECustomerKey": {
3648 | "shape": "S19",
3649 | "location": "header",
3650 | "locationName": "x-amz-server-side-encryption-customer-key"
3651 | },
3652 | "SSECustomerKeyMD5": {
3653 | "location": "header",
3654 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
3655 | },
3656 | "RequestPayer": {
3657 | "location": "header",
3658 | "locationName": "x-amz-request-payer"
3659 | }
3660 | },
3661 | "payload": "Body"
3662 | },
3663 | "output": {
3664 | "type": "structure",
3665 | "members": {
3666 | "ServerSideEncryption": {
3667 | "location": "header",
3668 | "locationName": "x-amz-server-side-encryption"
3669 | },
3670 | "ETag": {
3671 | "location": "header",
3672 | "locationName": "ETag"
3673 | },
3674 | "SSECustomerAlgorithm": {
3675 | "location": "header",
3676 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
3677 | },
3678 | "SSECustomerKeyMD5": {
3679 | "location": "header",
3680 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
3681 | },
3682 | "SSEKMSKeyId": {
3683 | "shape": "Sj",
3684 | "location": "header",
3685 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
3686 | },
3687 | "RequestCharged": {
3688 | "location": "header",
3689 | "locationName": "x-amz-request-charged"
3690 | }
3691 | }
3692 | }
3693 | },
3694 | "UploadPartCopy": {
3695 | "http": {
3696 | "method": "PUT",
3697 | "requestUri": "/{Bucket}/{Key+}"
3698 | },
3699 | "input": {
3700 | "type": "structure",
3701 | "required": [
3702 | "Bucket",
3703 | "CopySource",
3704 | "Key",
3705 | "PartNumber",
3706 | "UploadId"
3707 | ],
3708 | "members": {
3709 | "Bucket": {
3710 | "location": "uri",
3711 | "locationName": "Bucket"
3712 | },
3713 | "CopySource": {
3714 | "location": "header",
3715 | "locationName": "x-amz-copy-source"
3716 | },
3717 | "CopySourceIfMatch": {
3718 | "location": "header",
3719 | "locationName": "x-amz-copy-source-if-match"
3720 | },
3721 | "CopySourceIfModifiedSince": {
3722 | "location": "header",
3723 | "locationName": "x-amz-copy-source-if-modified-since",
3724 | "type": "timestamp"
3725 | },
3726 | "CopySourceIfNoneMatch": {
3727 | "location": "header",
3728 | "locationName": "x-amz-copy-source-if-none-match"
3729 | },
3730 | "CopySourceIfUnmodifiedSince": {
3731 | "location": "header",
3732 | "locationName": "x-amz-copy-source-if-unmodified-since",
3733 | "type": "timestamp"
3734 | },
3735 | "CopySourceRange": {
3736 | "location": "header",
3737 | "locationName": "x-amz-copy-source-range"
3738 | },
3739 | "Key": {
3740 | "location": "uri",
3741 | "locationName": "Key"
3742 | },
3743 | "PartNumber": {
3744 | "location": "querystring",
3745 | "locationName": "partNumber",
3746 | "type": "integer"
3747 | },
3748 | "UploadId": {
3749 | "location": "querystring",
3750 | "locationName": "uploadId"
3751 | },
3752 | "SSECustomerAlgorithm": {
3753 | "location": "header",
3754 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
3755 | },
3756 | "SSECustomerKey": {
3757 | "shape": "S19",
3758 | "location": "header",
3759 | "locationName": "x-amz-server-side-encryption-customer-key"
3760 | },
3761 | "SSECustomerKeyMD5": {
3762 | "location": "header",
3763 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
3764 | },
3765 | "CopySourceSSECustomerAlgorithm": {
3766 | "location": "header",
3767 | "locationName": "x-amz-copy-source-server-side-encryption-customer-algorithm"
3768 | },
3769 | "CopySourceSSECustomerKey": {
3770 | "shape": "S1c",
3771 | "location": "header",
3772 | "locationName": "x-amz-copy-source-server-side-encryption-customer-key"
3773 | },
3774 | "CopySourceSSECustomerKeyMD5": {
3775 | "location": "header",
3776 | "locationName": "x-amz-copy-source-server-side-encryption-customer-key-MD5"
3777 | },
3778 | "RequestPayer": {
3779 | "location": "header",
3780 | "locationName": "x-amz-request-payer"
3781 | }
3782 | }
3783 | },
3784 | "output": {
3785 | "type": "structure",
3786 | "members": {
3787 | "CopySourceVersionId": {
3788 | "location": "header",
3789 | "locationName": "x-amz-copy-source-version-id"
3790 | },
3791 | "CopyPartResult": {
3792 | "type": "structure",
3793 | "members": {
3794 | "ETag": {},
3795 | "LastModified": {
3796 | "type": "timestamp"
3797 | }
3798 | }
3799 | },
3800 | "ServerSideEncryption": {
3801 | "location": "header",
3802 | "locationName": "x-amz-server-side-encryption"
3803 | },
3804 | "SSECustomerAlgorithm": {
3805 | "location": "header",
3806 | "locationName": "x-amz-server-side-encryption-customer-algorithm"
3807 | },
3808 | "SSECustomerKeyMD5": {
3809 | "location": "header",
3810 | "locationName": "x-amz-server-side-encryption-customer-key-MD5"
3811 | },
3812 | "SSEKMSKeyId": {
3813 | "shape": "Sj",
3814 | "location": "header",
3815 | "locationName": "x-amz-server-side-encryption-aws-kms-key-id"
3816 | },
3817 | "RequestCharged": {
3818 | "location": "header",
3819 | "locationName": "x-amz-request-charged"
3820 | }
3821 | },
3822 | "payload": "CopyPartResult"
3823 | }
3824 | }
3825 | },
3826 | "shapes": {
3827 | "Sj": {
3828 | "type": "string",
3829 | "sensitive": true
3830 | },
3831 | "S11": {
3832 | "type": "map",
3833 | "key": {},
3834 | "value": {}
3835 | },
3836 | "S19": {
3837 | "type": "blob",
3838 | "sensitive": true
3839 | },
3840 | "S1c": {
3841 | "type": "blob",
3842 | "sensitive": true
3843 | },
3844 | "S2v": {
3845 | "type": "structure",
3846 | "members": {
3847 | "DisplayName": {},
3848 | "ID": {}
3849 | }
3850 | },
3851 | "S2y": {
3852 | "type": "list",
3853 | "member": {
3854 | "locationName": "Grant",
3855 | "type": "structure",
3856 | "members": {
3857 | "Grantee": {
3858 | "shape": "S30"
3859 | },
3860 | "Permission": {}
3861 | }
3862 | }
3863 | },
3864 | "S30": {
3865 | "type": "structure",
3866 | "required": [
3867 | "Type"
3868 | ],
3869 | "members": {
3870 | "DisplayName": {},
3871 | "EmailAddress": {},
3872 | "ID": {},
3873 | "Type": {
3874 | "locationName": "xsi:type",
3875 | "xmlAttribute": true
3876 | },
3877 | "URI": {}
3878 | },
3879 | "xmlNamespace": {
3880 | "prefix": "xsi",
3881 | "uri": "http://www.w3.org/2001/XMLSchema-instance"
3882 | }
3883 | },
3884 | "S37": {
3885 | "type": "structure",
3886 | "required": [
3887 | "Id",
3888 | "StorageClassAnalysis"
3889 | ],
3890 | "members": {
3891 | "Id": {},
3892 | "Filter": {
3893 | "type": "structure",
3894 | "members": {
3895 | "Prefix": {},
3896 | "Tag": {
3897 | "shape": "S3a"
3898 | },
3899 | "And": {
3900 | "type": "structure",
3901 | "members": {
3902 | "Prefix": {},
3903 | "Tags": {
3904 | "shape": "S3d",
3905 | "flattened": true,
3906 | "locationName": "Tag"
3907 | }
3908 | }
3909 | }
3910 | }
3911 | },
3912 | "StorageClassAnalysis": {
3913 | "type": "structure",
3914 | "members": {
3915 | "DataExport": {
3916 | "type": "structure",
3917 | "required": [
3918 | "OutputSchemaVersion",
3919 | "Destination"
3920 | ],
3921 | "members": {
3922 | "OutputSchemaVersion": {},
3923 | "Destination": {
3924 | "type": "structure",
3925 | "required": [
3926 | "S3BucketDestination"
3927 | ],
3928 | "members": {
3929 | "S3BucketDestination": {
3930 | "type": "structure",
3931 | "required": [
3932 | "Format",
3933 | "Bucket"
3934 | ],
3935 | "members": {
3936 | "Format": {},
3937 | "BucketAccountId": {},
3938 | "Bucket": {},
3939 | "Prefix": {}
3940 | }
3941 | }
3942 | }
3943 | }
3944 | }
3945 | }
3946 | }
3947 | }
3948 | }
3949 | },
3950 | "S3a": {
3951 | "type": "structure",
3952 | "required": [
3953 | "Key",
3954 | "Value"
3955 | ],
3956 | "members": {
3957 | "Key": {},
3958 | "Value": {}
3959 | }
3960 | },
3961 | "S3d": {
3962 | "type": "list",
3963 | "member": {
3964 | "shape": "S3a",
3965 | "locationName": "Tag"
3966 | }
3967 | },
3968 | "S3n": {
3969 | "type": "list",
3970 | "member": {
3971 | "type": "structure",
3972 | "required": [
3973 | "AllowedMethods",
3974 | "AllowedOrigins"
3975 | ],
3976 | "members": {
3977 | "AllowedHeaders": {
3978 | "locationName": "AllowedHeader",
3979 | "type": "list",
3980 | "member": {},
3981 | "flattened": true
3982 | },
3983 | "AllowedMethods": {
3984 | "locationName": "AllowedMethod",
3985 | "type": "list",
3986 | "member": {},
3987 | "flattened": true
3988 | },
3989 | "AllowedOrigins": {
3990 | "locationName": "AllowedOrigin",
3991 | "type": "list",
3992 | "member": {},
3993 | "flattened": true
3994 | },
3995 | "ExposeHeaders": {
3996 | "locationName": "ExposeHeader",
3997 | "type": "list",
3998 | "member": {},
3999 | "flattened": true
4000 | },
4001 | "MaxAgeSeconds": {
4002 | "type": "integer"
4003 | }
4004 | }
4005 | },
4006 | "flattened": true
4007 | },
4008 | "S40": {
4009 | "type": "structure",
4010 | "required": [
4011 | "Rules"
4012 | ],
4013 | "members": {
4014 | "Rules": {
4015 | "locationName": "Rule",
4016 | "type": "list",
4017 | "member": {
4018 | "type": "structure",
4019 | "members": {
4020 | "ApplyServerSideEncryptionByDefault": {
4021 | "type": "structure",
4022 | "required": [
4023 | "SSEAlgorithm"
4024 | ],
4025 | "members": {
4026 | "SSEAlgorithm": {},
4027 | "KMSMasterKeyID": {
4028 | "shape": "Sj"
4029 | }
4030 | }
4031 | }
4032 | }
4033 | },
4034 | "flattened": true
4035 | }
4036 | }
4037 | },
4038 | "S46": {
4039 | "type": "structure",
4040 | "required": [
4041 | "Destination",
4042 | "IsEnabled",
4043 | "Id",
4044 | "IncludedObjectVersions",
4045 | "Schedule"
4046 | ],
4047 | "members": {
4048 | "Destination": {
4049 | "type": "structure",
4050 | "required": [
4051 | "S3BucketDestination"
4052 | ],
4053 | "members": {
4054 | "S3BucketDestination": {
4055 | "type": "structure",
4056 | "required": [
4057 | "Bucket",
4058 | "Format"
4059 | ],
4060 | "members": {
4061 | "AccountId": {},
4062 | "Bucket": {},
4063 | "Format": {},
4064 | "Prefix": {},
4065 | "Encryption": {
4066 | "type": "structure",
4067 | "members": {
4068 | "SSES3": {
4069 | "locationName": "SSE-S3",
4070 | "type": "structure",
4071 | "members": {}
4072 | },
4073 | "SSEKMS": {
4074 | "locationName": "SSE-KMS",
4075 | "type": "structure",
4076 | "required": [
4077 | "KeyId"
4078 | ],
4079 | "members": {
4080 | "KeyId": {
4081 | "shape": "Sj"
4082 | }
4083 | }
4084 | }
4085 | }
4086 | }
4087 | }
4088 | }
4089 | }
4090 | },
4091 | "IsEnabled": {
4092 | "type": "boolean"
4093 | },
4094 | "Filter": {
4095 | "type": "structure",
4096 | "required": [
4097 | "Prefix"
4098 | ],
4099 | "members": {
4100 | "Prefix": {}
4101 | }
4102 | },
4103 | "Id": {},
4104 | "IncludedObjectVersions": {},
4105 | "OptionalFields": {
4106 | "type": "list",
4107 | "member": {
4108 | "locationName": "Field"
4109 | }
4110 | },
4111 | "Schedule": {
4112 | "type": "structure",
4113 | "required": [
4114 | "Frequency"
4115 | ],
4116 | "members": {
4117 | "Frequency": {}
4118 | }
4119 | }
4120 | }
4121 | },
4122 | "S4m": {
4123 | "type": "list",
4124 | "member": {
4125 | "type": "structure",
4126 | "required": [
4127 | "Prefix",
4128 | "Status"
4129 | ],
4130 | "members": {
4131 | "Expiration": {
4132 | "shape": "S4o"
4133 | },
4134 | "ID": {},
4135 | "Prefix": {},
4136 | "Status": {},
4137 | "Transition": {
4138 | "shape": "S4t"
4139 | },
4140 | "NoncurrentVersionTransition": {
4141 | "shape": "S4v"
4142 | },
4143 | "NoncurrentVersionExpiration": {
4144 | "shape": "S4w"
4145 | },
4146 | "AbortIncompleteMultipartUpload": {
4147 | "shape": "S4x"
4148 | }
4149 | }
4150 | },
4151 | "flattened": true
4152 | },
4153 | "S4o": {
4154 | "type": "structure",
4155 | "members": {
4156 | "Date": {
4157 | "shape": "S4p"
4158 | },
4159 | "Days": {
4160 | "type": "integer"
4161 | },
4162 | "ExpiredObjectDeleteMarker": {
4163 | "type": "boolean"
4164 | }
4165 | }
4166 | },
4167 | "S4p": {
4168 | "type": "timestamp",
4169 | "timestampFormat": "iso8601"
4170 | },
4171 | "S4t": {
4172 | "type": "structure",
4173 | "members": {
4174 | "Date": {
4175 | "shape": "S4p"
4176 | },
4177 | "Days": {
4178 | "type": "integer"
4179 | },
4180 | "StorageClass": {}
4181 | }
4182 | },
4183 | "S4v": {
4184 | "type": "structure",
4185 | "members": {
4186 | "NoncurrentDays": {
4187 | "type": "integer"
4188 | },
4189 | "StorageClass": {}
4190 | }
4191 | },
4192 | "S4w": {
4193 | "type": "structure",
4194 | "members": {
4195 | "NoncurrentDays": {
4196 | "type": "integer"
4197 | }
4198 | }
4199 | },
4200 | "S4x": {
4201 | "type": "structure",
4202 | "members": {
4203 | "DaysAfterInitiation": {
4204 | "type": "integer"
4205 | }
4206 | }
4207 | },
4208 | "S51": {
4209 | "type": "list",
4210 | "member": {
4211 | "type": "structure",
4212 | "required": [
4213 | "Status"
4214 | ],
4215 | "members": {
4216 | "Expiration": {
4217 | "shape": "S4o"
4218 | },
4219 | "ID": {},
4220 | "Prefix": {
4221 | "deprecated": true
4222 | },
4223 | "Filter": {
4224 | "type": "structure",
4225 | "members": {
4226 | "Prefix": {},
4227 | "Tag": {
4228 | "shape": "S3a"
4229 | },
4230 | "And": {
4231 | "type": "structure",
4232 | "members": {
4233 | "Prefix": {},
4234 | "Tags": {
4235 | "shape": "S3d",
4236 | "flattened": true,
4237 | "locationName": "Tag"
4238 | }
4239 | }
4240 | }
4241 | }
4242 | },
4243 | "Status": {},
4244 | "Transitions": {
4245 | "locationName": "Transition",
4246 | "type": "list",
4247 | "member": {
4248 | "shape": "S4t"
4249 | },
4250 | "flattened": true
4251 | },
4252 | "NoncurrentVersionTransitions": {
4253 | "locationName": "NoncurrentVersionTransition",
4254 | "type": "list",
4255 | "member": {
4256 | "shape": "S4v"
4257 | },
4258 | "flattened": true
4259 | },
4260 | "NoncurrentVersionExpiration": {
4261 | "shape": "S4w"
4262 | },
4263 | "AbortIncompleteMultipartUpload": {
4264 | "shape": "S4x"
4265 | }
4266 | }
4267 | },
4268 | "flattened": true
4269 | },
4270 | "S5b": {
4271 | "type": "structure",
4272 | "members": {
4273 | "TargetBucket": {},
4274 | "TargetGrants": {
4275 | "type": "list",
4276 | "member": {
4277 | "locationName": "Grant",
4278 | "type": "structure",
4279 | "members": {
4280 | "Grantee": {
4281 | "shape": "S30"
4282 | },
4283 | "Permission": {}
4284 | }
4285 | }
4286 | },
4287 | "TargetPrefix": {}
4288 | }
4289 | },
4290 | "S5j": {
4291 | "type": "structure",
4292 | "required": [
4293 | "Id"
4294 | ],
4295 | "members": {
4296 | "Id": {},
4297 | "Filter": {
4298 | "type": "structure",
4299 | "members": {
4300 | "Prefix": {},
4301 | "Tag": {
4302 | "shape": "S3a"
4303 | },
4304 | "And": {
4305 | "type": "structure",
4306 | "members": {
4307 | "Prefix": {},
4308 | "Tags": {
4309 | "shape": "S3d",
4310 | "flattened": true,
4311 | "locationName": "Tag"
4312 | }
4313 | }
4314 | }
4315 | }
4316 | }
4317 | }
4318 | },
4319 | "S5m": {
4320 | "type": "structure",
4321 | "required": [
4322 | "Bucket"
4323 | ],
4324 | "members": {
4325 | "Bucket": {
4326 | "location": "uri",
4327 | "locationName": "Bucket"
4328 | }
4329 | }
4330 | },
4331 | "S5n": {
4332 | "type": "structure",
4333 | "members": {
4334 | "TopicConfiguration": {
4335 | "type": "structure",
4336 | "members": {
4337 | "Id": {},
4338 | "Events": {
4339 | "shape": "S5q",
4340 | "locationName": "Event"
4341 | },
4342 | "Event": {
4343 | "deprecated": true
4344 | },
4345 | "Topic": {}
4346 | }
4347 | },
4348 | "QueueConfiguration": {
4349 | "type": "structure",
4350 | "members": {
4351 | "Id": {},
4352 | "Event": {
4353 | "deprecated": true
4354 | },
4355 | "Events": {
4356 | "shape": "S5q",
4357 | "locationName": "Event"
4358 | },
4359 | "Queue": {}
4360 | }
4361 | },
4362 | "CloudFunctionConfiguration": {
4363 | "type": "structure",
4364 | "members": {
4365 | "Id": {},
4366 | "Event": {
4367 | "deprecated": true
4368 | },
4369 | "Events": {
4370 | "shape": "S5q",
4371 | "locationName": "Event"
4372 | },
4373 | "CloudFunction": {},
4374 | "InvocationRole": {}
4375 | }
4376 | }
4377 | }
4378 | },
4379 | "S5q": {
4380 | "type": "list",
4381 | "member": {},
4382 | "flattened": true
4383 | },
4384 | "S5y": {
4385 | "type": "structure",
4386 | "members": {
4387 | "TopicConfigurations": {
4388 | "locationName": "TopicConfiguration",
4389 | "type": "list",
4390 | "member": {
4391 | "type": "structure",
4392 | "required": [
4393 | "TopicArn",
4394 | "Events"
4395 | ],
4396 | "members": {
4397 | "Id": {},
4398 | "TopicArn": {
4399 | "locationName": "Topic"
4400 | },
4401 | "Events": {
4402 | "shape": "S5q",
4403 | "locationName": "Event"
4404 | },
4405 | "Filter": {
4406 | "shape": "S61"
4407 | }
4408 | }
4409 | },
4410 | "flattened": true
4411 | },
4412 | "QueueConfigurations": {
4413 | "locationName": "QueueConfiguration",
4414 | "type": "list",
4415 | "member": {
4416 | "type": "structure",
4417 | "required": [
4418 | "QueueArn",
4419 | "Events"
4420 | ],
4421 | "members": {
4422 | "Id": {},
4423 | "QueueArn": {
4424 | "locationName": "Queue"
4425 | },
4426 | "Events": {
4427 | "shape": "S5q",
4428 | "locationName": "Event"
4429 | },
4430 | "Filter": {
4431 | "shape": "S61"
4432 | }
4433 | }
4434 | },
4435 | "flattened": true
4436 | },
4437 | "LambdaFunctionConfigurations": {
4438 | "locationName": "CloudFunctionConfiguration",
4439 | "type": "list",
4440 | "member": {
4441 | "type": "structure",
4442 | "required": [
4443 | "LambdaFunctionArn",
4444 | "Events"
4445 | ],
4446 | "members": {
4447 | "Id": {},
4448 | "LambdaFunctionArn": {
4449 | "locationName": "CloudFunction"
4450 | },
4451 | "Events": {
4452 | "shape": "S5q",
4453 | "locationName": "Event"
4454 | },
4455 | "Filter": {
4456 | "shape": "S61"
4457 | }
4458 | }
4459 | },
4460 | "flattened": true
4461 | }
4462 | }
4463 | },
4464 | "S61": {
4465 | "type": "structure",
4466 | "members": {
4467 | "Key": {
4468 | "locationName": "S3Key",
4469 | "type": "structure",
4470 | "members": {
4471 | "FilterRules": {
4472 | "locationName": "FilterRule",
4473 | "type": "list",
4474 | "member": {
4475 | "type": "structure",
4476 | "members": {
4477 | "Name": {},
4478 | "Value": {}
4479 | }
4480 | },
4481 | "flattened": true
4482 | }
4483 | }
4484 | }
4485 | }
4486 | },
4487 | "S6h": {
4488 | "type": "structure",
4489 | "required": [
4490 | "Role",
4491 | "Rules"
4492 | ],
4493 | "members": {
4494 | "Role": {},
4495 | "Rules": {
4496 | "locationName": "Rule",
4497 | "type": "list",
4498 | "member": {
4499 | "type": "structure",
4500 | "required": [
4501 | "Prefix",
4502 | "Status",
4503 | "Destination"
4504 | ],
4505 | "members": {
4506 | "ID": {},
4507 | "Prefix": {},
4508 | "Status": {},
4509 | "SourceSelectionCriteria": {
4510 | "type": "structure",
4511 | "members": {
4512 | "SseKmsEncryptedObjects": {
4513 | "type": "structure",
4514 | "required": [
4515 | "Status"
4516 | ],
4517 | "members": {
4518 | "Status": {}
4519 | }
4520 | }
4521 | }
4522 | },
4523 | "Destination": {
4524 | "type": "structure",
4525 | "required": [
4526 | "Bucket"
4527 | ],
4528 | "members": {
4529 | "Bucket": {},
4530 | "Account": {},
4531 | "StorageClass": {},
4532 | "AccessControlTranslation": {
4533 | "type": "structure",
4534 | "required": [
4535 | "Owner"
4536 | ],
4537 | "members": {
4538 | "Owner": {}
4539 | }
4540 | },
4541 | "EncryptionConfiguration": {
4542 | "type": "structure",
4543 | "members": {
4544 | "ReplicaKmsKeyID": {}
4545 | }
4546 | }
4547 | }
4548 | }
4549 | }
4550 | },
4551 | "flattened": true
4552 | }
4553 | }
4554 | },
4555 | "S75": {
4556 | "type": "structure",
4557 | "required": [
4558 | "HostName"
4559 | ],
4560 | "members": {
4561 | "HostName": {},
4562 | "Protocol": {}
4563 | }
4564 | },
4565 | "S78": {
4566 | "type": "structure",
4567 | "required": [
4568 | "Suffix"
4569 | ],
4570 | "members": {
4571 | "Suffix": {}
4572 | }
4573 | },
4574 | "S7a": {
4575 | "type": "structure",
4576 | "required": [
4577 | "Key"
4578 | ],
4579 | "members": {
4580 | "Key": {}
4581 | }
4582 | },
4583 | "S7b": {
4584 | "type": "list",
4585 | "member": {
4586 | "locationName": "RoutingRule",
4587 | "type": "structure",
4588 | "required": [
4589 | "Redirect"
4590 | ],
4591 | "members": {
4592 | "Condition": {
4593 | "type": "structure",
4594 | "members": {
4595 | "HttpErrorCodeReturnedEquals": {},
4596 | "KeyPrefixEquals": {}
4597 | }
4598 | },
4599 | "Redirect": {
4600 | "type": "structure",
4601 | "members": {
4602 | "HostName": {},
4603 | "HttpRedirectCode": {},
4604 | "Protocol": {},
4605 | "ReplaceKeyPrefixWith": {},
4606 | "ReplaceKeyWith": {}
4607 | }
4608 | }
4609 | }
4610 | }
4611 | },
4612 | "S97": {
4613 | "type": "structure",
4614 | "members": {
4615 | "ID": {},
4616 | "DisplayName": {}
4617 | }
4618 | },
4619 | "S98": {
4620 | "type": "list",
4621 | "member": {
4622 | "type": "structure",
4623 | "members": {
4624 | "Prefix": {}
4625 | }
4626 | },
4627 | "flattened": true
4628 | },
4629 | "S9q": {
4630 | "type": "list",
4631 | "member": {
4632 | "type": "structure",
4633 | "members": {
4634 | "Key": {},
4635 | "LastModified": {
4636 | "type": "timestamp"
4637 | },
4638 | "ETag": {},
4639 | "Size": {
4640 | "type": "integer"
4641 | },
4642 | "StorageClass": {},
4643 | "Owner": {
4644 | "shape": "S2v"
4645 | }
4646 | }
4647 | },
4648 | "flattened": true
4649 | },
4650 | "Sa8": {
4651 | "type": "structure",
4652 | "members": {
4653 | "Grants": {
4654 | "shape": "S2y",
4655 | "locationName": "AccessControlList"
4656 | },
4657 | "Owner": {
4658 | "shape": "S2v"
4659 | }
4660 | }
4661 | },
4662 | "Sau": {
4663 | "type": "structure",
4664 | "required": [
4665 | "TagSet"
4666 | ],
4667 | "members": {
4668 | "TagSet": {
4669 | "shape": "S3d"
4670 | }
4671 | }
4672 | }
4673 | }
4674 | }
4675 |
--------------------------------------------------------------------------------
/src/__tests__/AwsApiParser-test.ts:
--------------------------------------------------------------------------------
1 | import awsSDK from 'aws-sdk';
2 | import { AwsApiParser } from '../AwsApiParser';
3 | import { AwsService } from '../AwsService';
4 | import AwsConfigITC from '../types/AwsConfigITC';
5 |
6 | describe('AwsApiParser', () => {
7 | const aws = new AwsApiParser({
8 | awsSDK,
9 | });
10 |
11 | it('getServicesNames()', () => {
12 | const names = aws.getServicesNames();
13 | expect(names).toContain('S3');
14 | expect(names).toContain('EC2');
15 | expect(names).toContain('Route53');
16 | expect(names).toContain('SQS');
17 | });
18 |
19 | it('getServiceIdentifier()', () => {
20 | expect(aws.getServiceIdentifier('S3')).toBe('s3');
21 | // also should work if provided serviceIdentifier
22 | expect(aws.getServiceIdentifier('s3')).toBe('s3');
23 | });
24 |
25 | it('getServiceConfig()', () => {
26 | const cfg = aws.getServiceConfig('S3');
27 | expect(Object.keys(cfg)).toEqual([
28 | 'version',
29 | 'metadata',
30 | 'operations',
31 | 'shapes',
32 | 'paginators',
33 | 'waiters',
34 | ]);
35 |
36 | // get config by serviceIdentifier
37 | const cfg2 = aws.getServiceConfig('s3');
38 | expect(Object.keys(cfg2)).toEqual([
39 | 'version',
40 | 'metadata',
41 | 'operations',
42 | 'shapes',
43 | 'paginators',
44 | 'waiters',
45 | ]);
46 | });
47 |
48 | it('getService()', () => {
49 | const service = aws.getService('S3');
50 | expect(service).toBeInstanceOf(AwsService);
51 |
52 | // get service by serviceIdentifier
53 | const service2 = aws.getService('s3');
54 | expect(service2).toBeInstanceOf(AwsService);
55 | });
56 |
57 | it('getType()', () => {
58 | const type = aws.getType();
59 | expect(type.name).toBe('Aws');
60 | });
61 |
62 | it('getFieldConfig()', () => {
63 | const fc: any = aws.getFieldConfig();
64 | expect(fc.type).toBe(aws.getType());
65 | expect(fc.args.config.type).toBe(AwsConfigITC.getType());
66 | expect(fc.resolve()).toEqual({ awsConfig: {} });
67 | });
68 | });
69 |
--------------------------------------------------------------------------------
/src/__tests__/AwsParam-test.ts:
--------------------------------------------------------------------------------
1 | import { ObjectTypeComposer, InputTypeComposer } from 'graphql-compose';
2 | import { AwsParam, ParamStructure } from '../AwsParam';
3 |
4 | describe('AwsParam', () => {
5 | describe('static convertParam()', () => {
6 | it('scalars', () => {
7 | expect(AwsParam._convertParam({ type: 'boolean' }, '')).toBe('Boolean');
8 | expect(AwsParam._convertParam({ type: 'string' }, '')).toBe('String');
9 | expect(AwsParam._convertParam({ type: 'integer' }, '')).toBe('Int');
10 | expect(AwsParam._convertParam({ type: 'float' }, '')).toBe('Float');
11 | expect(AwsParam._convertParam({ type: 'timestamp' }, '')).toBe('Date');
12 | expect(AwsParam._convertParam({}, '')).toBe('String');
13 | });
14 |
15 | it('map', () => {
16 | // it does not have keys, so should be JSON type
17 | expect(AwsParam._convertParam({ type: 'map', key: {}, value: {} }, '')).toBe('JSON');
18 | });
19 |
20 | it('list', () => {
21 | const t = AwsParam._convertParam({ type: 'list', member: {}, flattened: true }, '');
22 | expect(t).toEqual(['String']);
23 |
24 | // nested lists
25 | const t2 = AwsParam._convertParam(
26 | { type: 'list', member: { type: 'list', member: {} }, flattened: true },
27 | ''
28 | );
29 | expect(t2).toEqual([['String']]);
30 | });
31 |
32 | it('structure', () => {
33 | const param = {
34 | type: 'structure',
35 | members: {
36 | Bucket: {},
37 | },
38 | };
39 |
40 | const t = AwsParam.convertParamOutput(param, 'Name');
41 | expect(t).toBeInstanceOf(ObjectTypeComposer);
42 |
43 | const t2 = AwsParam.convertParamInput(param, 'Name');
44 | expect(t2).toBeInstanceOf(InputTypeComposer);
45 | });
46 |
47 | it('shape', () => {
48 | const shapesMock: any = {
49 | getInputShape: () => 'Int',
50 | getOutputShape: () => 'String',
51 | };
52 |
53 | const t = AwsParam._convertParam({ shape: 'Sk' }, 'Name', true, shapesMock);
54 | expect(t).toBe('Int');
55 |
56 | const t2 = AwsParam._convertParam({ shape: 'Sk' }, 'Name', false, shapesMock);
57 | expect(t2).toBe('String');
58 |
59 | // as fallback use JSON, if shapes are empty
60 | const t3 = AwsParam._convertParam({ shape: 'Sk' }, 'Name');
61 | expect(t3).toBe('JSON');
62 | });
63 | });
64 |
65 | it('static convertInputStructure()', () => {
66 | const param: ParamStructure = {
67 | type: 'structure',
68 | required: ['Bucket'],
69 | members: {
70 | Bucket: {
71 | location: 'uri',
72 | locationName: 'Bucket',
73 | },
74 | Delimiter: {
75 | location: 'querystring',
76 | locationName: 'delimiter',
77 | },
78 | },
79 | };
80 |
81 | const itc = AwsParam.convertInputStructure(param, 'AwsS3Bucket');
82 | expect(itc).toBeInstanceOf(InputTypeComposer);
83 | expect(itc.getTypeName()).toBe('AwsS3BucketInput');
84 | expect(itc.getFieldTypeName('Bucket')).toBe('String!');
85 | expect(itc.getFieldTypeName('Delimiter')).toBe('String');
86 | });
87 |
88 | it('static convertOutputStructure()', () => {
89 | const param = {
90 | type: 'structure',
91 | required: ['Bucket'],
92 | members: {
93 | Bucket: {
94 | location: 'uri',
95 | locationName: 'Bucket',
96 | },
97 | Delimiter: {
98 | location: 'querystring',
99 | locationName: 'delimiter',
100 | },
101 | },
102 | } as ParamStructure;
103 |
104 | const tc = AwsParam.convertOutputStructure(param, 'AwsS3Bucket');
105 | expect(tc).toBeInstanceOf(ObjectTypeComposer);
106 | expect(tc.getTypeName()).toBe('AwsS3Bucket');
107 | expect(tc.getFieldTypeName('Bucket')).toBe('String!');
108 | expect(tc.getFieldTypeName('Delimiter')).toBe('String');
109 | });
110 | });
111 |
--------------------------------------------------------------------------------
/src/__tests__/AwsService-test.ts:
--------------------------------------------------------------------------------
1 | import { AwsService } from '../AwsService';
2 | import { AwsServiceOperation } from '../AwsServiceOperation';
3 | import s3Cfg from '../__mocks__/s3-2006-03-01.json';
4 | import AwsConfigITC from '../types/AwsConfigITC';
5 |
6 | describe('AwsService', () => {
7 | const s3 = new AwsService({
8 | serviceId: 'S3',
9 | prefix: 'Aws',
10 | config: s3Cfg as any,
11 | awsSDK: {},
12 | });
13 |
14 | it('getTypeName()', () => {
15 | expect(s3.getTypeName()).toBe('AwsS3');
16 | });
17 |
18 | it('getOperationNames()', () => {
19 | expect(s3.getOperationNames()).toMatchSnapshot();
20 | });
21 |
22 | it('getOperation()', () => {
23 | const oper = s3.getOperation('CreateBucket');
24 | expect(oper).toBeInstanceOf(AwsServiceOperation);
25 | expect(oper.getTypeName()).toBe('AwsS3CreateBucket');
26 | expect(oper.getArgs().input).toBeDefined();
27 | });
28 |
29 | it('getTypeComposer()', () => {
30 | const tc = s3.getTypeComposer();
31 | expect(tc.getTypeName()).toBe('AwsS3');
32 | expect(tc.getFieldNames()).toContain('createBucket');
33 | expect(tc.getFieldNames()).toContain('deleteObject');
34 | });
35 |
36 | it('getType()', () => {
37 | const type = s3.getType();
38 | expect(type.name).toBe('AwsS3');
39 | });
40 |
41 | it('getFieldConfig()', () => {
42 | const fc: any = s3.getFieldConfig();
43 | expect(fc.type).toBe(s3.getType());
44 | expect(fc.args.config.type).toBe(AwsConfigITC.getType());
45 | expect(fc.resolve()).toEqual({ awsConfig: {} });
46 | });
47 | });
48 |
--------------------------------------------------------------------------------
/src/__tests__/AwsServiceMetadata-test.ts:
--------------------------------------------------------------------------------
1 | import { ObjectTypeComposer } from 'graphql-compose';
2 | import { AwsServiceMetadata } from '../AwsServiceMetadata';
3 | import s3Cfg from '../__mocks__/s3-2006-03-01.json';
4 |
5 | const meta = new AwsServiceMetadata(s3Cfg.metadata);
6 |
7 | describe('AwsServiceMetadata', () => {
8 | it('getPrefix()', () => {
9 | expect(meta.getPrefix()).toBe('AwsS3');
10 | });
11 |
12 | it('getTypeComposer()', () => {
13 | const tc = meta.getTypeComposer();
14 | expect(tc).toBeInstanceOf(ObjectTypeComposer);
15 | expect(tc.getTypeName()).toBe('AwsS3Metadata');
16 | expect(tc.getFieldNames()).toMatchSnapshot();
17 | });
18 |
19 | it('getFieldConfig()', () => {
20 | const fc: any = meta.getFieldConfig();
21 | expect(fc).toMatchSnapshot();
22 | expect(fc.resolve()).toMatchSnapshot();
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/src/__tests__/AwsServiceOperation-test.ts:
--------------------------------------------------------------------------------
1 | import { GraphQLObjectType, GraphQLInputObjectType, GraphQLNonNull } from 'graphql';
2 | import { AwsServiceOperation, ServiceOperationConfig } from '../AwsServiceOperation';
3 | import AwsConfigITC from '../types/AwsConfigITC';
4 |
5 | const operations = {
6 | CreateBucket: {
7 | http: {
8 | method: 'PUT',
9 | requestUri: '/{Bucket}',
10 | },
11 | input: {
12 | type: 'structure',
13 | required: ['Bucket'],
14 | members: {
15 | ACL: {
16 | location: 'header',
17 | locationName: 'x-amz-acl',
18 | },
19 | Bucket: {
20 | location: 'uri',
21 | locationName: 'Bucket',
22 | },
23 | CreateBucketConfiguration: {
24 | locationName: 'CreateBucketConfiguration',
25 | xmlNamespace: {
26 | uri: 'http://s3.amazonaws.com/doc/2006-03-01/',
27 | },
28 | type: 'structure',
29 | members: {
30 | LocationConstraint: {},
31 | },
32 | },
33 | GrantFullControl: {
34 | location: 'header',
35 | locationName: 'x-amz-grant-full-control',
36 | },
37 | GrantRead: {
38 | location: 'header',
39 | locationName: 'x-amz-grant-read',
40 | },
41 | GrantReadACP: {
42 | location: 'header',
43 | locationName: 'x-amz-grant-read-acp',
44 | },
45 | GrantWrite: {
46 | location: 'header',
47 | locationName: 'x-amz-grant-write',
48 | },
49 | GrantWriteACP: {
50 | location: 'header',
51 | locationName: 'x-amz-grant-write-acp',
52 | },
53 | },
54 | payload: 'CreateBucketConfiguration',
55 | },
56 | output: {
57 | type: 'structure',
58 | members: {
59 | Location: {
60 | location: 'header',
61 | locationName: 'Location',
62 | },
63 | },
64 | },
65 | alias: 'PutBucket',
66 | },
67 | } as Record;
68 |
69 | describe('AwsJsonParserOperation', () => {
70 | const AWSMock: any = {
71 | S3: class S3 {
72 | CreateBucket(_args: any, _cb: any) {}
73 | },
74 | };
75 |
76 | const oper = new AwsServiceOperation({
77 | prefix: 'AWS',
78 | serviceId: 'S3',
79 | name: 'CreateBucket',
80 | config: operations.CreateBucket,
81 | awsSDK: AWSMock,
82 | shapes: {} as any,
83 | });
84 |
85 | it('getTypeName()', () => {
86 | expect(oper.getTypeName()).toBe('AWSS3CreateBucket');
87 | });
88 |
89 | it('getType()', () => {
90 | const tc = oper.getType();
91 | expect(tc).toBeInstanceOf(GraphQLObjectType);
92 | });
93 |
94 | it('getArgs()', () => {
95 | const args: any = oper.getArgs();
96 | expect(args.input).toBeDefined();
97 | // input arg has required fields, so it wrapped by NonNullComposer
98 | expect(args.input.type).toBeInstanceOf(GraphQLNonNull);
99 | expect(args.input.type.ofType).toBeInstanceOf(GraphQLInputObjectType);
100 | expect(args.input.type.ofType.name).toBe('AWSS3CreateBucketInput');
101 | });
102 |
103 | describe('getResolve()', () => {
104 | const resolve = oper.getResolve();
105 |
106 | it('to be function', () => {
107 | expect(resolve.call).toBeDefined();
108 | });
109 |
110 | it('resolves', async () => {
111 | AWSMock.S3 = class S3WithPayload {
112 | CreateBucket(args: any, cb: any) {
113 | cb(undefined, { payload: args });
114 | }
115 | };
116 | const res = await resolve({}, { input: { arg: 123 } }, {}, {} as any);
117 | expect(res).toEqual({ payload: { arg: 123 } });
118 | });
119 |
120 | it('rejects', async () => {
121 | AWSMock.S3 = class S3WithError {
122 | CreateBucket(_args: any, cb: any) {
123 | cb('err');
124 | }
125 | };
126 |
127 | expect.assertions(1);
128 | try {
129 | await resolve({}, {}, {} as any, {} as any);
130 | } catch (e) {
131 | expect(e).toBe('err');
132 | }
133 | });
134 | });
135 |
136 | it('getFieldConfig()', () => {
137 | const fc: any = oper.getFieldConfig();
138 | expect(fc.type).toBeInstanceOf(GraphQLObjectType);
139 | expect(fc.args.config.type).toBe(AwsConfigITC.getType());
140 | expect((fc.resolve as any).call).toBeDefined();
141 | });
142 | });
143 |
--------------------------------------------------------------------------------
/src/__tests__/AwsShapes-test.ts:
--------------------------------------------------------------------------------
1 | import { AwsShapes } from '../AwsShapes';
2 |
3 | describe('AwsShapes', () => {
4 | const shapes = new AwsShapes(
5 | {
6 | S1: {},
7 | S2: { type: 'float' },
8 | },
9 | 'Test'
10 | );
11 |
12 | it('getInputShape()', () => {
13 | expect(shapes.getInputShape('S1')).toBe('String');
14 | });
15 |
16 | it('getInputShape() from cache', () => {
17 | (shapes as any).shapesInput.cachedS1 = 'Cached';
18 | expect(shapes.getInputShape('cachedS1')).toBe('Cached');
19 | });
20 |
21 | it('getOutputShape()', () => {
22 | expect(shapes.getOutputShape('S2')).toBe('Float');
23 | });
24 |
25 | it('getOutputShape() from cache', () => {
26 | (shapes as any).shapesOutput.cachedS2 = 'Cached';
27 | expect(shapes.getOutputShape('cachedS2')).toBe('Cached');
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/src/__tests__/__snapshots__/AwsService-test.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`AwsService getOperationNames() 1`] = `
4 | Array [
5 | "AbortMultipartUpload",
6 | "CompleteMultipartUpload",
7 | "CopyObject",
8 | "CreateBucket",
9 | "CreateMultipartUpload",
10 | "DeleteBucket",
11 | "DeleteBucketAnalyticsConfiguration",
12 | "DeleteBucketCors",
13 | "DeleteBucketEncryption",
14 | "DeleteBucketInventoryConfiguration",
15 | "DeleteBucketLifecycle",
16 | "DeleteBucketMetricsConfiguration",
17 | "DeleteBucketPolicy",
18 | "DeleteBucketReplication",
19 | "DeleteBucketTagging",
20 | "DeleteBucketWebsite",
21 | "DeleteObject",
22 | "DeleteObjectTagging",
23 | "DeleteObjects",
24 | "GetBucketAccelerateConfiguration",
25 | "GetBucketAcl",
26 | "GetBucketAnalyticsConfiguration",
27 | "GetBucketCors",
28 | "GetBucketEncryption",
29 | "GetBucketInventoryConfiguration",
30 | "GetBucketLifecycle",
31 | "GetBucketLifecycleConfiguration",
32 | "GetBucketLocation",
33 | "GetBucketLogging",
34 | "GetBucketMetricsConfiguration",
35 | "GetBucketNotification",
36 | "GetBucketNotificationConfiguration",
37 | "GetBucketPolicy",
38 | "GetBucketReplication",
39 | "GetBucketRequestPayment",
40 | "GetBucketTagging",
41 | "GetBucketVersioning",
42 | "GetBucketWebsite",
43 | "GetObject",
44 | "GetObjectAcl",
45 | "GetObjectTagging",
46 | "GetObjectTorrent",
47 | "HeadBucket",
48 | "HeadObject",
49 | "ListBucketAnalyticsConfigurations",
50 | "ListBucketInventoryConfigurations",
51 | "ListBucketMetricsConfigurations",
52 | "ListBuckets",
53 | "ListMultipartUploads",
54 | "ListObjectVersions",
55 | "ListObjects",
56 | "ListObjectsV2",
57 | "ListParts",
58 | "PutBucketAccelerateConfiguration",
59 | "PutBucketAcl",
60 | "PutBucketAnalyticsConfiguration",
61 | "PutBucketCors",
62 | "PutBucketEncryption",
63 | "PutBucketInventoryConfiguration",
64 | "PutBucketLifecycle",
65 | "PutBucketLifecycleConfiguration",
66 | "PutBucketLogging",
67 | "PutBucketMetricsConfiguration",
68 | "PutBucketNotification",
69 | "PutBucketNotificationConfiguration",
70 | "PutBucketPolicy",
71 | "PutBucketReplication",
72 | "PutBucketRequestPayment",
73 | "PutBucketTagging",
74 | "PutBucketVersioning",
75 | "PutBucketWebsite",
76 | "PutObject",
77 | "PutObjectAcl",
78 | "PutObjectTagging",
79 | "RestoreObject",
80 | "UploadPart",
81 | "UploadPartCopy",
82 | ]
83 | `;
84 |
--------------------------------------------------------------------------------
/src/__tests__/__snapshots__/AwsServiceMetadata-test.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`AwsServiceMetadata getFieldConfig() 1`] = `
4 | Object {
5 | "resolve": [Function],
6 | "type": "AwsS3Metadata",
7 | }
8 | `;
9 |
10 | exports[`AwsServiceMetadata getFieldConfig() 2`] = `
11 | Object {
12 | "apiVersion": "2006-03-01",
13 | "checksumFormat": "md5",
14 | "endpointPrefix": "s3",
15 | "globalEndpoint": "s3.amazonaws.com",
16 | "protocol": "rest-xml",
17 | "raw": Object {
18 | "apiVersion": "2006-03-01",
19 | "checksumFormat": "md5",
20 | "endpointPrefix": "s3",
21 | "globalEndpoint": "s3.amazonaws.com",
22 | "protocol": "rest-xml",
23 | "serviceAbbreviation": "Amazon S3",
24 | "serviceFullName": "Amazon Simple Storage Service",
25 | "serviceId": "S3",
26 | "signatureVersion": "s3",
27 | "timestampFormat": "rfc822",
28 | "uid": "s3-2006-03-01",
29 | },
30 | "serviceAbbreviation": "Amazon S3",
31 | "serviceFullName": "Amazon Simple Storage Service",
32 | "serviceId": "S3",
33 | "signatureVersion": "s3",
34 | "timestampFormat": "rfc822",
35 | "uid": "s3-2006-03-01",
36 | }
37 | `;
38 |
39 | exports[`AwsServiceMetadata getTypeComposer() 1`] = `
40 | Array [
41 | "apiVersion",
42 | "endpointPrefix",
43 | "globalEndpoint",
44 | "serviceAbbreviation",
45 | "serviceFullName",
46 | "signatureVersion",
47 | "uid",
48 | "raw",
49 | ]
50 | `;
51 |
--------------------------------------------------------------------------------
/src/__tests__/aws-sdk-test.ts:
--------------------------------------------------------------------------------
1 | import AWS from 'aws-sdk';
2 |
3 | describe('aws-sdk', () => {
4 | describe('check s3', () => {
5 | it('should provide services', () => {
6 | expect(Object.keys((AWS as any).apiLoader.services)).toContain('s3');
7 | });
8 |
9 | it('should provide versions', () => {
10 | expect(Object.keys((AWS as any).apiLoader.services.s3)).toEqual(['2006-03-01']);
11 | });
12 |
13 | it('should contain config', () => {
14 | expect(Object.keys((AWS as any).apiLoader.services.s3['2006-03-01'])).toEqual([
15 | 'version',
16 | 'metadata',
17 | 'operations',
18 | 'shapes',
19 | 'paginators',
20 | 'waiters',
21 | ]);
22 |
23 | // console.log(AWS.apiLoader.services.s3['2006-03-01'].operations);
24 | // console.log(Object.keys(AWS));
25 | });
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | export { AwsApiParser } from './AwsApiParser';
2 |
--------------------------------------------------------------------------------
/src/types/AwsConfigITC.ts:
--------------------------------------------------------------------------------
1 | import { schemaComposer } from 'graphql-compose';
2 |
3 | export default schemaComposer.createInputTC({
4 | name: 'AwsConfig',
5 | fields: {
6 | accessKeyId: 'String',
7 | secretAccessKey: 'String',
8 | sessionToken: 'String',
9 | region: 'String',
10 | },
11 | });
12 |
--------------------------------------------------------------------------------
/src/utils.ts:
--------------------------------------------------------------------------------
1 | import { TypeStorage } from 'graphql-compose';
2 |
3 | const typeStorage = new TypeStorage();
4 |
5 | export function getTypeName(name: string, opts?: { prefix?: string; postfix?: string }): string {
6 | return `${opts?.prefix || 'Elastic'}${name}${opts?.postfix || ''}`;
7 | }
8 |
9 | export function getOrSetType(typeName: string, typeOrThunk: (() => T) | T): T {
10 | const type: any = typeStorage.getOrSet(typeName, typeOrThunk);
11 | return type;
12 | }
13 |
14 | // Remove newline multiline in descriptions
15 | export function desc(str: string): string {
16 | return str.replace(/\n\s+/gi, ' ').replace(/^\s+/, '');
17 | }
18 |
--------------------------------------------------------------------------------
/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "types": ["node"],
5 | "outDir": "./lib",
6 | },
7 | "include": ["src/**/*"],
8 | "exclude": ["**/__tests__", "**/__mocks__"]
9 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2016",
4 | "module": "commonjs",
5 | "moduleResolution": "node",
6 | "esModuleInterop": true,
7 | "sourceMap": true,
8 | "declaration": true,
9 | "declarationMap": true,
10 | "removeComments": true,
11 | "resolveJsonModule": true,
12 | "strict": true,
13 | "noImplicitAny": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "noUnusedParameters": true,
17 | "noUnusedLocals": true,
18 | "forceConsistentCasingInFileNames": true,
19 | "lib": ["es2017", "esnext.asynciterable"],
20 | "types": ["node", "jest"],
21 | "baseUrl": ".",
22 | "paths": {
23 | "*" : ["types/*"]
24 | },
25 | "rootDir": "./src",
26 | },
27 | "include": ["src/**/*"],
28 | "exclude": [
29 | "./node_modules"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------