Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional requests #7214

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .doc_gen/metadata/s3_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@ s3_CopyObject:
- description: Copy the object.
snippet_tags:
- s3.JavaScript.buckets.copyObjectV3
- description: Copy the object on condition its ETag does not match the one provided.
snippet_files:
- javascriptv3/example_code/s3/actions/copy-object-conditional-request-if-match.js
- description: Copy the object on condition its ETag does not match the one provided.
snippet_files:
- javascriptv3/example_code/s3/actions/copy-object-conditional-request-if-none-match.js
- description: Copy the object using on condition it has been created or modified in a given timeframe.
snippet_files:
- javascriptv3/example_code/s3/actions/copy-object-conditional-request-if-modified-since.js
- description: Copy the object using on condition it has not been created or modified in a given timeframe.
snippet_files:
- javascriptv3/example_code/s3/actions/copy-object-conditional-request-if-unmodified-since.js
PHP:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -951,6 +963,19 @@ s3_GetObject:
- description: Download the object.
snippet_tags:
- s3.JavaScript.buckets.getobjectV3
- description: Download the object on condition its ETag does not match the one provided.
snippet_files:
- javascriptv3/example_code/s3/actions/get-object-conditional-request-if-match.js
- description: Download the object on condition its ETag does not match the one provided.
snippet_files:
- javascriptv3/example_code/s3/actions/get-object-conditional-request-if-none-match.js
- description: Download the object using on condition it has been created or modified in a given timeframe.
snippet_files:
- javascriptv3/example_code/s3/actions/get-object-conditional-request-if-modified-since.js
- description: Download the object using on condition it has not been created or modified in a given timeframe.
snippet_files:
- javascriptv3/example_code/s3/actions/get-object-conditional-request-if-unmodified-since.js

Ruby:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -1602,6 +1627,9 @@ s3_PutObject:
- description: Upload the object.
snippet_tags:
- s3.JavaScript.buckets.uploadV3
- description: Upload the object on condition its ETag matches the one provided.
snippet_files:
- javascriptv3/example_code/s3/actions/get-object-conditional-request-if-match.js
Ruby:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -3617,6 +3645,29 @@ s3_Scenario_ConditionalRequests:
- description: A wrapper class for S3 functions.
snippet_tags:
- S3ConditionalRequests.dotnetv3.S3ActionsWrapper
JavaScript:
versions:
- sdk_version: 3
github: javascriptv3/example_code/s3/scenarios/conditional-requests
sdkguide:
excerpts:
- description: |
Entrypoint for the workflow (<noloc>index.js</noloc>). This orchestrates all of the steps.
Visit GitHub to see the implementation details for Scenario, ScenarioInput, ScenarioOutput, and ScenarioAction.
snippet_files:
- javascriptv3/example_code/s3/scenarios/conditional-requests/index.js
- description: Output welcome messages to the console (<noloc>welcome.steps.js</noloc>).
snippet_files:
- javascriptv3/example_code/s3/scenarios/conditional-requests/welcome.steps.js
- description: Deploy buckets and objects (<noloc>setup.steps.js</noloc>).
snippet_files:
- javascriptv3/example_code/s3/scenarios/conditional-requests/setup.steps.js
- description: Get, copy, and put objects using S3 conditional requests (<noloc>repl.steps.js</noloc>).
snippet_files:
- javascriptv3/example_code/s3/scenarios/conditional-requests/repl.steps.js
- description: Destroy all created resources (<noloc>clean.steps.js</noloc>).
snippet_files:
- javascriptv3/example_code/s3/scenarios/conditional-requests/clean.steps.js
services:
s3: {GetObject, PutObject, CopyObject}
s3_Scenario_DownloadS3Directory:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"dependencies": {
"@aws-sdk/client-bedrock-agent-runtime": "^3.675.0"
Expand Down
4 changes: 2 additions & 2 deletions javascriptv3/example_code/bedrock-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"test": "vitest run unit",
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-sdk/client-bedrock-agent": "^3.515.0"
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/bedrock-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"devDependencies": {
"vitest": "^1.6.0"
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/bedrock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-sdk/client-bedrock": "^3.485.0"
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/cloudwatch-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"devDependencies": {
"vitest": "^1.6.0"
Expand Down
4 changes: 2 additions & 2 deletions javascriptv3/example_code/cloudwatch-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"@aws-sdk/client-lambda": "^3.216.0"
},
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml",
"test": "vitest run **/*.unit.test.js"
"integration-test": "vitest run integration-test",
"test": "vitest run unit"
},
"devDependencies": {
"vitest": "^1.6.0"
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/cloudwatch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@aws-sdk/client-ec2": "^3.213.0"
},
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"devDependencies": {
"uuid": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/codebuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"devDependencies": {
"@aws-sdk/client-iam": "^3.391.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/codecommit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"dependencies": {
"@aws-sdk/client-codecommit": "^3.427.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"test": "vitest run unit",
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-doc-sdk-examples/lib": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"main": "build/index.js",
"scripts": {
"test": "vitest run **/*.unit.test.ts",
"test": "vitest run unit",
"start": "node ./watch.js"
},
"author": "[email protected]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"test": "vitest run unit",
"build": "rollup -c"
},
"author": "Corey Pyle <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"test": "vitest run unit",
"build": "rollup -c"
},
"author": "Corey Pyle <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"test": "vitest run unit",
"build": "rollup -c"
},
"author": "Corey Pyle <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"test": "vitest run unit",
"build": "rollup -c"
},
"author": "Corey Pyle <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "index.js",
"scripts": {
"build": "rollup -c",
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"test": "vitest run **/*.unit.test.ts",
"test": "vitest run unit",
"cdk": "cdk"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"test": "npm run cdk-test",
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml",
"integration-test": "vitest run integration-test",
"cdk-test": "npm run test --prefix ./cdk"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-sdk/client-auto-scaling": "^3.438.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-doc-sdk-examples/lib": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/ec2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache 2.0",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"dependencies": {
"@aws-doc-sdk-examples/lib": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/eventbridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "Corey Pyle <[email protected]>",
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-doc-sdk-examples/lib": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions javascriptv3/example_code/glue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"test": "vitest run unit",
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-doc-sdk-examples/lib": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/iam/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-doc-sdk-examples/lib": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/kinesis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"test": "tests"
},
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions javascriptv3/example_code/lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js",
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"test": "vitest run unit",
"integration-test": "vitest run integration-test"
},
"dependencies": {
"@aws-doc-sdk-examples/lib": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/libs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"dependencies": {
"@aws-sdk/client-cloudformation": "^3.637.0",
Expand Down
4 changes: 2 additions & 2 deletions javascriptv3/example_code/medical-imaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@aws-sdk/client-sts": "^3.620.0"
},
"scripts": {
"test": "vitest run **/*.unit.test.js",
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"test": "vitest run unit",
"integration-test": "vitest run integration-test"
},
"type": "module",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/nodegetstarted/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The final package.json should look similar to this:
"description": "This guide shows you how to initialize an NPM package, add a service client to your package, and use the JavaScript SDK to call a service action.",
"main": "index.js",
"scripts": {
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/nodegetstarted/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "This guide shows you how to initialize an NPM package, add a service client to your package, and use the JavaScript SDK to call a service action.",
"main": "index.js",
"scripts": {
"integration-test": "vitest run **/*.integration.test.js --reporter=junit --outputFile=test_results/$npm_package_name.junit.xml"
"integration-test": "vitest run integration-test"
},
"author": "Corey Pyle <[email protected]>",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/personalize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "personalize operations",
"main": "personalizeClients.js",
"scripts": {
"test": "vitest run **/*.unit.test.js"
"test": "vitest run unit"
},
"type": "module",
"author": "Samuel Ashman <[email protected]>",
Expand Down
Loading
Loading