diff --git a/testbed/boto__botocore/tests/functional/__init__.py b/testbed/boto__botocore/tests/functional/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a49ed14ef4f8a41b6490f687b8af4ba604a3f87d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/__init__.py @@ -0,0 +1,83 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import os +import uuid + +import botocore +from tests import BaseEnvVar + +_ORIGINAL = os.environ.copy() +# These are environment variables that allow users to control +# the location of config files used by botocore. +_CONFIG_FILE_ENV_VARS = [ + 'AWS_CONFIG_FILE', + 'AWS_SHARED_CREDENTIALS_FILE', + 'BOTO_CONFIG', +] +_CREDENTIAL_ENV_VARS = [ + 'AWS_ACCESS_KEY_ID', + 'AWS_SECRET_ACCESS_KEY', + 'AWS_SESSION_TOKEN', +] + +TEST_MODELS_DIR = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + 'models', +) + + +def create_session(**kwargs): + # Create session and inject functional test models into loader + loader = _create_functional_test_loader() + session = botocore.session.Session(**kwargs) + session.register_component('data_loader', loader) + session.set_config_variable('credentials_file', 'noexist/foo/botocore') + return session + + +def _create_functional_test_loader(): + loader = botocore.loaders.Loader() + loader.search_paths.insert(0, TEST_MODELS_DIR) + return loader + + +class FunctionalSessionTest(BaseEnvVar): + def setUp(self, **environ): + super().setUp() + self.environ['AWS_ACCESS_KEY_ID'] = 'access_key' + self.environ['AWS_SECRET_ACCESS_KEY'] = 'secret_key' + self.environ['AWS_CONFIG_FILE'] = 'no-exist-foo' + self.environ.update(environ) + self.session = create_session() + self.session.config_filename = 'no-exist-foo' + + +def setup_package(): + # We're using a random uuid to ensure we're pointing + # AWS_CONFIG_FILE and other env vars at a filename that + # does not exist. + random_file = str(uuid.uuid4()) + for varname in _CONFIG_FILE_ENV_VARS: + # The reason we're doing this is to ensure we don't automatically pick + # up any credentials a developer might have configured on their local + # machine. Travis will not have any credentials available, so without + # this fixture setup, it's possible to have all the tests pass on your + # local machine (if you have credentials configured) but still fail on + # travis. + os.environ[varname] = random_file + for credvar in _CREDENTIAL_ENV_VARS: + os.environ.pop(credvar, None) + + +def teardown_package(): + os.environ = _ORIGINAL diff --git a/testbed/boto__botocore/tests/functional/conftest.py b/testbed/boto__botocore/tests/functional/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..e4dc8c2ea6304d895a6deddbb0be1f05826adc71 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/conftest.py @@ -0,0 +1,27 @@ +# Copyright 2012-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +import pytest + +from tests import create_session + + +@pytest.fixture() +def patched_session(monkeypatch): + monkeypatch.setenv('AWS_ACCESS_KEY_ID', 'access_key') + monkeypatch.setenv('AWS_SECRET_ACCESS_KEY', 'secret_key') + monkeypatch.setenv('AWS_CONFIG_FILE', 'no-exist-foo') + monkeypatch.delenv('AWS_PROFILE', raising=False) + monkeypatch.delenv('AWS_DEFAULT_REGION', raising=False) + session = create_session() + return session diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/application-signals/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/application-signals/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..5c4d5d9e24e58548146d2f4d559cab5eb5ae3f8d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/application-signals/endpoint-tests-1.json @@ -0,0 +1,201 @@ +{ + "testCases": [ + { + "documentation": "For custom endpoint with region not set and fips disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals-fips.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals-fips.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals-fips.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals-fips.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://application-signals.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/apptest/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/apptest/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9781f0e5a2fbef9f443a3852d03a114c39eb8463 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/apptest/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://apptest.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://apptest.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://apptest.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://apptest.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/artifact/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/artifact/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..d78df5725d42875f3e12a2bbf244a518b807b6be --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/artifact/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://artifact.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://artifact.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://artifact.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://artifact.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/b2bi/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/b2bi/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..6810661f7b34ec9c9cc2fb40eb4cf90717ec61b8 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/b2bi/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://b2bi.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://b2bi.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://b2bi.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://b2bi.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/bcm-data-exports/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/bcm-data-exports/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..a19159559cca176d4064ea61ce0a38c200368c1a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/bcm-data-exports/endpoint-tests-1.json @@ -0,0 +1,149 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "bcm-data-exports", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bcm-data-exports.us-east-1.api.aws" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "bcm-data-exports", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bcm-data-exports.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bcm-data-exports.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-agent-runtime/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-agent-runtime/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..acf526dda48efbc93479558211324baea09a37df --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-agent-runtime/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-runtime.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-agent/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-agent/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b1ef7a03eeedc535130f09e3de069261feb9a502 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-agent/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-agent.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-runtime/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-runtime/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9dbe82d206c12bd3329e567f60ff4772c65b88ff --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock-runtime/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..1b22fd55b8b750fdcb98bc927a78d3e86ecd10e8 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/bedrock/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/chatbot/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/chatbot/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3a4c6b7af045a6001beece12893c2324b0297ac2 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/chatbot/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://chatbot.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://chatbot.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://chatbot.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://chatbot.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/cleanroomsml/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/cleanroomsml/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3d35e84b647e123d7cde7f498781abe3e8279cd4 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/cleanroomsml/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cleanrooms-ml.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/cloudfront-keyvaluestore/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/cloudfront-keyvaluestore/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..e073f9b859c83a0a7a800d31c0daf5b61638df10 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/cloudfront-keyvaluestore/endpoint-tests-1.json @@ -0,0 +1,198 @@ +{ + "testCases": [ + { + "documentation": "FIPS should error", + "expect": { + "error": "Invalid Configuration: FIPS is not supported with CloudFront-KeyValueStore." + }, + "params": { + "UseFIPS": true + } + }, + { + "documentation": "KVS ARN must be provided to use this service", + "expect": { + "error": "KVS ARN must be provided to use this service" + } + }, + { + "documentation": "KVS ARN must be a valid ARN", + "expect": { + "error": "KVS ARN must be a valid ARN" + }, + "params": { + "KvsARN": "not-a-valid-arn" + } + }, + { + "documentation": "Provided ARN was not a valid CloudFront Service ARN. Found: `notcloudfront`", + "expect": { + "error": "Provided ARN is not a valid CloudFront Service ARN. Found: `notcloudfront`" + }, + "params": { + "KvsARN": "arn:aws:notcloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba" + } + }, + { + "documentation": "Provided ARN must be a global resource ARN. Found: `us-west-2`", + "expect": { + "error": "Provided ARN must be a global resource ARN. Found: `us-west-2`" + }, + "params": { + "KvsARN": "arn:aws:cloudfront:us-west-2:123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba" + } + }, + { + "documentation": "ARN resource type is invalid. Expected `key-value-store`, found: `some-other-resource-type`", + "expect": { + "error": "ARN resource type is invalid. Expected `key-value-store`, found: `some-other-resource-type`" + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:some-other-resource-type/my-first-kvs-e10b1dce4f394248811e77167e0451ba" + } + }, + { + "documentation": "CloudFront-KeyValueStore is not supported in partition `aws-cn`", + "expect": { + "error": "CloudFront-KeyValueStore is not supported in partition `aws-cn`" + }, + "params": { + "KvsARN": "arn:aws-cn:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba" + } + }, + { + "documentation": "CloudFront-KeyValueStore is not supported in partition `aws-us-gov`", + "expect": { + "error": "CloudFront-KeyValueStore is not supported in partition `aws-us-gov`" + }, + "params": { + "KvsARN": "arn:aws-us-gov:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba" + } + }, + { + "documentation": "Valid account based endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "cloudfront-keyvaluestore", + "name": "sigv4a", + "signingRegionSet": [ + "*" + ] + } + ] + }, + "url": "https://123456789012.cloudfront-kvs.global.api.aws" + } + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba" + } + }, + { + "documentation": "Valid account based endpoint, with SDK region", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "cloudfront-keyvaluestore", + "name": "sigv4a", + "signingRegionSet": [ + "*" + ] + } + ] + }, + "url": "https://123456789012.cloudfront-kvs.global.api.aws" + } + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba", + "Region": "us-west-2" + } + }, + { + "documentation": "Valid ARN, different partition, should error", + "expect": { + "error": "Client was configured for partition `aws-cn` but Kvs ARN has `aws`" + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba", + "Region": "cn-north-1" + } + }, + { + "documentation": "Valid account based endpoint with FIPS, should error", + "expect": { + "error": "Invalid Configuration: FIPS is not supported with CloudFront-KeyValueStore." + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba", + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "Custom sdk endpoint override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "cloudfront-keyvaluestore", + "name": "sigv4a", + "signingRegionSet": [ + "*" + ] + } + ] + }, + "url": "https://123456789012.my-override.example.com" + } + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba", + "Region": "us-east-1", + "Endpoint": "https://my-override.example.com" + } + }, + { + "documentation": "Custom sdk endpoint override with path and http", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "cloudfront-keyvaluestore", + "name": "sigv4a", + "signingRegionSet": [ + "*" + ] + } + ] + }, + "url": "http://123456789012.my-override.example.com/custom-path" + } + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba", + "Endpoint": "http://my-override.example.com/custom-path" + } + }, + { + "documentation": "Custom override with different partition should error", + "expect": { + "error": "Client was configured for partition `aws-us-gov` but Kvs ARN has `aws`" + }, + "params": { + "KvsARN": "arn:aws:cloudfront::123456789012:key-value-store/my-first-kvs-e10b1dce4f394248811e77167e0451ba", + "Region": "us-gov-east-1", + "Endpoint": "https://my-override.example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/codeconnections/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/codeconnections/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b4c48afab43bcd62a8a3438678c7a29b4d45e977 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/codeconnections/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://codeconnections.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/controlcatalog/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/controlcatalog/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..6188cfeaed49b322a5d2b8d3aa472e13bc6b4e4d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/controlcatalog/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlcatalog.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/cost-optimization-hub/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/cost-optimization-hub/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ba946348e1412c86627617ca77e2a8acbd7273de --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/cost-optimization-hub/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cost-optimization-hub.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/datazone/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/datazone/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..45e6d01db425c73933151b907031ee2df50c8566 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/datazone/endpoint-tests-1.json @@ -0,0 +1,119 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://datazone-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://datazone.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://datazone-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://datazone.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://datazone-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://datazone.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/deadline/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/deadline/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..5d9474e43a4f17eb115fd6049e6c5f2305690c8a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/deadline/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deadline.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deadline.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deadline.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deadline.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/ds-data/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/ds-data/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..aa20546a9a09767af60f23132314e44e6cc2b9b6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/ds-data/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ds-data.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ds-data.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ds-data.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ds-data.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/eks-auth/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/eks-auth/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2f75975a45b8e9d2216bd5bd2e89c8dd7ba4e3bc --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/eks-auth/endpoint-tests-1.json @@ -0,0 +1,119 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://eks-auth-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://eks-auth.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://eks-auth-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://eks-auth.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://eks-auth-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://eks-auth.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/elastic-inference/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/elastic-inference/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9b3c9144154348727901d6e0f15448636aa6ca0c --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/elastic-inference/endpoint-tests-1.json @@ -0,0 +1,379 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.elastic-inference.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/elastictranscoder/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/elastictranscoder/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ce032519b67463079a5e0ccb85aaa8782430f1d2 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/elastictranscoder/endpoint-tests-1.json @@ -0,0 +1,405 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://elastictranscoder.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/freetier/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/freetier/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..7d15539bb5b74391bca466a5f46968569446f0e3 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/freetier/endpoint-tests-1.json @@ -0,0 +1,170 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "freetier", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://freetier.us-east-1.api.aws" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://freetier-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "freetier", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://freetier.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region aws-cn-global with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "freetier", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://freetier.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "aws-cn-global", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://freetier-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://freetier.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://freetier-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://freetier.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/inspector-scan/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/inspector-scan/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b3d01284bb5530843aabc365123bb53a36197137 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/inspector-scan/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://inspector-scan.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/iot1click-devices/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/iot1click-devices/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f5c8d9a906e9876eb78f0165b75d82077b12fdab --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/iot1click-devices/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://devices.iot1click.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/iot1click-projects/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/iot1click-projects/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..51b621736026d2b68e3d69792e412cc1babace10 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/iot1click-projects/endpoint-tests-1.json @@ -0,0 +1,392 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://projects.iot1click.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/iotfleethub/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/iotfleethub/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..7efbb4403bc416cef476831fac577669b99317bb --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/iotfleethub/endpoint-tests-1.json @@ -0,0 +1,509 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.fleethub.iot.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/kinesisvideo/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/kinesisvideo/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3e71d1d389bbc8ca4b6218c9a234c86ca35f3732 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/kinesisvideo/endpoint-tests-1.json @@ -0,0 +1,509 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://kinesisvideo.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/launch-wizard/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/launch-wizard/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..33502c9dc8e5411c2d01bd4f5407e6a9ccdbde28 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/launch-wizard/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://launchwizard.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/lex-runtime/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/lex-runtime/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f1e38e0c07c3deb529e44ab6298868b9e14273fb --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/lex-runtime/endpoint-tests-1.json @@ -0,0 +1,511 @@ +{ + "testCases": [ + { + "documentation": "For region eu-central-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.eu-central-1.api.aws" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.eu-central-1.api.aws" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.us-west-2.api.aws" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.us-west-2.api.aws" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.eu-west-2.api.aws" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.eu-west-2.api.aws" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.eu-west-1.api.aws" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.eu-west-1.api.aws" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.ap-northeast-1.api.aws" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.ap-northeast-1.api.aws" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.ap-southeast-1.api.aws" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.ap-southeast-1.api.aws" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.ap-southeast-2.api.aws" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.ap-southeast-2.api.aws" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.lex.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.lex.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/lexv2-models/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/lexv2-models/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..6f052631e36e7d03770b5c23dbd268c3bc6c34f8 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/lexv2-models/endpoint-tests-1.json @@ -0,0 +1,444 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://models-v2-lex.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/lexv2-runtime/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/lexv2-runtime/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..e0b4ced4a3336e42720cfbedd4250ebca55d5906 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/lexv2-runtime/endpoint-tests-1.json @@ -0,0 +1,444 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-v2-lex.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/license-manager-user-subscriptions/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/license-manager-user-subscriptions/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9b289de04c89d42a4b605b4039915289de9e5a22 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/license-manager-user-subscriptions/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://license-manager-user-subscriptions.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/location/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/location/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2281499b47f372dc37c5c36efb96cfbe26d5e241 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/location/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/logs/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/logs/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..11c361c527c01063927fd6948cad8ebea41386e5 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/logs/endpoint-tests-1.json @@ -0,0 +1,678 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://logs.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://logs.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://logs.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://logs-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutequipment/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutequipment/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..4cc41e239d7aaf2bebd58ab31b7432d938d7d907 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutequipment/endpoint-tests-1.json @@ -0,0 +1,340 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutequipment.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutmetrics/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutmetrics/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..8cb8d92dbd4406d93a8ebacc62da6e592487ac76 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutmetrics/endpoint-tests-1.json @@ -0,0 +1,418 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutmetrics.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutvision/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutvision/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..d68476c559e3859d092b5457985f32a7841b926c --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/lookoutvision/endpoint-tests-1.json @@ -0,0 +1,392 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://lookoutvision.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/m2/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/m2/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..46b2e6c2c5d88d09bedd52dc5f909ae58fad11cf --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/m2/endpoint-tests-1.json @@ -0,0 +1,392 @@ +{ + "testCases": [ + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://m2.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://m2.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://m2.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://m2.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/machinelearning/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/machinelearning/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..36b80040ae040bd656393507f3dca0e99e18252e --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/machinelearning/endpoint-tests-1.json @@ -0,0 +1,327 @@ +{ + "testCases": [ + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://machinelearning.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/macie2/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/macie2/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..5e98037ed604b459f115db8e8b06dc9144b272e6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/macie2/endpoint-tests-1.json @@ -0,0 +1,613 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://macie2.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://macie2.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mailmanager/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mailmanager/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..10683c5d595acf48eb5d538521f71755a9befd82 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mailmanager/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mail-manager.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/managedblockchain-query/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/managedblockchain-query/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..7287b49a660d6e5986bfaf009861716fcbee5e6b --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/managedblockchain-query/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-query.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/managedblockchain/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/managedblockchain/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..bb672b6a2283bfea09861e933918010b92763fb1 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/managedblockchain/endpoint-tests-1.json @@ -0,0 +1,379 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://managedblockchain.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-agreement/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-agreement/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..98fd1f954db5fad6066bd5884947b967a2c6de5d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-agreement/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://agreement-marketplace.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-catalog/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-catalog/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2b506d08d1fb7bb73c50cb5888105d0e8c7cdfa3 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-catalog/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://catalog.marketplace.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-deployment/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-deployment/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..82c509117a131494e427371a9e92ae8343c2b0e0 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-deployment/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://deployment-marketplace.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-entitlement/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-entitlement/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c3c840c4176de7ec5f57c71437f9a6819acddaca --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplace-entitlement/endpoint-tests-1.json @@ -0,0 +1,327 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement-marketplace.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://entitlement.marketplace.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/marketplacecommerceanalytics/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplacecommerceanalytics/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..628e634634aec3b1fba85d339076e171046e7100 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/marketplacecommerceanalytics/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://marketplacecommerceanalytics.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediaconnect/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediaconnect/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b255249b261907fbe6a4ca5eb56a73a1af4400af --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediaconnect/endpoint-tests-1.json @@ -0,0 +1,509 @@ +{ + "testCases": [ + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconnect.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediaconvert/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediaconvert/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3585a4d234419970eba25c8be20e377c70aa1bae --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediaconvert/endpoint-tests-1.json @@ -0,0 +1,600 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediaconvert.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/medialive/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/medialive/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..401d3467dde91c94717d26cb6f0984b3cbe11661 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/medialive/endpoint-tests-1.json @@ -0,0 +1,509 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medialive.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackage-vod/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackage-vod/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9d5d29f4909a3329aec5748cd5f168053e9f18ee --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackage-vod/endpoint-tests-1.json @@ -0,0 +1,496 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-vod.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackage/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackage/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9d863247b5abf1f7ba65078139d392296bcc81c8 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackage/endpoint-tests-1.json @@ -0,0 +1,496 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackage.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackagev2/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackagev2/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..94df0b1e9be20d690c9cd15ff7933b0045a9580c --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediapackagev2/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediapackagev2.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediastore-data/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediastore-data/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ea62b3f08a60039a30946d9c34ee7563758c4425 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediastore-data/endpoint-tests-1.json @@ -0,0 +1,418 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.mediastore.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediastore/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediastore/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..755d484b1006863393fd5a19966f319c730d0e05 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediastore/endpoint-tests-1.json @@ -0,0 +1,418 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediastore.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediastore.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mediastore.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mediastore.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mediatailor/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mediatailor/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3dc19af7485077afbd93a96f01df74b74afa4d2a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mediatailor/endpoint-tests-1.json @@ -0,0 +1,392 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.mediatailor.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/medical-imaging/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/medical-imaging/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..6ed7bab23a22cf71145704c5009c29ad9c467131 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/medical-imaging/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medical-imaging.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/memorydb/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/memorydb/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..21db4f60bb993dcd16fa00677a8cb5bc4bcb3964 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/memorydb/endpoint-tests-1.json @@ -0,0 +1,544 @@ +{ + "testCases": [ + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region fips with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "memorydb", + "signingRegion": "us-west-1" + } + ] + }, + "url": "https://memory-db-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "fips", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://memory-db.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://memory-db.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/meteringmarketplace/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/meteringmarketplace/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..0afe5efd95c238f55dca839c153cc62a1620f24e --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/meteringmarketplace/endpoint-tests-1.json @@ -0,0 +1,600 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metering.marketplace.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mgh/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mgh/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c99eb4af56bb7aad9ac7d8a4acf35d9c033a17a5 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mgh/endpoint-tests-1.json @@ -0,0 +1,407 @@ +{ + "testCases": [ + { + "documentation": "For region eu-central-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.eu-central-1.api.aws" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh.eu-central-1.api.aws" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.us-west-2.api.aws" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh.us-west-2.api.aws" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.eu-west-2.api.aws" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh.eu-west-2.api.aws" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.eu-west-1.api.aws" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh.eu-west-1.api.aws" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.ap-northeast-1.api.aws" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh.ap-northeast-1.api.aws" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.ap-southeast-2.api.aws" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh.ap-southeast-2.api.aws" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgh.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgh.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mgn/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mgn/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9e52c48885ee14cec473175d27091e5b8980764a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mgn/endpoint-tests-1.json @@ -0,0 +1,574 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgn.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mgn.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/migration-hub-refactor-spaces/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/migration-hub-refactor-spaces/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2439218202577190e05d3589e08a641745fc01af --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/migration-hub-refactor-spaces/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://refactor-spaces.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhub-config/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhub-config/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3cebde220544eafb979008e992ed6f9c6d09c05c --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhub-config/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-config.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhuborchestrator/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhuborchestrator/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2f56d882d3c051624cca027d1f9027793603d582 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhuborchestrator/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-orchestrator.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhubstrategy/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhubstrategy/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..77e63bb113eb324e11cce50eaa3bda6b62b0f77f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/migrationhubstrategy/endpoint-tests-1.json @@ -0,0 +1,392 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://migrationhub-strategy.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mq/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mq/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..58b22f3c279cc25034780308ac6252f73938d97e --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mq/endpoint-tests-1.json @@ -0,0 +1,665 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mq.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mq.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mq.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mq.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mturk/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mturk/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..729ac6859b98d33cb4909db311962d8c3f41de41 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mturk/endpoint-tests-1.json @@ -0,0 +1,95 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mturk-requester-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mturk-requester-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://mturk-requester.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://mturk-requester.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/mwaa/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/mwaa/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..87bc8970e1fd69419ee71f44985c62268215a3c2 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/mwaa/endpoint-tests-1.json @@ -0,0 +1,496 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://airflow.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://airflow.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/neptune-graph/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/neptune-graph/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..46ff1711f004839bc1a43d8bb290223699106c96 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/neptune-graph/endpoint-tests-1.json @@ -0,0 +1,978 @@ +{ + "testCases": [ + { + "documentation": "Region and CP ApiType are provided", + "expect": { + "endpoint": { + "url": "https://mycustomDomain.com" + } + }, + "params": { + "Endpoint": "https://mycustomDomain.com", + "ApiType": "ControlPlane", + "Region": "us-east-1" + } + }, + { + "documentation": "Region and DP ApiType are provided", + "expect": { + "endpoint": { + "url": "https://mycustomDomain.com" + } + }, + "params": { + "Endpoint": "https://mycustomDomain.com", + "ApiType": "DataPlane", + "Region": "us-east-1" + } + }, + { + "documentation": "Region and invalid ApiType are provided", + "expect": { + "endpoint": { + "url": "https://mycustomDomain.com" + } + }, + "params": { + "Endpoint": "https://mycustomDomain.com", + "ApiType": "someInvalidApiType", + "Region": "us-east-1" + } + }, + { + "documentation": "Only invalid ApiType is provided", + "expect": { + "endpoint": { + "url": "https://mycustomDomain.com" + } + }, + "params": { + "Endpoint": "https://mycustomDomain.com", + "ApiType": "someInvalidApiType" + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.us-east-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-east-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-east-1.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-east-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://us-east-1.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-2, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.us-east-2.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-2, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-2, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-2, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-2, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-east-2.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-2, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-east-2.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: us-east-2, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-east-2.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: us-east-2, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://us-east-2.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: us-west-2, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.us-west-2.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: us-west-2, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: us-west-2, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: us-west-2, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: us-west-2, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-west-2.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: us-west-2, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-west-2.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: us-west-2, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.us-west-2.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: us-west-2, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://us-west-2.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.eu-west-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.eu-west-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-west-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-west-1.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-west-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://eu-west-1.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-2, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.eu-west-2.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-2, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-2, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.eu-west-2.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-2, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-2, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-west-2.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-2, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-west-2.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: eu-west-2, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-west-2.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: eu-west-2, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://eu-west-2.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: eu-central-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.eu-central-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-central-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: eu-central-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-central-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: eu-central-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.eu-central-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: eu-central-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: eu-central-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-central-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: eu-central-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-central-1.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: eu-central-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.eu-central-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: eu-central-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://eu-central-1.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: ap-southeast-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.ap-southeast-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-southeast-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: ap-southeast-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-southeast-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: ap-southeast-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-southeast-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: ap-southeast-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-southeast-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: ap-southeast-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.ap-southeast-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: ap-southeast-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.ap-southeast-1.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: ap-southeast-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: ap-southeast-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://ap-southeast-1.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: ap-northeast-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.ap-northeast-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-northeast-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: ap-northeast-1, useFipsEndpoint: true, useDualStackEndpoint: true", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-northeast-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: ap-northeast-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph-fips.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-northeast-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: ap-northeast-1, useFipsEndpoint: true, useDualStackEndpoint: false", + "expect": { + "error": "Invalid Configuration: fips endpoint is not supported for this API" + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-northeast-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Validate CP endpoint in region: ap-northeast-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.ap-northeast-1.api.aws" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate DP endpoint in region: ap-northeast-1, useFipsEndpoint: false, useDualStackEndpoint: true", + "expect": { + "endpoint": { + "url": "https://neptune-graph.ap-northeast-1.on.aws" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "Validate CP endpoint in region: ap-northeast-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://neptune-graph.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "ApiType": "ControlPlane", + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate DP endpoint in region: ap-northeast-1, useFipsEndpoint: false, useDualStackEndpoint: false", + "expect": { + "endpoint": { + "url": "https://ap-northeast-1.neptune-graph.amazonaws.com" + } + }, + "params": { + "ApiType": "DataPlane", + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Validate When no region is provided", + "expect": { + "error": "Invalid Configuration: Missing Region" + }, + "params": { + "ApiType": "DataPlane" + } + }, + { + "documentation": "Validate When invalid/unknown ApiType provided", + "expect": { + "error": "Invalid Configuration: Unknown ApiType" + }, + "params": { + "Region": "us-east-1", + "ApiType": "someUnknownValue" + } + }, + { + "documentation": "Both Fips and dualstack enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://mycustomDomain.com", + "ApiType": "ControlPlane", + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "Fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://mycustomDomain.com", + "ApiType": "ControlPlane", + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "Fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://mycustomDomain.com", + "ApiType": "ControlPlane", + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/neptune/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/neptune/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..8b0bc663a10f4f2e69f810bd5782ed6e61642f33 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/neptune/endpoint-tests-1.json @@ -0,0 +1,691 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/neptunedata/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/neptunedata/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..0c56273f24583a1b690d54eaa19bc6c509e5ffbe --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/neptunedata/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://neptune-db.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/network-firewall/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/network-firewall/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..1864bf14028206f796bd9d33e756fd349274ff34 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/network-firewall/endpoint-tests-1.json @@ -0,0 +1,652 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://network-firewall.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/networkmanager/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/networkmanager/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..06545870edf22c6aea23486c89dc7421fe042cb0 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/networkmanager/endpoint-tests-1.json @@ -0,0 +1,376 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-west-2" + } + ] + }, + "url": "https://networkmanager.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmanager.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-west-2" + } + ] + }, + "url": "https://networkmanager.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmanager.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-us-gov-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://networkmanager.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmanager.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://networkmanager.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmanager.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/networkmonitor/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/networkmonitor/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9031dc3e2749017a8fe73ff51358f4b2e657e79f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/networkmonitor/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://networkmonitor.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/nimble/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/nimble/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..1b24bf5aa7cd4d392ac2c5ccb6ff716b71d856d1 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/nimble/endpoint-tests-1.json @@ -0,0 +1,379 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://nimble.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://nimble.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://nimble.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://nimble.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/oam/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/oam/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ba42a2d0256cc9de2e478b4c34dae7aa4291c744 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/oam/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://oam.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://oam.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://oam.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://oam.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/omics/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/omics/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ce98807209385f3681033c84dc32b326f133d6a6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/omics/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://omics.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://omics.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://omics.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://omics.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/opensearch/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/opensearch/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f65ad7d5a53577a1bcd23cee805ff83cb76a3df5 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/opensearch/endpoint-tests-1.json @@ -0,0 +1,678 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aos.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://es-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aos.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aos.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://es-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/opensearchserverless/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/opensearchserverless/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..944c804cc572b22bb4cd6b1094f0ca2e97fcfd77 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/opensearchserverless/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aoss.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aoss.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://aoss.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://aoss.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/opsworks/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/opsworks/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..89c8cf197f0e632da6564b0868d1fc3304fc045a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/opsworks/endpoint-tests-1.json @@ -0,0 +1,496 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/opsworkscm/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/opsworkscm/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..bdc8f8ed5d0579ce8c3bae14e3ece3e096d2e0cc --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/opsworkscm/endpoint-tests-1.json @@ -0,0 +1,418 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://opsworks-cm.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/organizations/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/organizations/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..e5dab874b5546cf41a445a4eb0e3b66280e45795 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/organizations/endpoint-tests-1.json @@ -0,0 +1,553 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://organizations.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-global with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://organizations-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://organizations-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://organizations-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://organizations.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://organizations.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-cn-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://organizations.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "aws-cn-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://organizations-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://organizations-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://organizations.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://organizations.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-us-gov-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://organizations.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-us-gov-global with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://organizations.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://organizations-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://organizations.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://organizations.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://organizations.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-iso-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://organizations.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "aws-iso-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://organizations-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://organizations.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-iso-b-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://organizations.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "aws-iso-b-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://organizations-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://organizations.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "organizations", + "signingRegion": "us-isof-south-1" + } + ] + }, + "url": "https://organizations.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/osis/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/osis/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b8c784e7978b5e42b4b2156ccbdb8476a754cf80 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/osis/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://osis.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://osis.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://osis.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://osis.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/outposts/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/outposts/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..5dd2c4cb2fa94acf99f784b6603aa4955388dc07 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/outposts/endpoint-tests-1.json @@ -0,0 +1,652 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://outposts.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://outposts.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/panorama/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/panorama/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..a671b73db90a318e48fd7dc89a738ffa9731568e --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/panorama/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://panorama.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://panorama.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://panorama.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://panorama.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/payment-cryptography-data/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/payment-cryptography-data/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..1c130cc08ba7d18cd07f1a9c4be3a1769e73f2c3 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/payment-cryptography-data/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://dataplane.payment-cryptography.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/payment-cryptography/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/payment-cryptography/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f1004e41dd72f6b3f4537796d7930fbc1358cbf7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/payment-cryptography/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://controlplane.payment-cryptography.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pca-connector-ad/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pca-connector-ad/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..42408f7295bdb3fa729e0f5ec18f3e8a4abccaa1 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pca-connector-ad/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-ad.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pca-connector-scep/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pca-connector-scep/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..27f0552329a1e37d2986390c7e479d1331461254 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pca-connector-scep/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pca-connector-scep.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pcs/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pcs/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..579a85f57a2934bd08572288ee5e7c35f67a81db --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pcs/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pcs.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/personalize-events/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/personalize-events/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..434664e3bd38e251fbec88f3573b57085a74a4e7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/personalize-events/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-events.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/personalize-runtime/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/personalize-runtime/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..06165e2d93477cae6bce745aa67a74e96f4e0190 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/personalize-runtime/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-runtime.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/personalize/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/personalize/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..a076e4c7bef2c4bf396fa88de414a0423ad44c22 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/personalize/endpoint-tests-1.json @@ -0,0 +1,444 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://personalize.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pi/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pi/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..73734bfa14e1724a76e5414b9d81820ffb0bf3f4 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pi/endpoint-tests-1.json @@ -0,0 +1,587 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pi.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pi.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pi.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pi.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-email/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-email/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..fa4feb98bdd2a08f50b778105baac1ab81f7a92d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-email/endpoint-tests-1.json @@ -0,0 +1,600 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://email.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://email-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://email.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://email.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://email.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-sms-voice-v2/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-sms-voice-v2/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..8f3ac65e87611d3a5bbdb19f28cafdd788de923e --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-sms-voice-v2/endpoint-tests-1.json @@ -0,0 +1,444 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-sms-voice/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-sms-voice/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c5475f448864217285230f4449c7f2013e92c485 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint-sms-voice/endpoint-tests-1.json @@ -0,0 +1,295 @@ +{ + "testCases": [ + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..60ed60bc36d65d61112ffb36f622bff2e42c9fac --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pinpoint/endpoint-tests-1.json @@ -0,0 +1,483 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pinpoint.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pipes/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pipes/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..95cdbb595d9a89d351482d44f462f55ed86d14b9 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pipes/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pipes.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pipes.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://pipes.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://pipes.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/polly/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/polly/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..748ad8f6a2b8a48de3d879538ae894133b71f2f6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/polly/endpoint-tests-1.json @@ -0,0 +1,626 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://polly.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://polly.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://polly.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://polly.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/pricing/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/pricing/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..db676384e56c6132fe679821cf0c61ee845c5035 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/pricing/endpoint-tests-1.json @@ -0,0 +1,327 @@ +{ + "testCases": [ + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.pricing.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/privatenetworks/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/privatenetworks/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..4bce020482b0df4262a2490d5006ff6bc268ab5c --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/privatenetworks/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://private-networks.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://private-networks.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://private-networks.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://private-networks.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/proton/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/proton/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2ea3a3dcf5b885711bede1fc148a57f4f3e39723 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/proton/endpoint-tests-1.json @@ -0,0 +1,366 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://proton.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://proton.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://proton.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://proton.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/qapps/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/qapps/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..271533dc779056bd1765ada6f313a2a626be090b --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/qapps/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://data.qapps.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/qbusiness/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/qbusiness/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9e9effe71f91a911d44759066ed7665bdc347dd4 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/qbusiness/endpoint-tests-1.json @@ -0,0 +1,119 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/qconnect/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/qconnect/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..6357b35cff282a5a3dd095d69b9d0347a352d3fb --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/qconnect/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/qldb-session/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/qldb-session/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3497fde86814fd3c6d5062e1bcc4be69c3017a46 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/qldb-session/endpoint-tests-1.json @@ -0,0 +1,470 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://session.qldb.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/qldb/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/qldb/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c8ca67f129b58058e91f38a3c13c4b15911b4517 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/qldb/endpoint-tests-1.json @@ -0,0 +1,483 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qldb.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://qldb.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/quicksight/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/quicksight/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..726ca1da1334284b81433612a93e331c4bea5151 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/quicksight/endpoint-tests-1.json @@ -0,0 +1,509 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region api with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.api.amazonaws.com" + } + }, + "params": { + "Region": "api", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://quicksight.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region api with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.api.amazonaws.com" + } + }, + "params": { + "Region": "api", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://quicksight.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/ram/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/ram/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ba2b34bc76a19ee20fee53681bf66b709d247202 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/ram/endpoint-tests-1.json @@ -0,0 +1,678 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ram.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ram.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ram.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ram-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/rbin/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/rbin/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..807fbef5e61d10dc85cdda9da95202886e3410bb --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/rbin/endpoint-tests-1.json @@ -0,0 +1,574 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rbin.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rbin.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/rds-data/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/rds-data/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f359d909aac179b7fcc3cebccfa733e336a253c7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/rds-data/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-data.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-data.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-data.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-data.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/rds/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/rds/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..8b0bc663a10f4f2e69f810bd5782ed6e61642f33 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/rds/endpoint-tests-1.json @@ -0,0 +1,691 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rds.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rds-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/redshift-data/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/redshift-data/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3f2eaaca3aa6b4bb10de842f9555a5fbff83b2d2 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/redshift-data/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-data.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/redshift-serverless/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/redshift-serverless/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..413ef0a553d726e0a4390c1a589c9f0d7fa296f7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/redshift-serverless/endpoint-tests-1.json @@ -0,0 +1,444 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-serverless.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/redshift/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/redshift/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..a065a7553eead7d89228d19bd8a43fc3f31fccc3 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/redshift/endpoint-tests-1.json @@ -0,0 +1,691 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://redshift-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/rekognition/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/rekognition/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3a088ca53db43ed86536990b7f9b4757fe611dff --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/rekognition/endpoint-tests-1.json @@ -0,0 +1,548 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rekognition.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rekognition.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/repostspace/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/repostspace/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f59458505746c766d848f271414e1ebacbd7db94 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/repostspace/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://repostspace.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://repostspace.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://repostspace.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://repostspace.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/resiliencehub/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/resiliencehub/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..5548bc2e776eeecd027abe780236d775c4a2b13a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/resiliencehub/endpoint-tests-1.json @@ -0,0 +1,561 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resiliencehub.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/resource-explorer-2/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/resource-explorer-2/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..de57bc625a417801817422b4946a4a001c985df2 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/resource-explorer-2/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-explorer-2.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/resource-groups/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/resource-groups/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..570ff07cbbd13edb9f6846b20d4c8a5c4866cad9 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/resource-groups/endpoint-tests-1.json @@ -0,0 +1,665 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://resource-groups.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/resourcegroupstaggingapi/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/resourcegroupstaggingapi/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..30325ab86b6474de2ec6936694c19b3a70a2cd80 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/resourcegroupstaggingapi/endpoint-tests-1.json @@ -0,0 +1,613 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tagging.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tagging-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/robomaker/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/robomaker/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..70e594aaf5352e47536fc81b68fbf3c9cdf11221 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/robomaker/endpoint-tests-1.json @@ -0,0 +1,405 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://robomaker.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://robomaker.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/rolesanywhere/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/rolesanywhere/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b5000b3a39f2fdc681912aeac69462fb6b3631ff --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/rolesanywhere/endpoint-tests-1.json @@ -0,0 +1,548 @@ +{ + "testCases": [ + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rolesanywhere.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-cluster/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-cluster/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3e5ab85774e220e38c2bf2d1b6cddec24b10da88 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-cluster/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-cluster.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-control-config/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-control-config/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..48431bfa77768b5205c0522b1a1732e471f9a0fa --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-control-config/endpoint-tests-1.json @@ -0,0 +1,336 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53-recovery-control-config", + "signingRegion": "us-west-2" + } + ] + }, + "url": "https://route53-recovery-control-config.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-control-config.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-readiness/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-readiness/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..fe7f4db3d7fb5c0b43b458ac2c71a733c36607c3 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/route53-recovery-readiness/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-recovery-readiness.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/route53/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/route53/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..42145ddb1cbf0df3e49765908cddf3c69db384fb --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/route53/endpoint-tests-1.json @@ -0,0 +1,575 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://route53.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-global with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://route53-fips.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://route53-fips.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://route53.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-cn-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://route53.amazonaws.com.cn" + } + }, + "params": { + "Region": "aws-cn-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://route53.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-us-gov-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://route53.us-gov.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-us-gov-global with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://route53.us-gov.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://route53.us-gov.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://route53.us-gov.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-iso-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://route53.c2s.ic.gov" + } + }, + "params": { + "Region": "aws-iso-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://route53.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-iso-b-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://route53.sc2s.sgov.gov" + } + }, + "params": { + "Region": "aws-iso-b-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://route53.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "eu-isoe-west-1" + } + ] + }, + "url": "https://route53.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-isof-south-1" + } + ] + }, + "url": "https://route53.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/route53domains/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/route53domains/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f837786f8dd61ecc50d774c7abedcf0b23346bdc --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/route53domains/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53domains.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53domains.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53domains.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53domains.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/route53profiles/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/route53profiles/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..34fdea876e5a9461631f274d850403b5cfbfd127 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/route53profiles/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53profiles.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/route53resolver/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/route53resolver/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..d8c59410ea677ac442dd48cda2a5c0e44d3205e1 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/route53resolver/endpoint-tests-1.json @@ -0,0 +1,626 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53resolver-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53resolver-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53resolver-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/rum/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/rum/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..50b7fb1734e4d65bf670026da9885abd08da6dcd --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/rum/endpoint-tests-1.json @@ -0,0 +1,431 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rum.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rum.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://rum.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://rum.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/s3/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/s3/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b6575d8e0201f6d932673ccccdc081f1b735f346 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/s3/endpoint-tests-1.json @@ -0,0 +1,8607 @@ +{ + "testCases": [ + { + "documentation": "region is not a valid DNS-suffix", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "a b", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "Invalid access point ARN: Not S3", + "expect": { + "error": "Invalid ARN: The ARN was not for the S3 service, found: not-s3" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Invalid access point ARN: invalid resource", + "expect": { + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data" + } + }, + { + "documentation": "Invalid access point ARN: invalid no ap name", + "expect": { + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:" + } + }, + { + "documentation": "Invalid access point ARN: AccountId is invalid", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123456_789012`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456_789012:accesspoint:apname" + } + }, + { + "documentation": "Invalid access point ARN: access point name is invalid", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `ap_name`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name" + } + }, + { + "documentation": "Access points (disable access points explicitly false)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Access points: partition does not support FIPS", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Bucket region is invalid", + "expect": { + "error": "Invalid region in ARN: `us-west -2` (invalid DNS name)" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Access points when Access points explicitly disabled (used for CreateBucket)", + "expect": { + "error": "Access points are not supported for this operation" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "missing arn type", + "expect": { + "error": "Invalid ARN: `arn:aws:s3:us-west-2:123456789012:` was not a valid ARN" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableAccessPoints": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:" + } + }, + { + "documentation": "SDK::Host + access point + Dualstack is an error", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "Access point ARN with FIPS & Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Access point ARN with Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "DisableAccessPoints": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "vanilla MRAP", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingRegionSet": [ + "*" + ], + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "MRAP does not support FIPS", + "expect": { + "error": "S3 MRAP does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "MRAP does not support DualStack", + "expect": { + "error": "S3 MRAP does not support dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "MRAP does not support S3 Accelerate", + "expect": { + "error": "S3 MRAP does not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "MRAP explicitly disabled", + "expect": { + "error": "Invalid configuration: Multi-Region Access Point ARNs are disabled." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::DisableMultiRegionAccessPoints": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-east-1", + "DisableMultiRegionAccessPoints": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "Dual-stack endpoint with path-style forced", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucketname" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucketname", + "Region": "us-west-2", + "ForcePathStyle": true, + "UseFIPS": false, + "Accelerate": false, + "UseDualStack": true + } + }, + { + "documentation": "Dual-stack endpoint + SDK::Host is error", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://abc.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucketname", + "Region": "us-west-2", + "ForcePathStyle": true, + "UseFIPS": false, + "Accelerate": false, + "UseDualStack": true, + "Endpoint": "https://abc.com" + } + }, + { + "documentation": "path style + ARN bucket", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "implicit path style bucket + dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/99_ab" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "implicit path style bucket + dualstack", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "http://abc.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "http://abc.com" + } + }, + { + "documentation": "don't allow URL injections in the bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/example.com%23" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "example.com#", + "Key": "key" + } + } + ], + "params": { + "Bucket": "example.com#", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "URI encode bucket names in the path", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket%20name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket name", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "scheme is respected", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" + } + }, + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "scheme is respected (virtual addressing)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucketname.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo" + } + }, + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + implicit private link", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99_ab", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99_ab", + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "invalid Endpoint override", + "expect": { + "error": "Custom endpoint `abcde://nota#url` was not a valid URI" + }, + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "abcde://nota#url", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "using an IPv4 address forces path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123.123.0.1/bucketname" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://123.123.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucketname", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucketname", + "Endpoint": "https://123.123.0.1", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn with region mismatch and UseArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "subdomains are not allowed in virtual buckets", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/bucket.name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket.name", + "Region": "us-east-1" + } + }, + { + "documentation": "bucket names with 3 characters are allowed in virtual buckets", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://aaa.s3.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "aaa", + "Key": "key" + } + } + ], + "params": { + "Bucket": "aaa", + "Region": "us-east-1" + } + }, + { + "documentation": "bucket names with fewer than 3 characters are not allowed in virtual host", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/aa" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "aa", + "Key": "key" + } + } + ], + "params": { + "Bucket": "aa", + "Region": "us-east-1" + } + }, + { + "documentation": "bucket names with uppercase characters are not allowed in virtual host", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.us-east-1.amazonaws.com/BucketName" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "BucketName", + "Key": "key" + } + } + ], + "params": { + "Bucket": "BucketName", + "Region": "us-east-1" + } + }, + { + "documentation": "subdomains are allowed in virtual buckets on http endpoints", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://bucket.name.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "http://example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.name", + "Key": "key" + } + } + ], + "params": { + "Bucket": "bucket.name", + "Region": "us-east-1", + "Endpoint": "http://example.com" + } + }, + { + "documentation": "no region set", + "expect": { + "error": "A region must be set when sending requests to S3." + }, + "params": { + "Bucket": "bucket-name" + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-west-2 uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-west-2", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=cn-north-1 uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "cn-north-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, fips=true uses the regional endpoint with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack=true uses the regional endpoint with dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1, dualstack and fips uses the regional endpoint with fips/dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-west-2 with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-west-2", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "UseGlobalEndpoints=true, region=us-east-1 with accelerate on non bucket case uses the global endpoint and ignores accelerate", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with fips uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with dualstack uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with fips and dualstack uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "aws-global region with accelerate on non-bucket case, uses global endpoint and ignores accelerate", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::Accelerate": true + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "aws-global region with custom endpoint, uses custom", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com" + }, + "operationName": "ListBuckets" + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": false, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with Prefix, and Key uses the global endpoint. Prefix and Key parameters should not be used in endpoint evaluation.", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global" + }, + "operationName": "ListObjects", + "operationParams": { + "Bucket": "bucket-name", + "Prefix": "prefix" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Prefix": "prefix", + "Key": "key" + } + }, + { + "documentation": "virtual addressing, aws-global region with Copy Source, and Key uses the global endpoint. Copy Source and Key parameters should not be used in endpoint evaluation.", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "CopySource": "/copy/source", + "Key": "key" + } + }, + { + "documentation": "virtual addressing, aws-global region with fips uses the regional fips endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with fips/dualstack uses the regional fips/dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, aws-global region with accelerate uses the global accelerate endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "virtual addressing, aws-global region with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-west-2 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and fips uses the regional fips endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region and accelerate uses the global accelerate endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true + } + }, + { + "documentation": "virtual addressing, UseGlobalEndpoint and us-east-1 region with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "Bucket": "bucket-name", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region with fips is invalid", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket-name" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region with dualstack uses regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, aws-global region custom endpoint uses the custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "SDK::Endpoint": "https://example.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "Endpoint": "https://example.com", + "Bucket": "bucket-name", + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region uses the global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-west-2 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region, dualstack uses the regional dualstack endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false + } + }, + { + "documentation": "ForcePathStyle, UseGlobalEndpoint us-east-1 region custom endpoint uses the custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "bucket-name", + "Endpoint": "https://example.com", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "ARN with aws-global region and UseArnRegion uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseArnRegion": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "cross partition MRAP ARN is an error", + "expect": { + "error": "Client was configured for partition `aws` but bucket referred to partition `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Key": "key" + } + } + ], + "params": { + "Bucket": "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap", + "Region": "us-west-1" + } + }, + { + "documentation": "Endpoint override, accesspoint with HTTP, port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://myendpoint-123456789012.beta.example.com:1234" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://beta.example.com:1234" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Endpoint": "http://beta.example.com:1234", + "Region": "us-west-2", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + } + }, + { + "documentation": "Endpoint override, accesspoint with http, path, query, and port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://myendpoint-123456789012.beta.example.com:1234/path" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "non-bucket endpoint override with FIPS = error", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "FIPS + dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "custom endpoint without FIPS/dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://beta.example.com:1234/path" + } + }, + "params": { + "Region": "us-west-2", + "Endpoint": "http://beta.example.com:1234/path", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "s3 object lambda with access points disabled", + "expect": { + "error": "Access points are not supported for this operation" + }, + "params": { + "Region": "us-west-2", + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:myendpoint", + "DisableAccessPoints": true + } + }, + { + "documentation": "non bucket + FIPS", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "standard non bucket endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "non bucket endpoint with FIPS + Dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "non bucket endpoint with dualstack", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "use global endpoint + IP address endpoint override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://127.0.0.1/bucket" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "http://127.0.0.1", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "non-dns endpoint + global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + use global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + dualstack + non-bucket endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "FIPS + dualstack + non-DNS endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "endpoint override + FIPS + dualstack (BUG)", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "endpoint override + non-dns bucket + FIPS (BUG)", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + bucket endpoint + force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "bucket + FIPS + force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "ForcePathStyle": true, + "UseFIPS": true, + "UseDualStack": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + dualstack + use global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bucket.s3-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": true, + "UseDualStack": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "URI encoded bucket + use global endpoint", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "https://foo.com" + } + }, + { + "documentation": "FIPS + path based endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "accelerate + dualstack + global endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://bucket.s3-accelerate.dualstack.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "dualstack + global endpoint + non URI safe bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "Accelerate": false, + "UseDualStack": true, + "UseFIPS": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + uri encoded bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "Accelerate": false, + "UseDualStack": false, + "UseFIPS": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + non-uri safe endpoint + force path style", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "ForcePathStyle": true, + "Accelerate": false, + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "http://foo.com", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "FIPS + Dualstack + global endpoint + non-dns bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true, + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "bucket!", + "Accelerate": false, + "UseDualStack": true, + "UseFIPS": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "endpoint override + FIPS + dualstack", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "non-bucket endpoint override + dualstack + global endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "Endpoint override + UseGlobalEndpoint + us-east-1", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "non-FIPS partition with FIPS set + custom endpoint", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "aws-global signs as us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseFIPS": true, + "Accelerate": false, + "UseDualStack": true + } + }, + { + "documentation": "aws-global signs as us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.foo.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "https://foo.com" + } + }, + { + "documentation": "aws-global + dualstack + path-only bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": false + } + }, + { + "documentation": "aws-global + path-only bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!" + } + }, + { + "documentation": "aws-global + fips + custom endpoint", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": false, + "UseFIPS": true, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "aws-global, endpoint override & path only-bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseDualStack": false, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "aws-global + dualstack + custom endpoint", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "aws-global", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": false, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "accelerate, dualstack + aws-global", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.s3-accelerate.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "UseDualStack": true, + "UseFIPS": false, + "Accelerate": true + } + }, + { + "documentation": "FIPS + aws-global + path only bucket. This is not supported by S3 but we allow garbage in garbage out", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.dualstack.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseDualStack": true, + "UseFIPS": true, + "Accelerate": false + } + }, + { + "documentation": "aws-global + FIPS + endpoint override.", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "force path style, FIPS, aws-global & endpoint override", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "ForcePathStyle": true, + "UseFIPS": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "ip address causes path style to be forced", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://192.168.1.1/bucket" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket", + "Endpoint": "http://192.168.1.1" + } + }, + { + "documentation": "endpoint override with aws-global region", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "FIPS + path-only (TODO: consider making this an error)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-1", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-fips.us-east-1.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "aws-global", + "Bucket": "bucket!", + "UseFIPS": true + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Invalid ARN: No ARN type specified" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:not-s3:us-west-2:123456789012::myendpoint" + } + }, + { + "documentation": "path style can't be used with accelerate", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "Accelerate": true + } + }, + { + "documentation": "invalid region", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "us-east-2!", + "Bucket": "bucket.subdomain", + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "invalid region", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "us-east-2!", + "Bucket": "bucket", + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Invalid Access Point Name" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3::123456789012:accesspoint:my_endpoint" + } + }, + { + "documentation": "empty arn type", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint`) has `aws-cn`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3:cn-north-1:123456789012:accesspoint:my-endpoint", + "UseArnRegion": true + } + }, + { + "documentation": "invalid arn region", + "expect": { + "error": "Invalid region in ARN: `us-east_2` (invalid DNS name)" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-object-lambda:us-east_2:123456789012:accesspoint:my-endpoint", + "UseArnRegion": true + } + }, + { + "documentation": "invalid ARN outpost", + "expect": { + "error": "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `op_01234567890123456`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op_01234567890123456/accesspoint/reports", + "UseArnRegion": true + } + }, + { + "documentation": "invalid ARN", + "expect": { + "error": "Invalid ARN: expected an access point name" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/reports" + } + }, + { + "documentation": "invalid ARN", + "expect": { + "error": "Invalid ARN: Expected a 4-component resource" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Expected an outpost type `accesspoint`, found not-accesspoint" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid region in ARN: `us-east_1` (invalid DNS name)" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east_1:123456789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `12345_789012`" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:12345_789012:outpost/op-01234567890123456/not-accesspoint/reports" + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "error": "Invalid ARN: The Outpost Id was not set" + }, + "params": { + "Region": "us-east-2", + "Bucket": "arn:aws:s3-outposts:us-east-1:12345789012:outpost" + } + }, + { + "documentation": "use global endpoint virtual addressing", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucket.example.com" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Endpoint": "http://example.com", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "global endpoint + ip address", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://192.168.0.1/bucket" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Endpoint": "http://192.168.0.1", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-east-2.amazonaws.com/bucket%21" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true + } + }, + { + "documentation": "invalid outpost type", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket.s3-accelerate.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket", + "Accelerate": true, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "use global endpoint + custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "use global endpoint, not us-east-1, force path style", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingRegion": "us-east-2", + "name": "sigv4", + "signingName": "s3", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://foo.com/bucket%21" + } + }, + "params": { + "Region": "us-east-2", + "Bucket": "bucket!", + "UseGlobalEndpoint": true, + "ForcePathStyle": true, + "Endpoint": "http://foo.com" + } + }, + { + "documentation": "vanilla virtual addressing@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate (dualstack=false)@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + fips@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "virtual addressing + dualstack + fips@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "accelerate + fips = error@us-west-2", + "expect": { + "error": "Accelerate cannot be used with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla virtual addressing@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + dualstack@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate (dualstack=false)@cn-north-1", + "expect": { + "error": "S3 Accelerate cannot be used in this region" + }, + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + fips@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla virtual addressing@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3.dualstack.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.dualstack.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "accelerate (dualstack=false)@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-accelerate.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "virtual addressing + dualstack + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.s3-fips.dualstack.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "accelerate + fips = error@af-south-1", + "expect": { + "error": "Accelerate cannot be used with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "vanilla path style@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "fips@us-gov-west-2, bucket is not S3-dns-compatible (subdomains)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "us-gov-west-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.us-gov-west-1.amazonaws.com/bucket.with.dots" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket.with.dots", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket.with.dots", + "Region": "us-gov-west-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@us-west-2", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.us-west-2.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@us-west-2", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.us-west-2.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla path style@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + fips@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@cn-north-1", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.cn-north-1.amazonaws.com.cn/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla path style@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + fips@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true, + "name": "sigv4" + } + ] + }, + "url": "https://s3-fips.af-south-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "path style + accelerate = error@af-south-1", + "expect": { + "error": "Path-style addressing cannot be used with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true, + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + dualstack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.dualstack.af-south-1.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "path style + arn is error@af-south-1", + "expect": { + "error": "Path-style addressing cannot be used with ARN buckets" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + invalid DNS name@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "ForcePathStyle": true, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "no path style + invalid DNS name@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3.af-south-1.amazonaws.com/99a_b" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "99a_b", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "99a_b", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + private link@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + FIPS@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "SDK::Host + DualStack@us-west-2", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@us-west-2", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + private link@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "FIPS@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "SDK::Host + DualStack@cn-north-1", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@cn-north-1", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "virtual addressing + private link@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "path style + private link@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::ForcePathStyle": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": true, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + FIPS@af-south-1", + "expect": { + "error": "A custom endpoint cannot be combined with FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "SDK::Host + DualStack@af-south-1", + "expect": { + "error": "Cannot set dual-stack in combination with a custom endpoint." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "SDK::HOST + accelerate@af-south-1", + "expect": { + "error": "A custom endpoint cannot be combined with S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "bucket-name", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "bucket-name", + "ForcePathStyle": false, + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "SDK::Host + access point ARN@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Endpoint": "https://beta.example.com", + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla access point arn@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@us-west-2", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "vanilla access point arn@cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@cn-north-1", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Bucket": "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "vanilla access point arn@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "access point arn + accelerate = error@af-south-1", + "expect": { + "error": "Access Points do not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": true, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point arn + FIPS + DualStack@af-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint", + "ForcePathStyle": false, + "Region": "af-south-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "S3 outposts vanilla test", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.example.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.amazonaws.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Endpoint": "https://example.amazonaws.com" + } + }, + { + "documentation": "outposts arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with region mismatch, custom region and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://example.com", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Endpoint": "https://example.com", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with region mismatch and UseArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outposts arn with partition mismatch and UseArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "ForcePathStyle": false, + "UseArnRegion": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ARN with UseGlobalEndpoint and use-east-1 region uses the regional endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseGlobalEndpoint": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseGlobalEndpoint": true, + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support dualstack", + "expect": { + "error": "S3 Outposts does not support Dual-stack" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support fips", + "expect": { + "error": "S3 Outposts does not support FIPS" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "S3 outposts does not support accelerate", + "expect": { + "error": "S3 Outposts does not support S3 Accelerate" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports" + } + }, + { + "documentation": "validates against subresource", + "expect": { + "error": "Invalid Arn: Outpost Access Point ARN contains sub resources" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:mybucket:object:foo" + } + }, + { + "documentation": "object lambda @us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda, colon resource deliminator @us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region us-west-2, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "s3-external-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region s3-external-1, useArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "s3-external-1", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "s3-external-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=true", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-east-1, client region aws-global, useArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @cn-north-1, client region us-west-2 (cross partition), useArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with dualstack", + "expect": { + "error": "S3 Object Lambda does not support Dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-gov-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @us-gov-east-1, with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.s3-object-lambda-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda @cn-north-1, with fips", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with accelerate", + "expect": { + "error": "S3 Object Lambda does not support S3 Accelerate" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::Accelerate": true, + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - bad service and someresource", + "expect": { + "error": "Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource)" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:sqs:us-west-2:123456789012:someresource" + } + }, + { + "documentation": "object lambda with invalid arn - invalid resource", + "expect": { + "error": "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `bucket_name`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:bucket_name:mybucket" + } + }, + { + "documentation": "object lambda with invalid arn - missing region", + "expect": { + "error": "Invalid ARN: bucket ARN is missing a region" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda::123456789012:accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - missing account-id", + "expect": { + "error": "Invalid ARN: Missing account id" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2::accesspoint/mybanner" + } + }, + { + "documentation": "object lambda with invalid arn - account id contains invalid characters", + "expect": { + "error": "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket" + } + }, + { + "documentation": "object lambda with invalid arn - missing access point name", + "expect": { + "error": "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains invalid character: *", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `*`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:*" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains invalid character: .", + "expect": { + "error": "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `my.bucket`" + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:my.bucket" + } + }, + { + "documentation": "object lambda with invalid arn - access point name contains sub resources", + "expect": { + "error": "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`." + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": true, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybucket:object:foo" + } + }, + { + "documentation": "object lambda with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://mybanner-123456789012.my-endpoint.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://my-endpoint.com", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseArnRegion": false, + "Bucket": "arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner", + "Endpoint": "https://my-endpoint.com" + } + }, + { + "documentation": "object lambda arn with region mismatch and UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3::UseArnRegion": false + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "Key": "key" + } + } + ], + "params": { + "Accelerate": false, + "Bucket": "arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner", + "ForcePathStyle": false, + "UseArnRegion": false, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse @ us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://my-endpoint.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://my-endpoint.com" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Endpoint": "https://my-endpoint.com", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse @ us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-object-lambda-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "WriteGetObjectResponse with dualstack", + "expect": { + "error": "S3 Object Lambda does not support Dual-stack" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "WriteGetObjectResponse", + "operationParams": { + "RequestRoute": "RequestRoute", + "RequestToken": "RequestToken" + } + } + ], + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with accelerate", + "expect": { + "error": "S3 Object Lambda does not support S3 Accelerate" + }, + "params": { + "Accelerate": true, + "UseObjectLambdaEndpoint": true, + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with fips in CN", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Accelerate": false, + "Region": "cn-north-1", + "UseObjectLambdaEndpoint": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "WriteGetObjectResponse with invalid partition", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "not a valid DNS name", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "WriteGetObjectResponse with an unknown partition", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-object-lambda", + "disableDoubleEncoding": true, + "signingRegion": "us-east.special" + } + ] + }, + "url": "https://s3-object-lambda.us-east.special.amazonaws.com" + } + }, + "params": { + "Accelerate": false, + "UseObjectLambdaEndpoint": true, + "Region": "us-east.special", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Prod us-west-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Prod ap-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "ap-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.op-0b1d075431d83bebd.s3-outposts.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Prod me-south-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "me-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3.ec2.s3-outposts.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "Bucket": "test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Real Outpost Beta", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3.op-0b1d075431d83bebd.example.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", + "Endpoint": "https://example.amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Ec2 Outpost Beta", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "s3-outposts", + "signingRegionSet": [ + "*" + ], + "disableDoubleEncoding": true + }, + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3.ec2.example.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "Bucket": "161743052723-e00000136899934034jeahy1t8gpzpbwjj8kb7beta0--op-s3", + "Endpoint": "https://example.amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", + "expect": { + "error": "Expected a endpoint to be specified but no endpoint was found" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o0b1d075431d83bebde8xz5w8ijx1qzlbp3i3kbeta0--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Invalid hardware type", + "expect": { + "error": "Unrecognized hardware type: \"Expected hardware type o or e but got h\"" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-h0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias Special character in Outpost Arn", + "expect": { + "error": "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`." + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-o00000754%1d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Outposts bucketAlias - No endpoint set for beta", + "expect": { + "error": "Expected a endpoint to be specified but no endpoint was found" + }, + "params": { + "Region": "us-east-1", + "Bucket": "test-accessp-e0b1d075431d83bebde8xz5w8ijx1qzlbp3i3ebeta0--op-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow with bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://10.0.1.12:433/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "http://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow without bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://10.0.1.12:433" + } + }, + "params": { + "Region": "snow", + "Endpoint": "https://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow no port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://10.0.1.12/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "http://10.0.1.12", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "S3 Snow dns endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://amazonaws.com/bucketName" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "https://amazonaws.com", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false + } + }, + { + "documentation": "Data Plane with short AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--use1-az1--x-s3.s3express-use1-az1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--use1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--use1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with short AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--use1-az1--x-s3.s3express-fips-use1-az1.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--use1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--use1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "ap-northeast-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--apne1-az1--x-s3.s3express-apne1-az1.ap-northeast-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "ap-northeast-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--apne1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "ap-northeast-1", + "Bucket": "mybucket--apne1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data Plane with long AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "ap-northeast-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--apne1-az1--x-s3.s3express-fips-apne1-az1.ap-northeast-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "ap-northeast-1", + "AWS::UseFIPS": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--apne1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "ap-northeast-1", + "Bucket": "mybucket--apne1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Control plane with short AZ bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.us-east-1.amazonaws.com/mybucket--use1-az1--x-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--use1-az1--x-s3" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--use1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane with short AZ bucket and fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--use1-az1--x-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "mybucket--use1-az1--x-s3" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--use1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane without bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "ListDirectoryBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Control plane without bucket and fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://s3express-control-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "ListDirectoryBuckets" + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": false + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with short AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "ap-northeast-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--apne1-az1--x-s3.s3express-apne1-az1.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "Bucket": "mybucket--apne1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Data Plane sigv4 auth with long AZ fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "ap-northeast-1", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--apne1-az1--x-s3.s3express-fips-apne1-az1.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "Bucket": "mybucket--apne1-az1--x-s3", + "UseFIPS": true, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "Control Plane host override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.custom.com" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Control Plane host override no bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://custom.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "Data plane host override non virtual session auth", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://10.0.0.1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://10.0.0.1" + } + }, + { + "documentation": "Control Plane host override ip", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://10.0.0.1/mybucket--usw2-az1--x-s3" + } + }, + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": true, + "DisableS3ExpressSessionAuth": true, + "Endpoint": "https://10.0.0.1" + } + }, + { + "documentation": "Data plane host override", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4-s3express", + "signingName": "s3express", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ], + "backend": "S3Express" + }, + "url": "https://mybucket--usw2-az1--x-s3.custom.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "mybucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "bad format error", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usaz1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--usaz1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "bad format error no session auth", + "expect": { + "error": "Unrecognized S3Express bucket name format." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--usaz1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--usaz1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false, + "DisableS3ExpressSessionAuth": true + } + }, + { + "documentation": "dual-stack error", + "expect": { + "error": "S3Express does not support Dual-stack." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseDualStack": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--use1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--use1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": true, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "accelerate error", + "expect": { + "error": "S3Express does not support S3 Accelerate." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::S3::Accelerate": true + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "mybucket--use1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "mybucket--use1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": true, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "Data plane bucket format error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.bucket--use1-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-east-1", + "Bucket": "my.bucket--use1-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "UseS3ExpressControlEndpoint": false + } + }, + { + "documentation": "host override data plane bucket error session auth", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://custom.com" + }, + "operationName": "GetObject", + "operationParams": { + "Bucket": "my.bucket--usw2-az1--x-s3", + "Key": "key" + } + } + ], + "params": { + "Region": "us-west-2", + "Bucket": "my.bucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com" + } + }, + { + "documentation": "host override data plane bucket error", + "expect": { + "error": "S3Express bucket name is not a valid virtual hostable name." + }, + "params": { + "Region": "us-west-2", + "Bucket": "my.bucket--usw2-az1--x-s3", + "UseFIPS": false, + "UseDualStack": false, + "Accelerate": false, + "Endpoint": "https://custom.com", + "DisableS3ExpressSessionAuth": true + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/s3control/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/s3control/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..a2650ef1ded38f5fa0cefc53bee2959f2cf7b07d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/s3control/endpoint-tests-1.json @@ -0,0 +1,3778 @@ +{ + "testCases": [ + { + "documentation": "Vanilla outposts without ARN region + access point ARN@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Vanilla outposts with ARN region + access point ARN@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "accept an access point ARN@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "vanilla outposts china@cn-north-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "cn-north-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "gov region@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "gov cloud with fips@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseFIPS": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "govcloud with fips + arn region@us-gov-west-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-gov-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-gov-west-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "gov region@cn-north-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "cn-north-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "gov cloud with fips@cn-north-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "cn-north-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "govcloud with fips + arn region@us-gov-west-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-gov-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-gov-west-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "gov region@af-south-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "af-south-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "gov cloud with fips@af-south-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "af-south-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "govcloud with fips + arn region@us-gov-west-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-gov-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-gov-west-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "CreateBucket + OutpostId = outposts endpoint@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "blah", + "OutpostId": "123" + } + } + ], + "params": { + "Bucket": "blah", + "OutpostId": "123", + "Region": "us-east-2", + "RequiresAccountId": false, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "CreateBucket + OutpostId with fips = outposts endpoint@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "blah", + "OutpostId": "123" + } + } + ], + "params": { + "Bucket": "blah", + "OutpostId": "123", + "Region": "us-east-2", + "RequiresAccountId": false, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "CreateBucket without OutpostId = regular endpoint@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-control.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "blah" + } + } + ], + "params": { + "Bucket": "blah", + "Region": "us-east-2", + "RequiresAccountId": false, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ListRegionalBuckets + OutpostId = outposts endpoint@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012", + "OutpostId": "op-123" + } + } + ], + "params": { + "AccountId": "123456789012", + "OutpostId": "op-123", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ListRegionalBuckets without OutpostId = regular endpoint@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.s3-control.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012" + } + } + ], + "params": { + "AccountId": "123456789012", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ListRegionalBucket + OutpostId with fips = outposts endpoint@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012", + "OutpostId": "op-123" + } + } + ], + "params": { + "AccountId": "123456789012", + "OutpostId": "op-123", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "outpost access points support dualstack@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.api.aws" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "outpost access points support dualstack@af-south-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.af-south-1.api.aws" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseDualStack": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "af-south-1", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "outpost access points support fips + dualstack@af-south-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.af-south-1.api.aws" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "af-south-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "af-south-1", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "invalid ARN: must be include outpost ID@us-west-2", + "expect": { + "error": "Invalid ARN: The Outpost Id was not set" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "invalid ARN: must specify access point@us-west-2", + "expect": { + "error": "Invalid ARN: Expected a 4-component resource" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "invalid ARN@us-west-2", + "expect": { + "error": "Invalid ARN: Expected a 4-component resource" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:myaccesspoint", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "when set, AccountId drives AP construction@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://myid-1234.s3-control.us-west-2.amazonaws.com" + } + }, + "params": { + "AccessPointName": "myaccesspoint", + "AccountId": "myid-1234", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Account ID set inline and in ARN but they both match@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3Control::UseArnRegion": false + }, + "operationName": "GetAccessPoint", + "operationParams": { + "AccountId": "123456789012", + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseArnRegion": false, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Account ID set inline and in ARN and they do not match@us-west-2", + "expect": { + "error": "Invalid ARN: the accountId specified in the ARN (`123456789012`) does not match the parameter (`999999999999`)" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3Control::UseArnRegion": false + }, + "operationName": "GetAccessPoint", + "operationParams": { + "AccountId": "999999999999", + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "999999999999", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseArnRegion": false, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "get access point prefixed with account id using endpoint url@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "AccountId": "123456789012", + "Name": "apname" + } + } + ], + "params": { + "AccessPointName": "apname", + "AccountId": "123456789012", + "Endpoint": "https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "endpoint url with s3-outposts@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point name with a bucket arn@us-west-2", + "expect": { + "error": "Expected an outpost type `accesspoint`, found `bucket`" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Endpoint": "beta.example.com", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket arn with access point name@us-west-2", + "expect": { + "error": "Invalid ARN: Expected an outpost type `bucket`, found `accesspoint`" + }, + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Endpoint": "beta.example.com", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "create bucket with outposts@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://beta.example.com" + } + }, + "params": { + "Bucket": "bucketname", + "Endpoint": "https://beta.example.com", + "OutpostId": "op-123", + "Region": "us-west-2", + "RequiresAccountId": false, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "get bucket with endpoint_url@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ListRegionalBucket + OutpostId endpoint url@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012", + "OutpostId": "op-123" + } + } + ], + "params": { + "AccountId": "123456789012", + "Endpoint": "https://beta.example.com", + "OutpostId": "op-123", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ListRegionalBucket + OutpostId + fips + endpoint url@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012", + "OutpostId": "op-123" + } + } + ], + "params": { + "AccountId": "123456789012", + "Endpoint": "https://beta.example.com", + "OutpostId": "op-123", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "ListRegionalBucket + OutpostId + fips + dualstack@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-east-2.api.aws" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012", + "OutpostId": "op-123" + } + } + ], + "params": { + "AccountId": "123456789012", + "OutpostId": "op-123", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "CreateBucket + OutpostId endpoint url@us-east-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "CreateBucket", + "operationParams": { + "Bucket": "blah", + "OutpostId": "123" + } + } + ], + "params": { + "Bucket": "blah", + "Endpoint": "https://beta.example.com", + "OutpostId": "123", + "Region": "us-east-2", + "RequiresAccountId": false, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "dualstack cannot be used with outposts when an endpoint URL is set@us-west-2.", + "expect": { + "error": "Invalid Configuration: DualStack and custom endpoint are not supported" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Endpoint": "https://s3-outposts.us-west-2.api.aws", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "vanilla bucket arn requires account id@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "CreateAccessPoint", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Name": "apname", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket arn with UseArnRegion = true (arn region supercedes client configured region)@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN in gov partition (non-fips)@us-gov-east-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-gov-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-east-1" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-gov-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN in gov partition with FIPS@us-gov-west-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-west-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-gov-west-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-west-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-west-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-gov-west-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "bucket ARN in aws partition with FIPS@us-east-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "bucket ARN in aws partition with fips + dualstack@us-east-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-east-2.api.aws" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "vanilla bucket arn requires account id@cn-north-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.cn-north-1.amazonaws.com.cn" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1" + }, + "operationName": "CreateAccessPoint", + "operationParams": { + "Bucket": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Name": "apname", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "cn-north-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket arn with UseArnRegion = true (arn region supercedes client configured region)@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN in gov partition (non-fips)@us-gov-east-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-gov-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-east-1" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-gov-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN in gov partition with FIPS@us-gov-west-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-west-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-gov-west-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-west-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-west-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-gov-west-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "bucket ARN in aws partition with FIPS@us-east-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "Outposts support dualstack @us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.api.aws" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "vanilla bucket arn requires account id@af-south-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "af-south-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.af-south-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "af-south-1" + }, + "operationName": "CreateAccessPoint", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Name": "apname", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:af-south-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "af-south-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket arn with UseArnRegion = true (arn region supercedes client configured region)@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN in gov partition (non-fips)@us-gov-east-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-gov-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-east-1" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-gov-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN in gov partition with FIPS@us-gov-west-1", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-gov-west-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-gov-west-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-gov-west-1", + "AWS::UseFIPS": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-west-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws-us-gov:s3-outposts:us-gov-west-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-gov-west-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "bucket ARN in aws partition with FIPS@us-east-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts-fips.us-east-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::UseFIPS": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "Invalid ARN: missing outpost id and bucket@us-west-2", + "expect": { + "error": "Invalid ARN: The Outpost Id was not set" + }, + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Invalid ARN: missing bucket@us-west-2", + "expect": { + "error": "Invalid ARN: Expected a 4-component resource" + }, + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Invalid ARN: missing outpost and bucket ids@us-west-2", + "expect": { + "error": "Invalid ARN: Expected a 4-component resource" + }, + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:bucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Invalid ARN: missing bucket id@us-west-2", + "expect": { + "error": "Invalid ARN: expected a bucket name" + }, + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "account id inserted into hostname@us-west-2", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://1234567890.s3-control.us-west-2.amazonaws.com" + } + }, + "params": { + "AccountId": "1234567890", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "account id prefix with dualstack@us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://1234567890.s3-control.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "AccountId": "1234567890", + "Region": "us-east-1", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "account id prefix with fips@us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://1234567890.s3-control-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "AccountId": "1234567890", + "Region": "us-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "custom account id prefix with fips@us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.s3-control-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "AccountId": "123456789012", + "Region": "us-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "standard url @ us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-control.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1" + } + }, + { + "documentation": "fips url @ us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-control-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "dualstack url @ us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-control.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true + } + }, + { + "documentation": "fips,dualstack url @ us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-control-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "standard url @ cn-north-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "cn-north-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-control.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1" + } + }, + { + "documentation": "fips @ cn-north-1", + "expect": { + "error": "Partition does not support FIPS" + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "custom account id prefix @us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.s3-control.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012" + } + } + ], + "params": { + "AccountId": "123456789012", + "Region": "us-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "invalid account id prefix @us-east-1", + "expect": { + "error": "AccountId must only contain a-z, A-Z, 0-9 and `-`." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "/?invalid¬-host*label" + } + } + ], + "params": { + "AccountId": "/?invalid¬-host*label", + "Region": "us-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "custom account id prefix with fips@us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.s3-control-fips.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012" + } + } + ], + "params": { + "AccountId": "123456789012", + "Region": "us-east-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "custom account id prefix with dualstack,fips@us-east-1", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.s3-control-fips.dualstack.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "AWS::UseDualStack": true + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012" + } + } + ], + "params": { + "AccountId": "123456789012", + "Region": "us-east-1", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "custom account id with custom endpoint", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://example.com" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012" + } + } + ], + "params": { + "AccountId": "123456789012", + "Region": "us-east-1", + "RequiresAccountId": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "RequiresAccountId with AccountId unset", + "expect": { + "error": "AccountId is required but not set" + }, + "params": { + "Region": "us-east-1", + "RequiresAccountId": true + } + }, + { + "documentation": "RequiresAccountId with AccountId unset and custom endpoint", + "expect": { + "error": "AccountId is required but not set" + }, + "params": { + "Region": "us-east-1", + "Endpoint": "https://beta.example.com", + "RequiresAccountId": true + } + }, + { + "documentation": "RequiresAccountId with invalid AccountId and custom endpoint", + "expect": { + "error": "AccountId must only contain a-z, A-Z, 0-9 and `-`." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "/?invalid¬-host*label" + } + } + ], + "params": { + "Region": "us-east-1", + "Endpoint": "https://beta.example.com", + "AccountId": "/?invalid¬-host*label", + "RequiresAccountId": true + } + }, + { + "documentation": "account id with custom endpoint, fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::UseFIPS": true, + "SDK::Endpoint": "https://example.com" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "AccountId": "123456789012" + } + } + ], + "params": { + "AccountId": "123456789012", + "Region": "us-east-1", + "RequiresAccountId": true, + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "custom endpoint, fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "custom endpoint, fips", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "custom endpoint, DualStack", + "expect": { + "error": "Invalid Configuration: DualStack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "Endpoint": "https://example.com", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "region not set", + "expect": { + "error": "Region must be set" + } + }, + { + "documentation": "invalid partition", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "Region": "invalid-region 42" + } + }, + { + "documentation": "ListRegionalBuckets + OutpostId without accountId set.", + "expect": { + "error": "AccountId is required but not set" + }, + "params": { + "OutpostId": "op-123", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "ListRegionalBuckets + OutpostId with invalid accountId set.", + "expect": { + "error": "AccountId must only contain a-z, A-Z, 0-9 and `-`." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "OutpostId": "op-123", + "AccountId": "/?invalid¬-host*label" + } + } + ], + "params": { + "AccountId": "/?invalid¬-host*label", + "OutpostId": "op-123", + "Region": "us-east-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "accesspoint set but missing accountId", + "expect": { + "error": "AccountId is required but not set" + }, + "params": { + "AccessPointName": "myaccesspoint", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "outpost accesspoint ARN with missing accountId", + "expect": { + "error": "Invalid ARN: missing account ID" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2::outpost:op-01234567890123456:outpost:op1", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN with missing accountId", + "expect": { + "error": "Invalid ARN: missing account ID" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2::outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "endpoint url with accesspoint (non-arn)", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://123456789012.beta.example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "apname", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "apname", + "Endpoint": "https://beta.example.com", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "access point name with an accesspoint arn@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://beta.example.com" + } + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "DualStack + Custom endpoint is not supported(non-arn)", + "expect": { + "error": "Invalid Configuration: DualStack and custom endpoint are not supported" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://beta.example.com" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "apname", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "apname", + "Endpoint": "https://beta.example.com", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "get bucket with custom endpoint and dualstack is not supported@us-west-2", + "expect": { + "error": "Invalid Configuration: DualStack and custom endpoint are not supported" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::UseDualStack": true, + "SDK::Endpoint": "https://s3-outposts.us-west-2.api.aws" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Endpoint": "https://s3-outposts.us-west-2.api.aws", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "ListRegionalBuckets + OutpostId with fips in CN.", + "expect": { + "error": "Partition does not support FIPS" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "cn-north-1", + "AWS::UseFIPS": true + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "OutpostId": "op-123", + "AccountId": "0123456789012" + } + } + ], + "params": { + "AccountId": "0123456789012", + "OutpostId": "op-123", + "Region": "cn-north-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "ListRegionalBuckets + invalid OutpostId.", + "expect": { + "error": "OutpostId must only contain a-z, A-Z, 0-9 and `-`." + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-1" + }, + "operationName": "ListRegionalBuckets", + "operationParams": { + "OutpostId": "?outpost/invalid+", + "AccountId": "0123456789012" + } + } + ], + "params": { + "AccountId": "0123456789012", + "OutpostId": "?outpost/invalid+", + "Region": "us-west-1", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "bucket ARN with mismatched accountId", + "expect": { + "error": "Invalid ARN: the accountId specified in the ARN (`999999`) does not match the parameter (`0123456789012`)" + }, + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:999999:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "0123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "OutpostId with invalid region", + "expect": { + "error": "Invalid region: region was not a valid DNS name." + }, + "params": { + "OutpostId": "op-123", + "Region": "invalid-region 42", + "AccountId": "0123456", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "OutpostId with RequireAccountId unset", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "params": { + "OutpostId": "op-123", + "Region": "us-west-2", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Outpost Accesspoint ARN with arn region and client region mismatch with UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3Control::UseArnRegion": false + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3Control::UseArnRegion": false + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseArnRegion": false, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Outpost Bucket ARN with arn region and client region mismatch with UseArnRegion=false", + "expect": { + "error": "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "SDK::Endpoint": "https://beta.example.com", + "AWS::S3Control::UseArnRegion": false + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Endpoint": "https://beta.example.com", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseArnRegion": false, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Accesspoint ARN with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Bucket ARN with region mismatch and UseArnRegion unset", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-east-1", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-east-1.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Outpost Bucket ARN with partition mismatch with UseArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3Control::UseArnRegion": true + }, + "operationName": "GetBucket", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseArnRegion": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "Accesspoint ARN with partition mismatch and UseArnRegion=true", + "expect": { + "error": "Client was configured for partition `aws` but ARN has `aws-cn`" + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3Control::UseArnRegion": true + }, + "operationName": "GetAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::S3Control::UseArnRegion": true + }, + "operationName": "DeleteAccessPoint", + "operationParams": { + "Name": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012" + } + } + ], + "params": { + "AccessPointName": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "AccountId": "123456789012", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseArnRegion": true, + "UseFIPS": false + } + }, + { + "documentation": "Accesspoint ARN with region mismatch, UseArnRegion=false and custom endpoint", + "expect": { + "error": "Invalid configuration: region from ARN `cn-north-1` does not match client region `us-west-2` and UseArnRegion is `false`" + }, + "params": { + "AccessPointName": "arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint", + "Region": "us-west-2", + "Endpoint": "https://example.com", + "RequiresAccountId": true, + "UseDualStack": false, + "UseArnRegion": false, + "UseFIPS": false + } + }, + { + "documentation": "outpost bucket arn@us-west-2", + "expect": { + "endpoint": { + "headers": { + "x-amz-account-id": [ + "123456789012" + ], + "x-amz-outpost-id": [ + "op-01234567890123456" + ] + }, + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3-outposts", + "signingRegion": "us-west-2", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "GetBucketVersioning", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012" + } + }, + { + "builtInParams": { + "AWS::Region": "us-west-2" + }, + "operationName": "PutBucketVersioning", + "operationParams": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "AccountId": "123456789012", + "VersioningConfiguration": { + "Status": "Enabled" + } + } + } + ], + "params": { + "Bucket": "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket", + "Region": "us-west-2", + "RequiresAccountId": true, + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "S3 Snow Control with bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://10.0.1.12:433" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "https://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "S3 Snow Control without bucket", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://10.0.1.12:433" + } + }, + "params": { + "Region": "snow", + "Endpoint": "https://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "S3 Snow Control with bucket and without port", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "https://10.0.1.12" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "https://10.0.1.12", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "S3 Snow Control with bucket and with DNS", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "s3", + "signingRegion": "snow", + "disableDoubleEncoding": true + } + ] + }, + "url": "http://s3snow.com" + } + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "http://s3snow.com", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "S3 Snow Control with FIPS enabled", + "expect": { + "error": "S3 Snow does not support FIPS" + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "https://10.0.1.12:433", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "S3 Snow Control with Dualstack enabled", + "expect": { + "error": "S3 Snow does not support DualStack" + }, + "params": { + "Region": "snow", + "Bucket": "bucketName", + "Endpoint": "https://10.0.1.12:433", + "UseFIPS": false, + "UseDualStack": true + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/s3outposts/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/s3outposts/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f0cf683fa1340f4c2c1027c1358fabdf75764a54 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/s3outposts/endpoint-tests-1.json @@ -0,0 +1,574 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://s3-outposts.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-a2i-runtime/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-a2i-runtime/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..cdc8feb8b8ae93b10ddfeb8ba464e7ec9d6dc529 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-a2i-runtime/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://a2i-runtime.sagemaker.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-edge/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-edge/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..8cca0a455d41ddaf3caf71181f6df4d496babb7d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-edge/endpoint-tests-1.json @@ -0,0 +1,379 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://edge.sagemaker.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-geospatial/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-geospatial/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b596e3acc18bd609ce0937dbd30fd8cbd60df894 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-geospatial/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sagemaker-geospatial.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-metrics/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-metrics/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f128fd281c27836324899e1e4fabc78bf91b3dac --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-metrics/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://metrics.sagemaker.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-runtime/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-runtime/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3317c56fa5333db23024f0a0f0872b581532ef62 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker-runtime/endpoint-tests-1.json @@ -0,0 +1,652 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.sagemaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.sagemaker.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.sagemaker.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime-fips.sagemaker.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://runtime.sagemaker.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..18f157429bf6411dfadc6b4ee44b75e3b89d806f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sagemaker/endpoint-tests-1.json @@ -0,0 +1,652 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api-fips.sagemaker.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api-fips.sagemaker.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api-fips.sagemaker.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api-fips.sagemaker.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.sagemaker.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/savingsplans/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/savingsplans/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..d59180edf111140322983d0dac14efd789ece137 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/savingsplans/endpoint-tests-1.json @@ -0,0 +1,345 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "savingsplans", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://savingsplans.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://savingsplans.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "savingsplans", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://savingsplans.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://savingsplans.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://savingsplans.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://savingsplans.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/scheduler/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/scheduler/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..8b33c890284ed3bab7a1ca2b673724a854b4b634 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/scheduler/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scheduler.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scheduler.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scheduler.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scheduler.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/schemas/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/schemas/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b1fc767dc3c1cb6c08f78509d9cdc29b1ab9cf4a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/schemas/endpoint-tests-1.json @@ -0,0 +1,522 @@ +{ + "testCases": [ + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://schemas.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://schemas.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sdb/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sdb/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3142c11214a317d314d8e454c48081a8755193b3 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sdb/endpoint-tests-1.json @@ -0,0 +1,459 @@ +{ + "testCases": [ + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.us-west-1.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "us-west-1", + "UseDualStack": true + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "us-west-1", + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.us-west-1.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "us-west-1", + "UseDualStack": true + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.us-west-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "us-west-1", + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.us-west-2.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "us-west-2", + "UseDualStack": true + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "us-west-2", + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.us-west-2.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "us-west-2", + "UseDualStack": true + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.us-west-2.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "us-west-2", + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.eu-west-1.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "eu-west-1", + "UseDualStack": true + } + }, + { + "documentation": "For region eu-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.eu-west-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "eu-west-1", + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.eu-west-1.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "eu-west-1", + "UseDualStack": true + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.eu-west-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "eu-west-1", + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.ap-northeast-1.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "ap-northeast-1", + "UseDualStack": true + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "ap-northeast-1", + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.ap-northeast-1.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "ap-northeast-1", + "UseDualStack": true + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "ap-northeast-1", + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.sa-east-1.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "sa-east-1", + "UseDualStack": true + } + }, + { + "documentation": "For region sa-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.sa-east-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "sa-east-1", + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.sa-east-1.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "sa-east-1", + "UseDualStack": true + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.sa-east-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "sa-east-1", + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.ap-southeast-1.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "ap-southeast-1", + "UseDualStack": true + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "ap-southeast-1", + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.ap-southeast-1.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "ap-southeast-1", + "UseDualStack": true + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "ap-southeast-1", + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.ap-southeast-2.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "ap-southeast-2", + "UseDualStack": true + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "ap-southeast-2", + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.ap-southeast-2.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "ap-southeast-2", + "UseDualStack": true + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "ap-southeast-2", + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.us-east-1.api.aws" + } + }, + "params": { + "UseFIPS": true, + "Region": "us-east-1", + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "UseFIPS": true, + "Region": "us-east-1", + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sdb.us-east-1.api.aws" + } + }, + "params": { + "UseFIPS": false, + "Region": "us-east-1", + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sdb.amazonaws.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "us-east-1", + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Region": "us-east-1", + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "UseFIPS": true, + "Region": "us-east-1", + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "UseFIPS": false, + "Region": "us-east-1", + "UseDualStack": true, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/securityhub/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/securityhub/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..61093208ca981fe63e6df2748cc7b36b5bc65e87 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/securityhub/endpoint-tests-1.json @@ -0,0 +1,665 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securityhub.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securityhub.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/securitylake/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/securitylake/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..35e974c2b0f5e64b52af3d35c309cbc9eb6f8665 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/securitylake/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securitylake.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securitylake.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://securitylake.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://securitylake.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/serverlessrepo/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/serverlessrepo/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..7bdd7c385f2d153d2d87f34bc7d6a0cc7b0e1d84 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/serverlessrepo/endpoint-tests-1.json @@ -0,0 +1,574 @@ +{ + "testCases": [ + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://serverlessrepo.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/servicecatalog-appregistry/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/servicecatalog-appregistry/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b38c5782e7e9511a69be0785f2623075020f7738 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/servicecatalog-appregistry/endpoint-tests-1.json @@ -0,0 +1,652 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-appregistry.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/servicecatalog/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/servicecatalog/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..70b3086095d25afc88ae75cba123ca3895a2575b --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/servicecatalog/endpoint-tests-1.json @@ -0,0 +1,665 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://servicecatalog.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sms-voice/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sms-voice/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c5475f448864217285230f4449c7f2013e92c485 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sms-voice/endpoint-tests-1.json @@ -0,0 +1,295 @@ +{ + "testCases": [ + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": true, + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": true, + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-voice.pinpoint.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sms/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sms/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..df31573ec734d1979bbbf30d4e4c16f4b401d14f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sms/endpoint-tests-1.json @@ -0,0 +1,639 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sms.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sms.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sns/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sns/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9755d146273aacef1c7fd2fd24889d75b2b39341 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sns/endpoint-tests-1.json @@ -0,0 +1,678 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sns.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sns.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sns.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sns-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-contacts/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-contacts/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..cf65d7b21cdb8bfe2b0bfe27855ec27b7b9d6487 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-contacts/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-contacts.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-quicksetup/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-quicksetup/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..7397c01138289a4f98d924070c90b026bd19c6d3 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-quicksetup/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-quicksetup.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-sap/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-sap/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..bada350570c6008f688b0db1e038eb11f31e6aaa --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm-sap/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-sap.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/ssm/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..4a35068991c2088f59477dd956ee958d99851ef9 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/ssm/endpoint-tests-1.json @@ -0,0 +1,678 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ssm-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/sts/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/sts/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..53202df05bfda4b871692a15c7078478cbc5c001 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/sts/endpoint-tests-1.json @@ -0,0 +1,1283 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sts.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sts.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sts.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sts-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `ap-northeast-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "ap-northeast-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `ap-south-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "ap-south-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `ap-southeast-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "ap-southeast-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `ap-southeast-2`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "ap-southeast-2", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `aws-global`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "aws-global", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `ca-central-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "ca-central-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `eu-central-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "eu-central-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `eu-north-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "eu-north-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `eu-west-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "eu-west-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `eu-west-2`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "eu-west-2", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `eu-west-3`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "eu-west-3", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `sa-east-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "sa-east-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `us-east-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `us-east-2`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-2", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `us-west-1`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-1", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region `us-west-2`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://sts.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-2", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with Non-legacy region `us-east-3`", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-3" + } + ] + }, + "url": "https://sts.us-east-3.amazonaws.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-east-3", + "AWS::STS::UseGlobalEndpoint": true + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "us-east-3", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true + } + }, + { + "documentation": "UseGlobalEndpoint with legacy region and custom endpoint", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "operationInputs": [ + { + "builtInParams": { + "AWS::Region": "us-west-1", + "AWS::STS::UseGlobalEndpoint": true, + "SDK::Endpoint": "https://example.com" + }, + "operationName": "GetCallerIdentity" + } + ], + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "UseGlobalEndpoint with unset region and custom endpoint", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "UseGlobalEndpoint": false, + "Endpoint": "https://example.com" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/supplychain/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/supplychain/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..a0e7f287e638785edcd6f83d417391357542c07f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/supplychain/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scn.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scn.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://scn.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://scn.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/support-app/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/support-app/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..8af08c60e0ba1d35195b14185a1162b1a5ad6b29 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/support-app/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://supportapp.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://supportapp.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://supportapp.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://supportapp.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/support/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/support/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..275cc370a2a11bb8ba51672b84b787f2e4b9ec40 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/support/endpoint-tests-1.json @@ -0,0 +1,500 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://support.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://support-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://support-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://support.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://support.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-cn-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "cn-north-1" + } + ] + }, + "url": "https://support.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "aws-cn-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://support-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://support-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://support.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "cn-north-1" + } + ] + }, + "url": "https://support.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-us-gov-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://support.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-us-gov-global with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://support.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://support-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://support.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://support.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://support.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-iso-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://support.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "aws-iso-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://support-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://support.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-iso-b-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://support.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "aws-iso-b-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://support-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://support.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/swf/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/swf/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..12163ee63d181f24965e689774c8b1dc6390cdcd --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/swf/endpoint-tests-1.json @@ -0,0 +1,678 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://swf.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://swf.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://swf.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://swf-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/synthetics/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/synthetics/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..5a1fb741415f508a6b013e477f1bf7b9db4a5968 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/synthetics/endpoint-tests-1.json @@ -0,0 +1,665 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://synthetics.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://synthetics-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/taxsettings/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/taxsettings/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f3593c11dac0b3ce83890c0baeee9c194699f58b --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/taxsettings/endpoint-tests-1.json @@ -0,0 +1,552 @@ +{ + "testCases": [ + { + "documentation": "For custom endpoint with region not set and fips disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://tax-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://tax-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://tax.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://tax.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://tax-fips.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://tax-fips.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://tax.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://tax.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://tax-fips.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://tax-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://tax.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://tax.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://tax-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://tax.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://tax-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://tax.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "eu-isoe-west-1" + } + ] + }, + "url": "https://tax-fips.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "eu-isoe-west-1" + } + ] + }, + "url": "https://tax.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isof-south-1" + } + ] + }, + "url": "https://tax-fips.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isof-south-1" + } + ] + }, + "url": "https://tax.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/textract/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/textract/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ef4043207202bb4c4e6172b1768429408dc356fd --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/textract/endpoint-tests-1.json @@ -0,0 +1,548 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://textract.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://textract.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://textract.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://textract.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-influxdb/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-influxdb/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c0d089c25b3d243a9e6139d37667f3f09430fcd9 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-influxdb/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://timestream-influxdb.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-query/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-query/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..da7e3111d85ab1ca52bb7afe70ce80c96d180d86 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-query/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://query.timestream.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-write/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-write/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c0d97159385f6dab1073d4551b0d95e66c086457 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/timestream-write/endpoint-tests-1.json @@ -0,0 +1,340 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/tnb/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/tnb/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..ec1704312a8662f352e2d94ad750a5fa9827bda6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/tnb/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tnb.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tnb.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://tnb.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://tnb.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/transcribe/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/transcribe/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..a47d848a4fad844c9a635d28c0b804cc2538747d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/transcribe/endpoint-tests-1.json @@ -0,0 +1,639 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://fips.transcribe.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://fips.transcribe.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://fips.transcribe.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://fips.transcribe.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://fips.transcribe.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribe-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cn.transcribe.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cn.transcribe.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribe-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribe.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://fips.transcribe.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://fips.transcribe.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribe-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribe.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/transfer/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/transfer/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..5dffbbb040e1ab5ae1e9407b110a175a8dc82821 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/transfer/endpoint-tests-1.json @@ -0,0 +1,665 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transfer.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transfer.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/translate/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/translate/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..2984854f21c9fd30b5ffd6ed639ec4412fccf7d4 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/translate/endpoint-tests-1.json @@ -0,0 +1,561 @@ +{ + "testCases": [ + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://translate.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://translate.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://translate.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://translate.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/trustedadvisor/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/trustedadvisor/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..39c3ae46e7d6caf93d36231e1776bac3db592ae8 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/trustedadvisor/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://trustedadvisor.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/verifiedpermissions/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/verifiedpermissions/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3a5b73a9e4e22db4cd037146a3e80c6178c30885 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/verifiedpermissions/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://verifiedpermissions.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/voice-id/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/voice-id/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..30745d91bfe15b11dad228012927f44e154f07af --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/voice-id/endpoint-tests-1.json @@ -0,0 +1,392 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://voiceid.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://voiceid.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://voiceid.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://voiceid.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/vpc-lattice/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/vpc-lattice/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..62c8ea06bb88a5ec5edf27c20aba0dea185784f2 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/vpc-lattice/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://vpc-lattice.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/waf/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/waf/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..e13c01270173b812b9921c5f54244ee11538d999 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/waf/endpoint-tests-1.json @@ -0,0 +1,376 @@ +{ + "testCases": [ + { + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "waf", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://waf.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region aws-global with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "waf", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://waf-fips.amazonaws.com" + } + }, + "params": { + "Region": "aws-global", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://waf-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "waf", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://waf-fips.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://waf.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "waf", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://waf.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://waf-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://waf.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://waf-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://waf.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://waf.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/wafv2/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/wafv2/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3463382c4a3308b573617dc15da2ac842c91414f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/wafv2/endpoint-tests-1.json @@ -0,0 +1,912 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region af-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wafv2.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wafv2.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/wellarchitected/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/wellarchitected/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..d960b95ae6e5872dbb332765f61e7281e241a34e --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/wellarchitected/endpoint-tests-1.json @@ -0,0 +1,535 @@ +{ + "testCases": [ + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wellarchitected.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/wisdom/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/wisdom/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..d3307f81d160f6a5e6b2f3e88468df0fe004474a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/wisdom/endpoint-tests-1.json @@ -0,0 +1,379 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://wisdom.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/workdocs/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/workdocs/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..13231bc9537dad3aaa2f38c8fb88cfb69dcda08d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/workdocs/endpoint-tests-1.json @@ -0,0 +1,392 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workdocs.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workdocs.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workdocs.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workdocs.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/workmail/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/workmail/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..be70fbc37317b553fccdc946b7f5663a166f5b6d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/workmail/endpoint-tests-1.json @@ -0,0 +1,340 @@ +{ + "testCases": [ + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmail.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmail.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmail.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmail.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/workmailmessageflow/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/workmailmessageflow/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..3bee569a6863e6f52172e51b5afb6943a55d00d9 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/workmailmessageflow/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workmailmessageflow.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces-thin-client/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces-thin-client/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..b1c009f8bcc8d2fb5a2036db00ec50e918a5e875 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces-thin-client/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://thinclient.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://thinclient.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://thinclient.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://thinclient.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces-web/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces-web/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..c62e398b8733f0af0f297bede792cf5a9c52506a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces-web/endpoint-tests-1.json @@ -0,0 +1,340 @@ +{ + "testCases": [ + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-web.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..bd53f54c6b54e4e5a8aef7a8b03c49f92586a8cf --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/workspaces/endpoint-tests-1.json @@ -0,0 +1,509 @@ +{ + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://workspaces-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/endpoint-rules/xray/endpoint-tests-1.json b/testbed/boto__botocore/tests/functional/endpoint-rules/xray/endpoint-tests-1.json new file mode 100644 index 0000000000000000000000000000000000000000..95e0fb619ae799bf9b6a8f857087b7dd1b074898 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/endpoint-rules/xray/endpoint-tests-1.json @@ -0,0 +1,665 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://xray.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://xray.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://xray.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://xray.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/functional/test_alias.py b/testbed/boto__botocore/tests/functional/test_alias.py new file mode 100644 index 0000000000000000000000000000000000000000..0812c85b0ee44a2e5943b851e6b5c1b50476d747 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_alias.py @@ -0,0 +1,89 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +import botocore.session +from botocore.exceptions import ParamValidationError +from botocore.stub import Stubber + +ALIAS_CASES = [ + { + 'service': 'ec2', + 'operation': 'describe_flow_logs', + 'original_name': 'Filter', + 'new_name': 'Filters', + 'parameter_value': [{'Name': 'traffic-type', 'Values': ['ACCEPT']}], + }, + { + 'service': 'cloudsearchdomain', + 'operation': 'search', + 'original_name': 'return', + 'new_name': 'returnFields', + 'parameter_value': '_all_fields', + 'extra_args': {'query': 'foo'}, + }, + { + 'service': 'logs', + 'operation': 'create_export_task', + 'original_name': 'from', + 'new_name': 'fromTime', + 'parameter_value': 0, + 'extra_args': { + 'logGroupName': 'name', + 'to': 10, + 'destination': 'mybucket', + }, + }, +] + + +@pytest.mark.parametrize("case", ALIAS_CASES) +def test_can_use_alias(case): + session = botocore.session.get_session() + _can_use_parameter_in_client_call(session, case) + + +@pytest.mark.parametrize("case", ALIAS_CASES) +def test_can_use_original_name(case): + session = botocore.session.get_session() + _can_use_parameter_in_client_call(session, case, False) + + +def _can_use_parameter_in_client_call(session, case, use_alias=True): + client = session.create_client( + case['service'], + region_name='us-east-1', + aws_access_key_id='foo', + aws_secret_access_key='bar', + ) + + stubber = Stubber(client) + stubber.activate() + operation = case['operation'] + params = case.get('extra_args', {}) + params = params.copy() + param_name = case['original_name'] + if use_alias: + param_name = case['new_name'] + params[param_name] = case['parameter_value'] + stubbed_response = case.get('stubbed_response', {}) + stubber.add_response(operation, stubbed_response) + try: + getattr(client, operation)(**params) + except ParamValidationError as e: + raise AssertionError( + 'Expecting {} to be valid parameter for {}.{} but received ' + '{}.'.format( + case['new_name'], case['service'], case['operation'], e + ) + ) diff --git a/testbed/boto__botocore/tests/functional/test_apigateway.py b/testbed/boto__botocore/tests/functional/test_apigateway.py new file mode 100644 index 0000000000000000000000000000000000000000..ee7feba1460b3feee8e4d4490ea70af89fb95c91 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_apigateway.py @@ -0,0 +1,38 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestApiGateway(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('apigateway', self.region) + self.http_stubber = ClientHTTPStubber(self.client) + + def test_get_export(self): + params = { + 'restApiId': 'foo', + 'stageName': 'bar', + 'exportType': 'swagger', + 'accepts': 'application/yaml', + } + + self.http_stubber.add_response(body=b'{}') + with self.http_stubber: + self.client.get_export(**params) + request = self.http_stubber.requests[0] + self.assertEqual(request.method, 'GET') + self.assertEqual( + request.headers.get('Accept'), b'application/yaml' + ) diff --git a/testbed/boto__botocore/tests/functional/test_auth_config.py b/testbed/boto__botocore/tests/functional/test_auth_config.py new file mode 100644 index 0000000000000000000000000000000000000000..7fe096d33835c48ae69bcef2e25506a8f5dcbc5f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_auth_config.py @@ -0,0 +1,77 @@ +# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +from botocore.session import get_session + +# In the future, a service may have a list of credentials requirements where one +# signature may fail and others may succeed. e.g. a service may want to use bearer +# auth but fall back to sigv4 if a token isn't available. There's currently no way to do +# this in botocore, so this test ensures we handle this gracefully when the need arises. + + +# The dictionary's value here needs to be hashable to be added to the set below; any +# new auth types with multiple requirements should be added in a comma-separated list +AUTH_TYPE_REQUIREMENTS = { + 'aws.auth#sigv4': 'credentials', + 'aws.auth#sigv4a': 'credentials', + 'smithy.api#httpBearerAuth': 'bearer_token', + 'smithy.api#noAuth': 'none', +} + + +def _all_test_cases(): + session = get_session() + loader = session.get_component('data_loader') + + services = loader.list_available_services('service-2') + auth_services = [] + auth_operations = [] + + for service in services: + service_model = session.get_service_model(service) + auth_config = service_model.metadata.get('auth', {}) + if auth_config: + auth_services.append([service, auth_config]) + for operation in service_model.operation_names: + operation_model = service_model.operation_model(operation) + if operation_model.auth: + auth_operations.append([service, operation_model]) + return auth_services, auth_operations + + +AUTH_SERVICES, AUTH_OPERATIONS = _all_test_cases() + + +@pytest.mark.validates_models +@pytest.mark.parametrize("auth_service, auth_config", AUTH_SERVICES) +def test_all_requirements_match_for_service(auth_service, auth_config): + # Validates that all service-level signature types have the same requirements + message = f'Found mixed signer requirements for service: {auth_service}' + assert_all_requirements_match(auth_config, message) + + +@pytest.mark.validates_models +@pytest.mark.parametrize("auth_service, operation_model", AUTH_OPERATIONS) +def test_all_requirements_match_for_operation(auth_service, operation_model): + # Validates that all operation-level signature types have the same requirements + message = f'Found mixed signer requirements for operation: {auth_service}.{operation_model.name}' + auth_config = operation_model.auth + assert_all_requirements_match(auth_config, message) + + +def assert_all_requirements_match(auth_config, message): + auth_requirements = set( + AUTH_TYPE_REQUIREMENTS[auth_type] for auth_type in auth_config + ) + assert len(auth_requirements) == 1 diff --git a/testbed/boto__botocore/tests/functional/test_client.py b/testbed/boto__botocore/tests/functional/test_client.py new file mode 100644 index 0000000000000000000000000000000000000000..776de83c47c55407c86946c82f6e4f739ae1ef1d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_client.py @@ -0,0 +1,21 @@ +import unittest + +import botocore + + +class TestCreateClients(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + + def test_client_can_clone_with_service_events(self): + # We should also be able to create a client object. + client = self.session.create_client('s3', region_name='us-west-2') + # We really just want to ensure create_client doesn't raise + # an exception, but we'll double check that the client looks right. + self.assertTrue(hasattr(client, 'list_buckets')) + + def test_client_raises_exception_invalid_region(self): + with self.assertRaisesRegex(ValueError, ('invalid region name')): + self.session.create_client( + 'cloudformation', region_name='invalid region name' + ) diff --git a/testbed/boto__botocore/tests/functional/test_client_class_names.py b/testbed/boto__botocore/tests/functional/test_client_class_names.py new file mode 100644 index 0000000000000000000000000000000000000000..c177e3e838255c7bd18bb16a6e3ba3389c0ecc03 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_client_class_names.py @@ -0,0 +1,75 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +import botocore.session + +REGION = 'us-east-1' + +SERVICE_TO_CLASS_NAME = { + 'autoscaling': 'AutoScaling', + 'cloudformation': 'CloudFormation', + 'cloudfront': 'CloudFront', + 'cloudhsm': 'CloudHSM', + 'cloudsearch': 'CloudSearch', + 'cloudsearchdomain': 'CloudSearchDomain', + 'cloudtrail': 'CloudTrail', + 'cloudwatch': 'CloudWatch', + 'codedeploy': 'CodeDeploy', + 'cognito-identity': 'CognitoIdentity', + 'cognito-sync': 'CognitoSync', + 'config': 'ConfigService', + 'datapipeline': 'DataPipeline', + 'directconnect': 'DirectConnect', + 'ds': 'DirectoryService', + 'dynamodb': 'DynamoDB', + 'ec2': 'EC2', + 'ecs': 'ECS', + 'efs': 'EFS', + 'elasticache': 'ElastiCache', + 'elasticbeanstalk': 'ElasticBeanstalk', + 'elastictranscoder': 'ElasticTranscoder', + 'elb': 'ElasticLoadBalancing', + 'emr': 'EMR', + 'glacier': 'Glacier', + 'iam': 'IAM', + 'importexport': 'ImportExport', + 'kinesis': 'Kinesis', + 'kms': 'KMS', + 'lambda': 'Lambda', + 'logs': 'CloudWatchLogs', + 'machinelearning': 'MachineLearning', + 'opsworks': 'OpsWorks', + 'rds': 'RDS', + 'redshift': 'Redshift', + 'route53': 'Route53', + 'route53domains': 'Route53Domains', + 's3': 'S3', + 'sdb': 'SimpleDB', + 'ses': 'SES', + 'sns': 'SNS', + 'sqs': 'SQS', + 'ssm': 'SSM', + 'storagegateway': 'StorageGateway', + 'sts': 'STS', + 'support': 'Support', + 'swf': 'SWF', + 'workspaces': 'WorkSpaces', +} + + +@pytest.mark.parametrize("service_name", SERVICE_TO_CLASS_NAME) +def test_client_has_correct_class_name(service_name): + session = botocore.session.get_session() + client = session.create_client(service_name, REGION) + assert client.__class__.__name__ == SERVICE_TO_CLASS_NAME[service_name] diff --git a/testbed/boto__botocore/tests/functional/test_client_metadata.py b/testbed/boto__botocore/tests/functional/test_client_metadata.py new file mode 100644 index 0000000000000000000000000000000000000000..5bcc557ad94e6af17eaeb57d71671acd4653211f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_client_metadata.py @@ -0,0 +1,45 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from tests import unittest + + +class TestClientMeta(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + + def test_region_name_on_meta(self): + client = self.session.create_client('s3', 'us-west-2') + self.assertEqual(client.meta.region_name, 'us-west-2') + + def test_endpoint_url_on_meta(self): + client = self.session.create_client( + 's3', 'us-west-2', endpoint_url='https://foo' + ) + self.assertEqual(client.meta.endpoint_url, 'https://foo') + + def test_client_has_standard_partition_on_meta(self): + client = self.session.create_client('s3', 'us-west-2') + self.assertEqual(client.meta.partition, 'aws') + + def test_client_has_china_partition_on_meta(self): + client = self.session.create_client('s3', 'cn-north-1') + self.assertEqual(client.meta.partition, 'aws-cn') + + def test_client_has_gov_partition_on_meta(self): + client = self.session.create_client('s3', 'us-gov-west-1') + self.assertEqual(client.meta.partition, 'aws-us-gov') + + def test_client_has_no_partition_on_meta_if_custom_region(self): + client = self.session.create_client('s3', 'myregion') + self.assertEqual(client.meta.partition, 'aws') diff --git a/testbed/boto__botocore/tests/functional/test_cloudformation.py b/testbed/boto__botocore/tests/functional/test_cloudformation.py new file mode 100644 index 0000000000000000000000000000000000000000..3eedbacb0987efb671e8273b6502510bd5b759dc --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_cloudformation.py @@ -0,0 +1,26 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests.functional.docs import BaseDocsFunctionalTest + + +class TestCloudFormationDocs(BaseDocsFunctionalTest): + def test_get_template_response_documented_as_dict(self): + content = self.get_docstring_for_method( + 'cloudformation', 'get_template' + ) + # String return type should be gone + self.assert_not_contains_line("(*string*) --", content) + # Check for template body returning a dict + self.assert_contains_line("(*dict*) --", content) + # Check the specifics of the returned dict + self.assert_contains_line('{}', content) diff --git a/testbed/boto__botocore/tests/functional/test_cloudsearchdomain.py b/testbed/boto__botocore/tests/functional/test_cloudsearchdomain.py new file mode 100644 index 0000000000000000000000000000000000000000..f51d7e0d47f75cc7233726de0e01c0ff89163ad1 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_cloudsearchdomain.py @@ -0,0 +1,33 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestCloudsearchdomain(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client( + 'cloudsearchdomain', self.region + ) + self.http_stubber = ClientHTTPStubber(self.client) + + def test_search(self): + self.http_stubber.add_response(body=b'{}') + with self.http_stubber: + self.client.search(query='foo') + request = self.http_stubber.requests[0] + self.assertIn('q=foo', request.body) + self.assertEqual(request.method, 'POST') + content_type = b'application/x-www-form-urlencoded' + self.assertEqual(request.headers.get('Content-Type'), content_type) diff --git a/testbed/boto__botocore/tests/functional/test_cognito_idp.py b/testbed/boto__botocore/tests/functional/test_cognito_idp.py new file mode 100644 index 0000000000000000000000000000000000000000..74e22a8429def3eca1a83dbd41a5ca6215181634 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_cognito_idp.py @@ -0,0 +1,94 @@ +# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +from tests import ClientHTTPStubber, create_session, mock + +OPERATION_PARAMS = { + 'change_password': { + 'PreviousPassword': 'myoldbadpassword', + 'ProposedPassword': 'mynewgoodpassword', + 'AccessToken': 'foobar', + }, + 'confirm_forgot_password': { + 'ClientId': 'foo', + 'Username': 'myusername', + 'ConfirmationCode': 'thisismeforreal', + 'Password': 'whydowesendpasswordsviaemail', + }, + 'confirm_sign_up': { + 'ClientId': 'foo', + 'Username': 'myusername', + 'ConfirmationCode': 'ireallydowanttosignup', + }, + 'delete_user': {'AccessToken': 'foobar'}, + 'delete_user_attributes': { + 'UserAttributeNames': ['myattribute'], + 'AccessToken': 'foobar', + }, + 'forgot_password': {'ClientId': 'foo', 'Username': 'myusername'}, + 'get_user': {'AccessToken': 'foobar'}, + 'get_user_attribute_verification_code': { + 'AttributeName': 'myattribute', + 'AccessToken': 'foobar', + }, + 'resend_confirmation_code': {'ClientId': 'foo', 'Username': 'myusername'}, + 'set_user_settings': { + 'AccessToken': 'randomtoken', + 'MFAOptions': [ + {'DeliveryMedium': 'SMS', 'AttributeName': 'someattributename'} + ], + }, + 'sign_up': { + 'ClientId': 'foo', + 'Username': 'bar', + 'Password': 'mysupersecurepassword', + }, + 'update_user_attributes': { + 'UserAttributes': [{'Name': 'someattributename', 'Value': 'newvalue'}], + 'AccessToken': 'foobar', + }, + 'verify_user_attribute': { + 'AttributeName': 'someattributename', + 'Code': 'someverificationcode', + 'AccessToken': 'foobar', + }, +} + + +@pytest.mark.parametrize( + "operation_name, parameters", OPERATION_PARAMS.items() +) +def test_unsigned_operations(operation_name, parameters): + environ = { + 'AWS_ACCESS_KEY_ID': 'access_key', + 'AWS_SECRET_ACCESS_KEY': 'secret_key', + 'AWS_CONFIG_FILE': 'no-exist-foo', + } + + with mock.patch('os.environ', environ): + session = create_session() + session.config_filename = 'no-exist-foo' + client = session.create_client('cognito-idp', 'us-west-2') + http_stubber = ClientHTTPStubber(client) + + operation = getattr(client, operation_name) + + http_stubber.add_response(body=b'{}') + with http_stubber: + operation(**parameters) + request = http_stubber.requests[0] + + assert ( + 'authorization' not in request.headers + ), 'authorization header found in unsigned operation' diff --git a/testbed/boto__botocore/tests/functional/test_compress.py b/testbed/boto__botocore/tests/functional/test_compress.py new file mode 100644 index 0000000000000000000000000000000000000000..63f1510b13b660ffdd831171c239f19c14d815d0 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_compress.py @@ -0,0 +1,129 @@ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +import gzip + +import pytest + +from botocore.compress import COMPRESSION_MAPPING +from botocore.config import Config +from tests import ALL_SERVICES, ClientHTTPStubber, patch_load_service_model + +FAKE_MODEL = { + "version": "2.0", + "documentation": "", + "metadata": { + "apiVersion": "2020-02-02", + "endpointPrefix": "otherservice", + "protocol": "query", + "serviceFullName": "Other Service", + "serviceId": "Other Service", + "signatureVersion": "v4", + "signingName": "otherservice", + "uid": "otherservice-2020-02-02", + }, + "operations": { + "MockOperation": { + "name": "MockOperation", + "http": {"method": "POST", "requestUri": "/"}, + "input": {"shape": "MockOperationRequest"}, + "documentation": "", + "requestcompression": { + "encodings": ["gzip"], + }, + }, + }, + "shapes": { + "MockOpParamList": { + "type": "list", + "member": {"shape": "MockOpParam"}, + }, + "MockOpParam": { + "type": "structure", + "members": {"MockOpParam": {"shape": "MockOpParamValue"}}, + }, + "MockOpParamValue": { + "type": "string", + }, + "MockOperationRequest": { + "type": "structure", + "required": ["MockOpParamList"], + "members": { + "MockOpParamList": { + "shape": "MockOpParamList", + "documentation": "", + }, + }, + }, + }, +} + +FAKE_RULESET = { + "version": "1.0", + "parameters": {}, + "rules": [ + { + "conditions": [], + "type": "endpoint", + "endpoint": { + "url": "https://foo.bar", + "properties": {}, + "headers": {}, + }, + } + ], +} + + +def _all_compression_operations(): + for service_model in ALL_SERVICES: + for operation_name in service_model.operation_names: + operation_model = service_model.operation_model(operation_name) + if operation_model.request_compression is not None: + yield operation_model + + +@pytest.mark.parametrize("operation_model", _all_compression_operations()) +def test_no_unknown_compression_encodings(operation_model): + for encoding in operation_model.request_compression["encodings"]: + assert encoding in COMPRESSION_MAPPING.keys(), ( + f"Found unknown compression encoding '{encoding}' " + f"in operation {operation_model.name}." + ) + + +def test_compression(patched_session, monkeypatch): + patch_load_service_model( + patched_session, monkeypatch, FAKE_MODEL, FAKE_RULESET + ) + client = patched_session.create_client( + "otherservice", + region_name="us-west-2", + config=Config(request_min_compression_size_bytes=100), + ) + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=200, body=b"") + params_list = [ + {"MockOpParam": f"MockOpParamValue{i}"} for i in range(1, 21) + ] + client.mock_operation(MockOpParamList=params_list) + param_template = ( + "MockOpParamList.member.{i}.MockOpParam=MockOpParamValue{i}" + ) + serialized_params = "&".join( + param_template.format(i=i) for i in range(1, 21) + ) + additional_params = "Action=MockOperation&Version=2020-02-02" + serialized_body = f"{additional_params}&{serialized_params}" + actual_body = gzip.decompress(http_stubber.requests[0].body) + assert serialized_body.encode('utf-8') == actual_body diff --git a/testbed/boto__botocore/tests/functional/test_config_provider.py b/testbed/boto__botocore/tests/functional/test_config_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..57b3fd445749c01b9429560b0a6832b8eb9696d9 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_config_provider.py @@ -0,0 +1,123 @@ +# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from pathlib import Path + +import pytest + +import botocore.exceptions +from botocore.config import Config +from botocore.session import get_session + +_SDK_DEFAULT_CONFIGURATION_VALUES_ALLOWLIST = ( + 'retryMode', + 'stsRegionalEndpoints', + 's3UsEast1RegionalEndpoints', + 'connectTimeoutInMillis', + 'tlsNegotiationTimeoutInMillis', +) + +session = get_session() +loader = session.get_component('data_loader') +sdk_default_configuration = loader.load_data('sdk-default-configuration') + + +def assert_client_uses_standard_defaults(client): + assert client.meta.config.s3['us_east_1_regional_endpoint'] == 'regional' + assert client.meta.config.connect_timeout == 3.1 + assert client.meta.endpoint_url == 'https://sts.us-west-2.amazonaws.com' + assert client.meta.config.retries['mode'] == 'standard' + + +@pytest.mark.parametrize("mode", sdk_default_configuration['base']) +def test_no_new_sdk_default_configuration_values(mode): + err_msg = ( + f'New default configuration value {mode} introduced to ' + f'sdk-default-configuration.json. Support for setting {mode} must be ' + 'considered and added to the DefaulConfigResolver. In addition, ' + 'must add value to _SDK_DEFAULT_CONFIGURATION_VALUES_ALLOWLIST.' + ) + assert mode in _SDK_DEFAULT_CONFIGURATION_VALUES_ALLOWLIST, err_msg + + +def test_default_configurations_resolve_correctly(): + session = get_session() + config = Config(defaults_mode='standard') + client = session.create_client( + 'sts', config=config, region_name='us-west-2' + ) + assert_client_uses_standard_defaults(client) + + +@pytest.fixture +def loader(): + test_models_dir = Path(__file__).parent / 'models' + loader = botocore.loaders.Loader() + loader.search_paths.insert(0, test_models_dir) + return loader + + +@pytest.fixture +def session(loader): + session = botocore.session.Session() + session.register_component('data_loader', loader) + return session + + +def assert_client_uses_legacy_defaults(client): + assert client.meta.config.s3 is None + assert client.meta.config.connect_timeout == 60 + assert client.meta.endpoint_url == 'https://sts.amazonaws.com' + assert client.meta.config.retries['mode'] == 'legacy' + + +def assert_client_uses_testing_defaults(client): + assert client.meta.config.s3['us_east_1_regional_endpoint'] == 'regional' + assert client.meta.config.connect_timeout == 9999 + assert client.meta.endpoint_url == 'https://sts.amazonaws.com' + assert client.meta.config.retries['mode'] == 'standard' + + +class TestConfigurationDefaults: + def test_defaults_mode_resolved_from_config_store(self, session): + config_store = session.get_component('config_store') + config_store.set_config_variable('defaults_mode', 'standard') + client = session.create_client('sts', 'us-west-2') + assert_client_uses_testing_defaults(client) + + def test_no_mutate_session_provider(self, session): + # Using the standard default mode should change the connect timeout + # on the client, but not the session + standard_client = session.create_client( + 'sts', 'us-west-2', config=Config(defaults_mode='standard') + ) + assert_client_uses_testing_defaults(standard_client) + + # Using the legacy default mode should not change the connect timeout + # on the client or the session. By default the connect timeout for a client + # is 60 seconds, and unset on the session. + legacy_client = session.create_client('sts', 'us-west-2') + assert_client_uses_legacy_defaults(legacy_client) + + def test_defaults_mode_resolved_from_client_config(self, session): + config = Config(defaults_mode='standard') + client = session.create_client('sts', 'us-west-2', config=config) + assert_client_uses_testing_defaults(client) + + def test_defaults_mode_resolved_invalid_mode_exception(self, session): + with pytest.raises(botocore.exceptions.InvalidDefaultsMode): + config = Config(defaults_mode='invalid_default_mode') + session.create_client('sts', 'us-west-2', config=config) + + def test_defaults_mode_resolved_legacy(self, session): + client = session.create_client('sts', 'us-west-2') + assert_client_uses_legacy_defaults(client) diff --git a/testbed/boto__botocore/tests/functional/test_context_params.py b/testbed/boto__botocore/tests/functional/test_context_params.py new file mode 100644 index 0000000000000000000000000000000000000000..766eea32f518f7867284740790a2bef5f836c771 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_context_params.py @@ -0,0 +1,610 @@ +# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +import pytest + +from botocore.config import Config +from tests import ClientHTTPStubber, mock, patch_load_service_model + +# fake rulesets compatible with all fake service models below +FAKE_RULESET_TEMPLATE = { + "version": "1.0", + "parameters": {}, + "rules": [ + { + "conditions": [], + "type": "endpoint", + "endpoint": { + "url": "https://foo.bar", + "properties": {}, + "headers": {}, + }, + } + ], +} + +# The region param is unrelated to context parameters and used as control in +# all test cases to ascertain that ANY EndpointProvider paramaters get +# populated. +REGION_PARAM = { + "builtIn": "AWS::Region", + "required": False, + "documentation": "", + "type": "String", +} + +FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS = { + **FAKE_RULESET_TEMPLATE, + "parameters": { + "Region": REGION_PARAM, + }, +} + +FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM = { + **FAKE_RULESET_TEMPLATE, + "parameters": { + "Region": REGION_PARAM, + "FooClientContextParamName": { + "required": False, + "documentation": "", + "type": "String", + }, + "BarClientContextParamName": { + "required": False, + "documentation": "", + "type": "String", + }, + }, +} + +FAKE_RULESET_WITH_STATIC_CONTEXT_PARAM = { + **FAKE_RULESET_TEMPLATE, + "parameters": { + "Region": REGION_PARAM, + "FooStaticContextParamName": { + "required": False, + "documentation": "", + "type": "String", + }, + }, +} + +FAKE_RULESET_WITH_DYNAMIC_CONTEXT_PARAM = { + **FAKE_RULESET_TEMPLATE, + "parameters": { + "Region": REGION_PARAM, + "FooDynamicContextParamName": { + "required": False, + "documentation": "", + "type": "String", + }, + }, +} + +# fake models for "otherservice" + +FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS = { + "version": "2.0", + "documentation": "", + "metadata": { + "apiVersion": "2020-02-02", + "endpointPrefix": "otherservice", + "protocol": "rest-xml", + "serviceFullName": "Other Service", + "serviceId": "Other Service", + "signatureVersion": "v4", + "signingName": "otherservice", + "uid": "otherservice-2020-02-02", + }, + "operations": { + "MockOperation": { + "name": "MockOperation", + "http": {"method": "GET", "requestUri": "/"}, + "input": {"shape": "MockOperationRequest"}, + "documentation": "", + }, + }, + "shapes": { + "MockOpParam": { + "type": "string", + }, + "MockOperationRequest": { + "type": "structure", + "required": ["MockOpParam"], + "members": { + "MockOpParam": { + "shape": "MockOpParam", + "documentation": "", + "location": "uri", + "locationName": "param", + }, + }, + }, + }, +} + +FAKE_MODEL_WITH_CLIENT_CONTEXT_PARAM = { + **FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + "clientContextParams": { + "FooClientContextParamName": { + "documentation": "My mock client context parameter", + "type": "string", + }, + "BarClientContextParamName": { + "documentation": "My mock client context parameter", + "type": "string", + }, + }, +} + +FAKE_MODEL_WITH_STATIC_CONTEXT_PARAM = { + **FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + "operations": { + "MockOperation": { + "name": "MockOperation", + "http": {"method": "GET", "requestUri": "/"}, + "input": {"shape": "MockOperationRequest"}, + "documentation": "", + "staticContextParams": { + "FooStaticContextParamName": { + "value": "foo-static-context-param-value" + } + }, + }, + }, +} + +FAKE_MODEL_WITH_DYNAMIC_CONTEXT_PARAM = { + **FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + "shapes": { + "MockOpParam": { + "type": "string", + }, + "MockOperationRequest": { + "type": "structure", + "required": ["MockOpParam"], + "members": { + "MockOpParam": { + "shape": "MockOpParam", + "documentation": "", + "location": "uri", + "locationName": "param", + "contextParam": {"name": "FooDynamicContextParamName"}, + }, + }, + }, + }, + # +} + +# fake models for s3 and s3control, the only services botocore currently +# supports client context parameters for + +S3_METADATA = { + "apiVersion": "2006-03-01", + "checksumFormat": "md5", + "endpointPrefix": "s3", + "globalEndpoint": "s3.amazonaws.com", + "protocol": "rest-xml", + "serviceAbbreviation": "Amazon S3", + "serviceFullName": "Amazon Simple Storage Service", + "serviceId": "S3", + "signatureVersion": "s3", + "uid": "s3-2006-03-01", +} + +FAKE_S3_MODEL_WITHOUT_ANY_CONTEXT_PARAMS = { + **FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + "metadata": S3_METADATA, +} + +FAKE_S3_MODEL_WITH_CLIENT_CONTEXT_PARAM = { + **FAKE_MODEL_WITH_CLIENT_CONTEXT_PARAM, + "metadata": S3_METADATA, +} + +S3CONTROL_METADATA = { + "apiVersion": "2018-08-20", + "endpointPrefix": "s3-control", + "protocol": "rest-xml", + "serviceFullName": "AWS S3 Control", + "serviceId": "S3 Control", + "signatureVersion": "s3v4", + "signingName": "s3", + "uid": "s3control-2018-08-20", +} + +FAKE_S3CONTROL_MODEL_WITHOUT_ANY_CONTEXT_PARAMS = { + **FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + "metadata": S3CONTROL_METADATA, +} + +FAKE_S3CONTROL_MODEL_WITH_CLIENT_CONTEXT_PARAM = { + **FAKE_MODEL_WITH_CLIENT_CONTEXT_PARAM, + "metadata": S3CONTROL_METADATA, +} +CLIENT_CONTEXT_PARAM_INPUT = { + "foo_client_context_param_name": "foo_context_param_value" +} +OTHER_CLIENT_CONTEXT_PARAM_INPUT = { + "bar_client_context_param_name": "bar_value" +} + +CONFIG_WITH_S3 = Config(s3=CLIENT_CONTEXT_PARAM_INPUT) +CONFIG_WITH_CLIENT_CONTEXT_PARAMS = Config( + client_context_params=CLIENT_CONTEXT_PARAM_INPUT +) +CONFIG_WITH_S3_AND_CLIENT_CONTEXT_PARAMS = Config( + s3=CLIENT_CONTEXT_PARAM_INPUT, + client_context_params=OTHER_CLIENT_CONTEXT_PARAM_INPUT, +) +CONFIG_WITH_CONFLICTING_S3_AND_CLIENT_CONTEXT_PARAMS = Config( + s3=CLIENT_CONTEXT_PARAM_INPUT, + client_context_params={"foo_client_context_param_name": "bar_value"}, +) +NO_CTX_PARAM_EXPECTED_CALL_KWARGS = {"Region": "us-east-1"} +CTX_PARAM_EXPECTED_CALL_KWARGS = { + **NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + "FooClientContextParamName": "foo_context_param_value", +} +MULTIPLE_CONTEXT_PARAMS_EXPECTED_CALL_KWARGS = { + **CTX_PARAM_EXPECTED_CALL_KWARGS, + "BarClientContextParamName": "bar_value", +} + + +@pytest.mark.parametrize( + 'service_name,service_model,ruleset,config,expected_call_kwargs', + [ + # s3 + ( + 's3', + FAKE_S3_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3, + CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3', + FAKE_S3_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3', + FAKE_S3_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3', + FAKE_S3_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3', + FAKE_S3_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_CLIENT_CONTEXT_PARAMS, + CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + # use both s3 and client_context_params when they don't overlap + ( + 's3', + FAKE_S3_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3_AND_CLIENT_CONTEXT_PARAMS, + MULTIPLE_CONTEXT_PARAMS_EXPECTED_CALL_KWARGS, + ), + # use s3 over client_context_params when they overlap + ( + 's3', + FAKE_S3_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_CONFLICTING_S3_AND_CLIENT_CONTEXT_PARAMS, + CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + # s3control + ( + 's3control', + FAKE_S3CONTROL_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3, + CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3control', + FAKE_S3CONTROL_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3control', + FAKE_S3CONTROL_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3control', + FAKE_S3CONTROL_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 's3control', + FAKE_S3CONTROL_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_CLIENT_CONTEXT_PARAMS, + CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + # use both s3 and client_context_params when they don't overlap + ( + 's3control', + FAKE_S3CONTROL_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3_AND_CLIENT_CONTEXT_PARAMS, + MULTIPLE_CONTEXT_PARAMS_EXPECTED_CALL_KWARGS, + ), + # use s3 over client_context_params when they overlap + ( + 's3control', + FAKE_S3CONTROL_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_CONFLICTING_S3_AND_CLIENT_CONTEXT_PARAMS, + CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + # otherservice + ( + 'otherservice', + FAKE_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 'otherservice', + FAKE_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 'otherservice', + FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 'otherservice', + FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + CONFIG_WITH_S3, + NO_CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ( + 'otherservice', + FAKE_MODEL_WITH_CLIENT_CONTEXT_PARAM, + FAKE_RULESET_WITH_CLIENT_CONTEXT_PARAM, + CONFIG_WITH_CLIENT_CONTEXT_PARAMS, + CTX_PARAM_EXPECTED_CALL_KWARGS, + ), + ], +) +def test_client_context_param_sent_to_endpoint_resolver( + monkeypatch, + patched_session, + service_name, + service_model, + ruleset, + config, + expected_call_kwargs, +): + # patch loader to return fake service model and fake endpoint ruleset + patch_load_service_model( + patched_session, monkeypatch, service_model, ruleset + ) + + # construct client using patched loader and a config object with an s3 + # or client_context_param section that sets the foo_context_param to a value + client = patched_session.create_client( + service_name, + region_name='us-east-1', + config=config, + ) + + # Stub client to prevent a request from getting sent and ascertain that + # only a single request would get sent. Wrap the EndpointProvider's + # resolve_endpoint method for inspecting the arguments it gets called with. + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=200) + with mock.patch.object( + client._ruleset_resolver._provider, + 'resolve_endpoint', + wraps=client._ruleset_resolver._provider.resolve_endpoint, + ) as mock_resolve_endpoint: + client.mock_operation(MockOpParam='mock-op-param-value') + + mock_resolve_endpoint.assert_called_once_with(**expected_call_kwargs) + + +@pytest.mark.parametrize( + 'service_name,service_model,ruleset,call_should_include_ctx_param', + [ + ( + 'otherservice', + FAKE_MODEL_WITH_STATIC_CONTEXT_PARAM, + FAKE_RULESET_WITH_STATIC_CONTEXT_PARAM, + True, + ), + ( + 'otherservice', + FAKE_MODEL_WITH_STATIC_CONTEXT_PARAM, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + False, + ), + ( + 'otherservice', + FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITH_STATIC_CONTEXT_PARAM, + False, + ), + ( + 'otherservice', + FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + False, + ), + ], +) +def test_static_context_param_sent_to_endpoint_resolver( + monkeypatch, + patched_session, + service_name, + service_model, + ruleset, + call_should_include_ctx_param, +): + # patch loader to return fake service model and fake endpoint ruleset + patch_load_service_model( + patched_session, monkeypatch, service_model, ruleset + ) + + # construct client using patched loader, but no special config is required + # for static context param to take effect + client = patched_session.create_client( + service_name, region_name='us-east-1' + ) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=200) + with mock.patch.object( + client._ruleset_resolver._provider, + 'resolve_endpoint', + wraps=client._ruleset_resolver._provider.resolve_endpoint, + ) as mock_resolve_endpoint: + client.mock_operation(MockOpParam='mock-op-param-value') + + if call_should_include_ctx_param: + mock_resolve_endpoint.assert_called_once_with( + Region='us-east-1', + FooStaticContextParamName='foo-static-context-param-value', + ) + else: + mock_resolve_endpoint.assert_called_once_with(Region='us-east-1') + + +@pytest.mark.parametrize( + 'service_name,service_model,ruleset,call_should_include_ctx_param', + [ + ( + 'otherservice', + FAKE_MODEL_WITH_DYNAMIC_CONTEXT_PARAM, + FAKE_RULESET_WITH_DYNAMIC_CONTEXT_PARAM, + True, + ), + ( + 'otherservice', + FAKE_MODEL_WITH_DYNAMIC_CONTEXT_PARAM, + FAKE_RULESET_WITHOUT_ANY_CONTEXT_PARAMS, + False, + ), + ( + 'otherservice', + FAKE_MODEL_WITHOUT_ANY_CONTEXT_PARAMS, + FAKE_RULESET_WITH_DYNAMIC_CONTEXT_PARAM, + False, + ), + ], +) +def test_dynamic_context_param_sent_to_endpoint_resolver( + monkeypatch, + patched_session, + service_name, + service_model, + ruleset, + call_should_include_ctx_param, +): + # patch loader to return fake service model and fake endpoint ruleset + patch_load_service_model( + patched_session, monkeypatch, service_model, ruleset + ) + + # construct client using patched loader, but no special config is required + # for static context param to take effect + client = patched_session.create_client( + service_name, region_name='us-east-1' + ) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=200) + with mock.patch.object( + client._ruleset_resolver._provider, + 'resolve_endpoint', + wraps=client._ruleset_resolver._provider.resolve_endpoint, + ) as mock_resolve_endpoint: + client.mock_operation(MockOpParam='mock-op-param-value') + + if call_should_include_ctx_param: + mock_resolve_endpoint.assert_called_once_with( + Region='us-east-1', + FooDynamicContextParamName='mock-op-param-value', + ) + else: + mock_resolve_endpoint.assert_called_once_with(Region='us-east-1') + + +def test_dynamic_context_param_from_event_handler_sent_to_endpoint_resolver( + monkeypatch, + patched_session, +): + # patch loader to return fake service model and fake endpoint ruleset + patch_load_service_model( + patched_session, + monkeypatch, + FAKE_MODEL_WITH_DYNAMIC_CONTEXT_PARAM, + FAKE_RULESET_WITH_DYNAMIC_CONTEXT_PARAM, + ) + + # event handler for provide-client-params that modifies the value of the + # MockOpParam parameter + def change_param(params, **kwargs): + params['MockOpParam'] = 'mock-op-param-value-2' + + client = patched_session.create_client( + 'otherservice', region_name='us-east-1' + ) + client.meta.events.register_last( + 'provide-client-params.other-service.*', change_param + ) + + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=200) + with mock.patch.object( + client._ruleset_resolver._provider, + 'resolve_endpoint', + wraps=client._ruleset_resolver._provider.resolve_endpoint, + ) as mock_resolve_endpoint: + client.mock_operation(MockOpParam='mock-op-param-value-1') + + mock_resolve_endpoint.assert_called_once_with( + Region='us-east-1', + FooDynamicContextParamName='mock-op-param-value-2', + ) diff --git a/testbed/boto__botocore/tests/functional/test_credentials.py b/testbed/boto__botocore/tests/functional/test_credentials.py new file mode 100644 index 0000000000000000000000000000000000000000..a6ba1f8b4b23f354ce1ea9c47f6b2cec7d362b5f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_credentials.py @@ -0,0 +1,1161 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import json +import math +import os +import shutil +import sys +import tempfile +import threading +import time +import uuid +from datetime import datetime, timedelta, timezone + +import pytest +from dateutil.tz import tzlocal + +from botocore import UNSIGNED +from botocore.config import Config +from botocore.credentials import ( + AssumeRoleProvider, + CanonicalNameCredentialSourcer, + ContainerProvider, + Credentials, + DeferredRefreshableCredentials, + EnvProvider, + InstanceMetadataProvider, + JSONFileCache, + ProfileProviderBuilder, + ReadOnlyCredentials, + create_credential_resolver, +) +from botocore.exceptions import ( + CredentialRetrievalError, + InfiniteLoopConfigError, + InvalidConfigError, +) +from botocore.session import Session +from botocore.stub import Stubber +from botocore.tokens import SSOTokenProvider +from botocore.utils import datetime2timestamp +from tests import ( + BaseEnvVar, + IntegerRefresher, + SessionHTTPStubber, + StubbedSession, + mock, + random_chars, + temporary_file, + unittest, +) + +TIME_IN_ONE_HOUR = datetime.now(tz=timezone.utc) + timedelta(hours=1) +TIME_IN_SIX_MONTHS = datetime.now(tz=timezone.utc) + timedelta(hours=4320) + + +class TestCredentialRefreshRaces(unittest.TestCase): + def assert_consistent_credentials_seen(self, creds, func): + collected = [] + self._run_threads(20, func, collected) + for creds in collected: + # During testing, the refresher uses it's current + # refresh count as the values for the access, secret, and + # token value. This means that at any given point in time, + # the credentials should be something like: + # + # ReadOnlyCredentials('1', '1', '1') + # ReadOnlyCredentials('2', '2', '2') + # ... + # ReadOnlyCredentials('30', '30', '30') + # + # This makes it really easy to verify we see a consistent + # set of credentials from the same time period. We just + # check if all the credential values are the same. If + # we ever see something like: + # + # ReadOnlyCredentials('1', '2', '1') + # + # We fail. This is because we're using the access_key + # from the first refresh ('1'), the secret key from + # the second refresh ('2'), and the token from the + # first refresh ('1'). + self.assertTrue(creds[0] == creds[1] == creds[2], creds) + + def assert_non_none_retrieved_credentials(self, func): + collected = [] + self._run_threads(50, func, collected) + for cred in collected: + self.assertIsNotNone(cred) + + def _run_threads(self, num_threads, func, collected): + threads = [] + for _ in range(num_threads): + threads.append(threading.Thread(target=func, args=(collected,))) + for thread in threads: + thread.start() + for thread in threads: + thread.join() + + def test_has_no_race_conditions(self): + creds = IntegerRefresher( + creds_last_for=2, advisory_refresh=1, mandatory_refresh=0 + ) + + def _run_in_thread(collected): + for _ in range(4000): + frozen = creds.get_frozen_credentials() + collected.append( + (frozen.access_key, frozen.secret_key, frozen.token) + ) + + start = time.time() + self.assert_consistent_credentials_seen(creds, _run_in_thread) + end = time.time() + # creds_last_for = 2 seconds (from above) + # So, for example, if execution time took 6.1 seconds, then + # we should see a maximum number of refreshes being (6 / 2.0) + 1 = 4 + max_calls_allowed = math.ceil((end - start) / 2.0) + 1 + self.assertTrue( + creds.refresh_counter <= max_calls_allowed, + f"Too many cred refreshes, max: {max_calls_allowed}, actual: " + f"{creds.refresh_counter}, time_delta: {end - start:.4f}", + ) + + def test_no_race_for_immediate_advisory_expiration(self): + creds = IntegerRefresher( + creds_last_for=1, advisory_refresh=1, mandatory_refresh=0 + ) + + def _run_in_thread(collected): + for _ in range(100): + frozen = creds.get_frozen_credentials() + collected.append( + (frozen.access_key, frozen.secret_key, frozen.token) + ) + + self.assert_consistent_credentials_seen(creds, _run_in_thread) + + def test_no_race_for_initial_refresh_of_deferred_refreshable(self): + def get_credentials(): + expiry_time = ( + datetime.now(tzlocal()) + timedelta(hours=24) + ).isoformat() + return { + 'access_key': 'my-access-key', + 'secret_key': 'my-secret-key', + 'token': 'my-token', + 'expiry_time': expiry_time, + } + + deferred_creds = DeferredRefreshableCredentials( + get_credentials, 'fixed' + ) + + def _run_in_thread(collected): + frozen = deferred_creds.get_frozen_credentials() + collected.append(frozen) + + self.assert_non_none_retrieved_credentials(_run_in_thread) + + +class BaseAssumeRoleTest(BaseEnvVar): + def setUp(self): + super().setUp() + self.tempdir = tempfile.mkdtemp() + self.config_file = os.path.join(self.tempdir, 'config') + self.environ['AWS_CONFIG_FILE'] = self.config_file + self.environ['AWS_SHARED_CREDENTIALS_FILE'] = str(uuid.uuid4()) + + def tearDown(self): + shutil.rmtree(self.tempdir) + super().tearDown() + + def some_future_time(self): + timeobj = datetime.now(tzlocal()) + return timeobj + timedelta(hours=24) + + def create_assume_role_response(self, credentials, expiration=None): + if expiration is None: + expiration = self.some_future_time() + + response = { + 'Credentials': { + 'AccessKeyId': credentials.access_key, + 'SecretAccessKey': credentials.secret_key, + 'SessionToken': credentials.token, + 'Expiration': expiration, + }, + 'AssumedRoleUser': { + 'AssumedRoleId': 'myroleid', + 'Arn': 'arn:aws:iam::1234567890:user/myuser', + }, + } + + return response + + def create_random_credentials(self): + return Credentials( + f'fake-{random_chars(15)}', + f'fake-{random_chars(35)}', + f'fake-{random_chars(45)}', + ) + + def assert_creds_equal(self, c1, c2): + c1_frozen = c1 + if not isinstance(c1_frozen, ReadOnlyCredentials): + c1_frozen = c1.get_frozen_credentials() + c2_frozen = c2 + if not isinstance(c2_frozen, ReadOnlyCredentials): + c2_frozen = c2.get_frozen_credentials() + self.assertEqual(c1_frozen, c2_frozen) + + def write_config(self, config): + with open(self.config_file, 'w') as f: + f.write(config) + + +class TestAssumeRole(BaseAssumeRoleTest): + def setUp(self): + super().setUp() + self.environ['AWS_ACCESS_KEY_ID'] = 'access_key' + self.environ['AWS_SECRET_ACCESS_KEY'] = 'secret_key' + + self.metadata_provider = self.mock_provider(InstanceMetadataProvider) + self.env_provider = self.mock_provider(EnvProvider) + self.container_provider = self.mock_provider(ContainerProvider) + self.mock_client_creator = mock.Mock(spec=Session.create_client) + self.actual_client_region = None + + current_dir = os.path.dirname(os.path.abspath(__file__)) + credential_process = os.path.join( + current_dir, 'utils', 'credentialprocess.py' + ) + self.credential_process = f'{sys.executable} {credential_process}' + + def mock_provider(self, provider_cls): + mock_instance = mock.Mock(spec=provider_cls) + mock_instance.load.return_value = None + mock_instance.METHOD = provider_cls.METHOD + mock_instance.CANONICAL_NAME = provider_cls.CANONICAL_NAME + return mock_instance + + def create_session(self, profile=None, sso_token_cache=None): + session = StubbedSession(profile=profile) + if not sso_token_cache: + sso_token_cache = JSONFileCache(self.tempdir) + # We have to set bogus credentials here or otherwise we'll trigger + # an early credential chain resolution. + sts = session.create_client( + 'sts', + aws_access_key_id='spam', + aws_secret_access_key='eggs', + ) + self.mock_client_creator.return_value = sts + assume_role_provider = AssumeRoleProvider( + load_config=lambda: session.full_config, + client_creator=self.mock_client_creator, + cache={}, + profile_name=profile, + credential_sourcer=CanonicalNameCredentialSourcer( + [ + self.env_provider, + self.container_provider, + self.metadata_provider, + ] + ), + profile_provider_builder=ProfileProviderBuilder( + session, + sso_token_cache=sso_token_cache, + ), + ) + stubber = session.stub('sts') + stubber.activate() + + component_name = 'credential_provider' + resolver = session.get_component(component_name) + available_methods = [p.METHOD for p in resolver.providers] + replacements = { + 'env': self.env_provider, + 'iam-role': self.metadata_provider, + 'container-role': self.container_provider, + 'assume-role': assume_role_provider, + } + for name, provider in replacements.items(): + try: + index = available_methods.index(name) + except ValueError: + # The provider isn't in the session + continue + + resolver.providers[index] = provider + + session.register_component('credential_provider', resolver) + return session, stubber + + def test_assume_role(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n\n' + '[profile B]\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + ) + self.write_config(config) + + expected_creds = self.create_random_credentials() + response = self.create_assume_role_response(expected_creds) + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + stubber.assert_no_pending_responses() + + def test_environment_credential_source(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'credential_source = Environment\n' + ) + self.write_config(config) + + environment_creds = self.create_random_credentials() + self.env_provider.load.return_value = environment_creds + + expected_creds = self.create_random_credentials() + response = self.create_assume_role_response(expected_creds) + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + + stubber.assert_no_pending_responses() + self.assertEqual(self.env_provider.load.call_count, 1) + + def test_instance_metadata_credential_source(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'credential_source = Ec2InstanceMetadata\n' + ) + self.write_config(config) + + metadata_creds = self.create_random_credentials() + self.metadata_provider.load.return_value = metadata_creds + + expected_creds = self.create_random_credentials() + response = self.create_assume_role_response(expected_creds) + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + + stubber.assert_no_pending_responses() + self.assertEqual(self.metadata_provider.load.call_count, 1) + + def test_container_credential_source(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'credential_source = EcsContainer\n' + ) + self.write_config(config) + + container_creds = self.create_random_credentials() + self.container_provider.load.return_value = container_creds + + expected_creds = self.create_random_credentials() + response = self.create_assume_role_response(expected_creds) + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + + stubber.assert_no_pending_responses() + self.assertEqual(self.container_provider.load.call_count, 1) + + def test_invalid_credential_source(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'credential_source = CustomInvalidProvider\n' + ) + self.write_config(config) + + with self.assertRaises(InvalidConfigError): + session, _ = self.create_session(profile='A') + session.get_credentials() + + def test_misconfigured_source_profile(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n' + '[profile B]\n' + 'region = us-west-2\n' + ) + self.write_config(config) + + with self.assertRaises(InvalidConfigError): + session, _ = self.create_session(profile='A') + session.get_credentials().get_frozen_credentials() + + def test_recursive_assume_role(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n\n' + '[profile B]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleB\n' + 'source_profile = C\n\n' + '[profile C]\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + ) + self.write_config(config) + + profile_b_creds = self.create_random_credentials() + profile_b_response = self.create_assume_role_response(profile_b_creds) + profile_a_creds = self.create_random_credentials() + profile_a_response = self.create_assume_role_response(profile_a_creds) + + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', profile_b_response) + stubber.add_response('assume_role', profile_a_response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, profile_a_creds) + stubber.assert_no_pending_responses() + + def test_recursive_assume_role_stops_at_static_creds(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n\n' + '[profile B]\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + 'role_arn = arn:aws:iam::123456789:role/RoleB\n' + 'source_profile = C\n\n' + '[profile C]\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + ) + self.write_config(config) + + profile_a_creds = self.create_random_credentials() + profile_a_response = self.create_assume_role_response(profile_a_creds) + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', profile_a_response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, profile_a_creds) + stubber.assert_no_pending_responses() + + def test_infinitely_recursive_assume_role(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = A\n' + ) + self.write_config(config) + + with self.assertRaises(InfiniteLoopConfigError): + session, _ = self.create_session(profile='A') + session.get_credentials() + + def test_process_source_profile(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n' + '[profile B]\n' + f'credential_process = {self.credential_process}\n' + ) + self.write_config(config) + + expected_creds = self.create_random_credentials() + response = self.create_assume_role_response(expected_creds) + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + stubber.assert_no_pending_responses() + # Assert that the client was created with the credentials from the + # credential process. + self.assertEqual(self.mock_client_creator.call_count, 1) + _, kwargs = self.mock_client_creator.call_args_list[0] + expected_kwargs = { + 'aws_access_key_id': 'spam', + 'aws_secret_access_key': 'eggs', + 'aws_session_token': None, + } + self.assertEqual(kwargs, expected_kwargs) + + def test_web_identity_source_profile(self): + token_path = os.path.join(self.tempdir, 'token') + with open(token_path, 'w') as token_file: + token_file.write('a.token') + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n' + '[profile B]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleB\n' + f'web_identity_token_file = {token_path}\n' + ) + self.write_config(config) + + session, stubber = self.create_session(profile='A') + + identity_creds = self.create_random_credentials() + identity_response = self.create_assume_role_response(identity_creds) + stubber.add_response( + 'assume_role_with_web_identity', + identity_response, + ) + + expected_creds = self.create_random_credentials() + assume_role_response = self.create_assume_role_response(expected_creds) + stubber.add_response('assume_role', assume_role_response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + stubber.assert_no_pending_responses() + # Assert that the client was created with the credentials from the + # assume role with web identity call. + self.assertEqual(self.mock_client_creator.call_count, 1) + _, kwargs = self.mock_client_creator.call_args_list[0] + expected_kwargs = { + 'aws_access_key_id': identity_creds.access_key, + 'aws_secret_access_key': identity_creds.secret_key, + 'aws_session_token': identity_creds.token, + } + self.assertEqual(kwargs, expected_kwargs) + + def test_web_identity_source_profile_ignores_env_vars(self): + token_path = os.path.join(self.tempdir, 'token') + with open(token_path, 'w') as token_file: + token_file.write('a.token') + self.environ['AWS_ROLE_ARN'] = 'arn:aws:iam::123456789:role/RoleB' + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n' + '[profile B]\n' + f'web_identity_token_file = {token_path}\n' + ) + self.write_config(config) + + session, _ = self.create_session(profile='A') + # The config is split between the profile and the env, we + # should only be looking at the profile so this should raise + # a configuration error. + with self.assertRaises(InvalidConfigError): + session.get_credentials() + + def test_sso_source_profile_legacy(self): + token_cache_key = 'f395038c92f1828cbb3991d2d6152d326b895606' + cached_token = { + 'accessToken': 'a.token', + 'expiresAt': self.some_future_time(), + } + temp_cache = JSONFileCache(self.tempdir) + temp_cache[token_cache_key] = cached_token + + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n' + '[profile B]\n' + 'sso_region = us-east-1\n' + 'sso_start_url = https://test.url/start\n' + 'sso_role_name = SSORole\n' + 'sso_account_id = 1234567890\n' + ) + self.write_config(config) + + session, sts_stubber = self.create_session(profile='A') + client_config = Config( + region_name='us-east-1', + signature_version=UNSIGNED, + ) + sso_stubber = session.stub('sso', config=client_config) + sso_stubber.activate() + # The expiration needs to be in milliseconds + expiration = datetime2timestamp(self.some_future_time()) * 1000 + sso_role_creds = self.create_random_credentials() + sso_role_response = { + 'roleCredentials': { + 'accessKeyId': sso_role_creds.access_key, + 'secretAccessKey': sso_role_creds.secret_key, + 'sessionToken': sso_role_creds.token, + 'expiration': int(expiration), + } + } + sso_stubber.add_response('get_role_credentials', sso_role_response) + + expected_creds = self.create_random_credentials() + assume_role_response = self.create_assume_role_response(expected_creds) + sts_stubber.add_response('assume_role', assume_role_response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + sts_stubber.assert_no_pending_responses() + # Assert that the client was created with the credentials from the + # SSO get role credentials response + self.assertEqual(self.mock_client_creator.call_count, 1) + _, kwargs = self.mock_client_creator.call_args_list[0] + expected_kwargs = { + 'aws_access_key_id': sso_role_creds.access_key, + 'aws_secret_access_key': sso_role_creds.secret_key, + 'aws_session_token': sso_role_creds.token, + } + self.assertEqual(kwargs, expected_kwargs) + + def test_sso_source_profile(self): + token_cache_key = '32096c2e0eff33d844ee6d675407ace18289357d' + cached_token = { + 'accessToken': 'C', + 'expiresAt': TIME_IN_ONE_HOUR.strftime('%Y-%m-%dT%H:%M:%SZ'), + } + temp_cache = JSONFileCache(self.tempdir) + temp_cache[token_cache_key] = cached_token + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n' + '[profile B]\n' + 'sso_session = C\n' + 'sso_role_name = SSORole\n' + 'sso_account_id = 1234567890\n' + '[sso-session C]\n' + 'sso_region = us-east-1\n' + 'sso_start_url = https://test.url/start\n' + ) + self.write_config(config) + + session, sts_stubber = self.create_session( + profile='A', sso_token_cache=temp_cache + ) + client_config = Config( + region_name='us-east-1', + signature_version=UNSIGNED, + ) + sso_stubber = session.stub('sso', config=client_config) + sso_stubber.activate() + # The expiration needs to be in milliseconds + expiration = datetime2timestamp(self.some_future_time()) * 1000 + sso_role_creds = self.create_random_credentials() + sso_role_response = { + 'roleCredentials': { + 'accessKeyId': sso_role_creds.access_key, + 'secretAccessKey': sso_role_creds.secret_key, + 'sessionToken': sso_role_creds.token, + 'expiration': int(expiration), + } + } + sso_stubber.add_response('get_role_credentials', sso_role_response) + + expected_creds = self.create_random_credentials() + assume_role_response = self.create_assume_role_response(expected_creds) + sts_stubber.add_response('assume_role', assume_role_response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + sts_stubber.assert_no_pending_responses() + # Assert that the client was created with the credentials from the + # SSO get role credentials response + self.assertEqual(self.mock_client_creator.call_count, 1) + _, kwargs = self.mock_client_creator.call_args_list[0] + expected_kwargs = { + 'aws_access_key_id': sso_role_creds.access_key, + 'aws_secret_access_key': sso_role_creds.secret_key, + 'aws_session_token': sso_role_creds.token, + } + self.assertEqual(kwargs, expected_kwargs) + + def test_web_identity_credential_source_ignores_env_vars(self): + token_path = os.path.join(self.tempdir, 'token') + with open(token_path, 'w') as token_file: + token_file.write('a.token') + self.environ['AWS_ROLE_ARN'] = 'arn:aws:iam::123456789:role/RoleB' + self.environ['AWS_WEB_IDENTITY_TOKEN_FILE'] = token_path + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'credential_source = Environment\n' + ) + self.write_config(config) + + session, _ = self.create_session(profile='A') + # We should not get credentials from web-identity configured in the + # environment when the Environment credential_source is set. + # There are no Environment credentials, so this should raise a + # retrieval error. + with self.assertRaises(CredentialRetrievalError): + session.get_credentials() + + def test_self_referential_profile(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = A\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + ) + self.write_config(config) + + expected_creds = self.create_random_credentials() + response = self.create_assume_role_response(expected_creds) + session, stubber = self.create_session(profile='A') + stubber.add_response('assume_role', response) + + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + stubber.assert_no_pending_responses() + + def create_stubbed_sts_client(self, session): + expected_creds = self.create_random_credentials() + _original_create_client = session.create_client + + def create_client_sts_stub(service, *args, **kwargs): + client = _original_create_client(service, *args, **kwargs) + stub = Stubber(client) + response = self.create_assume_role_response(expected_creds) + self.actual_client_region = client.meta.region_name + stub.add_response('assume_role', response) + stub.activate() + return client + + return create_client_sts_stub, expected_creds + + def test_assume_role_uses_correct_region(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n\n' + '[profile B]\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + ) + self.write_config(config) + session = Session(profile='A') + # Verify that when we configure the session with a specific region + # that we use that region when creating the sts client. + session.set_config_variable('region', 'cn-north-1') + + create_client, expected_creds = self.create_stubbed_sts_client(session) + session.create_client = create_client + + resolver = create_credential_resolver(session) + provider = resolver.get_provider('assume-role') + creds = provider.load() + self.assert_creds_equal(creds, expected_creds) + self.assertEqual(self.actual_client_region, 'cn-north-1') + + +class TestAssumeRoleWithWebIdentity(BaseAssumeRoleTest): + def setUp(self): + super().setUp() + self.token_file = os.path.join(self.tempdir, 'token.jwt') + self.write_token('totally.a.token') + + def write_token(self, token, path=None): + if path is None: + path = self.token_file + with open(path, 'w') as f: + f.write(token) + + def assert_session_credentials(self, expected_params, **kwargs): + expected_creds = self.create_random_credentials() + response = self.create_assume_role_response(expected_creds) + session = StubbedSession(**kwargs) + stubber = session.stub('sts') + stubber.add_response( + 'assume_role_with_web_identity', response, expected_params + ) + stubber.activate() + actual_creds = session.get_credentials() + self.assert_creds_equal(actual_creds, expected_creds) + stubber.assert_no_pending_responses() + + def test_assume_role(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'role_session_name = sname\n' + f'web_identity_token_file = {self.token_file}\n' + ) + self.write_config(config) + expected_params = { + 'RoleArn': 'arn:aws:iam::123456789:role/RoleA', + 'RoleSessionName': 'sname', + 'WebIdentityToken': 'totally.a.token', + } + self.assert_session_credentials(expected_params, profile='A') + + def test_assume_role_env_vars(self): + config = '[profile B]\n' 'region = us-west-2\n' + self.write_config(config) + self.environ['AWS_ROLE_ARN'] = 'arn:aws:iam::123456789:role/RoleB' + self.environ['AWS_WEB_IDENTITY_TOKEN_FILE'] = self.token_file + self.environ['AWS_ROLE_SESSION_NAME'] = 'bname' + + expected_params = { + 'RoleArn': 'arn:aws:iam::123456789:role/RoleB', + 'RoleSessionName': 'bname', + 'WebIdentityToken': 'totally.a.token', + } + self.assert_session_credentials(expected_params) + + def test_assume_role_env_vars_do_not_take_precedence(self): + config = ( + '[profile A]\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'role_session_name = aname\n' + f'web_identity_token_file = {self.token_file}\n' + ) + self.write_config(config) + + different_token = os.path.join(self.tempdir, str(uuid.uuid4())) + self.write_token('totally.different.token', path=different_token) + self.environ['AWS_ROLE_ARN'] = 'arn:aws:iam::123456789:role/RoleC' + self.environ['AWS_WEB_IDENTITY_TOKEN_FILE'] = different_token + self.environ['AWS_ROLE_SESSION_NAME'] = 'cname' + + expected_params = { + 'RoleArn': 'arn:aws:iam::123456789:role/RoleA', + 'RoleSessionName': 'aname', + 'WebIdentityToken': 'totally.a.token', + } + self.assert_session_credentials(expected_params, profile='A') + + +class TestProcessProvider(unittest.TestCase): + def setUp(self): + current_dir = os.path.dirname(os.path.abspath(__file__)) + credential_process = os.path.join( + current_dir, 'utils', 'credentialprocess.py' + ) + self.credential_process = f'{sys.executable} {credential_process}' + self.environ = os.environ.copy() + self.environ_patch = mock.patch('os.environ', self.environ) + self.environ_patch.start() + + def tearDown(self): + self.environ_patch.stop() + + def test_credential_process(self): + config = '[profile processcreds]\n' 'credential_process = %s\n' + config = config % self.credential_process + with temporary_file('w') as f: + f.write(config) + f.flush() + self.environ['AWS_CONFIG_FILE'] = f.name + + credentials = Session(profile='processcreds').get_credentials() + self.assertEqual(credentials.access_key, 'spam') + self.assertEqual(credentials.secret_key, 'eggs') + + def test_credential_process_returns_error(self): + config = ( + '[profile processcreds]\n' + 'credential_process = %s --raise-error\n' + ) + config = config % self.credential_process + with temporary_file('w') as f: + f.write(config) + f.flush() + self.environ['AWS_CONFIG_FILE'] = f.name + + session = Session(profile='processcreds') + + # This regex validates that there is no substring: b' + # The reason why we want to validate that is that we want to + # make sure that stderr is actually decoded so that in + # exceptional cases the error is properly formatted. + # As for how the regex works: + # `(?!b').` is a negative lookahead, meaning that it will only + # match if it is not followed by the pattern `b'`. Since it is + # followed by a `.` it will match any character not followed by + # that pattern. `((?!hede).)*` does that zero or more times. The + # final pattern adds `^` and `$` to anchor the beginning and end + # of the string so we can know the whole string is consumed. + # Finally `(?s)` at the beginning makes dots match newlines so + # we can handle a multi-line string. + reg = r"(?s)^((?!b').)*$" + with self.assertRaisesRegex(CredentialRetrievalError, reg): + session.get_credentials() + + +class TestSTSRegional(BaseAssumeRoleTest): + def add_assume_role_http_response(self, stubber): + stubber.add_response(body=self._get_assume_role_body('AssumeRole')) + + def add_assume_role_with_web_identity_http_response(self, stubber): + stubber.add_response( + body=self._get_assume_role_body('AssumeRoleWithWebIdentity') + ) + + def _get_assume_role_body(self, method_name): + expiration = self.some_future_time() + body = ( + f'<{method_name}Response>' + f' <{method_name}Result>' + ' ' + ' arn:aws:sts::0123456:user' + ' AKID:mysession-1567020004' + ' ' + ' ' + ' AccessKey' + ' SecretKey' + ' SessionToken' + f' {expiration}' + ' ' + f' ' + f'' + ) + return body.encode('utf-8') + + def make_stubbed_client_call_to_region(self, session, stubber, region): + ec2 = session.create_client('ec2', region_name=region) + stubber.add_response(body=b'') + ec2.describe_regions() + + def test_assume_role_uses_same_region_as_client(self): + config = ( + '[profile A]\n' + 'sts_regional_endpoints = regional\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + 'source_profile = B\n\n' + '[profile B]\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + ) + self.write_config(config) + + session = Session(profile='A') + with SessionHTTPStubber(session) as stubber: + self.add_assume_role_http_response(stubber) + # Make an arbitrary client and API call as we are really only + # looking to make sure the STS assume role call uses the correct + # endpoint. + self.make_stubbed_client_call_to_region( + session, stubber, 'us-west-2' + ) + self.assertEqual( + stubber.requests[0].url, 'https://sts.us-west-2.amazonaws.com/' + ) + + def test_assume_role_web_identity_uses_same_region_as_client(self): + token_file = os.path.join(self.tempdir, 'token.jwt') + with open(token_file, 'w') as f: + f.write('some-token') + config = ( + '[profile A]\n' + 'sts_regional_endpoints = regional\n' + 'role_arn = arn:aws:iam::123456789:role/RoleA\n' + f'web_identity_token_file = {token_file}\n' + 'source_profile = B\n\n' + '[profile B]\n' + 'aws_access_key_id = abc123\n' + 'aws_secret_access_key = def456\n' + ) + self.write_config(config) + # Make an arbitrary client and API call as we are really only + # looking to make sure the STS assume role call uses the correct + # endpoint. + session = Session(profile='A') + with SessionHTTPStubber(session) as stubber: + self.add_assume_role_with_web_identity_http_response(stubber) + # Make an arbitrary client and API call as we are really only + # looking to make sure the STS assume role call uses the correct + # endpoint. + self.make_stubbed_client_call_to_region( + session, stubber, 'us-west-2' + ) + self.assertEqual( + stubber.requests[0].url, 'https://sts.us-west-2.amazonaws.com/' + ) + + +class MockCache: + """Mock for JSONFileCache to avoid touching files on disk""" + + def __init__(self, working_dir=None, dumps_func=None): + self.working_dir = working_dir + self.dumps_func = dumps_func + + def __contains__(self, cache_key): + return True + + def __getitem__(self, cache_key): + return { + "startUrl": "https://test.awsapps.com/start", + "region": "us-east-1", + "accessToken": "access-token", + "expiresAt": TIME_IN_ONE_HOUR.strftime('%Y-%m-%dT%H:%M:%SZ'), + "expiresIn": 3600, + "clientId": "client-12345", + "clientSecret": "client-secret", + "registrationExpiresAt": TIME_IN_SIX_MONTHS.strftime( + '%Y-%m-%dT%H:%M:%SZ' + ), + "refreshToken": "refresh-here", + } + + def __delitem__(self, cache_key): + pass + + +class SSOSessionTest(BaseEnvVar): + def setUp(self): + super().setUp() + self.tempdir = tempfile.mkdtemp() + self.config_file = os.path.join(self.tempdir, 'config') + self.environ['AWS_CONFIG_FILE'] = self.config_file + self.access_key_id = 'ASIA123456ABCDEFG' + self.secret_access_key = 'secret-key' + self.session_token = 'session-token' + + def tearDown(self): + shutil.rmtree(self.tempdir) + super().tearDown() + + def write_config(self, config): + with open(self.config_file, 'w') as f: + f.write(config) + + def test_token_chosen_from_provider(self): + profile = ( + '[profile sso-test]\n' + 'region = us-east-1\n' + 'sso_session = sso-test-session\n' + 'sso_account_id = 12345678901234\n' + 'sso_role_name = ViewOnlyAccess\n' + '\n' + '[sso-session sso-test-session]\n' + 'sso_region = us-east-1\n' + 'sso_start_url = https://test.awsapps.com/start\n' + 'sso_registration_scopes = sso:account:access\n' + ) + self.write_config(profile) + + session = Session(profile='sso-test') + with SessionHTTPStubber(session) as stubber: + self.add_credential_response(stubber) + stubber.add_response() + with mock.patch.object( + SSOTokenProvider, 'DEFAULT_CACHE_CLS', MockCache + ): + c = session.create_client('s3') + c.list_buckets() + + self.assert_valid_sso_call( + stubber.requests[0], + ( + 'https://portal.sso.us-east-1.amazonaws.com/federation/credentials' + '?role_name=ViewOnlyAccess&account_id=12345678901234' + ), + b'access-token', + ) + self.assert_credentials_used( + stubber.requests[1], + self.access_key_id.encode('utf-8'), + self.session_token.encode('utf-8'), + ) + + def test_mismatched_session_values(self): + profile = ( + '[profile sso-test]\n' + 'region = us-east-1\n' + 'sso_session = sso-test-session\n' + 'sso_start_url = https://test2.awsapps.com/start\n' + 'sso_account_id = 12345678901234\n' + 'sso_role_name = ViewOnlyAccess\n' + '\n' + '[sso-session sso-test-session]\n' + 'sso_region = us-east-1\n' + 'sso_start_url = https://test.awsapps.com/start\n' + 'sso_registration_scopes = sso:account:access\n' + ) + self.write_config(profile) + + session = Session(profile='sso-test') + with pytest.raises(InvalidConfigError): + c = session.create_client('s3') + c.list_buckets() + + def test_missing_sso_session(self): + profile = ( + '[profile sso-test]\n' + 'region = us-east-1\n' + 'sso_session = sso-test-session\n' + 'sso_start_url = https://test2.awsapps.com/start\n' + 'sso_account_id = 12345678901234\n' + 'sso_role_name = ViewOnlyAccess\n' + '\n' + ) + self.write_config(profile) + + session = Session(profile='sso-test') + with pytest.raises(InvalidConfigError): + c = session.create_client('s3') + c.list_buckets() + + def assert_valid_sso_call(self, request, url, access_token): + assert request.url == url + assert 'x-amz-sso_bearer_token' in request.headers + assert request.headers['x-amz-sso_bearer_token'] == access_token + + def assert_credentials_used(self, request, access_key, session_token): + assert access_key in request.headers.get('Authorization') + assert request.headers.get('X-Amz-Security-Token') == session_token + + def add_credential_response(self, stubber): + response = { + 'roleCredentials': { + 'accessKeyId': self.access_key_id, + 'secretAccessKey': self.secret_access_key, + 'sessionToken': self.session_token, + 'expiration': TIME_IN_ONE_HOUR.timestamp() * 1000, + } + } + stubber.add_response(body=json.dumps(response).encode('utf-8')) + + +class TestContextCredentials(unittest.TestCase): + ACCESS_KEY = "access-key" + SECRET_KEY = "secret-key" + + def _add_fake_creds(self, request, **kwargs): + request.context.setdefault('signing', {}) + request.context['signing']['request_credentials'] = Credentials( + self.ACCESS_KEY, self.SECRET_KEY + ) + + def test_credential_context_override(self): + session = StubbedSession() + with SessionHTTPStubber(session) as stubber: + s3 = session.create_client('s3') + s3.meta.events.register('before-sign', self._add_fake_creds) + stubber.add_response() + s3.list_buckets() + request = stubber.requests[0] + assert self.ACCESS_KEY in str(request.headers.get('Authorization')) diff --git a/testbed/boto__botocore/tests/functional/test_discovery.py b/testbed/boto__botocore/tests/functional/test_discovery.py new file mode 100644 index 0000000000000000000000000000000000000000..8842d5b0867e74be229f5563d64cb2d3ad61fdf7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_discovery.py @@ -0,0 +1,366 @@ +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.compat import json +from botocore.config import Config +from botocore.discovery import EndpointDiscoveryRequired +from botocore.exceptions import ( + ClientError, + InvalidEndpointDiscoveryConfigurationError, +) +from tests import ClientHTTPStubber, temporary_file +from tests.functional import FunctionalSessionTest + + +class TestEndpointDiscovery(FunctionalSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + + def create_client( + self, + service_name='dynamodb', + region=None, + config=None, + endpoint_url=None, + ): + if region is None: + region = self.region + client = self.session.create_client( + service_name, region, config=config, endpoint_url=endpoint_url + ) + http_stubber = ClientHTTPStubber(client) + + return client, http_stubber + + def add_describe_endpoints_response(self, stubber, discovered_endpoint): + response = { + 'Endpoints': [ + { + 'Address': discovered_endpoint, + 'CachePeriodInMinutes': 1, + } + ] + } + response_body = json.dumps(response).encode() + stubber.add_response(status=200, body=response_body) + stubber.add_response(status=200, body=b'{}') + + def set_endpoint_discovery_config_file(self, fileobj, config_val): + fileobj.write( + '[default]\n' f'endpoint_discovery_enabled={config_val}\n' + ) + fileobj.flush() + self.environ['AWS_CONFIG_FILE'] = fileobj.name + + def assert_endpoint_discovery_used(self, stubber, discovered_endpoint): + self.assertEqual(len(stubber.requests), 2) + discover_request = stubber.requests[1] + self.assertEqual(discover_request.url, discovered_endpoint) + + def assert_discovery_skipped(self, stubber, operation): + self.assertEqual(len(stubber.requests), 1) + self.assertEqual( + stubber.requests[0].headers.get('X-Amz-Target'), operation + ) + + def assert_endpoint_used(self, actual_url, expected_url): + self.assertEqual(actual_url, expected_url) + + def test_endpoint_discovery_enabled(self): + discovered_endpoint = 'https://discovered.domain' + config = Config(endpoint_discovery_enabled=True) + client, http_stubber = self.create_client(config=config) + with http_stubber as stubber: + self.add_describe_endpoints_response(stubber, discovered_endpoint) + client.describe_table(TableName='sometable') + self.assert_endpoint_discovery_used(stubber, discovered_endpoint) + + def test_endpoint_discovery_with_invalid_endpoint(self): + response = { + 'Error': { + 'Code': 'InvalidEndpointException', + 'Message': 'Test Error', + } + } + response_body = json.dumps(response).encode() + + config = Config(endpoint_discovery_enabled=True) + client, http_stubber = self.create_client(config=config) + with http_stubber as stubber: + stubber.add_response(status=421, body=response_body) + with self.assertRaises(ClientError): + client.describe_table(TableName='sometable') + + def test_endpoint_discovery_disabled(self): + config = Config(endpoint_discovery_enabled=False) + client, http_stubber = self.create_client(config=config) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.describe_table(TableName='sometable') + self.assertEqual(len(stubber.requests), 1) + + def test_endpoint_discovery_no_config_default(self): + client, http_stubber = self.create_client() + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.describe_table(TableName='sometable') + self.assertEqual(len(stubber.requests), 1) + + def test_endpoint_discovery_default_required_endpoint(self): + discovered_endpoint = "https://discovered.domain" + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + with http_stubber as stubber: + self.add_describe_endpoints_response(stubber, discovered_endpoint) + client.test_discovery_required(Foo="bar") + self.assert_endpoint_discovery_used(stubber, discovered_endpoint) + + def test_endpoint_discovery_required_with_discovery_enabled(self): + discovered_endpoint = "https://discovered.domain" + config = Config(endpoint_discovery_enabled=True) + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", config=config + ) + with http_stubber as stubber: + self.add_describe_endpoints_response(stubber, discovered_endpoint) + client.test_discovery_required(Foo="bar") + self.assert_endpoint_discovery_used(stubber, discovered_endpoint) + + def test_endpoint_discovery_required_with_discovery_disabled(self): + discovered_endpoint = "https://discovered.domain" + config = Config(endpoint_discovery_enabled=False) + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", config=config + ) + self.add_describe_endpoints_response(http_stubber, discovered_endpoint) + with self.assertRaises(EndpointDiscoveryRequired): + client.test_discovery_required(Foo="bar") + + def test_endpoint_discovery_required_with_custom_endpoint(self): + endpoint = "https://custom.domain/" + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", endpoint_url=endpoint + ) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.test_discovery_required(Foo="bar") + self.assert_discovery_skipped( + stubber, b"test-discovery-endpoint.TestDiscoveryRequired" + ) + self.assert_endpoint_used(stubber.requests[0].url, endpoint) + + def test_endpoint_discovery_disabled_with_custom_endpoint(self): + endpoint = "https://custom.domain/" + config = Config(endpoint_discovery_enabled=False) + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", + config=config, + endpoint_url=endpoint, + ) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.test_discovery_required(Foo="bar") + self.assert_discovery_skipped( + stubber, b"test-discovery-endpoint.TestDiscoveryRequired" + ) + self.assert_endpoint_used(stubber.requests[0].url, endpoint) + + def test_endpoint_discovery_enabled_with_custom_endpoint(self): + endpoint = "https://custom.domain/" + config = Config(endpoint_discovery_enabled=True) + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", + config=config, + endpoint_url=endpoint, + ) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.test_discovery_required(Foo="bar") + self.assert_discovery_skipped( + stubber, b"test-discovery-endpoint.TestDiscoveryRequired" + ) + self.assert_endpoint_used(stubber.requests[0].url, endpoint) + + def test_endpoint_discovery_optional_with_custom_endpoint(self): + endpoint = "https://custom.domain/" + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", endpoint_url=endpoint + ) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.test_discovery_optional(Foo="bar") + self.assert_discovery_skipped( + stubber, b"test-discovery-endpoint.TestDiscoveryOptional" + ) + self.assert_endpoint_used(stubber.requests[0].url, endpoint) + + def test_endpoint_discovery_optional_disabled_with_custom_endpoint(self): + endpoint = "https://custom.domain/" + config = Config(endpoint_discovery_enabled=False) + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", + config=config, + endpoint_url=endpoint, + ) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.test_discovery_optional(Foo="bar") + self.assert_discovery_skipped( + stubber, + b"test-discovery-endpoint.TestDiscoveryOptional", + ) + self.assert_endpoint_used(stubber.requests[0].url, endpoint) + + def test_endpoint_discovery_default_optional_endpoint(self): + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.test_discovery_optional(Foo="bar") + self.assertEqual(len(stubber.requests), 1) + + def test_endpoint_discovery_enabled_optional_endpoint(self): + discovered_endpoint = 'https://discovered.domain' + config = Config(endpoint_discovery_enabled=True) + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", config=config + ) + with http_stubber as stubber: + self.add_describe_endpoints_response(stubber, discovered_endpoint) + client.test_discovery_optional(Foo="bar") + self.assert_endpoint_discovery_used(stubber, discovered_endpoint) + + def test_endpoint_discovery_manual_auto_on_required_endpoint(self): + discovered_endpoint = 'https://discovered.domain' + config = Config(endpoint_discovery_enabled=" aUto \n") + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", config=config + ) + with http_stubber as stubber: + self.add_describe_endpoints_response(stubber, discovered_endpoint) + client.test_discovery_required(Foo="bar") + self.assert_endpoint_discovery_used(stubber, discovered_endpoint) + + def test_endpoint_discovery_enabled_with_random_string(self): + config = Config(endpoint_discovery_enabled="bad value") + with self.assertRaises(InvalidEndpointDiscoveryConfigurationError): + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", config=config + ) + + def test_endpoint_discovery_required_with_env_var_default(self): + self.environ['AWS_ENDPOINT_DISCOVERY_ENABLED'] = 'auto' + discovered_endpoint = 'https://discovered.domain' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", config=None + ) + with http_stubber as stubber: + self.add_describe_endpoints_response(stubber, discovered_endpoint) + client.test_discovery_required(Foo="bar") + self.assert_endpoint_discovery_used(stubber, discovered_endpoint) + + def test_endpoint_discovery_optional_with_env_var_default(self): + self.environ['AWS_ENDPOINT_DISCOVERY_ENABLED'] = 'auto' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint", config=None + ) + with http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + client.test_discovery_optional(Foo="bar") + self.assert_discovery_skipped( + stubber, b"test-discovery-endpoint.TestDiscoveryOptional" + ) + + def test_endpoint_discovery_optional_with_env_var_enabled(self): + self.environ['AWS_ENDPOINT_DISCOVERY_ENABLED'] = "True" + discovered_endpoint = 'https://discovered.domain' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + with http_stubber as stubber: + self.add_describe_endpoints_response(stubber, discovered_endpoint) + client.test_discovery_optional(Foo="bar") + self.assert_endpoint_discovery_used(stubber, discovered_endpoint) + + def test_endpoint_discovery_required_with_env_var_disabled(self): + self.environ['AWS_ENDPOINT_DISCOVERY_ENABLED'] = "False" + discovered_endpoint = 'https://discovered.domain' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + self.add_describe_endpoints_response(http_stubber, discovered_endpoint) + with self.assertRaises(EndpointDiscoveryRequired): + client.test_discovery_required(Foo="bar") + + def test_endpoint_discovery_with_config_file_enabled(self): + with temporary_file('w') as f: + self.set_endpoint_discovery_config_file(f, "True") + discovered_endpoint = 'https://discovered.domain' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + with http_stubber as stubber: + self.add_describe_endpoints_response( + stubber, discovered_endpoint + ) + client.test_discovery_required(Foo="bar") + self.assert_endpoint_discovery_used( + stubber, discovered_endpoint + ) + + def test_endpoint_discovery_with_config_file_enabled_lowercase(self): + with temporary_file('w') as f: + self.set_endpoint_discovery_config_file(f, "true") + discovered_endpoint = 'https://discovered.domain' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + with http_stubber as stubber: + self.add_describe_endpoints_response( + stubber, discovered_endpoint + ) + client.test_discovery_required(Foo="bar") + self.assert_endpoint_discovery_used( + stubber, discovered_endpoint + ) + + def test_endpoint_discovery_with_config_file_disabled(self): + with temporary_file('w') as f: + self.set_endpoint_discovery_config_file(f, "false") + discovered_endpoint = 'https://discovered.domain' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + self.add_describe_endpoints_response( + http_stubber, discovered_endpoint + ) + with self.assertRaises(EndpointDiscoveryRequired): + client.test_discovery_required(Foo="bar") + + def test_endpoint_discovery_with_config_file_auto(self): + with temporary_file('w') as f: + self.set_endpoint_discovery_config_file(f, "AUTO") + discovered_endpoint = 'https://discovered.domain' + client, http_stubber = self.create_client( + service_name="test-discovery-endpoint" + ) + with http_stubber as stubber: + self.add_describe_endpoints_response( + stubber, discovered_endpoint + ) + client.test_discovery_required(Foo="bar") + self.assert_endpoint_discovery_used( + stubber, discovered_endpoint + ) diff --git a/testbed/boto__botocore/tests/functional/test_docdb.py b/testbed/boto__botocore/tests/functional/test_docdb.py new file mode 100644 index 0000000000000000000000000000000000000000..11c02574bfd0c980b133963ad080f470f9171232 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_docdb.py @@ -0,0 +1,62 @@ +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestDocDBPresignUrlInjection(BaseSessionTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client('docdb', 'us-west-2') + self.http_stubber = ClientHTTPStubber(self.client) + + def assert_presigned_url_injected_in_request(self, body): + self.assertIn('PreSignedUrl', body) + self.assertNotIn('SourceRegion', body) + + def test_create_db_cluster(self): + params = { + 'DBClusterIdentifier': 'my-cluster', + 'Engine': 'docdb', + 'SourceRegion': 'us-east-1', + 'MasterUsername': 'master', + 'MasterUserPassword': 'mypassword', + } + response_body = ( + b'' + b'' + b'' + b'' + ) + self.http_stubber.add_response(body=response_body) + with self.http_stubber: + self.client.create_db_cluster(**params) + sent_request = self.http_stubber.requests[0] + self.assert_presigned_url_injected_in_request(sent_request.body) + + def test_copy_db_cluster_snapshot(self): + params = { + 'SourceDBClusterSnapshotIdentifier': 'source-db', + 'TargetDBClusterSnapshotIdentifier': 'target-db', + 'SourceRegion': 'us-east-1', + } + response_body = ( + b'' + b'' + b'' + b'' + ) + self.http_stubber.add_response(body=response_body) + with self.http_stubber: + self.client.copy_db_cluster_snapshot(**params) + sent_request = self.http_stubber.requests[0] + self.assert_presigned_url_injected_in_request(sent_request.body) diff --git a/testbed/boto__botocore/tests/functional/test_dynamodb.py b/testbed/boto__botocore/tests/functional/test_dynamodb.py new file mode 100644 index 0000000000000000000000000000000000000000..52ea639eb0dc5acdf4112852130a5c448a831ae6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_dynamodb.py @@ -0,0 +1,64 @@ +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.compat import json +from botocore.config import Config +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestDynamoDBEndpointDiscovery(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.config = Config(endpoint_discovery_enabled=True) + self.create_client() + + def create_client(self): + self.client = self.session.create_client( + 'dynamodb', self.region, config=self.config + ) + self.http_stubber = ClientHTTPStubber(self.client) + + def test_dynamodb_endpoint_discovery_enabled(self): + discovered_endpoint = 'https://discovered.domain' + response = { + 'Endpoints': [ + { + 'Address': discovered_endpoint, + 'CachePeriodInMinutes': 1, + } + ] + } + response_body = json.dumps(response).encode() + with self.http_stubber as stubber: + stubber.add_response(status=200, body=response_body) + stubber.add_response(status=200, body=b'{}') + self.client.describe_table(TableName='sometable') + self.assertEqual(len(self.http_stubber.requests), 2) + discover_request = self.http_stubber.requests[1] + self.assertEqual(discover_request.url, discovered_endpoint) + + def test_dynamodb_endpoint_discovery_disabled(self): + self.config = Config(endpoint_discovery_enabled=False) + self.create_client() + with self.http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + self.client.describe_table(TableName='sometable') + self.assertEqual(len(self.http_stubber.requests), 1) + + def test_dynamodb_endpoint_discovery_no_config_default(self): + self.config = None + self.create_client() + with self.http_stubber as stubber: + stubber.add_response(status=200, body=b'{}') + self.client.describe_table(TableName='sometable') + self.assertEqual(len(self.http_stubber.requests), 1) diff --git a/testbed/boto__botocore/tests/functional/test_ec2.py b/testbed/boto__botocore/tests/functional/test_ec2.py new file mode 100644 index 0000000000000000000000000000000000000000..75ec6dc8f48eec71aea1041875d4912758f7a4a7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_ec2.py @@ -0,0 +1,141 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import datetime + +import botocore.session +from botocore.compat import parse_qs, urlparse +from botocore.stub import ANY, Stubber +from tests import BaseSessionTest, ClientHTTPStubber, mock, unittest + + +class TestIdempotencyToken(unittest.TestCase): + def setUp(self): + self.function_name = 'purchase_scheduled_instances' + self.region = 'us-west-2' + self.session = botocore.session.get_session() + self.client = self.session.create_client('ec2', self.region) + self.stubber = Stubber(self.client) + self.service_response = {} + self.params_seen = [] + + # Record all the parameters that get seen + self.client.meta.events.register_first( + 'before-call.*.*', + self.collect_params, + unique_id='TestIdempotencyToken', + ) + + def collect_params(self, model, params, *args, **kwargs): + self.params_seen.extend(params['body'].keys()) + + def test_provided_idempotency_token(self): + expected_params = { + 'PurchaseRequests': [ + {'PurchaseToken': 'foo', 'InstanceCount': 123} + ], + 'ClientToken': ANY, + } + self.stubber.add_response( + self.function_name, self.service_response, expected_params + ) + + with self.stubber: + self.client.purchase_scheduled_instances( + PurchaseRequests=[ + {'PurchaseToken': 'foo', 'InstanceCount': 123} + ], + ClientToken='foobar', + ) + self.assertIn('ClientToken', self.params_seen) + + def test_insert_idempotency_token(self): + expected_params = { + 'PurchaseRequests': [ + {'PurchaseToken': 'foo', 'InstanceCount': 123} + ], + } + + self.stubber.add_response( + self.function_name, self.service_response, expected_params + ) + + with self.stubber: + self.client.purchase_scheduled_instances( + PurchaseRequests=[ + {'PurchaseToken': 'foo', 'InstanceCount': 123} + ] + ) + self.assertIn('ClientToken', self.params_seen) + + +class TestCopySnapshotCustomization(BaseSessionTest): + def setUp(self): + super().setUp() + self.session = botocore.session.get_session() + self.client = self.session.create_client('ec2', 'us-east-1') + self.http_stubber = ClientHTTPStubber(self.client) + self.snapshot_id = 'snap-0123abc' + self.copy_response = ( + '\n' + '\n' + '%s\n' + '\n' + ) + self.now = datetime.datetime(2011, 9, 9, 23, 36) + self.datetime_patch = mock.patch.object( + botocore.auth.datetime, + 'datetime', + mock.Mock(wraps=datetime.datetime), + ) + self.mocked_datetime = self.datetime_patch.start() + self.mocked_datetime.utcnow.return_value = self.now + + def tearDown(self): + super().tearDown() + self.datetime_patch.stop() + + def add_copy_snapshot_response(self, snapshot_id): + body = (self.copy_response % snapshot_id).encode('utf-8') + self.http_stubber.add_response(body=body) + + def test_copy_snapshot_injects_presigned_url(self): + self.add_copy_snapshot_response(self.snapshot_id) + with self.http_stubber: + result = self.client.copy_snapshot( + SourceRegion='us-west-2', + SourceSnapshotId=self.snapshot_id, + ) + self.assertEqual(result['SnapshotId'], self.snapshot_id) + self.assertEqual(len(self.http_stubber.requests), 1) + snapshot_request = self.http_stubber.requests[0] + body = parse_qs(snapshot_request.body) + self.assertIn('PresignedUrl', body) + presigned_url = urlparse(body['PresignedUrl'][0]) + self.assertEqual(presigned_url.scheme, 'https') + self.assertEqual(presigned_url.netloc, 'ec2.us-west-2.amazonaws.com') + query_args = parse_qs(presigned_url.query) + self.assertEqual(query_args['Action'], ['CopySnapshot']) + self.assertEqual(query_args['Version'], ['2016-11-15']) + self.assertEqual(query_args['SourceRegion'], ['us-west-2']) + self.assertEqual(query_args['DestinationRegion'], ['us-east-1']) + self.assertEqual(query_args['SourceSnapshotId'], [self.snapshot_id]) + self.assertEqual(query_args['X-Amz-Algorithm'], ['AWS4-HMAC-SHA256']) + expected_credential = 'access_key/20110909/us-west-2/ec2/aws4_request' + self.assertEqual(query_args['X-Amz-Credential'], [expected_credential]) + self.assertEqual(query_args['X-Amz-Date'], ['20110909T233600Z']) + self.assertEqual(query_args['X-Amz-Expires'], ['3600']) + self.assertEqual(query_args['X-Amz-SignedHeaders'], ['host']) + expected_signature = ( + 'a94a6b52afdf3daa34c2e2a38a62b72c8dac129c9904c61aa1a5d86e38628537' + ) + self.assertEqual(query_args['X-Amz-Signature'], [expected_signature]) diff --git a/testbed/boto__botocore/tests/functional/test_endpoint_rulesets.py b/testbed/boto__botocore/tests/functional/test_endpoint_rulesets.py new file mode 100644 index 0000000000000000000000000000000000000000..fdfbabba09ba3bae21eb132685430cdd652d7933 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_endpoint_rulesets.py @@ -0,0 +1,307 @@ +# Copyright 2012-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +import json +from functools import lru_cache +from pathlib import Path + +import pytest + +from botocore import xform_name +from botocore.compat import HAS_CRT +from botocore.config import Config +from botocore.endpoint_provider import EndpointProvider +from botocore.exceptions import ( + BotoCoreError, + ClientError, + EndpointResolutionError, +) +from botocore.loaders import Loader +from botocore.parsers import ResponseParserError +from tests import ClientHTTPStubber + +ENDPOINT_TESTDATA_DIR = Path(__file__).parent / 'endpoint-rules' +LOADER = Loader() + +# For the purpose of the tests in this file, only services for which an +# endpoint ruleset file exists matter. The existence of required endpoint +# ruleset files is asserted for in tests/functional/test_model_completeness.py +ALL_SERVICES = [ + service_name + for service_name in LOADER.list_available_services( + type_name='endpoint-rule-set-1' + ) +] + + +@pytest.fixture(scope='module') +def partitions(): + return LOADER.load_data('partitions') + + +@lru_cache +def get_endpoint_tests_for_service(service_name): + file_path = ENDPOINT_TESTDATA_DIR / service_name / 'endpoint-tests-1.json' + if not file_path.is_file(): + raise FileNotFoundError( + f'Cannot find endpoint tests file for "{service_name}" at ' + 'path {file_path}' + ) + with file_path.open('r') as f: + return json.load(f) + + +@pytest.mark.parametrize("service_name", ALL_SERVICES) +def test_all_endpoint_tests_exist(service_name): + """Tests the existence of endpoint-tests-1.json for each service that has + a ruleset and verifies that content is present.""" + data = get_endpoint_tests_for_service(service_name) + assert len(data['testCases']) > 0 + + +def assert_all_signing_region_sets_have_length_one(rule): + """Helper function for test_all_signing_region_sets_have_length_one()""" + if 'endpoint' in rule: + authSchemes = ( + rule['endpoint'].get('properties', {}).get('authSchemes', []) + ) + for authScheme in authSchemes: + if 'signingRegionSet' in authScheme: + assert len(authScheme['signingRegionSet']) == 1 + for sub_rule in rule.get('rules', []): + assert_all_signing_region_sets_have_length_one(sub_rule) + + +@pytest.mark.parametrize("service_name", ALL_SERVICES) +def test_all_signing_region_sets_have_length_one(service_name): + """Checks all endpoint rulesets for endpoints that contain an authSchemes + property with a `signingRegionSet` and asserts that it is a list of + length 1. + + In theory, `signingRegionSet` could have >1 entries. As of writing this + test, no service uses >1 entry, the meaning of >1 entry is poorly defined, + and botocore cannot handle >1 entry. This test exists specifically to + fail if a ruleset ever uses >1 entry. + + The test also fails for empty lists. While botocore would handle these + gracefully, the expected behavior for empty `signingRegionSet` lists is + not defined. + """ + ruleset = LOADER.load_service_model(service_name, 'endpoint-rule-set-1') + assert_all_signing_region_sets_have_length_one(ruleset) + + +def test_assert_all_signing_region_sets_have_length_one(): + """Negative test for to confirm that + assert_all_signing_region_sets_have_length_one() actually fails when two + sigingRegionSet entries are present.""" + with pytest.raises(AssertionError): + assert_all_signing_region_sets_have_length_one( + { + "version": "1.0", + "parameters": {}, + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://foo", + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "disableDoubleEncoding": True, + "signingRegionSet": ["*", "abc"], + "signingName": "myservice", + } + ] + }, + "headers": {}, + }, + "type": "endpoint", + } + ], + } + ) + + +def iter_all_test_cases(): + for service_name in ALL_SERVICES: + test_data = get_endpoint_tests_for_service(service_name) + for test_case in test_data['testCases']: + yield service_name, test_case + + +def iter_provider_test_cases_that_produce(endpoints=False, errors=False): + for service_name, test in iter_all_test_cases(): + input_params = test.get('params', {}) + expected_object = test['expect'] + if endpoints and 'endpoint' in expected_object: + yield service_name, input_params, expected_object['endpoint'] + if errors and 'error' in expected_object: + yield service_name, input_params, expected_object['error'] + + +def iter_e2e_test_cases_that_produce(endpoints=False, errors=False): + for service_name, test in iter_all_test_cases(): + # Not all test cases contain operation inputs for end-to-end tests. + if 'operationInputs' not in test: + continue + # Each test case can contain a list of input sets for the same + # expected result. + for op_inputs in test['operationInputs']: + op_params = op_inputs.get('operationParams', {}) + # Test cases that use invalid bucket names as inputs fail in + # botocore because botocore validated bucket names before running + # endpoint resolution. + if op_params.get('Bucket') in ['bucket name', 'example.com#']: + continue + op_name = op_inputs['operationName'] + builtins = op_inputs.get('builtInParams', {}) + + expected_object = test['expect'] + if endpoints and 'endpoint' in expected_object: + expected_endpoint = expected_object['endpoint'] + expected_props = expected_endpoint.get('properties', {}) + expected_authschemes = [ + auth_scheme['name'] + for auth_scheme in expected_props.get('authSchemes', []) + ] + yield pytest.param( + service_name, + op_name, + op_params, + builtins, + expected_endpoint, + marks=pytest.mark.skipif( + 'sigv4a' in expected_authschemes and not HAS_CRT, + reason="Test case expects sigv4a which requires CRT", + ), + ) + if errors and 'error' in expected_object: + yield pytest.param( + service_name, + op_name, + op_params, + builtins, + expected_object['error'], + ) + + +@pytest.mark.parametrize( + 'service_name, input_params, expected_endpoint', + iter_provider_test_cases_that_produce(endpoints=True), +) +def test_endpoint_provider_test_cases_yielding_endpoints( + partitions, service_name, input_params, expected_endpoint +): + ruleset = LOADER.load_service_model(service_name, 'endpoint-rule-set-1') + endpoint_provider = EndpointProvider(ruleset, partitions) + endpoint = endpoint_provider.resolve_endpoint(**input_params) + assert endpoint.url == expected_endpoint['url'] + assert endpoint.properties == expected_endpoint.get('properties', {}) + assert endpoint.headers == expected_endpoint.get('headers', {}) + + +@pytest.mark.parametrize( + 'service_name, input_params, expected_error', + iter_provider_test_cases_that_produce(errors=True), +) +def test_endpoint_provider_test_cases_yielding_errors( + partitions, service_name, input_params, expected_error +): + ruleset = LOADER.load_service_model(service_name, 'endpoint-rule-set-1') + endpoint_provider = EndpointProvider(ruleset, partitions) + with pytest.raises(EndpointResolutionError) as exc_info: + endpoint_provider.resolve_endpoint(**input_params) + assert str(exc_info.value) == expected_error + + +@pytest.mark.parametrize( + 'service_name, op_name, op_params, builtin_params, expected_endpoint', + iter_e2e_test_cases_that_produce(endpoints=True), +) +def test_end_to_end_test_cases_yielding_endpoints( + patched_session, + service_name, + op_name, + op_params, + builtin_params, + expected_endpoint, +): + def builtin_overwriter_handler(builtins, **kwargs): + # must edit builtins dict in place but need to erase all existing + # entries + for key in list(builtins.keys()): + del builtins[key] + for key, val in builtin_params.items(): + builtins[key] = val + + region = builtin_params.get('AWS::Region', 'us-east-1') + client = patched_session.create_client( + service_name, + region_name=region, + # endpoint ruleset test cases do not account for host prefixes from the + # operation model + config=Config(inject_host_prefix=False), + ) + client.meta.events.register_last( + 'before-endpoint-resolution', builtin_overwriter_handler + ) + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=418) + op_fn = getattr(client, xform_name(op_name)) + try: + op_fn(**op_params) + except (ClientError, ResponseParserError): + pass + assert len(http_stubber.requests) > 0 + actual_url = http_stubber.requests[0].url + assert actual_url.startswith( + expected_endpoint['url'] + ), f"{actual_url} does not start with {expected_endpoint['url']}" + + +@pytest.mark.parametrize( + 'service_name, op_name, op_params, builtin_params, expected_error', + iter_e2e_test_cases_that_produce(errors=True), +) +def test_end_to_end_test_cases_yielding_errors( + patched_session, + service_name, + op_name, + op_params, + builtin_params, + expected_error, +): + def builtin_overwriter_handler(builtins, **kwargs): + # must edit builtins dict in place but need to erase all existing + # entries + for key in list(builtins.keys()): + del builtins[key] + for key, val in builtin_params.items(): + builtins[key] = val + + region = builtin_params.get('AWS::Region', 'us-east-1') + client = patched_session.create_client(service_name, region_name=region) + client.meta.events.register_last( + 'before-endpoint-resolution', builtin_overwriter_handler + ) + with ClientHTTPStubber(client, strict=True) as http_stubber: + http_stubber.add_response(status=418) + op_fn = getattr(client, xform_name(op_name)) + with pytest.raises(BotoCoreError): + try: + op_fn(**op_params) + except (ClientError, ResponseParserError): + pass + assert len(http_stubber.requests) == 0 diff --git a/testbed/boto__botocore/tests/functional/test_endpoints.py b/testbed/boto__botocore/tests/functional/test_endpoints.py new file mode 100644 index 0000000000000000000000000000000000000000..b97fb3b2a3c52d0f6c37e84b087cd87ea2f7b0b2 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_endpoints.py @@ -0,0 +1,123 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +from botocore.session import get_session +from botocore.utils import CLIENT_NAME_TO_HYPHENIZED_SERVICE_ID_OVERRIDES + +ENDPOINT_PREFIX_OVERRIDE = { + # entry in endpoints.json -> actual endpoint prefix. + # The autoscaling-* services actually send requests to the + # autoscaling service, but they're exposed as separate clients + # in botocore. + 'autoscaling-plans': 'autoscaling', + 'application-autoscaling': 'autoscaling', + # For neptune, we send requests to the RDS endpoint. + 'neptune': 'rds', + 'docdb': 'rds', + # iotevents data endpoints.json and service-2.json don't line up. + 'ioteventsdata': 'data.iotevents', + 'iotsecuredtunneling': 'api.tunneling.iot', + 'iotwireless': 'api.iotwireless', + 'data.iot': 'data-ats.iot', +} + +NOT_SUPPORTED_IN_SDK = [ + 'mobileanalytics', + 'transcribestreaming', +] + + +SESSION = get_session() +LOADER = SESSION.get_component('data_loader') +AVAILABLE_SERVICES = LOADER.list_available_services('service-2') + + +def _known_endpoint_prefixes(): + # The entries in endpoints.json are keyed off of the endpoint + # prefix. We don't directly have that data, so we have to load + # every service model and look up its endpoint prefix in its + # ``metadata`` section. + return { + SESSION.get_service_model(service_name).endpoint_prefix + for service_name in AVAILABLE_SERVICES + } + + +def _computed_endpoint_prefixes(): + # This verifies client names match up with data from the endpoints.json + # file. We want to verify that every entry in the endpoints.json + # file corresponds to a client we can construct via + # session.create_client(...). + # So first we get a list of all the service names in the endpoints + # file. + endpoints = LOADER.load_data('endpoints') + # A service can be in multiple partitions so we're using + # a set here to remove dupes. + services_in_endpoints_file = set() + for partition in endpoints['partitions']: + for service in partition['services']: + # There are some services we don't support in the SDK + # so we don't need to add them to the list of services + # we need to check. + if service not in NOT_SUPPORTED_IN_SDK: + services_in_endpoints_file.add(service) + + # Now we go through every known endpoint prefix in the endpoints.json + # file and ensure it maps to an endpoint prefix we've seen + # in a service model. + endpoint_prefixes = [] + for endpoint_prefix in services_in_endpoints_file: + # Check for an override where we know that an entry + # in the endpoints.json actually maps to a different endpoint + # prefix. + endpoint_prefix = ENDPOINT_PREFIX_OVERRIDE.get( + endpoint_prefix, endpoint_prefix + ) + endpoint_prefixes.append(endpoint_prefix) + return sorted(endpoint_prefixes) + + +KNOWN_ENDPOINT_PREFIXES = _known_endpoint_prefixes() +COMPUTED_ENDPOINT_PREFIXES = _computed_endpoint_prefixes() + + +@pytest.mark.parametrize("endpoint_prefix", COMPUTED_ENDPOINT_PREFIXES) +def test_endpoint_matches_service(endpoint_prefix): + # We need to cross check all computed endpoints against our + # known values in endpoints.json, to ensure everything lines + # up correctly. + assert endpoint_prefix in KNOWN_ENDPOINT_PREFIXES + + +@pytest.mark.parametrize("service_name", AVAILABLE_SERVICES) +def test_client_name_matches_hyphenized_service_id(service_name): + """Generates tests for each service to verify that the computed service + named based on the service id matches the service name used to + create a client (i.e the directory name in botocore/data) + unless there is an explicit exception. + """ + service_model = SESSION.get_service_model(service_name) + computed_name = service_model.service_id.replace(' ', '-').lower() + + # Handle known exceptions where we have renamed the service directory + # for one reason or another. + actual_service_name = CLIENT_NAME_TO_HYPHENIZED_SERVICE_ID_OVERRIDES.get( + service_name, service_name + ) + + err_msg = ( + f"Actual service name `{actual_service_name}` does not match " + f"expected service name we computed: `{computed_name}`" + ) + assert computed_name == actual_service_name, err_msg diff --git a/testbed/boto__botocore/tests/functional/test_event_alias.py b/testbed/boto__botocore/tests/functional/test_event_alias.py new file mode 100644 index 0000000000000000000000000000000000000000..e16a8932563ed6e6473791312e975165c80c3860 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_event_alias.py @@ -0,0 +1,393 @@ +import pytest + +from botocore.session import Session + +# The list of services which were available when we switched over from using +# endpoint prefix in event to using service id. These should all accept +# either. +SERVICES = { + "acm": {"endpoint_prefix": "acm", "service_id": "acm"}, + "acm-pca": {"endpoint_prefix": "acm-pca", "service_id": "acm-pca"}, + "apigateway": { + "endpoint_prefix": "apigateway", + "service_id": "api-gateway", + }, + "application-autoscaling": {"service_id": "application-auto-scaling"}, + "appstream": {"endpoint_prefix": "appstream2", "service_id": "appstream"}, + "appsync": {"endpoint_prefix": "appsync", "service_id": "appsync"}, + "athena": {"endpoint_prefix": "athena", "service_id": "athena"}, + "autoscaling": { + "endpoint_prefix": "autoscaling", + "service_id": "auto-scaling", + }, + "autoscaling-plans": {"service_id": "auto-scaling-plans"}, + "batch": {"endpoint_prefix": "batch", "service_id": "batch"}, + "budgets": {"endpoint_prefix": "budgets", "service_id": "budgets"}, + "ce": {"endpoint_prefix": "ce", "service_id": "cost-explorer"}, + "cloud9": {"endpoint_prefix": "cloud9", "service_id": "cloud9"}, + "clouddirectory": { + "endpoint_prefix": "clouddirectory", + "service_id": "clouddirectory", + }, + "cloudformation": { + "endpoint_prefix": "cloudformation", + "service_id": "cloudformation", + }, + "cloudfront": { + "endpoint_prefix": "cloudfront", + "service_id": "cloudfront", + }, + "cloudhsm": {"endpoint_prefix": "cloudhsm", "service_id": "cloudhsm"}, + "cloudhsmv2": { + "endpoint_prefix": "cloudhsmv2", + "service_id": "cloudhsm-v2", + }, + "cloudsearch": { + "endpoint_prefix": "cloudsearch", + "service_id": "cloudsearch", + }, + "cloudsearchdomain": { + "endpoint_prefix": "cloudsearchdomain", + "service_id": "cloudsearch-domain", + }, + "cloudtrail": { + "endpoint_prefix": "cloudtrail", + "service_id": "cloudtrail", + }, + "cloudwatch": { + "endpoint_prefix": "monitoring", + "service_id": "cloudwatch", + }, + "codebuild": {"endpoint_prefix": "codebuild", "service_id": "codebuild"}, + "codecommit": { + "endpoint_prefix": "codecommit", + "service_id": "codecommit", + }, + "codedeploy": { + "endpoint_prefix": "codedeploy", + "service_id": "codedeploy", + }, + "codepipeline": { + "endpoint_prefix": "codepipeline", + "service_id": "codepipeline", + }, + "cognito-identity": { + "endpoint_prefix": "cognito-identity", + "service_id": "cognito-identity", + }, + "cognito-idp": { + "endpoint_prefix": "cognito-idp", + "service_id": "cognito-identity-provider", + }, + "cognito-sync": { + "endpoint_prefix": "cognito-sync", + "service_id": "cognito-sync", + }, + "comprehend": { + "endpoint_prefix": "comprehend", + "service_id": "comprehend", + }, + "config": {"endpoint_prefix": "config", "service_id": "config-service"}, + "connect": {"endpoint_prefix": "connect", "service_id": "connect"}, + "cur": { + "endpoint_prefix": "cur", + "service_id": "cost-and-usage-report-service", + }, + "datapipeline": { + "endpoint_prefix": "datapipeline", + "service_id": "data-pipeline", + }, + "dax": {"endpoint_prefix": "dax", "service_id": "dax"}, + "devicefarm": { + "endpoint_prefix": "devicefarm", + "service_id": "device-farm", + }, + "directconnect": { + "endpoint_prefix": "directconnect", + "service_id": "direct-connect", + }, + "discovery": { + "endpoint_prefix": "discovery", + "service_id": "application-discovery-service", + }, + "dlm": {"endpoint_prefix": "dlm", "service_id": "dlm"}, + "dms": { + "endpoint_prefix": "dms", + "service_id": "database-migration-service", + }, + "ds": {"endpoint_prefix": "ds", "service_id": "directory-service"}, + "dynamodb": {"endpoint_prefix": "dynamodb", "service_id": "dynamodb"}, + "dynamodbstreams": { + "endpoint_prefix": "streams.dynamodb", + "service_id": "dynamodb-streams", + }, + "ec2": {"endpoint_prefix": "ec2", "service_id": "ec2"}, + "ecr": {"endpoint_prefix": "ecr", "service_id": "ecr"}, + "ecs": {"endpoint_prefix": "ecs", "service_id": "ecs"}, + "efs": {"endpoint_prefix": "elasticfilesystem", "service_id": "efs"}, + "eks": {"endpoint_prefix": "eks", "service_id": "eks"}, + "elasticache": { + "endpoint_prefix": "elasticache", + "service_id": "elasticache", + }, + "elasticbeanstalk": { + "endpoint_prefix": "elasticbeanstalk", + "service_id": "elastic-beanstalk", + }, + "elastictranscoder": { + "endpoint_prefix": "elastictranscoder", + "service_id": "elastic-transcoder", + }, + "elb": { + "endpoint_prefix": "elasticloadbalancing", + "service_id": "elastic-load-balancing", + }, + "elbv2": {"service_id": "elastic-load-balancing-v2"}, + "emr": {"endpoint_prefix": "elasticmapreduce", "service_id": "emr"}, + "es": {"endpoint_prefix": "es", "service_id": "elasticsearch-service"}, + "events": {"endpoint_prefix": "events", "service_id": "cloudwatch-events"}, + "firehose": {"endpoint_prefix": "firehose", "service_id": "firehose"}, + "fms": {"endpoint_prefix": "fms", "service_id": "fms"}, + "gamelift": {"endpoint_prefix": "gamelift", "service_id": "gamelift"}, + "glacier": {"endpoint_prefix": "glacier", "service_id": "glacier"}, + "glue": {"endpoint_prefix": "glue", "service_id": "glue"}, + "greengrass": { + "endpoint_prefix": "greengrass", + "service_id": "greengrass", + }, + "guardduty": {"endpoint_prefix": "guardduty", "service_id": "guardduty"}, + "health": {"endpoint_prefix": "health", "service_id": "health"}, + "iam": {"endpoint_prefix": "iam", "service_id": "iam"}, + "importexport": { + "endpoint_prefix": "importexport", + "service_id": "importexport", + }, + "inspector": {"endpoint_prefix": "inspector", "service_id": "inspector"}, + "iot": {"endpoint_prefix": "iot", "service_id": "iot"}, + "iot-data": { + "endpoint_prefix": "data.iot", + "service_id": "iot-data-plane", + }, + "iot-jobs-data": { + "endpoint_prefix": "data.jobs.iot", + "service_id": "iot-jobs-data-plane", + }, + "iot1click-devices": { + "endpoint_prefix": "devices.iot1click", + "service_id": "iot-1click-devices-service", + }, + "iot1click-projects": { + "endpoint_prefix": "projects.iot1click", + "service_id": "iot-1click-projects", + }, + "iotanalytics": { + "endpoint_prefix": "iotanalytics", + "service_id": "iotanalytics", + }, + "kinesis": {"endpoint_prefix": "kinesis", "service_id": "kinesis"}, + "kinesis-video-archived-media": { + "service_id": "kinesis-video-archived-media" + }, + "kinesis-video-media": {"service_id": "kinesis-video-media"}, + "kinesisanalytics": { + "endpoint_prefix": "kinesisanalytics", + "service_id": "kinesis-analytics", + }, + "kinesisvideo": { + "endpoint_prefix": "kinesisvideo", + "service_id": "kinesis-video", + }, + "kms": {"endpoint_prefix": "kms", "service_id": "kms"}, + "lambda": {"endpoint_prefix": "lambda", "service_id": "lambda"}, + "lex-models": { + "endpoint_prefix": "models.lex", + "service_id": "lex-model-building-service", + }, + "lex-runtime": { + "endpoint_prefix": "runtime.lex", + "service_id": "lex-runtime-service", + }, + "lightsail": {"endpoint_prefix": "lightsail", "service_id": "lightsail"}, + "logs": {"endpoint_prefix": "logs", "service_id": "cloudwatch-logs"}, + "machinelearning": { + "endpoint_prefix": "machinelearning", + "service_id": "machine-learning", + }, + "marketplace-entitlement": { + "endpoint_prefix": "entitlement.marketplace", + "service_id": "marketplace-entitlement-service", + }, + "marketplacecommerceanalytics": { + "endpoint_prefix": "marketplacecommerceanalytics", + "service_id": "marketplace-commerce-analytics", + }, + "mediaconvert": { + "endpoint_prefix": "mediaconvert", + "service_id": "mediaconvert", + }, + "medialive": {"endpoint_prefix": "medialive", "service_id": "medialive"}, + "mediapackage": { + "endpoint_prefix": "mediapackage", + "service_id": "mediapackage", + }, + "mediastore": { + "endpoint_prefix": "mediastore", + "service_id": "mediastore", + }, + "mediastore-data": { + "endpoint_prefix": "data.mediastore", + "service_id": "mediastore-data", + }, + "mediatailor": { + "endpoint_prefix": "api.mediatailor", + "service_id": "mediatailor", + }, + "meteringmarketplace": { + "endpoint_prefix": "metering.marketplace", + "service_id": "marketplace-metering", + }, + "mgh": {"endpoint_prefix": "mgh", "service_id": "migration-hub"}, + "mq": {"endpoint_prefix": "mq", "service_id": "mq"}, + "mturk": {"endpoint_prefix": "mturk-requester", "service_id": "mturk"}, + "neptune": {"service_id": "neptune"}, + "opsworks": {"endpoint_prefix": "opsworks", "service_id": "opsworks"}, + "opsworkscm": { + "endpoint_prefix": "opsworks-cm", + "service_id": "opsworkscm", + }, + "organizations": { + "endpoint_prefix": "organizations", + "service_id": "organizations", + }, + "pi": {"endpoint_prefix": "pi", "service_id": "pi"}, + "pinpoint": {"endpoint_prefix": "pinpoint", "service_id": "pinpoint"}, + "polly": {"endpoint_prefix": "polly", "service_id": "polly"}, + "pricing": {"endpoint_prefix": "api.pricing", "service_id": "pricing"}, + "rds": {"endpoint_prefix": "rds", "service_id": "rds"}, + "redshift": {"endpoint_prefix": "redshift", "service_id": "redshift"}, + "rekognition": { + "endpoint_prefix": "rekognition", + "service_id": "rekognition", + }, + "resource-groups": { + "endpoint_prefix": "resource-groups", + "service_id": "resource-groups", + }, + "resourcegroupstaggingapi": { + "endpoint_prefix": "tagging", + "service_id": "resource-groups-tagging-api", + }, + "route53": {"endpoint_prefix": "route53", "service_id": "route-53"}, + "route53domains": { + "endpoint_prefix": "route53domains", + "service_id": "route-53-domains", + }, + "s3": {"endpoint_prefix": "s3", "service_id": "s3"}, + "sagemaker": { + "endpoint_prefix": "api.sagemaker", + "service_id": "sagemaker", + }, + "sagemaker-runtime": { + "endpoint_prefix": "runtime.sagemaker", + "service_id": "sagemaker-runtime", + }, + "sdb": {"endpoint_prefix": "sdb", "service_id": "simpledb"}, + "secretsmanager": { + "endpoint_prefix": "secretsmanager", + "service_id": "secrets-manager", + }, + "serverlessrepo": { + "endpoint_prefix": "serverlessrepo", + "service_id": "serverlessapplicationrepository", + }, + "servicecatalog": { + "endpoint_prefix": "servicecatalog", + "service_id": "service-catalog", + }, + "servicediscovery": { + "endpoint_prefix": "servicediscovery", + "service_id": "servicediscovery", + }, + "ses": {"endpoint_prefix": "email", "service_id": "ses"}, + "shield": {"endpoint_prefix": "shield", "service_id": "shield"}, + "sms": {"endpoint_prefix": "sms", "service_id": "sms"}, + "snowball": {"endpoint_prefix": "snowball", "service_id": "snowball"}, + "sns": {"endpoint_prefix": "sns", "service_id": "sns"}, + "sqs": {"endpoint_prefix": "sqs", "service_id": "sqs"}, + "ssm": {"endpoint_prefix": "ssm", "service_id": "ssm"}, + "stepfunctions": {"endpoint_prefix": "states", "service_id": "sfn"}, + "storagegateway": { + "endpoint_prefix": "storagegateway", + "service_id": "storage-gateway", + }, + "sts": {"endpoint_prefix": "sts", "service_id": "sts"}, + "support": {"endpoint_prefix": "support", "service_id": "support"}, + "swf": {"endpoint_prefix": "swf", "service_id": "swf"}, + "transcribe": { + "endpoint_prefix": "transcribe", + "service_id": "transcribe", + }, + "translate": {"endpoint_prefix": "translate", "service_id": "translate"}, + "waf": {"endpoint_prefix": "waf", "service_id": "waf"}, + "waf-regional": { + "endpoint_prefix": "waf-regional", + "service_id": "waf-regional", + }, + "workdocs": {"endpoint_prefix": "workdocs", "service_id": "workdocs"}, + "workmail": {"endpoint_prefix": "workmail", "service_id": "workmail"}, + "workspaces": { + "endpoint_prefix": "workspaces", + "service_id": "workspaces", + }, + "xray": {"endpoint_prefix": "xray", "service_id": "xray"}, +} + + +def _event_aliases(): + for client_name in SERVICES.keys(): + service_id = SERVICES[client_name]['service_id'] + yield client_name, service_id + + +def _event_aliases_with_endpoint_prefix(): + for client_name in SERVICES.keys(): + endpoint_prefix = SERVICES[client_name].get('endpoint_prefix') + if endpoint_prefix is not None: + yield client_name, endpoint_prefix + + +@pytest.mark.parametrize( + "client_name, endpoint_prefix", _event_aliases_with_endpoint_prefix() +) +def test_event_alias_by_endpoint_prefix(client_name, endpoint_prefix): + _assert_handler_called(client_name, endpoint_prefix) + + +@pytest.mark.parametrize("client_name, service_id", _event_aliases()) +def test_event_alias_by_service_id(client_name, service_id): + _assert_handler_called(client_name, service_id) + + +@pytest.mark.parametrize("client_name, service_id", _event_aliases()) +def test_event_alias_by_client_name(client_name, service_id): + _assert_handler_called(client_name, client_name) + + +def _assert_handler_called(client_name, event_part): + hook_calls = [] + + def _hook(**kwargs): + hook_calls.append(kwargs['event_name']) + + session = _get_session() + session.register(f'creating-client-class.{event_part}', _hook) + session.create_client(client_name) + assert len(hook_calls) == 1 + + +def _get_session(): + session = Session() + session.set_credentials('foo', 'bar') + session.set_config_variable('region', 'us-west-2') + session.config_filename = 'no-exist-foo' + return session diff --git a/testbed/boto__botocore/tests/functional/test_eventbridge.py b/testbed/boto__botocore/tests/functional/test_eventbridge.py new file mode 100644 index 0000000000000000000000000000000000000000..c732b39b223769fd557766268187651520947e50 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_eventbridge.py @@ -0,0 +1,344 @@ +import json + +import pytest + +from botocore.config import Config +from botocore.exceptions import InvalidEndpointConfigurationError +from tests import BaseSessionTest, ClientHTTPStubber, requires_crt + + +class TestClientEvents(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = "us-east-1" + + def create_eventbridge_client(self, region=None, **kwargs): + if region is None: + region = self.region + client = self.session.create_client("events", region, **kwargs) + return client + + def create_stubbed_eventbridge_client( + self, with_default_responses=False, **kwargs + ): + client = self.create_eventbridge_client(**kwargs) + http_stubber = ClientHTTPStubber(client) + http_stubber.start() + if with_default_responses: + http_stubber.add_response() + http_stubber.add_response() + return client, http_stubber + + def _default_put_events_args(self): + return { + "Entries": [ + { + "Source": "test", + "Resources": [ + "resource", + ], + "DetailType": "my-detail", + "Detail": "detail", + "EventBusName": "my-bus", + }, + ] + } + + def _assert_multi_region_endpoint(self, request, endpoint_id, suffix=None): + if suffix is None: + suffix = "amazonaws.com" + assert ( + request.url == f"https://{endpoint_id}.endpoint.events.{suffix}/" + ) + + def _assert_sigv4a_headers(self, request): + assert request.headers["x-amz-region-set"] == b"*" + assert request.headers["authorization"].startswith( + b"AWS4-ECDSA-P256-SHA256 Credential=" + ) + + def _assert_params_in_body(self, request, params): + assert len(params) > 0 + body = json.loads(request.body) + for key, value in params: + assert body[key] == value + + def test_put_event_default_endpoint(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + ) + with stubber: + client.put_events(**self._default_put_events_args()) + assert ( + stubber.requests[0].url + == "https://events.us-east-1.amazonaws.com/" + ) + assert b"EndpointId" not in stubber.requests[0].body + + def test_put_event_default_endpoint_explicit_configs(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + config=Config( + use_dualstack_endpoint=False, + use_fips_endpoint=False, + ), + ) + with stubber: + client.put_events(**self._default_put_events_args()) + assert ( + stubber.requests[0].url + == "https://events.us-east-1.amazonaws.com/" + ) + assert b"EndpointId" not in stubber.requests[0].body + + @requires_crt() + def test_put_event_endpoint_id(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + ) + default_args = self._default_put_events_args() + endpoint_id = "abc123.456def" + + with stubber: + client.put_events(EndpointId=endpoint_id, **default_args) + + self._assert_params_in_body( + stubber.requests[0], + [ + ("EndpointId", endpoint_id), + ], + ) + self._assert_multi_region_endpoint(stubber.requests[0], endpoint_id) + self._assert_sigv4a_headers(stubber.requests[0]) + + @requires_crt() + def test_put_event_endpoint_id_explicit_config(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + config=Config( + use_dualstack_endpoint=False, + use_fips_endpoint=False, + ), + ) + default_args = self._default_put_events_args() + endpoint_id = "abc123.456def" + + with stubber: + client.put_events(EndpointId=endpoint_id, **default_args) + + self._assert_params_in_body( + stubber.requests[0], + [ + ("EndpointId", endpoint_id), + ], + ) + self._assert_multi_region_endpoint(stubber.requests[0], endpoint_id) + self._assert_sigv4a_headers(stubber.requests[0]) + + @requires_crt() + def test_put_event_bad_endpoint_id(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + ) + default_args = self._default_put_events_args() + endpoint_id = "badactor.com?foo=bar" + + with pytest.raises(InvalidEndpointConfigurationError): + client.put_events(EndpointId=endpoint_id, **default_args) + + @requires_crt() + def test_put_event_bad_endpoint_id_explicit_config(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + config=Config( + use_dualstack_endpoint=False, + use_fips_endpoint=False, + ), + ) + default_args = self._default_put_events_args() + endpoint_id = "badactor.com?foo=bar" + + with pytest.raises(InvalidEndpointConfigurationError): + client.put_events(EndpointId=endpoint_id, **default_args) + + @requires_crt() + def test_put_event_empty_endpoint_id(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + ) + default_args = self._default_put_events_args() + endpoint_id = "" + + with pytest.raises(InvalidEndpointConfigurationError): + client.put_events(EndpointId=endpoint_id, **default_args) + + @requires_crt() + def test_put_event_empty_endpoint_id_explicit_config(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + config=Config( + use_dualstack_endpoint=False, + use_fips_endpoint=False, + ), + ) + default_args = self._default_put_events_args() + endpoint_id = "" + + with pytest.raises(InvalidEndpointConfigurationError): + client.put_events(EndpointId=endpoint_id, **default_args) + + def test_put_event_default_dualstack_endpoint(self): + config = Config(use_dualstack_endpoint=True, use_fips_endpoint=False) + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, config=config + ) + default_args = self._default_put_events_args() + + with stubber: + client.put_events(**default_args) + assert stubber.requests[0].url == "https://events.us-east-1.api.aws/" + + @requires_crt() + def test_put_events_endpoint_id_dualstack(self): + config = Config(use_dualstack_endpoint=True, use_fips_endpoint=False) + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, config=config + ) + default_args = self._default_put_events_args() + endpoint_id = "abc123.456def" + + with stubber: + client.put_events(EndpointId=endpoint_id, **default_args) + + self._assert_params_in_body( + stubber.requests[0], + [ + ("EndpointId", endpoint_id), + ], + ) + self._assert_multi_region_endpoint( + stubber.requests[0], endpoint_id, suffix="api.aws" + ) + self._assert_sigv4a_headers(stubber.requests[0]) + + def test_put_events_default_fips_endpoint(self): + config = Config(use_dualstack_endpoint=False, use_fips_endpoint=True) + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, config=config + ) + default_args = self._default_put_events_args() + + with stubber: + client.put_events(**default_args) + assert ( + stubber.requests[0].url + == "https://events-fips.us-east-1.amazonaws.com/" + ) + + @requires_crt() + def test_put_events_endpoint_id_fips(self): + config = Config(use_dualstack_endpoint=False, use_fips_endpoint=True) + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, config=config + ) + default_args = self._default_put_events_args() + endpoint_id = "abc123.456def" + + with pytest.raises(InvalidEndpointConfigurationError): + client.put_events(EndpointId=endpoint_id, **default_args) + + def test_put_events_default_dualstack_fips_endpoint(self): + config = Config(use_dualstack_endpoint=True, use_fips_endpoint=True) + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, config=config + ) + default_args = self._default_put_events_args() + + with stubber: + client.put_events(**default_args) + assert ( + stubber.requests[0].url == "https://events-fips.us-east-1.api.aws/" + ) + + @requires_crt() + def test_put_events_endpoint_id_dualstack_fips(self): + config = Config(use_dualstack_endpoint=True, use_fips_endpoint=True) + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, config=config + ) + default_args = self._default_put_events_args() + endpoint_id = "abc123.456def" + + with pytest.raises(InvalidEndpointConfigurationError) as e: + client.put_events(EndpointId=endpoint_id, **default_args) + assert ( + "FIPS is not supported with EventBridge multi-region endpoints" + in str(e.value) + ) + + def test_put_events_default_gov_endpoint(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + region="us-iso-east-1", + ) + default_args = self._default_put_events_args() + + with stubber: + client.put_events(**default_args) + assert ( + stubber.requests[0].url + == "https://events.us-iso-east-1.c2s.ic.gov/" + ) + + @requires_crt() + def test_put_events_endpoint_id_gov(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, + region="us-iso-east-1", + ) + default_args = self._default_put_events_args() + endpoint_id = "abc123.456def" + + with stubber: + client.put_events(EndpointId=endpoint_id, **default_args) + + self._assert_params_in_body( + stubber.requests[0], + [ + ("EndpointId", endpoint_id), + ], + ) + self._assert_multi_region_endpoint( + stubber.requests[0], endpoint_id, suffix="c2s.ic.gov" + ) + self._assert_sigv4a_headers(stubber.requests[0]) + + def test_put_events_default_custom_endpoint(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, endpoint_url="https://example.org" + ) + default_args = self._default_put_events_args() + + with stubber: + client.put_events(**default_args) + assert stubber.requests[0].url == "https://example.org/" + + @requires_crt() + def test_put_events_endpoint_id_custom(self): + client, stubber = self.create_stubbed_eventbridge_client( + with_default_responses=True, endpoint_url="https://example.org" + ) + default_args = self._default_put_events_args() + endpoint_id = "abc123.456def" + + with stubber: + client.put_events(EndpointId=endpoint_id, **default_args) + + self._assert_params_in_body( + stubber.requests[0], + [ + ("EndpointId", endpoint_id), + ], + ) + assert stubber.requests[0].url == "https://example.org/" + self._assert_sigv4a_headers(stubber.requests[0]) diff --git a/testbed/boto__botocore/tests/functional/test_events.py b/testbed/boto__botocore/tests/functional/test_events.py new file mode 100644 index 0000000000000000000000000000000000000000..b2f98906553faded2c978b5563e1570513a82e43 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_events.py @@ -0,0 +1,92 @@ +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests import BaseSessionTest, mock + + +class RecordingHandler: + def __init__(self): + self.recorded_events = [] + + def record(self, event_name, **kwargs): + self.recorded_events.append((event_name, kwargs)) + + +class TestClientEvents(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('ec2', self.region) + + def test_emit_response_received(self): + recording_handler = RecordingHandler() + self.client.meta.events.register( + 'response-received.ec2.DescribeRegions', recording_handler.record + ) + with mock.patch( + 'botocore.httpsession.URLLib3Session.send' + ) as mock_send: + response_body = ( + b'' + b'' + b'' + ) + mock_send.return_value = mock.Mock( + status_code=200, headers={}, content=response_body + ) + self.client.describe_regions() + self.assertEqual( + recording_handler.recorded_events, + [ + ( + 'response-received.ec2.DescribeRegions', + { + 'exception': None, + 'response_dict': { + 'body': response_body, + 'headers': {}, + 'context': mock.ANY, + 'status_code': 200, + }, + 'parsed_response': {'ResponseMetadata': mock.ANY}, + 'context': mock.ANY, + }, + ) + ], + ) + + def test_emit_response_received_for_exception(self): + recording_handler = RecordingHandler() + self.client.meta.events.register( + 'response-received.ec2.DescribeRegions', recording_handler.record + ) + with mock.patch( + 'botocore.httpsession.URLLib3Session.send' + ) as mock_send: + raised_exception = RuntimeError('Unexpected exception') + mock_send.side_effect = raised_exception + with self.assertRaises(RuntimeError): + self.client.describe_regions() + self.assertEqual( + recording_handler.recorded_events, + [ + ( + 'response-received.ec2.DescribeRegions', + { + 'exception': raised_exception, + 'response_dict': None, + 'parsed_response': None, + 'context': mock.ANY, + }, + ) + ], + ) diff --git a/testbed/boto__botocore/tests/functional/test_h2_required.py b/testbed/boto__botocore/tests/functional/test_h2_required.py new file mode 100644 index 0000000000000000000000000000000000000000..8754cf27447008bc5361c7f84d386010a6338ddd --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_h2_required.py @@ -0,0 +1,67 @@ +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +from botocore.session import get_session + +_H2_REQUIRED = object() +# Service names to list of known HTTP 2 operations +_KNOWN_SERVICES = { + 'qbusiness': ['Chat'], + 'kinesis': ['SubscribeToShard'], + 'lexv2-runtime': ['StartConversation'], +} + + +def _all_test_cases(): + session = get_session() + loader = session.get_component('data_loader') + + services = loader.list_available_services('service-2') + h2_services = [] + h2_operations = [] + + for service in services: + service_model = session.get_service_model(service) + h2_config = service_model.metadata.get('protocolSettings', {}).get( + 'h2' + ) + if h2_config == 'required': + h2_services.append(service) + elif h2_config == 'eventstream': + for operation in service_model.operation_names: + operation_model = service_model.operation_model(operation) + if operation_model.has_event_stream_output: + h2_operations.append([service, operation]) + + return h2_services, h2_operations + + +H2_SERVICES, H2_OPERATIONS = _all_test_cases() + + +@pytest.mark.validates_models +@pytest.mark.parametrize("h2_service", H2_SERVICES) +def test_all_uses_of_h2_are_known(h2_service): + # Validates that a service that requires HTTP 2 for all operations is known + message = f'Found unknown HTTP 2 service: {h2_service}' + assert _KNOWN_SERVICES.get(h2_service) is _H2_REQUIRED, message + + +@pytest.mark.validates_models +@pytest.mark.parametrize("h2_service, operation", H2_OPERATIONS) +def test_all_h2_operations_are_known(h2_service, operation): + # Validates that an operation that requires HTTP 2 is known + known_operations = _KNOWN_SERVICES.get(h2_service, []) + message = f'Found unknown HTTP 2 operation: {h2_service}.{operation}' + assert operation in known_operations, message diff --git a/testbed/boto__botocore/tests/functional/test_history.py b/testbed/boto__botocore/tests/functional/test_history.py new file mode 100644 index 0000000000000000000000000000000000000000..e8c2dced52b8f68c24993dd65c787dd22f64642b --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_history.py @@ -0,0 +1,146 @@ +from botocore.history import BaseHistoryHandler, get_global_history_recorder +from tests import BaseSessionTest, ClientHTTPStubber + + +class RecordingHandler(BaseHistoryHandler): + def __init__(self): + self.recorded_calls = [] + + def emit(self, event_type, payload, source): + self.recorded_calls.append((event_type, payload, source)) + + +class TestRecordStatementsInjections(BaseSessionTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client('s3', 'us-west-2') + self.http_stubber = ClientHTTPStubber(self.client) + self.s3_response_body = ( + b'' + b' ' + b' d41d8cd98f00b204e9800998ecf8427e' + b' foo' + b' ' + b' ' + b' ' + b' bar' + b' 1912-06-23T22:57:02.000Z' + b' ' + b' ' + b'' + ) + self.recording_handler = RecordingHandler() + history_recorder = get_global_history_recorder() + history_recorder.enable() + history_recorder.add_handler(self.recording_handler) + + def _get_all_events_of_type(self, event_type): + recorded_calls = self.recording_handler.recorded_calls + matching = [call for call in recorded_calls if call[0] == event_type] + return matching + + def test_does_record_api_call(self): + self.http_stubber.add_response(body=self.s3_response_body) + with self.http_stubber: + self.client.list_buckets() + + api_call_events = self._get_all_events_of_type('API_CALL') + self.assertEqual(len(api_call_events), 1) + event = api_call_events[0] + event_type, payload, source = event + self.assertEqual( + payload, + {'operation': 'ListBuckets', 'params': {}, 'service': 's3'}, + ) + self.assertEqual(source, 'BOTOCORE') + + def test_does_record_http_request(self): + self.http_stubber.add_response(body=self.s3_response_body) + with self.http_stubber: + self.client.list_buckets() + + http_request_events = self._get_all_events_of_type('HTTP_REQUEST') + self.assertEqual(len(http_request_events), 1) + event = http_request_events[0] + event_type, payload, source = event + + method = payload['method'] + self.assertEqual(method, 'GET') + + # The header values vary too much per request to verify them here. + # Instead just check the presense of each expected header. + headers = payload['headers'] + for expected_header in [ + 'Authorization', + 'User-Agent', + 'X-Amz-Date', + 'X-Amz-Content-SHA256', + ]: + self.assertIn(expected_header, headers) + + body = payload['body'] + self.assertIsNone(body) + + streaming = payload['streaming'] + self.assertEqual(streaming, False) + + url = payload['url'] + self.assertEqual(url, 'https://s3.us-west-2.amazonaws.com/') + + self.assertEqual(source, 'BOTOCORE') + + def test_does_record_http_response(self): + self.http_stubber.add_response(body=self.s3_response_body) + with self.http_stubber: + self.client.list_buckets() + + http_response_events = self._get_all_events_of_type('HTTP_RESPONSE') + self.assertEqual(len(http_response_events), 1) + event = http_response_events[0] + event_type, payload, source = event + + self.assertEqual( + payload, + { + 'status_code': 200, + 'headers': {}, + 'streaming': False, + 'body': self.s3_response_body, + 'context': {'operation_name': 'ListBuckets'}, + }, + ) + self.assertEqual(source, 'BOTOCORE') + + def test_does_record_parsed_response(self): + self.http_stubber.add_response(body=self.s3_response_body) + with self.http_stubber: + self.client.list_buckets() + + parsed_response_events = self._get_all_events_of_type( + 'PARSED_RESPONSE' + ) + self.assertEqual(len(parsed_response_events), 1) + event = parsed_response_events[0] + event_type, payload, source = event + + # Given that the request contains headers with a user agent string + # a date and a signature we need to disassemble the call and manually + # assert the interesting bits since mock can only assert if the args + # all match exactly. + owner = payload['Owner'] + self.assertEqual( + owner, + {'DisplayName': 'foo', 'ID': 'd41d8cd98f00b204e9800998ecf8427e'}, + ) + + buckets = payload['Buckets'] + self.assertEqual(len(buckets), 1) + bucket = buckets[0] + self.assertEqual(bucket['Name'], 'bar') + + metadata = payload['ResponseMetadata'] + self.assertEqual( + metadata, + {'HTTPHeaders': {}, 'HTTPStatusCode': 200, 'RetryAttempts': 0}, + ) diff --git a/testbed/boto__botocore/tests/functional/test_importexport.py b/testbed/boto__botocore/tests/functional/test_importexport.py new file mode 100644 index 0000000000000000000000000000000000000000..eea88588931c3222e0c4ce25b6a8c636100b2493 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_importexport.py @@ -0,0 +1,51 @@ +# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestImportexport(BaseSessionTest): + def create_client_and_stubber(self, service_name, region_name=None): + if region_name is None: + region_name = 'us-west-2' + + client = self.session.create_client(service_name, region_name) + http_stubber = ClientHTTPStubber(client) + + return client, http_stubber + + def test_importexport_signature_version(self): + """The importexport service has sigv2 registered as its "signature_version" + in the service model. While this was historically true, they migrated to + sigv4 with the introduction of endpoints.json. + + This test ensures we always choose sigv4 regardless of what the model states. + """ + client, stubber = self.create_client_and_stubber('importexport') + importexport_response = ( + b'\n\n' + b"" + b"" + b"" + ) + + # Confirm we've ignored the model signatureVersion and chosen v4 + assert client.meta.config.signature_version == "v4" + with stubber: + stubber.add_response(body=importexport_response) + client.cancel_job(JobId="12345") + + # Validate we actually signed with sigv4 + auth_header = stubber.requests[0].headers.get('Authorization', '') + assert auth_header.startswith(b"AWS4-HMAC-SHA256") + assert b"aws4_request" in auth_header diff --git a/testbed/boto__botocore/tests/functional/test_iot_data.py b/testbed/boto__botocore/tests/functional/test_iot_data.py new file mode 100644 index 0000000000000000000000000000000000000000..80275187ce8ed37feb7aa66395cf796b106c9113 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_iot_data.py @@ -0,0 +1,33 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.exceptions import UnsupportedTLSVersionWarning +from tests import BaseSessionTest, mock + + +class TestOpensslVersion(BaseSessionTest): + def test_incompatible_openssl_version(self): + with mock.patch('ssl.OPENSSL_VERSION_INFO', new=(0, 9, 8, 11, 15)): + with mock.patch('warnings.warn') as mock_warn: + self.session.create_client('iot-data', 'us-east-1') + call_args = mock_warn.call_args[0] + warning_message = call_args[0] + warning_type = call_args[1] + # We should say something specific about the service. + self.assertIn('iot-data', warning_message) + self.assertEqual(warning_type, UnsupportedTLSVersionWarning) + + def test_compatible_openssl_version(self): + with mock.patch('ssl.OPENSSL_VERSION_INFO', new=(1, 0, 1, 1, 1)): + with mock.patch('warnings.warn') as mock_warn: + self.session.create_client('iot-data', 'us-east-1') + self.assertFalse(mock_warn.called) diff --git a/testbed/boto__botocore/tests/functional/test_kinesis.py b/testbed/boto__botocore/tests/functional/test_kinesis.py new file mode 100644 index 0000000000000000000000000000000000000000..a9dc2a37ed2d32f04b98bfc045415d485c26bbcd --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_kinesis.py @@ -0,0 +1,87 @@ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import json +from base64 import b64decode +from uuid import uuid4 + +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestKinesisListStreams(BaseSessionTest): + def setUp(self): + super().setUp() + self.stream_name = "kinesis-test-stream" + self.region = "us-east-1" + self.client = self.session.create_client("kinesis", self.region) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + + def assert_base64encoded_str_equals(self, encoded_str, expected_value): + """Validate a value can be base64 decoded and equals expected value""" + try: + decoded_str = b64decode(encoded_str).decode("utf-8") + except UnicodeDecodeError: + self.fail("Base64 encoded record is not a valid utf-8 string") + self.assertEqual(decoded_str, expected_value) + + def test_can_put_stream_blob(self): + unique_data = str(uuid4()) + with self.http_stubber as stub: + self.client.put_record( + StreamName=self.stream_name, + PartitionKey="foo", + Data=unique_data, + ) + self.assertEqual(len(stub.requests), 1) + request = json.loads(stub.requests[0].body.decode("utf-8")) + self.assertEqual(request["StreamName"], self.stream_name) + self.assertEqual(request["PartitionKey"], "foo") + self.assert_base64encoded_str_equals(request["Data"], unique_data) + + def test_can_put_records_single_blob(self): + unique_data = str(uuid4()) + with self.http_stubber as stub: + self.client.put_records( + StreamName=self.stream_name, + Records=[{"Data": unique_data, "PartitionKey": "foo"}], + ) + self.assertEqual(len(stub.requests), 1) + request = json.loads(stub.requests[0].body.decode("utf-8")) + self.assertEqual(len(request["Records"]), 1) + self.assertEqual(request["StreamName"], self.stream_name) + + record = request["Records"][0] + self.assertEqual(record["PartitionKey"], "foo") + self.assert_base64encoded_str_equals(record["Data"], unique_data) + + def test_can_put_records_multiple_blob(self): + with self.http_stubber as stub: + self.client.put_records( + StreamName=self.stream_name, + Records=[ + {"Data": "foobar", "PartitionKey": "foo"}, + {"Data": "barfoo", "PartitionKey": "foo"}, + ], + ) + self.assertEqual(len(stub.requests), 1) + request = json.loads(stub.requests[0].body.decode("utf-8")) + self.assertEqual(len(request["Records"]), 2) + + record_foobar = request["Records"][0] + record_barfoo = request["Records"][1] + self.assert_base64encoded_str_equals( + record_foobar["Data"], "foobar" + ) + self.assert_base64encoded_str_equals( + record_barfoo["Data"], "barfoo" + ) diff --git a/testbed/boto__botocore/tests/functional/test_lex.py b/testbed/boto__botocore/tests/functional/test_lex.py new file mode 100644 index 0000000000000000000000000000000000000000..a62b0357dd7a9a22d7294e6194751eff386540e6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_lex.py @@ -0,0 +1,74 @@ +# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from datetime import datetime + +from tests import BaseSessionTest, ClientHTTPStubber, mock + + +class TestLex(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('lex-runtime', self.region) + self.http_stubber = ClientHTTPStubber(self.client) + + def test_unsigned_payload(self): + params = { + 'botName': 'foo', + 'botAlias': 'bar', + 'userId': 'baz', + 'contentType': 'application/octet-stream', + 'inputStream': b'', + } + + timestamp = datetime(2017, 3, 22, 0, 0) + + with mock.patch('botocore.auth.datetime.datetime') as _datetime: + _datetime.utcnow.return_value = timestamp + self.http_stubber.add_response(body=b'{}') + with self.http_stubber: + self.client.post_content(**params) + request = self.http_stubber.requests[0] + + # The payload gets added to the string to sign, and then part of the + # signature. The signature will be part of the authorization header. + # Since we don't have direct access to the payload signature, + # we compare the authorization instead. + authorization = request.headers.get('authorization') + + expected_authorization = ( + b'AWS4-HMAC-SHA256 ' + b'Credential=access_key/20170322/us-west-2/lex/aws4_request, ' + b'SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date,' + b' Signature=' + b'7f93fde5c36163dce6ee116fcfebab13474ab903782fea04c00bb1dedc3fc4cc' + ) + self.assertEqual(authorization, expected_authorization) + + content_header = request.headers.get('x-amz-content-sha256') + self.assertEqual(content_header, b'UNSIGNED-PAYLOAD') + + +class TestLexV2(BaseSessionTest): + def test_start_conversation(self): + """StartConversation operation removed due to h2 requirement""" + lexv2 = self.session.create_client('lexv2-runtime', 'us-west-2') + try: + lexv2.start_conversation + except AttributeError: + pass + else: + self.fail( + 'start_conversation shouldn\'t be available on the ' + 'lexv2-runtime client.' + ) diff --git a/testbed/boto__botocore/tests/functional/test_loaders.py b/testbed/boto__botocore/tests/functional/test_loaders.py new file mode 100644 index 0000000000000000000000000000000000000000..5983270416e3234dc606ebc803e50ece47fa7b82 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_loaders.py @@ -0,0 +1,41 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import os +import shutil + +from botocore import loaders +from tests import temporary_file, unittest + + +class TestLoaderAllowsDataPathOverride(unittest.TestCase): + def create_file(self, f, contents, name): + f.write(contents) + f.flush() + dirname = os.path.dirname(os.path.abspath(f.name)) + override_name = os.path.join(dirname, name) + shutil.copy(f.name, override_name) + return override_name + + def test_can_override_session(self): + with temporary_file('w') as f: + # We're going to override _retry.json in + # botocore/data by setting our own data directory. + override_name = self.create_file( + f, contents='{"foo": "bar"}', name='_retry.json' + ) + new_data_path = os.path.dirname(override_name) + loader = loaders.create_loader(search_path_string=new_data_path) + + new_content = loader.load_data('_retry') + # This should contain the content we just created. + self.assertEqual(new_content, {"foo": "bar"}) diff --git a/testbed/boto__botocore/tests/functional/test_machinelearning.py b/testbed/boto__botocore/tests/functional/test_machinelearning.py new file mode 100644 index 0000000000000000000000000000000000000000..9d584e520174e0878d9bf54b1eba1c4569085413 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_machinelearning.py @@ -0,0 +1,35 @@ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestMachineLearning(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client( + 'machinelearning', self.region + ) + self.http_stubber = ClientHTTPStubber(self.client) + + def test_predict(self): + self.http_stubber.add_response(body=b'{}') + with self.http_stubber: + custom_endpoint = 'https://myendpoint.amazonaws.com/' + self.client.predict( + MLModelId='ml-foo', + Record={'Foo': 'Bar'}, + PredictEndpoint=custom_endpoint, + ) + sent_request = self.http_stubber.requests[0] + self.assertEqual(sent_request.url, custom_endpoint) diff --git a/testbed/boto__botocore/tests/functional/test_model_backcompat.py b/testbed/boto__botocore/tests/functional/test_model_backcompat.py new file mode 100644 index 0000000000000000000000000000000000000000..9a7f234cc05b23271e40dfd2eeabae000ee6283d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_model_backcompat.py @@ -0,0 +1,78 @@ +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.session import Session +from tests import ClientHTTPStubber +from tests.functional import TEST_MODELS_DIR + + +def test_old_model_continues_to_work(): + # This test ensures that botocore can load the service models as they exist + # today. There's a directory in tests/functional/models that is a + # snapshot of a service model. This test ensures that we can continue + # to stub an API call using this model. That way if the models ever + # change we have a mechanism to ensure that the existing models continue + # to work with botocore. The test should not change (with the exception + # of potential changes to the ClientHTTPStubber), and the files in + # tests/functional/models should not change! + session = Session() + loader = session.get_component('data_loader') + # We're adding our path to the existing search paths so we don't have to + # copy additional data files such as _retry.json to our TEST_MODELS_DIR. + # We only care about the service model and endpoints file not changing. + # This also prevents us from having to make any changes to this models dir + # if we end up adding a new data file that's needed to create clients. + # We're adding our TEST_MODELS_DIR as the first element in the list to + # ensure we load the endpoints.json file from TEST_MODELS_DIR. For the + # service model we have an extra safety net where we can choose a custom + # client name. + loader.search_paths.insert(0, TEST_MODELS_DIR) + + # The model dir we copied from botocore/data/acm was renamed to + # 'custom-acm' to ensure we're loading our version of the model and + # not the built in one. + client = session.create_client( + 'custom-acm', + region_name='us-west-2', + aws_access_key_id='foo', + aws_secret_access_key='bar', + ) + with ClientHTTPStubber(client) as stubber: + stubber.add_response( + url='https://acm.us-west-2.amazonaws.com/', + headers={ + 'x-amzn-RequestId': 'abcd', + 'Date': 'Fri, 26 Oct 2018 01:46:30 GMT', + 'Content-Length': '29', + 'Content-Type': 'application/x-amz-json-1.1', + }, + body=b'{"CertificateSummaryList":[]}', + ) + response = client.list_certificates() + assert response == { + 'CertificateSummaryList': [], + 'ResponseMetadata': { + 'HTTPHeaders': { + 'content-length': '29', + 'content-type': 'application/x-amz-json-1.1', + 'date': 'Fri, 26 Oct 2018 01:46:30 GMT', + 'x-amzn-requestid': 'abcd', + }, + 'HTTPStatusCode': 200, + 'RequestId': 'abcd', + 'RetryAttempts': 0, + }, + } + + # Also verify we can use the paginators as well. + assert client.can_paginate('list_certificates') is True + assert client.waiter_names == ['certificate_validated'] diff --git a/testbed/boto__botocore/tests/functional/test_model_completeness.py b/testbed/boto__botocore/tests/functional/test_model_completeness.py new file mode 100644 index 0000000000000000000000000000000000000000..ec77a32928967a9f92eda4d41239d92acbb6198f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_model_completeness.py @@ -0,0 +1,79 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import os + +import pytest + +from botocore.exceptions import DataNotFoundError +from botocore.loaders import Loader + +LOADER = Loader() +AVAILABLE_SERVICES = LOADER.list_available_services(type_name='service-2') +TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "endpoint-rules") + + +def _paginators_and_waiters_test_cases(): + for service_name in AVAILABLE_SERVICES: + versions = LOADER.list_api_versions(service_name, 'service-2') + if len(versions) > 1: + for type_name in ['paginators-1', 'waiters-2']: + yield service_name, type_name, versions[-2], versions[-1] + + +@pytest.mark.parametrize( + "service_name, type_name, previous_version, latest_version", + _paginators_and_waiters_test_cases(), +) +def test_paginators_and_waiters_are_not_lost_in_new_version( + service_name, type_name, previous_version, latest_version +): + # Make sure if a paginator and/or waiter exists in previous version, + # there will be a successor existing in latest version. + try: + LOADER.load_service_model(service_name, type_name, previous_version) + except DataNotFoundError: + pass + else: + try: + LOADER.load_service_model(service_name, type_name, latest_version) + except DataNotFoundError as e: + raise AssertionError( + f"{type_name} must exist for {service_name}: {e}" + ) + + +def _endpoint_rule_set_cases(): + for service_name in AVAILABLE_SERVICES: + versions = LOADER.list_api_versions(service_name, 'service-2') + for version in versions: + yield service_name, version + + +# endpoint tests validations are included in +# tests/functional/test_endpoint_rulesets.py +@pytest.mark.parametrize( + "service_name, version", + _endpoint_rule_set_cases(), +) +def test_all_endpoint_rule_sets_exist(service_name, version): + """Tests the existence of endpoint-rule-set-1.json for each service + and verifies that content is present.""" + type_name = 'endpoint-rule-set-1' + data = LOADER.load_service_model(service_name, type_name, version) + assert len(data['rules']) >= 1 + + +def test_partitions_exists(): + """Tests the existence of partitions.json and verifies that content is present.""" + data = LOADER.load_data('partitions') + assert len(data['partitions']) >= 4 diff --git a/testbed/boto__botocore/tests/functional/test_modeled_exceptions.py b/testbed/boto__botocore/tests/functional/test_modeled_exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..8ce44f6eac5dde16f935cdf9b6eb7dc018049fe0 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_modeled_exceptions.py @@ -0,0 +1,167 @@ +# Copyright 2012-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestModeledExceptions(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = "us-east-1" + + def _create_client(self, service): + client = self.session.create_client(service, self.region) + http_stubber = ClientHTTPStubber(client) + return client, http_stubber + + def test_query_service(self): + body = ( + b'' + b'Sender' + b'foobar' + b'AlreadyExists' + b'Template already exists' + b'' + ) + response = { + 'Error': { + # NOTE: The name and type are also present here as we return + # the entire Error node as the 'Error' field for query + 'Name': 'foobar', + 'Type': 'Sender', + 'Code': 'AlreadyExists', + 'Message': 'Template already exists', + }, + 'ResponseMetadata': { + 'HTTPStatusCode': 400, + 'HTTPHeaders': {}, + 'RetryAttempts': 0, + }, + # Modeled properties on the exception shape + 'Name': 'foobar', + } + ses, http_stubber = self._create_client('ses') + exception_cls = ses.exceptions.AlreadyExistsException + with http_stubber as stubber: + stubber.add_response(status=400, headers={}, body=body) + with self.assertRaises(exception_cls) as assertion_context: + template = { + 'TemplateName': 'foobar', + 'SubjectPart': 'foo', + 'TextPart': 'bar', + } + ses.create_template(Template=template) + self.assertEqual(assertion_context.exception.response, response) + + def test_rest_xml_service(self): + body = ( + b'\n' + b'' + b'SenderNoSuchDistribution' + b'The specified distribution does not exist.' + b'' + b'request-id' + b'' + ) + response = { + 'Error': { + 'Type': 'Sender', + 'Code': 'NoSuchDistribution', + 'Message': 'The specified distribution does not exist.', + }, + 'ResponseMetadata': { + 'HTTPStatusCode': 404, + 'HTTPHeaders': {}, + 'RequestId': 'request-id', + 'RetryAttempts': 0, + }, + # Modeled properties on the exception shape + 'Message': 'The specified distribution does not exist.', + } + cloudfront, http_stubber = self._create_client('cloudfront') + exception_cls = cloudfront.exceptions.NoSuchDistribution + with http_stubber as stubber: + stubber.add_response(status=404, headers={}, body=body) + with self.assertRaises(exception_cls) as assertion_context: + cloudfront.get_distribution(Id='foobar') + self.assertEqual(assertion_context.exception.response, response) + + def test_rest_json_service(self): + headers = { + 'x-amzn-RequestId': 'request-id', + 'x-amzn-ErrorType': 'FileSystemAlreadyExists:', + } + body = ( + b'{"ErrorCode":"FileSystemAlreadyExists",' + b'"FileSystemId":"fs-abcabc12",' + b'"Message":"File system already exists"}' + ) + response = { + 'Error': { + 'Code': 'FileSystemAlreadyExists', + 'Message': 'File system already exists', + }, + 'ResponseMetadata': { + 'HTTPStatusCode': 409, + 'HTTPHeaders': { + 'x-amzn-requestid': 'request-id', + 'x-amzn-errortype': 'FileSystemAlreadyExists:', + }, + 'RequestId': 'request-id', + 'RetryAttempts': 0, + }, + # Modeled properties on the exception shape + 'ErrorCode': 'FileSystemAlreadyExists', + 'FileSystemId': 'fs-abcabc12', + 'Message': 'File system already exists', + } + efs, http_stubber = self._create_client('efs') + exception_cls = efs.exceptions.FileSystemAlreadyExists + with http_stubber as stubber: + stubber.add_response(status=409, headers=headers, body=body) + with self.assertRaises(exception_cls) as assertion_context: + efs.create_file_system() + self.assertEqual(assertion_context.exception.response, response) + + def test_json_service(self): + headers = { + 'x-amzn-RequestId': 'request-id', + 'x-amzn-id-2': 'id-2', + } + body = ( + b'{"__type":"ResourceNotFoundException",' + b'"message":"Stream not found"}' + ) + response = { + 'Error': { + 'Code': 'ResourceNotFoundException', + 'Message': 'Stream not found', + }, + 'ResponseMetadata': { + 'HTTPStatusCode': 400, + 'HTTPHeaders': { + 'x-amzn-requestid': 'request-id', + 'x-amzn-id-2': 'id-2', + }, + 'RequestId': 'request-id', + 'RetryAttempts': 0, + }, + # Modeled properties on the exception shape + 'message': 'Stream not found', + } + kinesis, http_stubber = self._create_client('kinesis') + exception_cls = kinesis.exceptions.ResourceNotFoundException + with http_stubber as stubber: + stubber.add_response(status=400, headers=headers, body=body) + with self.assertRaises(exception_cls) as assertion_context: + kinesis.describe_stream(StreamName='foobar') + self.assertEqual(assertion_context.exception.response, response) diff --git a/testbed/boto__botocore/tests/functional/test_mturk.py b/testbed/boto__botocore/tests/functional/test_mturk.py new file mode 100644 index 0000000000000000000000000000000000000000..bd4e4267f64c64bb42e105dfc6607a94bbbee31f --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_mturk.py @@ -0,0 +1,38 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.stub import Stubber +from tests import BaseSessionTest + + +class TestMturk(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('mturk', self.region) + self.stubber = Stubber(self.client) + self.stubber.activate() + + def tearDown(self): + super().tearDown() + self.stubber.deactivate() + + def test_list_hits_aliased(self): + self.stubber.add_response('list_hits_for_qualification_type', {}) + self.stubber.add_response('list_hits_for_qualification_type', {}) + + params = {'QualificationTypeId': 'foo'} + + self.client.list_hi_ts_for_qualification_type(**params) + self.client.list_hits_for_qualification_type(**params) + + self.stubber.assert_no_pending_responses() diff --git a/testbed/boto__botocore/tests/functional/test_neptune.py b/testbed/boto__botocore/tests/functional/test_neptune.py new file mode 100644 index 0000000000000000000000000000000000000000..2ada9421c9bb37cccf28d4d7cae901742af82910 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_neptune.py @@ -0,0 +1,60 @@ +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestNeptunePresignUrlInjection(BaseSessionTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client('neptune', 'us-west-2') + self.http_stubber = ClientHTTPStubber(self.client) + + def assert_presigned_url_injected_in_request(self, body): + self.assertIn('PreSignedUrl', body) + self.assertNotIn('SourceRegion', body) + + def test_create_db_cluster(self): + params = { + 'DBClusterIdentifier': 'my-cluster', + 'Engine': 'neptune', + 'SourceRegion': 'us-east-1', + } + response_body = ( + b'' + b'' + b'' + b'' + ) + self.http_stubber.add_response(body=response_body) + with self.http_stubber: + self.client.create_db_cluster(**params) + sent_request = self.http_stubber.requests[0] + self.assert_presigned_url_injected_in_request(sent_request.body) + + def test_copy_db_cluster_snapshot(self): + params = { + 'SourceDBClusterSnapshotIdentifier': 'source-db', + 'TargetDBClusterSnapshotIdentifier': 'target-db', + 'SourceRegion': 'us-east-1', + } + response_body = ( + b'' + b'' + b'' + b'' + ) + self.http_stubber.add_response(body=response_body) + with self.http_stubber: + self.client.copy_db_cluster_snapshot(**params) + sent_request = self.http_stubber.requests[0] + self.assert_presigned_url_injected_in_request(sent_request.body) diff --git a/testbed/boto__botocore/tests/functional/test_paginate.py b/testbed/boto__botocore/tests/functional/test_paginate.py new file mode 100644 index 0000000000000000000000000000000000000000..92b6aafa141ba8dd7674a688c7d6461def21ee14 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_paginate.py @@ -0,0 +1,239 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from datetime import datetime +from math import ceil + +import pytest + +from botocore.paginate import TokenDecoder, TokenEncoder +from botocore.stub import StubAssertionError, Stubber +from tests import BaseSessionTest, random_chars + + +class TestRDSPagination(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('rds', self.region) + self.stubber = Stubber(self.client) + + def test_can_specify_zero_marker(self): + service_response = { + 'LogFileData': 'foo', + 'Marker': '2', + 'AdditionalDataPending': True, + } + expected_params = { + 'DBInstanceIdentifier': 'foo', + 'LogFileName': 'bar', + 'NumberOfLines': 2, + 'Marker': '0', + } + function_name = 'download_db_log_file_portion' + + # The stubber will assert that the function is called with the expected + # parameters. + self.stubber.add_response( + function_name, service_response, expected_params + ) + self.stubber.activate() + + try: + paginator = self.client.get_paginator(function_name) + result = paginator.paginate( + DBInstanceIdentifier='foo', + LogFileName='bar', + NumberOfLines=2, + PaginationConfig={'StartingToken': '0', 'MaxItems': 3}, + ).build_full_result() + self.assertEqual(result['LogFileData'], 'foo') + self.assertIn('NextToken', result) + except StubAssertionError as e: + self.fail(str(e)) + + +class TestAutoscalingPagination(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client( + 'autoscaling', + self.region, + aws_secret_access_key='foo', + aws_access_key_id='bar', + aws_session_token='baz', + ) + self.stubber = Stubber(self.client) + self.stubber.activate() + + def _setup_scaling_pagination( + self, page_size=200, max_items=100, total_items=600 + ): + """ + Add to the stubber to test paginating describe_scaling_activities. + + WARNING: This only handles cases where max_items cleanly divides + page_size. + """ + requests_per_page = page_size / max_items + if requests_per_page != ceil(requests_per_page): + raise NotImplementedError( + "This only handles setup where max_items is less than " + "page_size and where max_items evenly divides page_size." + ) + requests_per_page = int(requests_per_page) + num_pages = int(ceil(total_items / page_size)) + + previous_next_token = None + for i in range(num_pages): + page = self.create_describe_scaling_response(page_size=page_size) + + # Don't create a next_token for the final page + if i + 1 == num_pages: + next_token = None + else: + next_token = random_chars(10) + + expected_args = {} + if previous_next_token: + expected_args['StartingToken'] = previous_next_token + + # The same page may be accessed multiple times because we are + # truncating it at max_items + for _ in range(requests_per_page - 1): + # The page is copied because the paginator will modify the + # response object, causing issues when using the stubber. + self.stubber.add_response( + 'describe_scaling_activities', page.copy() + ) + + if next_token is not None: + page['NextToken'] = next_token + + # Copying the page here isn't necessary because it is about to + # be blown away anyway. + self.stubber.add_response('describe_scaling_activities', page) + + previous_next_token = next_token + + def create_describe_scaling_response(self, page_size=200): + """Create a valid describe_scaling_activities response.""" + page = [] + date = datetime.now() + for _ in range(page_size): + page.append( + { + 'AutoScalingGroupName': 'test', + 'ActivityId': random_chars(10), + 'Cause': 'test', + 'StartTime': date, + 'StatusCode': '200', + } + ) + return {'Activities': page} + + def test_repeated_build_full_results(self): + # This ensures that we can cleanly paginate using build_full_results. + max_items = 100 + total_items = 600 + self._setup_scaling_pagination( + max_items=max_items, total_items=total_items, page_size=200 + ) + paginator = self.client.get_paginator('describe_scaling_activities') + conf = {'MaxItems': max_items} + + pagination_tokens = [] + + result = paginator.paginate(PaginationConfig=conf).build_full_result() + all_results = result['Activities'] + while 'NextToken' in result: + starting_token = result['NextToken'] + # We should never get a duplicate pagination token. + self.assertNotIn(starting_token, pagination_tokens) + pagination_tokens.append(starting_token) + + conf['StartingToken'] = starting_token + pages = paginator.paginate(PaginationConfig=conf) + result = pages.build_full_result() + all_results.extend(result['Activities']) + + self.assertEqual(len(all_results), total_items) + + +class TestCloudwatchLogsPagination(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client( + 'logs', + self.region, + aws_secret_access_key='foo', + aws_access_key_id='bar', + aws_session_token='baz', + ) + self.stubber = Stubber(self.client) + self.stubber.activate() + + def test_token_with_triple_underscores(self): + response = { + 'events': [ + { + 'logStreamName': 'foobar', + 'timestamp': 1560195817, + 'message': 'a thing happened', + 'ingestionTime': 1560195817, + 'eventId': 'foo', + } + ], + 'searchedLogStreams': [ + { + 'logStreamName': 'foobar', + 'searchedCompletely': False, + } + ], + } + group_name = 'foo' + token = 'foo___bar' + expected_args = { + 'logGroupName': group_name, + 'nextToken': token, + } + self.stubber.add_response('filter_log_events', response, expected_args) + paginator = self.client.get_paginator('filter_log_events') + pages = paginator.paginate( + PaginationConfig={ + 'MaxItems': 1, + 'StartingToken': token, + }, + logGroupName=group_name, + ) + result = pages.build_full_result() + self.assertEqual(len(result['events']), 1) + + +@pytest.mark.parametrize( + "token_dict", + ( + {'foo': 'bar'}, + {'foo': b'bar'}, + {'foo': {'bar': b'baz'}}, + {'foo': ['bar', b'baz']}, + {'foo': b'\xff'}, + {'foo': {'bar': b'baz', 'bin': [b'bam']}}, + ), +) +def test_token_encoding(token_dict): + encoded = TokenEncoder().encode(token_dict) + assert isinstance(encoded, str) + decoded = TokenDecoder().decode(encoded) + assert decoded == token_dict diff --git a/testbed/boto__botocore/tests/functional/test_paginator_config.py b/testbed/boto__botocore/tests/functional/test_paginator_config.py new file mode 100644 index 0000000000000000000000000000000000000000..1d2155b370156b7df74f7b1cf5ea65a8c0f9bb40 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_paginator_config.py @@ -0,0 +1,294 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import string + +import jmespath +import pytest +from jmespath.exceptions import JMESPathError + +import botocore.session + +KNOWN_PAGE_KEYS = { + 'input_token', + 'py_input_token', + 'output_token', + 'result_key', + 'limit_key', + 'more_results', + 'non_aggregate_keys', +} +MEMBER_NAME_CHARS = set(string.ascii_letters + string.digits) +# The goal here should be to remove all of these by updating the paginators +# to reference all the extra output keys. Nothing should ever be added to this +# list, it represents all the current released paginators that fail this test. +KNOWN_EXTRA_OUTPUT_KEYS = [ + 'apigateway.GetApiKeys.warnings', + 'apigateway.GetUsage.usagePlanId', + 'apigateway.GetUsage.startDate', + 'apigateway.GetUsage.endDate', + 'athena.GetQueryResults.ResultSet', + 'cloudfront.ListCloudFrontOriginAccessIdentities.CloudFrontOriginAccessIdentityList', + 'cloudfront.ListDistributions.DistributionList', + 'cloudfront.ListInvalidations.InvalidationList', + 'cloudfront.ListStreamingDistributions.StreamingDistributionList', + 'cloudfront.ListKeyValueStores.KeyValueStoreList', + 'codedeploy.ListDeploymentGroups.applicationName', + 'dms.DescribeTableStatistics.ReplicationTaskArn', + 'dms.DescribeReplicationTaskAssessmentResults.BucketName', + 'ec2.DescribeSpotFleetInstances.SpotFleetRequestId', + 'ec2.DescribeVpcEndpointServices.ServiceNames', + 'efs.DescribeFileSystems.Marker', + 'efs.DescribeMountTargets.Marker', + 'efs.DescribeTags.Marker', + 'elasticache.DescribeCacheParameters.CacheNodeTypeSpecificParameters', + 'elasticache.DescribeEngineDefaultParameters.EngineDefaults', + 'glacier.ListParts.PartSizeInBytes', + 'glacier.ListParts.ArchiveDescription', + 'glacier.ListParts.MultipartUploadId', + 'glacier.ListParts.VaultARN', + 'glacier.ListParts.CreationDate', + 'kinesis.DescribeStream.StreamDescription', + 'mturk.ListAssignmentsForHIT.NumResults', + 'mturk.ListQualificationTypes.NumResults', + 'mturk.ListHITs.NumResults', + 'mturk.ListWorkerBlocks.NumResults', + 'mturk.ListReviewableHITs.NumResults', + 'mturk.ListHITsForQualificationType.NumResults', + 'mturk.ListQualificationRequests.NumResults', + 'mturk.ListWorkersWithQualificationType.NumResults', + 'mturk.ListBonusPayments.NumResults', + 'neptune.DescribeEngineDefaultParameters.EngineDefaults', + 'rds.DescribeEngineDefaultClusterParameters.EngineDefaults', + 'rds.DescribeEngineDefaultParameters.EngineDefaults', + 'redshift.DescribeDefaultClusterParameters.DefaultClusterParameters', + 'resource-groups.ListGroups.GroupIdentifiers', + 'resource-groups.SearchResources.QueryErrors', + 'resource-groups.ListGroupResources.QueryErrors', + 'route53.ListHealthChecks.MaxItems', + 'route53.ListHealthChecks.Marker', + 'route53.ListHostedZones.MaxItems', + 'route53.ListHostedZones.Marker', + 'route53.ListResourceRecordSets.MaxItems', + 's3.ListMultipartUploads.Delimiter', + 's3.ListMultipartUploads.KeyMarker', + 's3.ListMultipartUploads.Prefix', + 's3.ListMultipartUploads.Bucket', + 's3.ListMultipartUploads.MaxUploads', + 's3.ListMultipartUploads.UploadIdMarker', + 's3.ListMultipartUploads.EncodingType', + 's3.ListObjectVersions.MaxKeys', + 's3.ListObjectVersions.Delimiter', + 's3.ListObjectVersions.VersionIdMarker', + 's3.ListObjectVersions.KeyMarker', + 's3.ListObjectVersions.Prefix', + 's3.ListObjectVersions.Name', + 's3.ListObjectVersions.EncodingType', + 's3.ListObjects.MaxKeys', + 's3.ListObjects.Delimiter', + 's3.ListObjects.NextMarker', + 's3.ListObjects.Prefix', + 's3.ListObjects.Marker', + 's3.ListObjects.Name', + 's3.ListObjects.EncodingType', + 's3.ListObjectsV2.StartAfter', + 's3.ListObjectsV2.MaxKeys', + 's3.ListObjectsV2.Delimiter', + 's3.ListObjectsV2.ContinuationToken', + 's3.ListObjectsV2.KeyCount', + 's3.ListObjectsV2.Prefix', + 's3.ListObjectsV2.Name', + 's3.ListObjectsV2.EncodingType', + 's3.ListParts.PartNumberMarker', + 's3.ListParts.AbortDate', + 's3.ListParts.MaxParts', + 's3.ListParts.Bucket', + 's3.ListParts.Key', + 's3.ListParts.UploadId', + 's3.ListParts.AbortRuleId', + 's3.ListParts.RequestCharged', + 'sms.GetReplicationRuns.replicationJob', + 'sms.GetServers.lastModifiedOn', + 'sms.GetServers.serverCatalogStatus', + 'storagegateway.DescribeTapeRecoveryPoints.GatewayARN', + 'storagegateway.DescribeVTLDevices.GatewayARN', + 'storagegateway.ListVolumes.GatewayARN', + 'workdocs.DescribeUsers.TotalNumberOfUsers', + 'xray.BatchGetTraces.UnprocessedTraceIds', + 'xray.GetServiceGraph.EndTime', + 'xray.GetServiceGraph.ContainsOldGroupVersions', + 'xray.GetServiceGraph.StartTime', + 'xray.GetTraceSummaries.TracesProcessedCount', + 'xray.GetTraceSummaries.ApproximateTime', +] + + +def _pagination_configs(): + session = botocore.session.get_session() + loader = session.get_component('data_loader') + services = loader.list_available_services('paginators-1') + for service_name in services: + service_model = session.get_service_model(service_name) + page_config = loader.load_service_model( + service_name, 'paginators-1', service_model.api_version + ) + for op_name, single_config in page_config['pagination'].items(): + yield (op_name, single_config, service_model) + + +@pytest.mark.validates_models +@pytest.mark.parametrize( + "operation_name, page_config, service_model", _pagination_configs() +) +def test_lint_pagination_configs(operation_name, page_config, service_model): + _validate_known_pagination_keys(page_config) + _valiate_result_key_exists(page_config) + _validate_referenced_operation_exists(operation_name, service_model) + _validate_operation_has_output(operation_name, service_model) + _validate_input_keys_match(operation_name, page_config, service_model) + _validate_output_keys_match(operation_name, page_config, service_model) + + +def _validate_known_pagination_keys(page_config): + for key in page_config: + if key not in KNOWN_PAGE_KEYS: + raise AssertionError( + f"Unknown key '{key}' in pagination config: {page_config}" + ) + + +def _valiate_result_key_exists(page_config): + if 'result_key' not in page_config: + raise AssertionError( + "Required key 'result_key' is missing " + f"from pagination config: {page_config}" + ) + + +def _validate_referenced_operation_exists(operation_name, service_model): + if operation_name not in service_model.operation_names: + raise AssertionError( + "Pagination config refers to operation that " + f"does not exist: {operation_name}" + ) + + +def _validate_operation_has_output(operation_name, service_model): + op_model = service_model.operation_model(operation_name) + output = op_model.output_shape + if output is None or not output.members: + raise AssertionError( + "Pagination config refers to operation " + f"that does not have any output: {operation_name}" + ) + + +def _validate_input_keys_match(operation_name, page_config, service_model): + input_tokens = page_config['input_token'] + if not isinstance(input_tokens, list): + input_tokens = [input_tokens] + valid_input_names = service_model.operation_model( + operation_name + ).input_shape.members + for token in input_tokens: + if token not in valid_input_names: + raise AssertionError( + f"input_token '{token}' refers to a non existent " + f"input member for operation: {operation_name}" + ) + if 'limit_key' in page_config: + limit_key = page_config['limit_key'] + if limit_key not in valid_input_names: + raise AssertionError( + "limit_key '{}' refers to a non existent " + "input member for operation: {}, valid keys: " + "{}".format( + limit_key, + operation_name, + ', '.join(list(valid_input_names)), + ) + ) + + +def _validate_output_keys_match(operation_name, page_config, service_model): + # NOTE: The original version of this function from translate.py had logic + # to ensure that the entire set of output_members was accounted for in the + # union of 'result_key', 'output_token', 'more_results', and + # 'non_aggregate_keys'. + # There's enough state drift (especially with non_aggregate_keys) that + # this is no longer a realistic thing to check. Someone would have to + # backport the missing keys to all the paginators. + output_shape = service_model.operation_model(operation_name).output_shape + output_members = set(output_shape.members) + for key_name, output_key in _get_all_page_output_keys(page_config): + if _looks_like_jmespath(output_key): + _validate_jmespath_compiles(output_key) + else: + if output_key not in output_members: + raise AssertionError( + f"Pagination key '{key_name}' refers to an output " + f"member that does not exist: {output_key}" + ) + output_members.remove(output_key) + + for member in list(output_members): + key = f"{service_model.service_name}.{operation_name}.{member}" + if key in KNOWN_EXTRA_OUTPUT_KEYS: + output_members.remove(member) + + if output_members: + raise AssertionError( + "There are member names in the output shape of " + "{} that are not accounted for in the pagination " + "config for service {}: {}".format( + operation_name, + service_model.service_name, + ', '.join(output_members), + ) + ) + + +def _looks_like_jmespath(expression): + if all(ch in MEMBER_NAME_CHARS for ch in expression): + return False + return True + + +def _validate_jmespath_compiles(expression): + try: + jmespath.compile(expression) + except JMESPathError as e: + raise AssertionError( + "Invalid JMESPath expression used " + f"in pagination config: {expression}\nerror: {e}" + ) + + +def _get_all_page_output_keys(page_config): + for key in _get_list_value(page_config, 'result_key'): + yield 'result_key', key + for key in _get_list_value(page_config, 'output_token'): + yield 'output_token', key + if 'more_results' in page_config: + yield 'more_results', page_config['more_results'] + for key in page_config.get('non_aggregate_keys', []): + yield 'non_aggregate_keys', key + + +def _get_list_value(page_config, key): + # Some pagination config values can be a scalar value or a list of scalars. + # This function will always return a list of scalar values, converting as + # necessary. + value = page_config[key] + if not isinstance(value, list): + value = [value] + return value diff --git a/testbed/boto__botocore/tests/functional/test_public_apis.py b/testbed/boto__botocore/tests/functional/test_public_apis.py new file mode 100644 index 0000000000000000000000000000000000000000..97caab316bab987276bdf7afb3b91ede51ce0aec --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_public_apis.py @@ -0,0 +1,81 @@ +# Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from collections import defaultdict + +import pytest + +from botocore import xform_name +from botocore.session import Session +from tests import ClientHTTPStubber, mock + +REGIONS = defaultdict(lambda: 'us-east-1') +PUBLIC_API_TESTS = { + "cognito-identity": { + "GetId": {"IdentityPoolId": "region:1234"}, + "GetOpenIdToken": {"IdentityId": "region:1234"}, + "UnlinkIdentity": { + "IdentityId": "region:1234", + "Logins": {}, + "LoginsToRemove": [], + }, + "GetCredentialsForIdentity": {"IdentityId": "region:1234"}, + }, + "sts": { + "AssumeRoleWithSaml": { + "PrincipalArn": "a" * 20, + "RoleArn": "a" * 20, + "SAMLAssertion": "abcd", + }, + "AssumeRoleWithWebIdentity": { + "RoleArn": "a" * 20, + "RoleSessionName": "foo", + "WebIdentityToken": "abcd", + }, + }, +} + + +class EarlyExit(Exception): + pass + + +def _public_apis(): + session = Session() + + # Mimic the scenario that user does not have aws credentials setup + session.get_credentials = mock.Mock(return_value=None) + + for service_name in PUBLIC_API_TESTS: + client = session.create_client(service_name, REGIONS[service_name]) + for operation_name in PUBLIC_API_TESTS[service_name]: + kwargs = PUBLIC_API_TESTS[service_name][operation_name] + method = getattr(client, xform_name(operation_name)) + yield client, method, kwargs + + +@pytest.mark.parametrize("client, operation, kwargs", _public_apis()) +def test_public_apis_will_not_be_signed(client, operation, kwargs): + with ClientHTTPStubber(client) as http_stubber: + http_stubber.responses.append(EarlyExit()) + try: + operation(**kwargs) + except EarlyExit: + pass + request = http_stubber.requests[0] + + sig_v2_disabled = 'SignatureVersion=2' not in request.url + assert sig_v2_disabled, "SigV2 is incorrectly enabled" + sig_v3_disabled = 'X-Amzn-Authorization' not in request.headers + assert sig_v3_disabled, "SigV3 is incorrectly enabled" + sig_v4_disabled = 'Authorization' not in request.headers + assert sig_v4_disabled, "SigV4 is incorrectly enabled" diff --git a/testbed/boto__botocore/tests/functional/test_qbusiness.py b/testbed/boto__botocore/tests/functional/test_qbusiness.py new file mode 100644 index 0000000000000000000000000000000000000000..31e682fed12fe7e617e31b5bdb5f3871d079e3a6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_qbusiness.py @@ -0,0 +1,23 @@ +# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +from botocore.session import get_session + + +def test_chat_removal(): + """Chat operation removed due to h2 requirement""" + session = get_session() + qbusiness = session.create_client('qbusiness', 'us-west-2') + with pytest.raises(AttributeError): + qbusiness.chat diff --git a/testbed/boto__botocore/tests/functional/test_rds.py b/testbed/boto__botocore/tests/functional/test_rds.py new file mode 100644 index 0000000000000000000000000000000000000000..cd4cedc219f072a05de72a7637750bdf2f9fd1ff --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_rds.py @@ -0,0 +1,102 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.stub import Stubber +from tests import BaseSessionTest, ClientHTTPStubber + + +class TestRDSPresignUrlInjection(BaseSessionTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client('rds', 'us-west-2') + self.http_stubber = ClientHTTPStubber(self.client) + + def assert_presigned_url_injected_in_request(self, body): + self.assertIn('PreSignedUrl', body) + self.assertNotIn('SourceRegion', body) + + def test_copy_snapshot(self): + params = { + 'SourceDBSnapshotIdentifier': 'source-db', + 'TargetDBSnapshotIdentifier': 'target-db', + 'SourceRegion': 'us-east-1', + } + response_body = ( + b'' + b'' + b'' + ) + self.http_stubber.add_response(body=response_body) + with self.http_stubber: + self.client.copy_db_snapshot(**params) + sent_request = self.http_stubber.requests[0] + self.assert_presigned_url_injected_in_request(sent_request.body) + + def test_create_db_instance_read_replica(self): + params = { + 'SourceDBInstanceIdentifier': 'source-db', + 'DBInstanceIdentifier': 'target-db', + 'SourceRegion': 'us-east-1', + } + response_body = ( + b'' + b'' + b'' + b'' + ) + self.http_stubber.add_response(body=response_body) + with self.http_stubber: + self.client.create_db_instance_read_replica(**params) + sent_request = self.http_stubber.requests[0] + self.assert_presigned_url_injected_in_request(sent_request.body) + + def test_start_db_instance_automated_backups_replication(self): + params = { + 'SourceDBInstanceArn': 'arn:aws:rds:us-east-1:123456789012:db:source-db-instance', + 'SourceRegion': 'us-east-1', + } + response_body = ( + b'' + b'' + b'' + b'' + ) + self.http_stubber.add_response(body=response_body) + with self.http_stubber: + self.client.start_db_instance_automated_backups_replication( + **params + ) + sent_request = self.http_stubber.requests[0] + self.assert_presigned_url_injected_in_request(sent_request.body) + + +class TestRDS(BaseSessionTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client('rds', 'us-west-2') + self.stubber = Stubber(self.client) + self.stubber.activate() + + def test_generate_db_auth_token(self): + hostname = 'host.us-east-1.rds.amazonaws.com' + port = 3306 + username = 'mySQLUser' + auth_token = self.client.generate_db_auth_token( + DBHostname=hostname, Port=port, DBUsername=username + ) + + endpoint_url = 'host.us-east-1.rds.amazonaws.com:3306' + self.assertIn(endpoint_url, auth_token) + self.assertIn('Action=connect', auth_token) + + # Asserts that there is no scheme in the url + self.assertTrue(auth_token.startswith(hostname)) diff --git a/testbed/boto__botocore/tests/functional/test_regions.py b/testbed/boto__botocore/tests/functional/test_regions.py new file mode 100644 index 0000000000000000000000000000000000000000..11a882f91ff3b10001f3a99d2bb1696acfe5180d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_regions.py @@ -0,0 +1,547 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +from botocore.client import ClientEndpointBridge +from botocore.exceptions import NoRegionError +from tests import BaseSessionTest, ClientHTTPStubber, mock + +# NOTE: sqs endpoint updated to be the CN in the SSL cert because +# a bug in python2.6 prevents subjectAltNames from being parsed +# and subsequently being used in cert validation. +# Same thing is needed for rds. +KNOWN_REGIONS = { + 'ap-northeast-1': { + 'apigateway': 'apigateway.ap-northeast-1.amazonaws.com', + 'appstream': 'appstream.ap-northeast-1.amazonaws.com', + 'autoscaling': 'autoscaling.ap-northeast-1.amazonaws.com', + 'cloudformation': 'cloudformation.ap-northeast-1.amazonaws.com', + 'cloudhsm': 'cloudhsm.ap-northeast-1.amazonaws.com', + 'cloudsearch': 'cloudsearch.ap-northeast-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.ap-northeast-1.amazonaws.com', + 'codedeploy': 'codedeploy.ap-northeast-1.amazonaws.com', + 'cognito-identity': 'cognito-identity.ap-northeast-1.amazonaws.com', + 'cognito-sync': 'cognito-sync.ap-northeast-1.amazonaws.com', + 'config': 'config.ap-northeast-1.amazonaws.com', + 'datapipeline': 'datapipeline.ap-northeast-1.amazonaws.com', + 'directconnect': 'directconnect.ap-northeast-1.amazonaws.com', + 'ds': 'ds.ap-northeast-1.amazonaws.com', + 'dynamodb': 'dynamodb.ap-northeast-1.amazonaws.com', + 'ec2': 'ec2.ap-northeast-1.amazonaws.com', + 'ecs': 'ecs.ap-northeast-1.amazonaws.com', + 'elasticache': 'elasticache.ap-northeast-1.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.ap-northeast-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.ap-northeast-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.ap-northeast-1.amazonaws.com', + 'elastictranscoder': 'elastictranscoder.ap-northeast-1.amazonaws.com', + 'glacier': 'glacier.ap-northeast-1.amazonaws.com', + 'iot': 'iot.ap-northeast-1.amazonaws.com', + 'kinesis': 'kinesis.ap-northeast-1.amazonaws.com', + 'kms': 'kms.ap-northeast-1.amazonaws.com', + 'lambda': 'lambda.ap-northeast-1.amazonaws.com', + 'logs': 'logs.ap-northeast-1.amazonaws.com', + 'monitoring': 'monitoring.ap-northeast-1.amazonaws.com', + 'rds': 'rds.ap-northeast-1.amazonaws.com', + 'redshift': 'redshift.ap-northeast-1.amazonaws.com', + 's3': 's3.ap-northeast-1.amazonaws.com', + 'sdb': 'sdb.ap-northeast-1.amazonaws.com', + 'sns': 'sns.ap-northeast-1.amazonaws.com', + 'sqs': 'sqs.ap-northeast-1.amazonaws.com', + 'storagegateway': 'storagegateway.ap-northeast-1.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.ap-northeast-1.amazonaws.com', + 'sts': 'sts.ap-northeast-1.amazonaws.com', + 'swf': 'swf.ap-northeast-1.amazonaws.com', + 'workspaces': 'workspaces.ap-northeast-1.amazonaws.com', + }, + 'ap-southeast-1': { + 'autoscaling': 'autoscaling.ap-southeast-1.amazonaws.com', + 'cloudformation': 'cloudformation.ap-southeast-1.amazonaws.com', + 'cloudhsm': 'cloudhsm.ap-southeast-1.amazonaws.com', + 'cloudsearch': 'cloudsearch.ap-southeast-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.ap-southeast-1.amazonaws.com', + 'config': 'config.ap-southeast-1.amazonaws.com', + 'directconnect': 'directconnect.ap-southeast-1.amazonaws.com', + 'ds': 'ds.ap-southeast-1.amazonaws.com', + 'dynamodb': 'dynamodb.ap-southeast-1.amazonaws.com', + 'ec2': 'ec2.ap-southeast-1.amazonaws.com', + 'elasticache': 'elasticache.ap-southeast-1.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.ap-southeast-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.ap-southeast-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.ap-southeast-1.amazonaws.com', + 'elastictranscoder': 'elastictranscoder.ap-southeast-1.amazonaws.com', + 'kinesis': 'kinesis.ap-southeast-1.amazonaws.com', + 'kms': 'kms.ap-southeast-1.amazonaws.com', + 'logs': 'logs.ap-southeast-1.amazonaws.com', + 'monitoring': 'monitoring.ap-southeast-1.amazonaws.com', + 'rds': 'rds.ap-southeast-1.amazonaws.com', + 'redshift': 'redshift.ap-southeast-1.amazonaws.com', + 's3': 's3.ap-southeast-1.amazonaws.com', + 'sdb': 'sdb.ap-southeast-1.amazonaws.com', + 'sns': 'sns.ap-southeast-1.amazonaws.com', + 'sqs': 'sqs.ap-southeast-1.amazonaws.com', + 'storagegateway': 'storagegateway.ap-southeast-1.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.ap-southeast-1.amazonaws.com', + 'sts': 'sts.ap-southeast-1.amazonaws.com', + 'swf': 'swf.ap-southeast-1.amazonaws.com', + 'workspaces': 'workspaces.ap-southeast-1.amazonaws.com', + }, + 'ap-southeast-2': { + 'autoscaling': 'autoscaling.ap-southeast-2.amazonaws.com', + 'cloudformation': 'cloudformation.ap-southeast-2.amazonaws.com', + 'cloudhsm': 'cloudhsm.ap-southeast-2.amazonaws.com', + 'cloudsearch': 'cloudsearch.ap-southeast-2.amazonaws.com', + 'cloudtrail': 'cloudtrail.ap-southeast-2.amazonaws.com', + 'codedeploy': 'codedeploy.ap-southeast-2.amazonaws.com', + 'config': 'config.ap-southeast-2.amazonaws.com', + 'datapipeline': 'datapipeline.ap-southeast-2.amazonaws.com', + 'directconnect': 'directconnect.ap-southeast-2.amazonaws.com', + 'ds': 'ds.ap-southeast-2.amazonaws.com', + 'dynamodb': 'dynamodb.ap-southeast-2.amazonaws.com', + 'ec2': 'ec2.ap-southeast-2.amazonaws.com', + 'ecs': 'ecs.ap-southeast-2.amazonaws.com', + 'elasticache': 'elasticache.ap-southeast-2.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.ap-southeast-2.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.ap-southeast-2.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.ap-southeast-2.amazonaws.com', + 'glacier': 'glacier.ap-southeast-2.amazonaws.com', + 'kinesis': 'kinesis.ap-southeast-2.amazonaws.com', + 'kms': 'kms.ap-southeast-2.amazonaws.com', + 'logs': 'logs.ap-southeast-2.amazonaws.com', + 'monitoring': 'monitoring.ap-southeast-2.amazonaws.com', + 'rds': 'rds.ap-southeast-2.amazonaws.com', + 'redshift': 'redshift.ap-southeast-2.amazonaws.com', + 's3': 's3.ap-southeast-2.amazonaws.com', + 'sdb': 'sdb.ap-southeast-2.amazonaws.com', + 'sns': 'sns.ap-southeast-2.amazonaws.com', + 'sqs': 'sqs.ap-southeast-2.amazonaws.com', + 'storagegateway': 'storagegateway.ap-southeast-2.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.ap-southeast-2.amazonaws.com', + 'sts': 'sts.ap-southeast-2.amazonaws.com', + 'swf': 'swf.ap-southeast-2.amazonaws.com', + 'workspaces': 'workspaces.ap-southeast-2.amazonaws.com', + }, + 'aws-us-gov-global': {'iam': 'iam.us-gov.amazonaws.com'}, + 'cn-north-1': { + 'autoscaling': 'autoscaling.cn-north-1.amazonaws.com.cn', + 'cloudformation': 'cloudformation.cn-north-1.amazonaws.com.cn', + 'cloudtrail': 'cloudtrail.cn-north-1.amazonaws.com.cn', + 'directconnect': 'directconnect.cn-north-1.amazonaws.com.cn', + 'dynamodb': 'dynamodb.cn-north-1.amazonaws.com.cn', + 'ec2': 'ec2.cn-north-1.amazonaws.com.cn', + 'elasticache': 'elasticache.cn-north-1.amazonaws.com.cn', + 'elasticbeanstalk': 'elasticbeanstalk.cn-north-1.amazonaws.com.cn', + 'elasticloadbalancing': 'elasticloadbalancing.cn-north-1.amazonaws.com.cn', + 'elasticmapreduce': 'elasticmapreduce.cn-north-1.amazonaws.com.cn', + 'glacier': 'glacier.cn-north-1.amazonaws.com.cn', + 'iam': 'iam.cn-north-1.amazonaws.com.cn', + 'kinesis': 'kinesis.cn-north-1.amazonaws.com.cn', + 'monitoring': 'monitoring.cn-north-1.amazonaws.com.cn', + 'rds': 'rds.cn-north-1.amazonaws.com.cn', + 's3': 's3.cn-north-1.amazonaws.com.cn', + 'sns': 'sns.cn-north-1.amazonaws.com.cn', + 'sqs': 'sqs.cn-north-1.amazonaws.com.cn', + 'storagegateway': 'storagegateway.cn-north-1.amazonaws.com.cn', + 'streams.dynamodb': 'streams.dynamodb.cn-north-1.amazonaws.com.cn', + 'sts': 'sts.cn-north-1.amazonaws.com.cn', + 'swf': 'swf.cn-north-1.amazonaws.com.cn', + }, + 'eu-central-1': { + 'autoscaling': 'autoscaling.eu-central-1.amazonaws.com', + 'cloudformation': 'cloudformation.eu-central-1.amazonaws.com', + 'cloudhsm': 'cloudhsm.eu-central-1.amazonaws.com', + 'cloudsearch': 'cloudsearch.eu-central-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.eu-central-1.amazonaws.com', + 'codedeploy': 'codedeploy.eu-central-1.amazonaws.com', + 'config': 'config.eu-central-1.amazonaws.com', + 'directconnect': 'directconnect.eu-central-1.amazonaws.com', + 'dynamodb': 'dynamodb.eu-central-1.amazonaws.com', + 'ec2': 'ec2.eu-central-1.amazonaws.com', + 'elasticache': 'elasticache.eu-central-1.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.eu-central-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.eu-central-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.eu-central-1.amazonaws.com', + 'glacier': 'glacier.eu-central-1.amazonaws.com', + 'kinesis': 'kinesis.eu-central-1.amazonaws.com', + 'kms': 'kms.eu-central-1.amazonaws.com', + 'logs': 'logs.eu-central-1.amazonaws.com', + 'monitoring': 'monitoring.eu-central-1.amazonaws.com', + 'rds': 'rds.eu-central-1.amazonaws.com', + 'redshift': 'redshift.eu-central-1.amazonaws.com', + 's3': 's3.eu-central-1.amazonaws.com', + 'sns': 'sns.eu-central-1.amazonaws.com', + 'sqs': 'sqs.eu-central-1.amazonaws.com', + 'storagegateway': 'storagegateway.eu-central-1.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.eu-central-1.amazonaws.com', + 'sts': 'sts.eu-central-1.amazonaws.com', + 'swf': 'swf.eu-central-1.amazonaws.com', + }, + 'eu-west-1': { + 'apigateway': 'apigateway.eu-west-1.amazonaws.com', + 'autoscaling': 'autoscaling.eu-west-1.amazonaws.com', + 'cloudformation': 'cloudformation.eu-west-1.amazonaws.com', + 'cloudhsm': 'cloudhsm.eu-west-1.amazonaws.com', + 'cloudsearch': 'cloudsearch.eu-west-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.eu-west-1.amazonaws.com', + 'codedeploy': 'codedeploy.eu-west-1.amazonaws.com', + 'cognito-identity': 'cognito-identity.eu-west-1.amazonaws.com', + 'cognito-sync': 'cognito-sync.eu-west-1.amazonaws.com', + 'config': 'config.eu-west-1.amazonaws.com', + 'datapipeline': 'datapipeline.eu-west-1.amazonaws.com', + 'directconnect': 'directconnect.eu-west-1.amazonaws.com', + 'ds': 'ds.eu-west-1.amazonaws.com', + 'dynamodb': 'dynamodb.eu-west-1.amazonaws.com', + 'ec2': 'ec2.eu-west-1.amazonaws.com', + 'ecs': 'ecs.eu-west-1.amazonaws.com', + 'elasticache': 'elasticache.eu-west-1.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.eu-west-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.eu-west-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.eu-west-1.amazonaws.com', + 'elastictranscoder': 'elastictranscoder.eu-west-1.amazonaws.com', + 'email': 'email.eu-west-1.amazonaws.com', + 'glacier': 'glacier.eu-west-1.amazonaws.com', + 'iot': 'iot.eu-west-1.amazonaws.com', + 'kinesis': 'kinesis.eu-west-1.amazonaws.com', + 'kms': 'kms.eu-west-1.amazonaws.com', + 'lambda': 'lambda.eu-west-1.amazonaws.com', + 'logs': 'logs.eu-west-1.amazonaws.com', + 'machinelearning': 'machinelearning.eu-west-1.amazonaws.com', + 'monitoring': 'monitoring.eu-west-1.amazonaws.com', + 'rds': 'rds.eu-west-1.amazonaws.com', + 'redshift': 'redshift.eu-west-1.amazonaws.com', + 's3': 's3.eu-west-1.amazonaws.com', + 'sdb': 'sdb.eu-west-1.amazonaws.com', + 'sns': 'sns.eu-west-1.amazonaws.com', + 'sqs': 'sqs.eu-west-1.amazonaws.com', + 'ssm': 'ssm.eu-west-1.amazonaws.com', + 'storagegateway': 'storagegateway.eu-west-1.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.eu-west-1.amazonaws.com', + 'sts': 'sts.eu-west-1.amazonaws.com', + 'swf': 'swf.eu-west-1.amazonaws.com', + 'workspaces': 'workspaces.eu-west-1.amazonaws.com', + }, + 'fips-us-gov-west-1': {'s3': 's3-fips.us-gov-west-1.amazonaws.com'}, + 's3-external-1': {'s3': 's3-external-1.amazonaws.com'}, + 'sa-east-1': { + 'autoscaling': 'autoscaling.sa-east-1.amazonaws.com', + 'cloudformation': 'cloudformation.sa-east-1.amazonaws.com', + 'cloudsearch': 'cloudsearch.sa-east-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.sa-east-1.amazonaws.com', + 'config': 'config.sa-east-1.amazonaws.com', + 'directconnect': 'directconnect.sa-east-1.amazonaws.com', + 'dynamodb': 'dynamodb.sa-east-1.amazonaws.com', + 'ec2': 'ec2.sa-east-1.amazonaws.com', + 'elasticache': 'elasticache.sa-east-1.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.sa-east-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.sa-east-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.sa-east-1.amazonaws.com', + 'kms': 'kms.sa-east-1.amazonaws.com', + 'monitoring': 'monitoring.sa-east-1.amazonaws.com', + 'rds': 'rds.sa-east-1.amazonaws.com', + 's3': 's3.sa-east-1.amazonaws.com', + 'sdb': 'sdb.sa-east-1.amazonaws.com', + 'sns': 'sns.sa-east-1.amazonaws.com', + 'sqs': 'sqs.sa-east-1.amazonaws.com', + 'storagegateway': 'storagegateway.sa-east-1.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.sa-east-1.amazonaws.com', + 'sts': 'sts.sa-east-1.amazonaws.com', + 'swf': 'swf.sa-east-1.amazonaws.com', + }, + 'us-east-1': { + 'apigateway': 'apigateway.us-east-1.amazonaws.com', + 'appstream': 'appstream.us-east-1.amazonaws.com', + 'autoscaling': 'autoscaling.us-east-1.amazonaws.com', + 'cloudformation': 'cloudformation.us-east-1.amazonaws.com', + 'cloudfront': 'cloudfront.amazonaws.com', + 'cloudhsm': 'cloudhsm.us-east-1.amazonaws.com', + 'cloudsearch': 'cloudsearch.us-east-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.us-east-1.amazonaws.com', + 'codecommit': 'codecommit.us-east-1.amazonaws.com', + 'codedeploy': 'codedeploy.us-east-1.amazonaws.com', + 'codepipeline': 'codepipeline.us-east-1.amazonaws.com', + 'cognito-identity': 'cognito-identity.us-east-1.amazonaws.com', + 'cognito-sync': 'cognito-sync.us-east-1.amazonaws.com', + 'config': 'config.us-east-1.amazonaws.com', + 'datapipeline': 'datapipeline.us-east-1.amazonaws.com', + 'directconnect': 'directconnect.us-east-1.amazonaws.com', + 'ds': 'ds.us-east-1.amazonaws.com', + 'dynamodb': 'dynamodb.us-east-1.amazonaws.com', + 'ec2': 'ec2.us-east-1.amazonaws.com', + 'ecs': 'ecs.us-east-1.amazonaws.com', + 'elasticache': 'elasticache.us-east-1.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.us-east-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.us-east-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.us-east-1.amazonaws.com', + 'elastictranscoder': 'elastictranscoder.us-east-1.amazonaws.com', + 'email': 'email.us-east-1.amazonaws.com', + 'glacier': 'glacier.us-east-1.amazonaws.com', + 'iam': 'iam.amazonaws.com', + 'importexport': 'importexport.amazonaws.com', + 'iot': 'iot.us-east-1.amazonaws.com', + 'kinesis': 'kinesis.us-east-1.amazonaws.com', + 'kms': 'kms.us-east-1.amazonaws.com', + 'lambda': 'lambda.us-east-1.amazonaws.com', + 'logs': 'logs.us-east-1.amazonaws.com', + 'machinelearning': 'machinelearning.us-east-1.amazonaws.com', + 'mobileanalytics': 'mobileanalytics.us-east-1.amazonaws.com', + 'monitoring': 'monitoring.us-east-1.amazonaws.com', + 'opsworks': 'opsworks.us-east-1.amazonaws.com', + 'rds': 'rds.us-east-1.amazonaws.com', + 'redshift': 'redshift.us-east-1.amazonaws.com', + 'route53': 'route53.amazonaws.com', + 'route53domains': 'route53domains.us-east-1.amazonaws.com', + 's3': 's3.us-east-1.amazonaws.com', + 'sdb': 'sdb.amazonaws.com', + 'sns': 'sns.us-east-1.amazonaws.com', + 'sqs': 'sqs.us-east-1.amazonaws.com', + 'ssm': 'ssm.us-east-1.amazonaws.com', + 'storagegateway': 'storagegateway.us-east-1.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.us-east-1.amazonaws.com', + 'sts': 'sts.us-east-1.amazonaws.com', + 'support': 'support.us-east-1.amazonaws.com', + 'swf': 'swf.us-east-1.amazonaws.com', + 'workspaces': 'workspaces.us-east-1.amazonaws.com', + 'waf': 'waf.amazonaws.com', + }, + 'us-gov-west-1': { + 'autoscaling': 'autoscaling.us-gov-west-1.amazonaws.com', + 'cloudformation': 'cloudformation.us-gov-west-1.amazonaws.com', + 'cloudhsm': 'cloudhsm.us-gov-west-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.us-gov-west-1.amazonaws.com', + 'dynamodb': 'dynamodb.us-gov-west-1.amazonaws.com', + 'ec2': 'ec2.us-gov-west-1.amazonaws.com', + 'elasticache': 'elasticache.us-gov-west-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.us-gov-west-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.us-gov-west-1.amazonaws.com', + 'glacier': 'glacier.us-gov-west-1.amazonaws.com', + 'iam': 'iam.us-gov.amazonaws.com', + 'kms': 'kms.us-gov-west-1.amazonaws.com', + 'monitoring': 'monitoring.us-gov-west-1.amazonaws.com', + 'rds': 'rds.us-gov-west-1.amazonaws.com', + 'redshift': 'redshift.us-gov-west-1.amazonaws.com', + 's3': 's3.us-gov-west-1.amazonaws.com', + 'sns': 'sns.us-gov-west-1.amazonaws.com', + 'sqs': 'sqs.us-gov-west-1.amazonaws.com', + 'sts': 'sts.us-gov-west-1.amazonaws.com', + 'swf': 'swf.us-gov-west-1.amazonaws.com', + }, + 'us-west-1': { + 'autoscaling': 'autoscaling.us-west-1.amazonaws.com', + 'cloudformation': 'cloudformation.us-west-1.amazonaws.com', + 'cloudsearch': 'cloudsearch.us-west-1.amazonaws.com', + 'cloudtrail': 'cloudtrail.us-west-1.amazonaws.com', + 'config': 'config.us-west-1.amazonaws.com', + 'directconnect': 'directconnect.us-west-1.amazonaws.com', + 'dynamodb': 'dynamodb.us-west-1.amazonaws.com', + 'ec2': 'ec2.us-west-1.amazonaws.com', + 'ecs': 'ecs.us-west-1.amazonaws.com', + 'elasticache': 'elasticache.us-west-1.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.us-west-1.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.us-west-1.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.us-west-1.amazonaws.com', + 'elastictranscoder': 'elastictranscoder.us-west-1.amazonaws.com', + 'glacier': 'glacier.us-west-1.amazonaws.com', + 'kinesis': 'kinesis.us-west-1.amazonaws.com', + 'kms': 'kms.us-west-1.amazonaws.com', + 'logs': 'logs.us-west-1.amazonaws.com', + 'monitoring': 'monitoring.us-west-1.amazonaws.com', + 'rds': 'rds.us-west-1.amazonaws.com', + 's3': 's3.us-west-1.amazonaws.com', + 'sdb': 'sdb.us-west-1.amazonaws.com', + 'sns': 'sns.us-west-1.amazonaws.com', + 'sqs': 'sqs.us-west-1.amazonaws.com', + 'storagegateway': 'storagegateway.us-west-1.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.us-west-1.amazonaws.com', + 'sts': 'sts.us-west-1.amazonaws.com', + 'swf': 'swf.us-west-1.amazonaws.com', + }, + 'us-west-2': { + 'apigateway': 'apigateway.us-west-2.amazonaws.com', + 'autoscaling': 'autoscaling.us-west-2.amazonaws.com', + 'cloudformation': 'cloudformation.us-west-2.amazonaws.com', + 'cloudhsm': 'cloudhsm.us-west-2.amazonaws.com', + 'cloudsearch': 'cloudsearch.us-west-2.amazonaws.com', + 'cloudtrail': 'cloudtrail.us-west-2.amazonaws.com', + 'codedeploy': 'codedeploy.us-west-2.amazonaws.com', + 'codepipeline': 'codepipeline.us-west-2.amazonaws.com', + 'config': 'config.us-west-2.amazonaws.com', + 'datapipeline': 'datapipeline.us-west-2.amazonaws.com', + 'devicefarm': 'devicefarm.us-west-2.amazonaws.com', + 'directconnect': 'directconnect.us-west-2.amazonaws.com', + 'ds': 'ds.us-west-2.amazonaws.com', + 'dynamodb': 'dynamodb.us-west-2.amazonaws.com', + 'ec2': 'ec2.us-west-2.amazonaws.com', + 'ecs': 'ecs.us-west-2.amazonaws.com', + 'elasticache': 'elasticache.us-west-2.amazonaws.com', + 'elasticbeanstalk': 'elasticbeanstalk.us-west-2.amazonaws.com', + 'elasticfilesystem': 'elasticfilesystem.us-west-2.amazonaws.com', + 'elasticloadbalancing': 'elasticloadbalancing.us-west-2.amazonaws.com', + 'elasticmapreduce': 'elasticmapreduce.us-west-2.amazonaws.com', + 'elastictranscoder': 'elastictranscoder.us-west-2.amazonaws.com', + 'email': 'email.us-west-2.amazonaws.com', + 'glacier': 'glacier.us-west-2.amazonaws.com', + 'iot': 'iot.us-west-2.amazonaws.com', + 'kinesis': 'kinesis.us-west-2.amazonaws.com', + 'kms': 'kms.us-west-2.amazonaws.com', + 'lambda': 'lambda.us-west-2.amazonaws.com', + 'logs': 'logs.us-west-2.amazonaws.com', + 'monitoring': 'monitoring.us-west-2.amazonaws.com', + 'rds': 'rds.us-west-2.amazonaws.com', + 'redshift': 'redshift.us-west-2.amazonaws.com', + 's3': 's3.us-west-2.amazonaws.com', + 'sdb': 'sdb.us-west-2.amazonaws.com', + 'sns': 'sns.us-west-2.amazonaws.com', + 'sqs': 'sqs.us-west-2.amazonaws.com', + 'ssm': 'ssm.us-west-2.amazonaws.com', + 'storagegateway': 'storagegateway.us-west-2.amazonaws.com', + 'streams.dynamodb': 'streams.dynamodb.us-west-2.amazonaws.com', + 'sts': 'sts.us-west-2.amazonaws.com', + 'swf': 'swf.us-west-2.amazonaws.com', + 'workspaces': 'workspaces.us-west-2.amazonaws.com', + }, +} + + +# Lists the services in the aws partition that do not require a region +# when resolving an endpoint because these services have partitionWide +# endpoints. +KNOWN_AWS_PARTITION_WIDE = { + 'importexport': 'https://importexport.amazonaws.com', + 'cloudfront': 'https://cloudfront.amazonaws.com', + 'waf': 'https://waf.amazonaws.com', + 'route53': 'https://route53.amazonaws.com', + 's3': 'https://s3.amazonaws.com', + 'sts': 'https://sts.amazonaws.com', + 'iam': 'https://iam.amazonaws.com', +} + + +def _known_endpoints_by_region(): + for region_name, service_dict in KNOWN_REGIONS.items(): + for service_name, endpoint in service_dict.items(): + yield service_name, region_name, endpoint + + +@pytest.mark.parametrize( + "service_name, region_name, expected_endpoint", + _known_endpoints_by_region(), +) +def test_single_service_region_endpoint( + patched_session, service_name, region_name, expected_endpoint +): + # Verify the actual values from the partition files. While + # TestEndpointHeuristics verified the generic functionality given any + # endpoints file, this test actually verifies the partition data against a + # fixed list of known endpoints. This list doesn't need to be kept 100% up + # to date, but serves as a basis for regressions as the endpoint data + # logic evolves. + resolver = patched_session._get_internal_component('endpoint_resolver') + bridge = ClientEndpointBridge(resolver, None, None) + result = bridge.resolve(service_name, region_name) + expected = f'https://{expected_endpoint}' + assert result['endpoint_url'] == expected + + +# Ensure that all S3 regions use s3v4 instead of v4 +def test_all_s3_endpoints_have_s3v4(patched_session): + session = patched_session + partitions = session.get_available_partitions() + resolver = session._get_internal_component('endpoint_resolver') + for partition_name in partitions: + for endpoint in session.get_available_regions('s3', partition_name): + resolved = resolver.construct_endpoint('s3', endpoint) + assert 's3v4' in resolved['signatureVersions'] + assert 'v4' not in resolved['signatureVersions'] + + +@pytest.mark.parametrize( + "service_name, expected_endpoint", KNOWN_AWS_PARTITION_WIDE.items() +) +def test_single_service_partition_endpoint( + patched_session, service_name, expected_endpoint +): + resolver = patched_session._get_internal_component('endpoint_resolver') + bridge = ClientEndpointBridge(resolver) + result = bridge.resolve(service_name) + assert result['endpoint_url'] == expected_endpoint + + +def test_non_partition_endpoint_requires_region(patched_session): + resolver = patched_session._get_internal_component('endpoint_resolver') + with pytest.raises(NoRegionError): + resolver.construct_endpoint('ec2') + + +class TestEndpointResolution(BaseSessionTest): + def setUp(self): + super().setUp() + self.xml_response = ( + b'\n\n' + b'\n' + b'\n' + b'' + ) + + def create_stubbed_client(self, service_name, region_name, **kwargs): + client = self.session.create_client( + service_name, region_name, **kwargs + ) + http_stubber = ClientHTTPStubber(client) + http_stubber.start() + return client, http_stubber + + def test_regionalized_client_endpoint_resolution(self): + client, stubber = self.create_stubbed_client('s3', 'us-east-2') + stubber.add_response() + client.list_buckets() + self.assertEqual( + stubber.requests[0].url, 'https://s3.us-east-2.amazonaws.com/' + ) + + def test_regionalized_client_with_unknown_region(self): + client, stubber = self.create_stubbed_client('s3', 'not-real') + stubber.add_response() + client.list_buckets() + # Validate we don't fall back to partition endpoint for + # regionalized services. + self.assertEqual( + stubber.requests[0].url, 'https://s3.not-real.amazonaws.com/' + ) + + def test_unregionalized_client_endpoint_resolution(self): + client, stubber = self.create_stubbed_client('iam', 'us-west-2') + stubber.add_response(body=self.xml_response) + client.list_roles() + self.assertTrue( + stubber.requests[0].url.startswith('https://iam.amazonaws.com/') + ) + + def test_unregionalized_client_with_unknown_region(self): + client, stubber = self.create_stubbed_client('iam', 'not-real') + stubber.add_response(body=self.xml_response) + client.list_roles() + self.assertTrue( + stubber.requests[0].url.startswith('https://iam.amazonaws.com/') + ) + + +@pytest.mark.parametrize("is_builtin", [True, False]) +def test_endpoint_resolver_knows_its_datasource(patched_session, is_builtin): + # The information whether or not the endpoints.json file was loaded from + # the builtin data directory or not should be passed from Loader to + # EndpointResolver. + session = patched_session + loader = session.get_component('data_loader') + with mock.patch.object(loader, 'is_builtin_path', return_value=is_builtin): + resolver = session._get_internal_component('endpoint_resolver') + assert resolver.uses_builtin_data == is_builtin diff --git a/testbed/boto__botocore/tests/functional/test_response_shadowing.py b/testbed/boto__botocore/tests/functional/test_response_shadowing.py new file mode 100644 index 0000000000000000000000000000000000000000..a5cbaac047d0aab4ec62ee98f878be5b8d09c400 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_response_shadowing.py @@ -0,0 +1,50 @@ +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +from tests import ALL_SERVICES + + +def _all_service_error_shapes(): + for service_model in ALL_SERVICES: + yield from service_model.error_shapes + + +def _all_operations(): + for service_model in ALL_SERVICES: + for operation_name in service_model.operation_names: + yield service_model.operation_model(operation_name).output_shape + + +def _assert_not_shadowed(key, shape): + if not shape: + return + + assert ( + key not in shape.members + ), f'Found shape "{shape.name}" that shadows the botocore response key "{key}"' + + +@pytest.mark.parametrize("operation_output_shape", _all_operations()) +def test_response_metadata_is_not_shadowed(operation_output_shape): + _assert_not_shadowed('ResponseMetadata', operation_output_shape) + + +@pytest.mark.parametrize("error_shape", _all_service_error_shapes()) +def test_exceptions_do_not_shadow_response_metadata(error_shape): + _assert_not_shadowed('ResponseMetadata', error_shape) + + +@pytest.mark.parametrize("error_shape", _all_service_error_shapes()) +def test_exceptions_do_not_shadow_error(error_shape): + _assert_not_shadowed('Error', error_shape) diff --git a/testbed/boto__botocore/tests/functional/test_retry.py b/testbed/boto__botocore/tests/functional/test_retry.py new file mode 100644 index 0000000000000000000000000000000000000000..da7460313c4315f97cfb65820774f5d3d2e684ab --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_retry.py @@ -0,0 +1,351 @@ +# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import contextlib +import datetime +import json + +import botocore.endpoint +from botocore.config import Config +from botocore.exceptions import ClientError +from tests import BaseSessionTest, ClientHTTPStubber, mock + +RETRY_MODES = ('legacy', 'standard', 'adaptive') + + +class BaseRetryTest(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.sleep_patch = mock.patch('time.sleep') + self.sleep_patch.start() + + def tearDown(self): + super().tearDown() + self.sleep_patch.stop() + + @contextlib.contextmanager + def assert_will_retry_n_times( + self, client, num_retries, status=500, body=b'{}' + ): + num_responses = num_retries + 1 + if not isinstance(body, bytes): + body = json.dumps(body).encode() + with ClientHTTPStubber(client) as http_stubber: + for _ in range(num_responses): + http_stubber.add_response(status=status, body=body) + with self.assertRaisesRegex( + ClientError, f'reached max retries: {num_retries}' + ): + yield + self.assertEqual(len(http_stubber.requests), num_responses) + + +class TestRetryHeader(BaseRetryTest): + def _retry_headers_test_cases(self): + responses = [ + [ + (500, {'Date': 'Sat, 01 Jun 2019 00:00:00 GMT'}), + (500, {'Date': 'Sat, 01 Jun 2019 00:00:01 GMT'}), + (200, {'Date': 'Sat, 01 Jun 2019 00:00:02 GMT'}), + ], + [ + (500, {'Date': 'Sat, 01 Jun 2019 00:10:03 GMT'}), + (500, {'Date': 'Sat, 01 Jun 2019 00:10:09 GMT'}), + (200, {'Date': 'Sat, 01 Jun 2019 00:10:15 GMT'}), + ], + ] + + # The first, third and seventh datetime values of each + # utcnow_side_effects list are side_effect values for when + # utcnow is called in SigV4 signing. + utcnow_side_effects = [ + [ + datetime.datetime(2019, 6, 1, 0, 0, 0, 0), + datetime.datetime(2019, 6, 1, 0, 0, 0, 0), + datetime.datetime(2019, 6, 1, 0, 0, 1, 0), + datetime.datetime(2019, 6, 1, 0, 0, 0, 0), + datetime.datetime(2019, 6, 1, 0, 0, 1, 0), + datetime.datetime(2019, 6, 1, 0, 0, 2, 0), + datetime.datetime(2019, 6, 1, 0, 0, 0, 0), + ], + [ + datetime.datetime(2020, 6, 1, 0, 0, 0, 0), + datetime.datetime(2019, 6, 1, 0, 0, 5, 0), + datetime.datetime(2019, 6, 1, 0, 0, 6, 0), + datetime.datetime(2019, 6, 1, 0, 0, 0, 0), + datetime.datetime(2019, 6, 1, 0, 0, 11, 0), + datetime.datetime(2019, 6, 1, 0, 0, 12, 0), + datetime.datetime(2019, 6, 1, 0, 0, 0, 0), + ], + ] + expected_headers = [ + [ + b'attempt=1', + b'ttl=20190601T000011Z; attempt=2; max=3', + b'ttl=20190601T000012Z; attempt=3; max=3', + ], + [ + b'attempt=1', + b'ttl=20190601T001014Z; attempt=2; max=3', + b'ttl=20190601T001020Z; attempt=3; max=3', + ], + ] + test_cases = list( + zip(responses, utcnow_side_effects, expected_headers) + ) + return test_cases + + def _test_amz_sdk_request_header_with_test_case( + self, responses, utcnow_side_effects, expected_headers, client_config + ): + datetime_patcher = mock.patch.object( + botocore.endpoint.datetime, + 'datetime', + mock.Mock(wraps=datetime.datetime), + ) + mocked_datetime = datetime_patcher.start() + mocked_datetime.utcnow.side_effect = utcnow_side_effects + + client = self.session.create_client( + 'dynamodb', self.region, config=client_config + ) + with ClientHTTPStubber(client) as http_stubber: + for response in responses: + http_stubber.add_response( + headers=response[1], status=response[0], body=b'{}' + ) + client.list_tables() + amz_sdk_request_headers = [ + request.headers['amz-sdk-request'] + for request in http_stubber.requests + ] + self.assertListEqual(amz_sdk_request_headers, expected_headers) + datetime_patcher.stop() + + def test_amz_sdk_request_header(self): + test_cases = self._retry_headers_test_cases() + for retry_mode in RETRY_MODES: + retries_config = {'mode': retry_mode, 'total_max_attempts': 3} + client_config = Config(read_timeout=10, retries=retries_config) + for test_case in test_cases: + self._test_amz_sdk_request_header_with_test_case( + *test_case, client_config=client_config + ) + + def test_amz_sdk_invocation_id_header_persists(self): + for retry_mode in RETRY_MODES: + client_config = Config(retries={'mode': retry_mode}) + client = self.session.create_client( + 'dynamodb', self.region, config=client_config + ) + num_retries = 2 + with ClientHTTPStubber(client) as http_stubber: + for _ in range(num_retries): + http_stubber.add_response(status=500) + http_stubber.add_response(status=200) + client.list_tables() + amz_sdk_invocation_id_headers = [ + request.headers['amz-sdk-invocation-id'] + for request in http_stubber.requests + ] + self.assertEqual( + amz_sdk_invocation_id_headers[0], + amz_sdk_invocation_id_headers[1], + ) + self.assertEqual( + amz_sdk_invocation_id_headers[1], + amz_sdk_invocation_id_headers[2], + ) + + def test_amz_sdk_invocation_id_header_unique_per_invocation(self): + client = self.session.create_client('dynamodb', self.region) + num_of_invocations = 2 + with ClientHTTPStubber(client) as http_stubber: + for _ in range(num_of_invocations): + http_stubber.add_response(status=500) + http_stubber.add_response(status=200) + client.list_tables() + amz_sdk_invocation_id_headers = [ + request.headers['amz-sdk-invocation-id'] + for request in http_stubber.requests + ] + self.assertEqual( + amz_sdk_invocation_id_headers[0], + amz_sdk_invocation_id_headers[1], + ) + self.assertEqual( + amz_sdk_invocation_id_headers[2], + amz_sdk_invocation_id_headers[3], + ) + self.assertNotEqual( + amz_sdk_invocation_id_headers[0], + amz_sdk_invocation_id_headers[2], + ) + + +class TestLegacyRetry(BaseRetryTest): + def test_can_override_max_attempts(self): + client = self.session.create_client( + 'dynamodb', self.region, config=Config(retries={'max_attempts': 1}) + ) + with self.assert_will_retry_n_times(client, 1): + client.list_tables() + + def test_do_not_attempt_retries(self): + client = self.session.create_client( + 'dynamodb', self.region, config=Config(retries={'max_attempts': 0}) + ) + with self.assert_will_retry_n_times(client, 0): + client.list_tables() + + def test_setting_max_attempts_does_not_set_for_other_clients(self): + # Make one client with max attempts configured. + self.session.create_client( + 'codecommit', + self.region, + config=Config(retries={'max_attempts': 1}), + ) + + # Make another client that has no custom retry configured. + client = self.session.create_client('codecommit', self.region) + # It should use the default max retries, which should be four retries + # for this service. + with self.assert_will_retry_n_times(client, 4): + client.list_repositories() + + def test_service_specific_defaults_do_not_mutate_general_defaults(self): + # This tests for a bug where if you created a client for a service + # with specific retry configurations and then created a client for + # a service whose retry configurations fallback to the general + # defaults, the second client would actually use the defaults of + # the first client. + + # Make a dynamodb client. It's a special case client that is + # configured to a make a maximum of 10 requests (9 retries). + client = self.session.create_client('dynamodb', self.region) + with self.assert_will_retry_n_times(client, 9): + client.list_tables() + + # A codecommit client is not a special case for retries. It will at + # most make 5 requests (4 retries) for its default. + client = self.session.create_client('codecommit', self.region) + with self.assert_will_retry_n_times(client, 4): + client.list_repositories() + + def test_set_max_attempts_on_session(self): + self.session.set_default_client_config( + Config(retries={'max_attempts': 1}) + ) + # Max attempts should be inherited from the session. + client = self.session.create_client('codecommit', self.region) + with self.assert_will_retry_n_times(client, 1): + client.list_repositories() + + def test_can_clobber_max_attempts_on_session(self): + self.session.set_default_client_config( + Config(retries={'max_attempts': 1}) + ) + # Max attempts should override the session's configured max attempts. + client = self.session.create_client( + 'codecommit', + self.region, + config=Config(retries={'max_attempts': 0}), + ) + with self.assert_will_retry_n_times(client, 0): + client.list_repositories() + + +class TestRetriesV2(BaseRetryTest): + def create_client_with_retry_mode( + self, service, retry_mode, max_attempts=None + ): + retries = {'mode': retry_mode} + if max_attempts is not None: + retries['total_max_attempts'] = max_attempts + client = self.session.create_client( + service, self.region, config=Config(retries=retries) + ) + return client + + def test_standard_mode_has_default_3_retries(self): + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='standard' + ) + with self.assert_will_retry_n_times(client, 2): + client.list_tables() + + def test_standard_mode_can_configure_max_attempts(self): + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='standard', max_attempts=5 + ) + with self.assert_will_retry_n_times(client, 4): + client.list_tables() + + def test_no_retry_needed_standard_mode(self): + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='standard' + ) + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(status=200, body=b'{}') + client.list_tables() + + def test_standard_mode_retry_throttling_error(self): + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='standard' + ) + error_body = {"__type": "ThrottlingException", "message": "Error"} + with self.assert_will_retry_n_times( + client, 2, status=400, body=error_body + ): + client.list_tables() + + def test_standard_mode_retry_transient_error(self): + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='standard' + ) + with self.assert_will_retry_n_times(client, 2, status=502): + client.list_tables() + + def test_adaptive_mode_still_retries_errors(self): + # Verify that adaptive mode is just adding on to standard mode. + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='adaptive' + ) + with self.assert_will_retry_n_times(client, 2): + client.list_tables() + + def test_adaptive_mode_retry_transient_error(self): + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='adaptive' + ) + with self.assert_will_retry_n_times(client, 2, status=502): + client.list_tables() + + def test_can_exhaust_default_retry_quota(self): + # Quota of 500 / 5 retry costs == 100 retry attempts + # 100 retry attempts / 2 retries per API call == 50 client calls + client = self.create_client_with_retry_mode( + 'dynamodb', retry_mode='standard' + ) + for i in range(50): + with self.assert_will_retry_n_times(client, 2, status=502): + client.list_tables() + # Now on the 51th attempt we should see quota errors, which we can + # verify by looking at the request metadata. + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(status=502, body=b'{}') + with self.assertRaises(ClientError) as e: + client.list_tables() + self.assertTrue( + e.exception.response['ResponseMetadata'].get('RetryQuotaReached') + ) diff --git a/testbed/boto__botocore/tests/functional/test_route53.py b/testbed/boto__botocore/tests/functional/test_route53.py new file mode 100644 index 0000000000000000000000000000000000000000..f1677ba37121be3e9353758b71ca16a3c12c64d1 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_route53.py @@ -0,0 +1,74 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from botocore.stub import Stubber +from tests import BaseSessionTest, ClientHTTPStubber, unittest + + +class TestRoute53Pagination(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('route53', 'us-west-2') + self.stubber = Stubber(self.client) + # response has required fields + self.response = { + 'HostedZones': [], + 'Marker': '', + 'IsTruncated': True, + 'MaxItems': '1', + } + self.operation_name = 'list_hosted_zones' + + def test_paginate_with_max_items_int(self): + # Route53 has a string type for MaxItems. We need to ensure that this + # still works with integers as the cli auto converts the page size + # argument to an integer. + self.stubber.add_response(self.operation_name, self.response) + paginator = self.client.get_paginator('list_hosted_zones') + with self.stubber: + config = {'PageSize': 1} + results = list(paginator.paginate(PaginationConfig=config)) + self.assertTrue(len(results) >= 0) + + def test_paginate_with_max_items_str(self): + # Route53 has a string type for MaxItems. We need to ensure that this + # still works with strings as that's the expected type for this key. + self.stubber.add_response(self.operation_name, self.response) + paginator = self.client.get_paginator('list_hosted_zones') + with self.stubber: + config = {'PageSize': '1'} + results = list(paginator.paginate(PaginationConfig=config)) + self.assertTrue(len(results) >= 0) + + +class TestRoute53EndpointResolution(BaseSessionTest): + def create_stubbed_client(self, service_name, region_name, **kwargs): + client = self.session.create_client( + service_name, region_name, **kwargs + ) + http_stubber = ClientHTTPStubber(client) + http_stubber.start() + http_stubber.add_response() + return client, http_stubber + + def test_unregionalized_client_endpoint_resolution(self): + client, stubber = self.create_stubbed_client('route53', 'us-west-2') + client.list_geo_locations() + expected_url = 'https://route53.amazonaws.com/' + self.assertTrue(stubber.requests[0].url.startswith(expected_url)) + + def test_unregionalized_client_with_unknown_region(self): + client, stubber = self.create_stubbed_client('route53', 'not-real') + client.list_geo_locations() + expected_url = 'https://route53.amazonaws.com/' + self.assertTrue(stubber.requests[0].url.startswith(expected_url)) diff --git a/testbed/boto__botocore/tests/functional/test_s3.py b/testbed/boto__botocore/tests/functional/test_s3.py new file mode 100644 index 0000000000000000000000000000000000000000..04fc32aa7b3cb3a1cc4f54a0cd8a75e4fdd70475 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_s3.py @@ -0,0 +1,3765 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import base64 +import datetime +import re + +import pytest +from dateutil.tz import tzutc + +import botocore.session +from botocore import UNSIGNED +from botocore.compat import get_md5, parse_qs, urlsplit +from botocore.config import Config +from botocore.exceptions import ( + ClientError, + InvalidS3UsEast1RegionalEndpointConfigError, + ParamValidationError, + UnsupportedS3AccesspointConfigurationError, + UnsupportedS3ConfigurationError, +) +from botocore.parsers import ResponseParserError +from tests import ( + BaseSessionTest, + ClientHTTPStubber, + FreezeTime, + create_session, + mock, + requires_crt, + temporary_file, + unittest, +) + +DATE = datetime.datetime(2021, 8, 27, 0, 0, 0) + + +class TestS3BucketValidation(unittest.TestCase): + def test_invalid_bucket_name_raises_error(self): + session = botocore.session.get_session() + s3 = session.create_client("s3") + with self.assertRaises(ParamValidationError): + s3.put_object( + Bucket="adfgasdfadfs/bucket/name", Key="foo", Body=b"asdf" + ) + + +class BaseS3OperationTest(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = "us-west-2" + self.client = self.session.create_client("s3", self.region) + self.http_stubber = ClientHTTPStubber(self.client) + + +class BaseS3ClientConfigurationTest(BaseSessionTest): + _V4_AUTH_REGEX = re.compile( + r"AWS4-HMAC-SHA256 " + r"Credential=\w+/\d+/" + r"(?P[a-z0-9-]+)/" + r"(?P[a-z0-9-]+)/" + ) + + _V4A_AUTH_REGEX = re.compile( + r"AWS4-ECDSA-P256-SHA256 " + r"Credential=\w+/\d+/" + r"(?P[a-z0-9-]+)/" + ) + + def setUp(self): + super().setUp() + self.region = "us-west-2" + + def _get_auth_regex(self, auth_header): + if auth_header.startswith("AWS4-ECDSA"): + return self._V4A_AUTH_REGEX + return self._V4_AUTH_REGEX + + def assert_signing_region(self, request, expected_region): + auth_header = request.headers["Authorization"].decode("utf-8") + actual_region = None + auth_regex = self._get_auth_regex(auth_header) + match = auth_regex.match(auth_header) + if match and auth_regex is self._V4_AUTH_REGEX: + actual_region = match.group("signing_region") + self.assertEqual(expected_region, actual_region) + else: + # SigV4a does not sign with a specific region + region_set = request.headers.get('X-Amz-Region-Set') + self.assertEqual(region_set, b'*') + + def assert_signing_name(self, request, expected_name): + auth_header = request.headers["Authorization"].decode("utf-8") + actual_name = None + auth_regex = self._get_auth_regex(auth_header) + match = auth_regex.match(auth_header) + if match: + actual_name = match.group("signing_name") + self.assertEqual(expected_name, actual_name) + + def assert_signing_region_in_url(self, url, expected_region): + qs_components = parse_qs(urlsplit(url).query) + self.assertIn(expected_region, qs_components["X-Amz-Credential"][0]) + + def assert_endpoint(self, request, expected_endpoint): + actual_endpoint = urlsplit(request.url).netloc + self.assertEqual(actual_endpoint, expected_endpoint) + + def create_s3_client(self, **kwargs): + client_kwargs = {"region_name": self.region} + client_kwargs.update(kwargs) + return self.session.create_client("s3", **client_kwargs) + + def set_config_file(self, fileobj, contents): + fileobj.write(contents) + fileobj.flush() + self.environ["AWS_CONFIG_FILE"] = fileobj.name + + +class TestS3ClientConfigResolution(BaseS3ClientConfigurationTest): + def test_no_s3_config(self): + client = self.create_s3_client() + self.assertIsNone(client.meta.config.s3) + + def test_client_s3_dualstack_handles_uppercase_true(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " use_dualstack_endpoint = True" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3["use_dualstack_endpoint"], True + ) + + def test_client_s3_dualstack_handles_lowercase_true(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " use_dualstack_endpoint = true" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3["use_dualstack_endpoint"], True + ) + + def test_client_s3_accelerate_handles_uppercase_true(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " use_accelerate_endpoint = True" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3["use_accelerate_endpoint"], True + ) + + def test_client_s3_accelerate_handles_lowercase_true(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " use_accelerate_endpoint = true" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3["use_accelerate_endpoint"], True + ) + + def test_client_payload_signing_enabled_handles_uppercase_true(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " payload_signing_enabled = True" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3["payload_signing_enabled"], True + ) + + def test_client_payload_signing_enabled_handles_lowercase_true(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " payload_signing_enabled = true" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3["payload_signing_enabled"], True + ) + + def test_includes_unmodeled_s3_config_vars(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " unmodeled = unmodeled_val" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3["unmodeled"], "unmodeled_val" + ) + + def test_mixed_modeled_and_unmodeled_config_vars(self): + with temporary_file("w") as f: + self.set_config_file( + f, + "[default]\n" + "s3 = \n" + " payload_signing_enabled = true\n" + " unmodeled = unmodeled_val", + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "payload_signing_enabled": True, + "unmodeled": "unmodeled_val", + }, + ) + + def test_use_arn_region(self): + self.environ["AWS_S3_USE_ARN_REGION"] = "true" + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "use_arn_region": True, + }, + ) + + def test_use_arn_region_config_var(self): + with temporary_file("w") as f: + self.set_config_file(f, "[default]\n" "s3_use_arn_region = true") + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "use_arn_region": True, + }, + ) + + def test_use_arn_region_nested_config_var(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " use_arn_region = true" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "use_arn_region": True, + }, + ) + + def test_use_arn_region_is_case_insensitive(self): + self.environ["AWS_S3_USE_ARN_REGION"] = "True" + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "use_arn_region": True, + }, + ) + + def test_use_arn_region_env_var_overrides_config_var(self): + self.environ["AWS_S3_USE_ARN_REGION"] = "false" + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " use_arn_region = true" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "use_arn_region": False, + }, + ) + + def test_client_config_use_arn_region_overrides_env_var(self): + self.environ["AWS_S3_USE_ARN_REGION"] = "true" + client = self.create_s3_client( + config=Config(s3={"use_arn_region": False}) + ) + self.assertEqual( + client.meta.config.s3, + { + "use_arn_region": False, + }, + ) + + def test_client_config_use_arn_region_overrides_config_var(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3 = \n" " use_arn_region = true" + ) + client = self.create_s3_client( + config=Config(s3={"use_arn_region": False}) + ) + self.assertEqual( + client.meta.config.s3, + { + "use_arn_region": False, + }, + ) + + def test_us_east_1_regional_env_var(self): + self.environ["AWS_S3_US_EAST_1_REGIONAL_ENDPOINT"] = "regional" + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "us_east_1_regional_endpoint": "regional", + }, + ) + + def test_us_east_1_regional_config_var(self): + with temporary_file("w") as f: + self.set_config_file( + f, "[default]\n" "s3_us_east_1_regional_endpoint = regional" + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "us_east_1_regional_endpoint": "regional", + }, + ) + + def test_us_east_1_regional_nested_config_var(self): + with temporary_file("w") as f: + self.set_config_file( + f, + "[default]\n" + "s3 = \n" + " us_east_1_regional_endpoint = regional", + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "us_east_1_regional_endpoint": "regional", + }, + ) + + def test_us_east_1_regional_env_var_overrides_config_var(self): + self.environ["AWS_S3_US_EAST_1_REGIONAL_ENDPOINT"] = "regional" + with temporary_file("w") as f: + self.set_config_file( + f, + "[default]\n" + "s3 = \n" + " us_east_1_regional_endpoint = legacy", + ) + client = self.create_s3_client() + self.assertEqual( + client.meta.config.s3, + { + "us_east_1_regional_endpoint": "regional", + }, + ) + + def test_client_config_us_east_1_regional_overrides_env_var(self): + self.environ["AWS_S3_US_EAST_1_REGIONAL_ENDPOINT"] = "regional" + client = self.create_s3_client( + config=Config(s3={"us_east_1_regional_endpoint": "legacy"}) + ) + self.assertEqual( + client.meta.config.s3, + { + "us_east_1_regional_endpoint": "legacy", + }, + ) + + def test_client_config_us_east_1_regional_overrides_config_var(self): + with temporary_file("w") as f: + self.set_config_file( + f, + "[default]\n" + "s3 = \n" + " us_east_1_regional_endpoint = legacy", + ) + client = self.create_s3_client( + config=Config(s3={"us_east_1_regional_endpoint": "regional"}) + ) + self.assertEqual( + client.meta.config.s3, + { + "us_east_1_regional_endpoint": "regional", + }, + ) + + def test_client_validates_us_east_1_regional(self): + with self.assertRaises(InvalidS3UsEast1RegionalEndpointConfigError): + self.create_s3_client( + config=Config(s3={"us_east_1_regional_endpoint": "not-valid"}) + ) + + def test_client_region_defaults_to_us_east_1(self): + client = self.create_s3_client(region_name=None) + self.assertEqual(client.meta.region_name, "us-east-1") + + def test_client_region_remains_us_east_1(self): + client = self.create_s3_client(region_name="us-east-1") + self.assertEqual(client.meta.region_name, "us-east-1") + + def test_client_region_remains_aws_global(self): + client = self.create_s3_client(region_name="aws-global") + self.assertEqual(client.meta.region_name, "aws-global") + + def test_client_region_defaults_to_aws_global_for_regional(self): + self.environ["AWS_S3_US_EAST_1_REGIONAL_ENDPOINT"] = "regional" + client = self.create_s3_client(region_name=None) + self.assertEqual(client.meta.region_name, "aws-global") + + def test_client_region_remains_us_east_1_for_regional(self): + self.environ["AWS_S3_US_EAST_1_REGIONAL_ENDPOINT"] = "regional" + client = self.create_s3_client(region_name="us-east-1") + self.assertEqual(client.meta.region_name, "us-east-1") + + def test_client_region_remains_aws_global_for_regional(self): + self.environ["AWS_S3_US_EAST_1_REGIONAL_ENDPOINT"] = "regional" + client = self.create_s3_client(region_name="aws-global") + self.assertEqual(client.meta.region_name, "aws-global") + + +class TestS3Copy(BaseS3OperationTest): + def create_s3_client(self, **kwargs): + client_kwargs = {"region_name": self.region} + client_kwargs.update(kwargs) + return self.session.create_client("s3", **client_kwargs) + + def create_stubbed_s3_client(self, **kwargs): + client = self.create_s3_client(**kwargs) + http_stubber = ClientHTTPStubber(client) + http_stubber.start() + return client, http_stubber + + def test_s3_copy_object_with_empty_response(self): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-east-1" + ) + + empty_body = b"" + complete_body = ( + b'\n\n' + b"' + b"2020-04-21T21:03:31.000Z" + b""s0mEcH3cK5uM"" + ) + + self.http_stubber.add_response(status=200, body=empty_body) + self.http_stubber.add_response(status=200, body=complete_body) + response = self.client.copy_object( + Bucket="bucket", + CopySource="other-bucket/test.txt", + Key="test.txt", + ) + + # Validate we retried and got second body + self.assertEqual(len(self.http_stubber.requests), 2) + self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 200) + self.assertTrue("CopyObjectResult" in response) + + def test_s3_copy_object_with_incomplete_response(self): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-east-1" + ) + + incomplete_body = b'\n\n\n' + self.http_stubber.add_response(status=200, body=incomplete_body) + with self.assertRaises(ResponseParserError): + self.client.copy_object( + Bucket="bucket", + CopySource="other-bucket/test.txt", + Key="test.txt", + ) + + +class TestAccesspointArn(BaseS3ClientConfigurationTest): + def setUp(self): + super().setUp() + self.client, self.http_stubber = self.create_stubbed_s3_client() + + def create_stubbed_s3_client(self, **kwargs): + client = self.create_s3_client(**kwargs) + http_stubber = ClientHTTPStubber(client) + http_stubber.start() + return client, http_stubber + + def assert_expected_copy_source_header( + self, http_stubber, expected_copy_source + ): + request = self.http_stubber.requests[0] + self.assertIn("x-amz-copy-source", request.headers) + self.assertEqual( + request.headers["x-amz-copy-source"], expected_copy_source + ) + + def add_copy_object_response(self, http_stubber): + http_stubber.add_response( + body=b"" + ) + + def assert_endpoint(self, request, expected_endpoint): + actual_endpoint = urlsplit(request.url).netloc + self.assertEqual(actual_endpoint, expected_endpoint) + + def assert_header_matches(self, request, header_key, expected_value): + self.assertEqual(request.headers.get(header_key), expected_value) + + def test_missing_account_id_in_arn(self): + accesspoint_arn = "arn:aws:s3:us-west-2::accesspoint:myendpoint" + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_missing_accesspoint_name_in_arn(self): + accesspoint_arn = "arn:aws:s3:us-west-2:123456789012:accesspoint" + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_accesspoint_includes_asterisk(self): + accesspoint_arn = "arn:aws:s3:us-west-2:123456789012:accesspoint:*" + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_accesspoint_arn_contains_subresources(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:object" + ) + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_accesspoint_arn_with_custom_endpoint(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, http_stubber = self.create_stubbed_s3_client( + endpoint_url="https://custom.com" + ) + http_stubber.add_response() + self.client.list_objects(Bucket=accesspoint_arn) + expected_endpoint = "myendpoint-123456789012.custom.com" + self.assert_endpoint(http_stubber.requests[0], expected_endpoint) + + def test_accesspoint_arn_with_custom_endpoint_and_dualstack(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, http_stubber = self.create_stubbed_s3_client( + endpoint_url="https://custom.com", + config=Config(s3={"use_dualstack_endpoint": True}), + ) + http_stubber.add_response() + self.client.list_objects(Bucket=accesspoint_arn) + expected_endpoint = "myendpoint-123456789012.custom.com" + self.assert_endpoint(http_stubber.requests[0], expected_endpoint) + + def test_accesspoint_arn_with_s3_accelerate(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + config=Config(s3={"use_accelerate_endpoint": True}) + ) + with self.assertRaises( + botocore.exceptions.UnsupportedS3AccesspointConfigurationError + ): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_accesspoint_arn_cross_partition(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="cn-north-1" + ) + with self.assertRaises( + botocore.exceptions.UnsupportedS3AccesspointConfigurationError + ): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_accesspoint_arn_cross_partition_use_client_region(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="cn-north-1", + config=Config(s3={"use_accelerate_endpoint": True}), + ) + with self.assertRaises( + botocore.exceptions.UnsupportedS3AccesspointConfigurationError + ): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_signs_with_arn_region(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-east-1" + ) + self.http_stubber.add_response() + self.client.list_objects(Bucket=accesspoint_arn) + self.assert_signing_region(self.http_stubber.requests[0], "us-west-2") + + def test_signs_with_client_region_when_use_arn_region_false(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-east-1", + config=Config(s3={"use_arn_region": False}), + ) + self.http_stubber.add_response() + with self.assertRaises(UnsupportedS3AccesspointConfigurationError): + self.client.list_objects(Bucket=accesspoint_arn) + + def test_presign_signs_with_arn_region(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="us-east-1", config=Config(signature_version="s3v4") + ) + url = self.client.generate_presigned_url( + "get_object", {"Bucket": accesspoint_arn, "Key": "mykey"} + ) + self.assert_signing_region_in_url(url, "us-west-2") + + def test_presign_signs_with_client_region_when_use_arn_region_false(self): + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="us-east-1", + config=Config( + signature_version="s3v4", s3={"use_arn_region": False} + ), + ) + with self.assertRaises(UnsupportedS3AccesspointConfigurationError): + self.client.generate_presigned_url( + "get_object", {"Bucket": accesspoint_arn, "Key": "mykey"} + ) + + def test_copy_source_str_with_accesspoint_arn(self): + copy_source = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint/" + "object/myprefix/myobject" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client() + self.add_copy_object_response(self.http_stubber) + self.client.copy_object( + Bucket="mybucket", Key="mykey", CopySource=copy_source + ) + self.assert_expected_copy_source_header( + self.http_stubber, + expected_copy_source=( + b"arn%3Aaws%3As3%3Aus-west-2%3A123456789012%3Aaccesspoint%3A" + b"myendpoint/object/myprefix/myobject" + ), + ) + + def test_copy_source_str_with_accesspoint_arn_and_version_id(self): + copy_source = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint/" + "object/myprefix/myobject?versionId=myversionid" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client() + self.add_copy_object_response(self.http_stubber) + self.client.copy_object( + Bucket="mybucket", Key="mykey", CopySource=copy_source + ) + self.assert_expected_copy_source_header( + self.http_stubber, + expected_copy_source=( + b"arn%3Aaws%3As3%3Aus-west-2%3A123456789012%3Aaccesspoint%3A" + b"myendpoint/object/myprefix/myobject?versionId=myversionid" + ), + ) + + def test_copy_source_dict_with_accesspoint_arn(self): + copy_source = { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "myprefix/myobject", + } + self.client, self.http_stubber = self.create_stubbed_s3_client() + self.add_copy_object_response(self.http_stubber) + self.client.copy_object( + Bucket="mybucket", Key="mykey", CopySource=copy_source + ) + self.assert_expected_copy_source_header( + self.http_stubber, + expected_copy_source=( + b"arn%3Aaws%3As3%3Aus-west-2%3A123456789012%3Aaccesspoint%3A" + b"myendpoint/object/myprefix/myobject" + ), + ) + + def test_copy_source_dict_with_accesspoint_arn_and_version_id(self): + copy_source = { + "Bucket": "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint", + "Key": "myprefix/myobject", + "VersionId": "myversionid", + } + self.client, self.http_stubber = self.create_stubbed_s3_client() + self.add_copy_object_response(self.http_stubber) + self.client.copy_object( + Bucket="mybucket", Key="mykey", CopySource=copy_source + ) + self.assert_expected_copy_source_header( + self.http_stubber, + expected_copy_source=( + b"arn%3Aaws%3As3%3Aus-west-2%3A123456789012%3Aaccesspoint%3A" + b"myendpoint/object/myprefix/myobject?versionId=myversionid" + ), + ) + + def test_basic_outpost_arn(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:" + "op-01234567890123456:accesspoint:myaccesspoint" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-east-1" + ) + self.http_stubber.add_response() + self.client.list_objects(Bucket=outpost_arn) + request = self.http_stubber.requests[0] + self.assert_signing_name(request, "s3-outposts") + self.assert_signing_region(request, "us-west-2") + expected_endpoint = ( + "myaccesspoint-123456789012.op-01234567890123456." + "s3-outposts.us-west-2.amazonaws.com" + ) + self.assert_endpoint(request, expected_endpoint) + sha_header = request.headers.get("x-amz-content-sha256") + self.assertIsNotNone(sha_header) + self.assertNotEqual(sha_header, b"UNSIGNED-PAYLOAD") + + def test_basic_outpost_arn_custom_endpoint(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:" + "op-01234567890123456:accesspoint:myaccesspoint" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client( + endpoint_url="https://custom.com", region_name="us-east-1" + ) + self.http_stubber.add_response() + self.client.list_objects(Bucket=outpost_arn) + request = self.http_stubber.requests[0] + self.assert_signing_name(request, "s3-outposts") + self.assert_signing_region(request, "us-west-2") + expected_endpoint = ( + "myaccesspoint-123456789012.op-01234567890123456.custom.com" + ) + self.assert_endpoint(request, expected_endpoint) + + def test_outpost_arn_presigned_url(self): + outpost_arn = ( + 'arn:aws:s3-outposts:us-west-2:123456789012:outpost/' + 'op-01234567890123456/accesspoint/myaccesspoint' + ) + expected_url = ( + 'myaccesspoint-123456789012.op-01234567890123456.' + 's3-outposts.us-west-2.amazonaws.com' + ) + expected_credentials = ( + '20210827%2Fus-west-2%2Fs3-outposts%2Faws4_request' + ) + expected_signature = ( + 'a944fbe2bfbae429f922746546d1c6f890649c88ba7826bd1d258ac13f327e09' + ) + config = Config(signature_version='s3v4') + presigned_url = self._get_presigned_url( + outpost_arn, 'us-west-2', config=config + ) + self._assert_presigned_url( + presigned_url, + expected_url, + expected_signature, + expected_credentials, + ) + + def test_outpost_arn_presigned_url_with_use_arn_region(self): + outpost_arn = ( + 'arn:aws:s3-outposts:us-west-2:123456789012:outpost/' + 'op-01234567890123456/accesspoint/myaccesspoint' + ) + expected_url = ( + 'myaccesspoint-123456789012.op-01234567890123456.' + 's3-outposts.us-west-2.amazonaws.com' + ) + expected_credentials = ( + '20210827%2Fus-west-2%2Fs3-outposts%2Faws4_request' + ) + expected_signature = ( + 'a944fbe2bfbae429f922746546d1c6f890649c88ba7826bd1d258ac13f327e09' + ) + config = Config( + signature_version='s3v4', + s3={ + 'use_arn_region': True, + }, + ) + presigned_url = self._get_presigned_url( + outpost_arn, 'us-west-2', config=config + ) + self._assert_presigned_url( + presigned_url, + expected_url, + expected_signature, + expected_credentials, + ) + + def test_outpost_arn_presigned_url_cross_region_arn(self): + outpost_arn = ( + 'arn:aws:s3-outposts:us-east-1:123456789012:outpost/' + 'op-01234567890123456/accesspoint/myaccesspoint' + ) + expected_url = ( + 'myaccesspoint-123456789012.op-01234567890123456.' + 's3-outposts.us-east-1.amazonaws.com' + ) + expected_credentials = ( + '20210827%2Fus-east-1%2Fs3-outposts%2Faws4_request' + ) + expected_signature = ( + '7f93df0b81f80e590d95442d579bd6cf749a35ff4bbdc6373fa669b89c7fce4e' + ) + config = Config( + signature_version='s3v4', + s3={ + 'use_arn_region': True, + }, + ) + presigned_url = self._get_presigned_url( + outpost_arn, 'us-west-2', config=config + ) + self._assert_presigned_url( + presigned_url, + expected_url, + expected_signature, + expected_credentials, + ) + + def test_outpost_arn_with_s3_accelerate(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:" + "op-01234567890123456:accesspoint:myaccesspoint" + ) + self.client, _ = self.create_stubbed_s3_client( + config=Config(s3={"use_accelerate_endpoint": True}) + ) + with self.assertRaises(UnsupportedS3AccesspointConfigurationError): + self.client.list_objects(Bucket=outpost_arn) + + def test_outpost_arn_with_s3_dualstack(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:" + "op-01234567890123456:accesspoint:myaccesspoint" + ) + self.client, _ = self.create_stubbed_s3_client( + config=Config(s3={"use_dualstack_endpoint": True}) + ) + with self.assertRaises(UnsupportedS3AccesspointConfigurationError): + self.client.list_objects(Bucket=outpost_arn) + + def test_incorrect_outpost_format(self): + outpost_arn = "arn:aws:s3-outposts:us-west-2:123456789012:outpost" + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=outpost_arn) + + def test_incorrect_outpost_no_accesspoint(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:" + "op-01234567890123456" + ) + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=outpost_arn) + + def test_incorrect_outpost_resource_format(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:myaccesspoint" + ) + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=outpost_arn) + + def test_incorrect_outpost_sub_resources(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:" + "op-01234567890123456:accesspoint:mybucket:object:foo" + ) + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=outpost_arn) + + def test_incorrect_outpost_invalid_character(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-west-2:123456789012:outpost:" + "op-0123456.890123456:accesspoint:myaccesspoint" + ) + with self.assertRaises(botocore.exceptions.ParamValidationError): + self.client.list_objects(Bucket=outpost_arn) + + def test_s3_object_lambda_arn_with_s3_dualstack(self): + s3_object_lambda_arn = ( + "arn:aws:s3-object-lambda:us-west-2:123456789012:" + "accesspoint/myBanner" + ) + self.client, _ = self.create_stubbed_s3_client( + config=Config(s3={"use_dualstack_endpoint": True}) + ) + with self.assertRaises(UnsupportedS3AccesspointConfigurationError): + self.client.list_objects(Bucket=s3_object_lambda_arn) + + def test_s3_object_lambda_fips_raise_for_cross_region(self): + s3_object_lambda_arn = ( + "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:123456789012:" + "accesspoint/mybanner" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="fips-us-gov-west-1", + config=Config(s3={"use_arn_region": False}), + ) + expected_exception = UnsupportedS3AccesspointConfigurationError + with self.assertRaises(expected_exception): + self.client.list_objects(Bucket=s3_object_lambda_arn) + + def test_s3_object_lambda_with_global_regions(self): + s3_object_lambda_arn = ( + "arn:aws:s3-object-lambda:us-east-1:123456789012:" + "accesspoint/mybanner" + ) + expected_exception = UnsupportedS3AccesspointConfigurationError + for region in ("aws-global", "s3-external-1"): + self.client, _ = self.create_stubbed_s3_client( + region_name=region, config=Config(s3={"use_arn_region": False}) + ) + with self.assertRaises(expected_exception): + self.client.list_objects(Bucket=s3_object_lambda_arn) + + def test_s3_object_lambda_arn_with_us_east_1(self): + # test that us-east-1 region is not resolved + # into s3 global endpoint + s3_object_lambda_arn = ( + "arn:aws:s3-object-lambda:us-east-1:123456789012:" + "accesspoint/myBanner" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-east-1", + config=Config(s3={"use_arn_region": False}), + ) + self.http_stubber.add_response() + self.client.list_objects(Bucket=s3_object_lambda_arn) + request = self.http_stubber.requests[0] + self.assert_signing_name(request, "s3-object-lambda") + self.assert_signing_region(request, "us-east-1") + expected_endpoint = ( + "myBanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com" + ) + self.assert_endpoint(request, expected_endpoint) + + def test_basic_s3_object_lambda_arn(self): + s3_object_lambda_arn = ( + "arn:aws:s3-object-lambda:us-west-2:123456789012:" + "accesspoint/myBanner" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-east-1" + ) + self.http_stubber.add_response() + self.client.list_objects(Bucket=s3_object_lambda_arn) + request = self.http_stubber.requests[0] + self.assert_signing_name(request, "s3-object-lambda") + self.assert_signing_region(request, "us-west-2") + expected_endpoint = ( + "myBanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com" + ) + self.assert_endpoint(request, expected_endpoint) + sha_header = request.headers.get("x-amz-content-sha256") + self.assertIsNotNone(sha_header) + self.assertNotEqual(sha_header, b"UNSIGNED-PAYLOAD") + + def test_outposts_raise_exception_if_fips_region(self): + outpost_arn = ( + "arn:aws:s3-outposts:us-gov-east-1:123456789012:outpost:" + "op-01234567890123456:accesspoint:myaccesspoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="fips-east-1" + ) + expected_exception = UnsupportedS3AccesspointConfigurationError + with self.assertRaises(expected_exception): + self.client.list_objects(Bucket=outpost_arn) + + def test_accesspoint_fips_raise_for_cross_region(self): + s3_accesspoint_arn = ( + "arn:aws-us-gov:s3:us-gov-east-1:123456789012:" + "accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="fips-us-gov-west-1", + config=Config(s3={"use_arn_region": False}), + ) + expected_exception = UnsupportedS3AccesspointConfigurationError + with self.assertRaises(expected_exception): + self.client.list_objects(Bucket=s3_accesspoint_arn) + + def test_accesspoint_fips_raise_if_fips_in_arn(self): + s3_accesspoint_arn = ( + "arn:aws-us-gov:s3:fips-us-gov-west-1:123456789012:" + "accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="fips-us-gov-west-1", + ) + expected_exception = UnsupportedS3AccesspointConfigurationError + with self.assertRaises(expected_exception): + self.client.list_objects(Bucket=s3_accesspoint_arn) + + def test_accesspoint_with_global_regions(self): + s3_accesspoint_arn = ( + "arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint" + ) + self.client, _ = self.create_stubbed_s3_client( + region_name="aws-global", + config=Config(s3={"use_arn_region": False}), + ) + expected_exception = UnsupportedS3AccesspointConfigurationError + with self.assertRaises(expected_exception): + self.client.list_objects(Bucket=s3_accesspoint_arn) + + # It shouldn't raise if use_arn_region is True + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="s3-external-1", + config=Config(s3={"use_arn_region": True}), + ) + + self.http_stubber.add_response() + self.client.list_objects(Bucket=s3_accesspoint_arn) + request = self.http_stubber.requests[0] + expected_endpoint = ( + "myendpoint-123456789012.s3-accesspoint." "us-east-1.amazonaws.com" + ) + self.assert_endpoint(request, expected_endpoint) + + # It shouldn't raise if no use_arn_region is specified since + # use_arn_region defaults to True + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="s3-external-1", + ) + + self.http_stubber.add_response() + self.client.list_objects(Bucket=s3_accesspoint_arn) + request = self.http_stubber.requests[0] + expected_endpoint = ( + "myendpoint-123456789012.s3-accesspoint." "us-east-1.amazonaws.com" + ) + self.assert_endpoint(request, expected_endpoint) + + @requires_crt() + def test_mrap_arn_with_client_regions(self): + mrap_arn = "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + region_tests = [ + ( + "us-east-1", + "mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com", + ), + ( + "us-west-2", + "mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com", + ), + ( + "aws-global", + "mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com", + ), + ] + for region, expected in region_tests: + self._assert_mrap_endpoint(mrap_arn, region, expected) + + @requires_crt() + def test_mrap_arn_with_other_partition(self): + mrap_arn = "arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + expected = "mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com.cn" + self._assert_mrap_endpoint(mrap_arn, "cn-north-1", expected) + + @requires_crt() + def test_mrap_arn_with_invalid_s3_configs(self): + mrap_arn = "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + config_tests = [ + ("us-west-2", Config(s3={"use_dualstack_endpoint": True})), + ("us-west-2", Config(s3={"use_accelerate_endpoint": True})), + ] + for region, config in config_tests: + self._assert_mrap_config_failure(mrap_arn, region, config=config) + + @requires_crt() + def test_mrap_arn_with_disable_config_enabled(self): + mrap_arn = "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + config = Config(s3={"s3_disable_multiregion_access_points": True}) + for region in ("us-west-2", "aws-global"): + self._assert_mrap_config_failure(mrap_arn, region, config) + + @requires_crt() + def test_mrap_arn_with_disable_config_enabled_custom_endpoint(self): + mrap_arn = "arn:aws:s3::123456789012:accesspoint:myendpoint" + config = Config(s3={"s3_disable_multiregion_access_points": True}) + self._assert_mrap_config_failure(mrap_arn, "us-west-2", config) + + @requires_crt() + def test_mrap_arn_with_disable_config_disabled(self): + mrap_arn = "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + config = Config(s3={"s3_disable_multiregion_access_points": False}) + expected = "mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com" + self._assert_mrap_endpoint( + mrap_arn, "us-west-2", expected, config=config + ) + + @requires_crt() + def test_global_arn_without_mrap_suffix(self): + global_arn_tests = [ + ( + "arn:aws:s3::123456789012:accesspoint:myendpoint", + "myendpoint.accesspoint.s3-global.amazonaws.com", + ), + ( + "arn:aws:s3::123456789012:accesspoint:my.bucket", + "my.bucket.accesspoint.s3-global.amazonaws.com", + ), + ] + for arn, expected in global_arn_tests: + self._assert_mrap_endpoint(arn, "us-west-2", expected) + + @requires_crt() + def test_mrap_signing_algorithm_is_sigv4a(self): + s3_accesspoint_arn = ( + "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + ) + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-west-2" + ) + self.http_stubber.add_response() + self.client.list_objects(Bucket=s3_accesspoint_arn) + request = self.http_stubber.requests[0] + self._assert_sigv4a_used(request.headers) + + @requires_crt() + def test_mrap_presigned_url(self): + mrap_arn = "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + config = Config(s3={"s3_disable_multiregion_access_points": False}) + expected_url = "mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com" + self._assert_mrap_presigned_url( + mrap_arn, "us-west-2", expected_url, config=config + ) + + @requires_crt() + def test_mrap_presigned_url_disabled(self): + mrap_arn = "arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap" + config = Config(s3={"s3_disable_multiregion_access_points": True}) + self._assert_mrap_config_presigned_failure( + mrap_arn, "us-west-2", config + ) + + def _assert_mrap_config_failure(self, arn, region, config): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name=region, config=config + ) + with self.assertRaises( + botocore.exceptions.UnsupportedS3AccesspointConfigurationError + ): + self.client.list_objects(Bucket=arn) + + @FreezeTime(botocore.auth.datetime, date=DATE) + def _get_presigned_url(self, arn, region, config=None, endpoint_url=None): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name=region, + endpoint_url=endpoint_url, + config=config, + aws_access_key_id='ACCESS_KEY_ID', + aws_secret_access_key='SECRET_ACCESS_KEY', + ) + presigned_url = self.client.generate_presigned_url( + 'get_object', Params={'Bucket': arn, 'Key': 'obj'}, ExpiresIn=900 + ) + return presigned_url + + def _assert_presigned_url( + self, + presigned_url, + expected_url, + expected_signature, + expected_credentials, + ): + url_parts = urlsplit(presigned_url) + assert url_parts.netloc == expected_url + query_strs = url_parts.query.split('&') + query_parts = dict(part.split('=') for part in query_strs) + assert expected_signature == query_parts['X-Amz-Signature'] + assert expected_credentials in query_parts['X-Amz-Credential'] + + def _assert_mrap_presigned_url( + self, arn, region, expected, endpoint_url=None, config=None + ): + presigned_url = self._get_presigned_url( + arn, region, endpoint_url=endpoint_url, config=config + ) + url_parts = urlsplit(presigned_url) + self.assertEqual(expected, url_parts.hostname) + # X-Amz-Region-Set header MUST be * (percent-encoded as %2A) for MRAPs + self.assertIn("X-Amz-Region-Set=%2A", url_parts.query) + + def _assert_mrap_config_presigned_failure(self, arn, region, config): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name=region, config=config + ) + with self.assertRaises( + botocore.exceptions.UnsupportedS3AccesspointConfigurationError + ): + self.client.generate_presigned_url( + "get_object", Params={"Bucket": arn, "Key": "test_object"} + ) + + def _assert_mrap_endpoint( + self, arn, region, expected, endpoint_url=None, config=None + ): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name=region, endpoint_url=endpoint_url, config=config + ) + self.http_stubber.add_response() + self.client.list_objects(Bucket=arn) + request = self.http_stubber.requests[0] + self.assert_endpoint(request, expected) + # MRAP requests MUST include a global signing region stored in the + # X-Amz-Region-Set header as *. + self.assert_header_matches(request, "X-Amz-Region-Set", b"*") + + def _assert_sigv4a_used(self, headers): + self.assertIn( + b"AWS4-ECDSA-P256-SHA256", headers.get("Authorization", "") + ) + + +class TestOnlyAsciiCharsAllowed(BaseS3OperationTest): + def test_validates_non_ascii_chars_trigger_validation_error(self): + self.http_stubber.add_response() + with self.http_stubber: + with self.assertRaises(ParamValidationError): + self.client.put_object( + Bucket="foo", + Key="bar", + Metadata={"goodkey": "good", "non-ascii": "\u2713"}, + ) + + +class TestS3GetBucketLifecycle(BaseS3OperationTest): + def test_multiple_transitions_returns_one(self): + response_body = ( + b'' + b'' + b" " + b" transitionRule" + b" foo" + b" Enabled" + b" " + b" 40" + b" STANDARD_IA" + b" " + b" " + b" 70" + b" GLACIER" + b" " + b" " + b" " + b" noncurrentVersionRule" + b" bar" + b" Enabled" + b" " + b" 40" + b" STANDARD_IA" + b" " + b" " + b" 70" + b" GLACIER" + b" " + b" " + b"" + ) + s3 = self.session.create_client("s3") + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response(body=response_body) + response = s3.get_bucket_lifecycle(Bucket="mybucket") + # Each Transition member should have at least one of the + # transitions provided. + self.assertEqual( + response["Rules"][0]["Transition"], + {"Days": 40, "StorageClass": "STANDARD_IA"}, + ) + self.assertEqual( + response["Rules"][1]["NoncurrentVersionTransition"], + {"NoncurrentDays": 40, "StorageClass": "STANDARD_IA"}, + ) + + +class TestS3PutObject(BaseS3OperationTest): + def test_500_error_with_non_xml_body(self): + # Note: This exact tesdict may not be applicable from + # an integration standpoint if the issue is fixed in the future. + # + # The issue is that: + # S3 returns a 200 response but the received response from urllib3 has + # a 500 status code and the headers are in the body of the + # the response. Botocore will try to parse out the error body as xml, + # but the body is invalid xml because it is full of headers. + # So instead of blowing up on an XML parsing error, we + # should at least use the 500 status code because that can be + # retried. + # + # We are unsure of what exactly causes the response to be mangled + # but we expect it to be how 100 continues are handled. + non_xml_content = ( + b"x-amz-id-2: foo\r\n" + b"x-amz-request-id: bar\n" + b"Date: Tue, 06 Oct 2015 03:20:38 GMT\r\n" + b'ETag: "a6d856bc171fc6aa1b236680856094e2"\r\n' + b"Content-Length: 0\r\n" + b"Server: AmazonS3\r\n" + ) + s3 = self.session.create_client("s3") + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response(status=500, body=non_xml_content) + http_stubber.add_response() + response = s3.put_object( + Bucket="mybucket", Key="mykey", Body=b"foo" + ) + # The first response should have been retried even though the xml is + # invalid and eventually return the 200 response. + self.assertEqual( + response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + self.assertEqual(len(http_stubber.requests), 2) + + +class TestS3ExpiresHeaderResponse(BaseS3OperationTest): + def test_valid_expires_value_in_response(self): + expires_value = "Thu, 01 Jan 1970 00:00:00 GMT" + mock_headers = {'expires': expires_value} + s3 = self.session.create_client("s3") + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response(headers=mock_headers) + response = s3.get_object(Bucket='mybucket', Key='mykey') + self.assertEqual( + response.get('Expires'), + datetime.datetime(1970, 1, 1, tzinfo=tzutc()), + ) + self.assertEqual(response.get('ExpiresString'), expires_value) + + def test_invalid_expires_value_in_response(self): + expires_value = "Invalid Date" + mock_headers = {'expires': expires_value} + warning_msg = 'Failed to parse the "Expires" member as a timestamp' + s3 = self.session.create_client("s3") + with self.assertLogs('botocore.handlers', level='WARNING') as log: + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response(headers=mock_headers) + response = s3.get_object(Bucket='mybucket', Key='mykey') + self.assertNotIn( + 'expires', + response.get('ResponseMetadata').get('HTTPHeaders'), + ) + self.assertNotIn('Expires', response) + self.assertEqual(response.get('ExpiresString'), expires_value) + self.assertTrue( + any(warning_msg in entry for entry in log.output), + f'Expected warning message not found in logs. Logs: {log.output}', + ) + + +class TestWriteGetObjectResponse(BaseS3ClientConfigurationTest): + def create_stubbed_s3_client(self, **kwargs): + client = self.create_s3_client(**kwargs) + http_stubber = ClientHTTPStubber(client) + http_stubber.start() + return client, http_stubber + + def test_endpoint_redirection(self): + regions = ["us-west-2", "us-east-1"] + for region in regions: + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name=region + ) + self.http_stubber.add_response() + self.client.write_get_object_response( + RequestRoute="endpoint-io.a1c1d5c7", + RequestToken="SecretToken", + ) + request = self.http_stubber.requests[0] + self.assert_signing_name(request, "s3-object-lambda") + self.assert_signing_region(request, region) + expected_endpoint = ( + "endpoint-io.a1c1d5c7.s3-object-lambda." + f"{region}.amazonaws.com" + ) + self.assert_endpoint(request, expected_endpoint) + + def test_endpoint_redirection_fails_with_custom_endpoint(self): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-west-2", endpoint_url="https://example.com" + ) + self.http_stubber.add_response() + self.client.write_get_object_response( + RequestRoute="endpoint-io.a1c1d5c7", + RequestToken="SecretToken", + ) + request = self.http_stubber.requests[0] + self.assert_signing_name(request, "s3-object-lambda") + self.assert_signing_region(request, "us-west-2") + self.assert_endpoint(request, "endpoint-io.a1c1d5c7.example.com") + + def test_endpoint_redirection_fails_with_accelerate_endpoint(self): + config = Config(s3={"use_accelerate_endpoint": True}) + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-west-2", + config=config, + ) + self.http_stubber.add_response() + with self.assertRaises(UnsupportedS3ConfigurationError): + self.client.write_get_object_response( + RequestRoute="endpoint-io.a1c1d5c7", + RequestToken="SecretToken", + ) + + def test_invalid_request_route_raises(self): + self.client, self.http_stubber = self.create_stubbed_s3_client( + region_name="us-west-2" + ) + self.http_stubber.add_response() + with self.assertRaises(ParamValidationError): + self.client.write_get_object_response( + RequestRoute="my-route/", + RequestToken="SecretToken", + ) + + +class TestS3SigV4(BaseS3OperationTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client( + "s3", self.region, config=Config(signature_version="s3v4") + ) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + + def get_sent_headers(self): + return self.http_stubber.requests[0].headers + + def test_content_md5_set(self): + with self.http_stubber: + self.client.put_object(Bucket="foo", Key="bar", Body="baz") + self.assertIn("content-md5", self.get_sent_headers()) + + def test_content_md5_set_empty_body(self): + with self.http_stubber: + self.client.put_object(Bucket="foo", Key="bar", Body="") + self.assertIn("content-md5", self.get_sent_headers()) + + def test_content_md5_set_empty_file(self): + with self.http_stubber: + with temporary_file("rb") as f: + assert f.read() == b"" + self.client.put_object(Bucket="foo", Key="bar", Body=f) + self.assertIn("content-md5", self.get_sent_headers()) + + def test_content_sha256_set_if_config_value_is_true(self): + # By default, put_object() does not include an x-amz-content-sha256 + # header because it also includes a `Content-MD5` header. The + # `payload_signing_enabled` config overrides this logic and forces the + # header. + config = Config( + signature_version="s3v4", s3={"payload_signing_enabled": True} + ) + self.client = self.session.create_client( + "s3", self.region, config=config + ) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + with self.http_stubber: + self.client.put_object(Bucket="foo", Key="bar", Body="baz") + sent_headers = self.get_sent_headers() + sha_header = sent_headers.get("x-amz-content-sha256") + self.assertNotEqual(sha_header, b"UNSIGNED-PAYLOAD") + + def test_content_sha256_not_set_if_config_value_is_false(self): + config = Config( + signature_version="s3v4", s3={"payload_signing_enabled": False} + ) + self.client = self.session.create_client( + "s3", self.region, config=config + ) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + with self.http_stubber: + self.client.put_object(Bucket="foo", Key="bar", Body="baz") + sent_headers = self.get_sent_headers() + sha_header = sent_headers.get("x-amz-content-sha256") + self.assertEqual(sha_header, b"UNSIGNED-PAYLOAD") + + def test_content_sha256_set_if_config_value_not_set_put_object(self): + # The default behavior matches payload_signing_enabled=False. For + # operations where the `Content-MD5` is present this means that + # `x-amz-content-sha256` is present but not set. + config = Config(signature_version="s3v4") + self.client = self.session.create_client( + "s3", self.region, config=config + ) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + with self.http_stubber: + self.client.put_object(Bucket="foo", Key="bar", Body="baz") + sent_headers = self.get_sent_headers() + sha_header = sent_headers.get("x-amz-content-sha256") + self.assertEqual(sha_header, b"UNSIGNED-PAYLOAD") + + def test_content_sha256_set_if_config_value_not_set_list_objects(self): + # The default behavior matches payload_signing_enabled=False. For + # operations where the `Content-MD5` is not present, this means that + # `x-amz-content-sha256` is present and set. + config = Config(signature_version="s3v4") + self.client = self.session.create_client( + "s3", self.region, config=config + ) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + with self.http_stubber: + self.client.list_objects(Bucket="foo") + sent_headers = self.get_sent_headers() + sha_header = sent_headers.get("x-amz-content-sha256") + self.assertIsNotNone(sha_header) + self.assertNotEqual(sha_header, b"UNSIGNED-PAYLOAD") + + def test_content_sha256_set_s3_on_outpost(self): + # S3 on Outpost bucket names should behave the same way. + config = Config(signature_version="s3v4") + bucket = ( + 'test-accessp-e0000075431d83bebde8xz5w8ijx1qzlbp3i3kuse10--op-s3' + ) + self.client = self.session.create_client( + "s3", self.region, config=config + ) + self.http_stubber = ClientHTTPStubber(self.client) + self.http_stubber.add_response() + with self.http_stubber: + self.client.list_objects(Bucket=bucket) + sent_headers = self.get_sent_headers() + sha_header = sent_headers.get("x-amz-content-sha256") + self.assertNotEqual(sha_header, b"UNSIGNED-PAYLOAD") + + def test_content_sha256_set_if_md5_is_unavailable(self): + with mock.patch("botocore.compat.MD5_AVAILABLE", False): + with mock.patch("botocore.utils.MD5_AVAILABLE", False): + with self.http_stubber: + self.client.put_object(Bucket="foo", Key="bar", Body="baz") + sent_headers = self.get_sent_headers() + unsigned = "UNSIGNED-PAYLOAD" + self.assertNotEqual(sent_headers["x-amz-content-sha256"], unsigned) + self.assertNotIn("content-md5", sent_headers) + + +class TestCanSendIntegerHeaders(BaseSessionTest): + def test_int_values_with_sigv4(self): + s3 = self.session.create_client( + "s3", config=Config(signature_version="s3v4") + ) + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response() + s3.upload_part( + Bucket="foo", + Key="bar", + Body=b"foo", + UploadId="bar", + PartNumber=1, + ContentLength=3, + ) + headers = http_stubber.requests[0].headers + # Verify that the request integer value of 3 has been converted to + # string '3'. This also means we've made it pass the signer which + # expects string values in order to sign properly. + self.assertEqual(headers["Content-Length"], b"3") + + +class TestRegionRedirect(BaseS3OperationTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client( + "s3", + "us-west-2", + config=Config( + signature_version="s3v4", + s3={"addressing_style": "path"}, + ), + ) + self.http_stubber = ClientHTTPStubber(self.client) + + self.redirect_response = { + "status": 301, + "headers": {"x-amz-bucket-region": "eu-central-1"}, + "body": ( + b'\n' + b"" + b" PermanentRedirect" + b" The bucket you are attempting to access must be" + b" addressed using the specified endpoint. Please send " + b" all future requests to this endpoint." + b" " + b" foo" + b" foo.s3.eu-central-1.amazonaws.com" + b"" + ), + } + self.bad_signing_region_response = { + "status": 400, + "headers": {"x-amz-bucket-region": "eu-central-1"}, + "body": ( + b'' + b"" + b" AuthorizationHeaderMalformed" + b" the region us-west-2 is wrong; " + b"expecting eu-central-1" + b" eu-central-1" + b" BD9AA1730D454E39" + b" " + b"" + ), + } + self.success_response = { + "status": 200, + "headers": {}, + "body": ( + b'\n' + b"" + b" foo" + b" " + b" " + b" 1000" + b" url" + b" false" + b"" + ), + } + + def test_region_redirect(self): + self.http_stubber.add_response(**self.redirect_response) + self.http_stubber.add_response(**self.success_response) + with self.http_stubber: + response = self.client.list_objects(Bucket="foo") + self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 200) + self.assertEqual(len(self.http_stubber.requests), 2) + + initial_url = ( + "https://s3.us-west-2.amazonaws.com/foo" "?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[0].url, initial_url) + + fixed_url = ( + "https://s3.eu-central-1.amazonaws.com/foo" "?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[1].url, fixed_url) + + def test_region_redirect_cache(self): + self.http_stubber.add_response(**self.redirect_response) + self.http_stubber.add_response(**self.success_response) + self.http_stubber.add_response(**self.success_response) + + with self.http_stubber: + first_response = self.client.list_objects(Bucket="foo") + second_response = self.client.list_objects(Bucket="foo") + + self.assertEqual( + first_response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + self.assertEqual( + second_response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + + self.assertEqual(len(self.http_stubber.requests), 3) + initial_url = ( + "https://s3.us-west-2.amazonaws.com/foo" "?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[0].url, initial_url) + + fixed_url = ( + "https://s3.eu-central-1.amazonaws.com/foo" "?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[1].url, fixed_url) + self.assertEqual(self.http_stubber.requests[2].url, fixed_url) + + def test_resign_request_with_region_when_needed(self): + # Create a client with no explicit configuration so we can + # verify the default behavior. + client = self.session.create_client("s3", "us-west-2") + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(**self.bad_signing_region_response) + http_stubber.add_response(**self.success_response) + first_response = client.list_objects(Bucket="foo") + self.assertEqual( + first_response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + + self.assertEqual(len(http_stubber.requests), 2) + initial_url = ( + "https://foo.s3.us-west-2.amazonaws.com/" "?encoding-type=url" + ) + self.assertEqual(http_stubber.requests[0].url, initial_url) + + fixed_url = ( + "https://foo.s3.eu-central-1.amazonaws.com/" + "?encoding-type=url" + ) + self.assertEqual(http_stubber.requests[1].url, fixed_url) + + def test_resign_request_in_us_east_1(self): + region_headers = {"x-amz-bucket-region": "eu-central-1"} + + # Verify that the default behavior in us-east-1 will redirect + client = self.session.create_client("s3", "us-east-1") + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(status=400) + http_stubber.add_response(status=400, headers=region_headers) + http_stubber.add_response(headers=region_headers) + http_stubber.add_response() + response = client.head_object(Bucket="foo", Key="bar") + self.assertEqual( + response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + + self.assertEqual(len(http_stubber.requests), 4) + initial_url = "https://foo.s3.amazonaws.com/bar" + self.assertEqual(http_stubber.requests[0].url, initial_url) + + fixed_url = "https://foo.s3.eu-central-1.amazonaws.com/bar" + self.assertEqual(http_stubber.requests[-1].url, fixed_url) + + def test_resign_request_in_us_east_1_fails(self): + region_headers = {"x-amz-bucket-region": "eu-central-1"} + + # Verify that the final 400 response is propagated + # back to the user. + client = self.session.create_client("s3", "us-east-1") + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(status=400) + http_stubber.add_response(status=400, headers=region_headers) + http_stubber.add_response(headers=region_headers) + # The final request still fails with a 400. + http_stubber.add_response(status=400) + with self.assertRaises(ClientError): + client.head_object(Bucket="foo", Key="bar") + self.assertEqual(len(http_stubber.requests), 4) + + def test_no_region_redirect_for_accesspoint(self): + self.http_stubber.add_response(**self.redirect_response) + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + with self.http_stubber: + try: + self.client.list_objects(Bucket=accesspoint_arn) + except self.client.exceptions.ClientError as e: + self.assertEqual( + e.response["Error"]["Code"], "PermanentRedirect" + ) + else: + self.fail("PermanentRedirect error should have been raised") + + +class TestFipsRegionRedirect(BaseS3OperationTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client( + "s3", + "fips-us-west-2", + config=Config(signature_version="s3v4"), + ) + self.http_stubber = ClientHTTPStubber(self.client) + + self.redirect_response = { + "status": 301, + "headers": {"x-amz-bucket-region": "us-west-1"}, + "body": ( + b'\n' + b"" + b" PermanentRedirect" + b" The bucket you are attempting to access must be" + b" addressed using the specified endpoint. Please send " + b" all future requests to this endpoint." + b" " + b" foo" + b" foo.s3-fips.us-west-1.amazonaws.com" + b"" + ), + } + self.success_response = { + "status": 200, + "headers": {}, + "body": ( + b'\n' + b"" + b" foo" + b" " + b" " + b" 1000" + b" url" + b" false" + b"" + ), + } + self.bad_signing_region_response = { + "status": 400, + "headers": {"x-amz-bucket-region": "us-west-1"}, + "body": ( + b'' + b"" + b" AuthorizationHeaderMalformed" + b" the region us-west-2 is wrong; " + b"expecting us-west-1" + b" us-west-1" + b" BD9AA1730D454E39" + b" " + b"" + ), + } + + def test_fips_region_redirect(self): + self.http_stubber.add_response(**self.redirect_response) + self.http_stubber.add_response(**self.success_response) + with self.http_stubber: + response = self.client.list_objects(Bucket="foo") + self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 200) + self.assertEqual(len(self.http_stubber.requests), 2) + + initial_url = ( + "https://foo.s3-fips.us-west-2.amazonaws.com/?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[0].url, initial_url) + + fixed_url = ( + "https://foo.s3-fips.us-west-1.amazonaws.com/?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[1].url, fixed_url) + + def test_fips_region_redirect_cache(self): + self.http_stubber.add_response(**self.redirect_response) + self.http_stubber.add_response(**self.success_response) + self.http_stubber.add_response(**self.success_response) + + with self.http_stubber: + first_response = self.client.list_objects(Bucket="foo") + second_response = self.client.list_objects(Bucket="foo") + + self.assertEqual( + first_response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + self.assertEqual( + second_response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + + self.assertEqual(len(self.http_stubber.requests), 3) + initial_url = ( + "https://foo.s3-fips.us-west-2.amazonaws.com/?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[0].url, initial_url) + + fixed_url = ( + "https://foo.s3-fips.us-west-1.amazonaws.com/?encoding-type=url" + ) + self.assertEqual(self.http_stubber.requests[1].url, fixed_url) + self.assertEqual(self.http_stubber.requests[2].url, fixed_url) + + def test_fips_resign_request_with_region_when_needed(self): + # Create a client with no explicit configuration so we can + # verify the default behavior. + client = self.session.create_client("s3", "fips-us-west-2") + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(**self.bad_signing_region_response) + http_stubber.add_response(**self.success_response) + first_response = client.list_objects(Bucket="foo") + self.assertEqual( + first_response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + + self.assertEqual(len(http_stubber.requests), 2) + initial_url = ( + "https://foo.s3-fips.us-west-2.amazonaws.com/" + "?encoding-type=url" + ) + self.assertEqual(http_stubber.requests[0].url, initial_url) + + fixed_url = ( + "https://foo.s3-fips.us-west-1.amazonaws.com/" + "?encoding-type=url" + ) + self.assertEqual(http_stubber.requests[1].url, fixed_url) + + def test_fips_resign_request_in_us_east_1(self): + region_headers = {"x-amz-bucket-region": "us-east-2"} + + # Verify that the default behavior in us-east-1 will redirect + client = self.session.create_client("s3", "fips-us-east-1") + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(status=400) + http_stubber.add_response(status=400, headers=region_headers) + http_stubber.add_response(headers=region_headers) + http_stubber.add_response() + response = client.head_object(Bucket="foo", Key="bar") + self.assertEqual( + response["ResponseMetadata"]["HTTPStatusCode"], 200 + ) + + self.assertEqual(len(http_stubber.requests), 4) + initial_url = "https://foo.s3-fips.us-east-1.amazonaws.com/bar" + self.assertEqual(http_stubber.requests[0].url, initial_url) + + fixed_url = "https://foo.s3-fips.us-east-2.amazonaws.com/bar" + self.assertEqual(http_stubber.requests[-1].url, fixed_url) + + def test_fips_resign_request_in_us_east_1_fails(self): + region_headers = {"x-amz-bucket-region": "us-east-2"} + + # Verify that the final 400 response is propagated + # back to the user. + client = self.session.create_client("s3", "fips-us-east-1") + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(status=400) + http_stubber.add_response(status=400, headers=region_headers) + http_stubber.add_response(headers=region_headers) + # The final request still fails with a 400. + http_stubber.add_response(status=400) + with self.assertRaises(ClientError): + client.head_object(Bucket="foo", Key="bar") + self.assertEqual(len(http_stubber.requests), 4) + + def test_fips_no_region_redirect_for_accesspoint(self): + self.http_stubber.add_response(**self.redirect_response) + accesspoint_arn = ( + "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" + ) + with self.http_stubber: + try: + self.client.list_objects(Bucket=accesspoint_arn) + except self.client.exceptions.ClientError as e: + self.assertEqual( + e.response["Error"]["Code"], "PermanentRedirect" + ) + else: + self.fail("PermanentRedirect error should have been raised") + + +class TestGeneratePresigned(BaseS3OperationTest): + def assert_is_v2_presigned_url(self, url): + qs_components = parse_qs(urlsplit(url).query) + # Assert that it looks like a v2 presigned url by asserting it does + # not have a couple of the v4 qs components and assert that it has the + # v2 Signature component. + self.assertNotIn("X-Amz-Credential", qs_components) + self.assertNotIn("X-Amz-Algorithm", qs_components) + self.assertIn("Signature", qs_components) + + def test_generate_unauthed_url(self): + config = Config(signature_version=botocore.UNSIGNED) + client = self.session.create_client("s3", self.region, config=config) + url = client.generate_presigned_url( + ClientMethod="get_object", Params={"Bucket": "foo", "Key": "bar"} + ) + self.assertEqual(url, "https://foo.s3.amazonaws.com/bar") + + def test_generate_unauthed_post(self): + config = Config(signature_version=botocore.UNSIGNED) + client = self.session.create_client("s3", self.region, config=config) + parts = client.generate_presigned_post(Bucket="foo", Key="bar") + expected = { + "fields": {"key": "bar"}, + "url": "https://foo.s3.amazonaws.com/", + } + self.assertEqual(parts, expected) + + def test_default_presign_uses_sigv2(self): + url = self.client.generate_presigned_url(ClientMethod="list_buckets") + self.assertNotIn("Algorithm=AWS4-HMAC-SHA256", url) + + def test_sigv4_presign(self): + config = Config(signature_version="s3v4") + client = self.session.create_client("s3", self.region, config=config) + url = client.generate_presigned_url(ClientMethod="list_buckets") + self.assertIn("Algorithm=AWS4-HMAC-SHA256", url) + + def test_sigv2_presign(self): + config = Config(signature_version="s3") + client = self.session.create_client("s3", self.region, config=config) + url = client.generate_presigned_url(ClientMethod="list_buckets") + self.assertNotIn("Algorithm=AWS4-HMAC-SHA256", url) + + def test_uses_sigv4_for_unknown_region(self): + client = self.session.create_client("s3", "us-west-88") + url = client.generate_presigned_url(ClientMethod="list_buckets") + self.assertIn("Algorithm=AWS4-HMAC-SHA256", url) + + def test_default_presign_sigv4_in_sigv4_only_region(self): + client = self.session.create_client("s3", "us-east-2") + url = client.generate_presigned_url(ClientMethod="list_buckets") + self.assertIn("Algorithm=AWS4-HMAC-SHA256", url) + + def test_presign_unsigned(self): + config = Config(signature_version=botocore.UNSIGNED) + client = self.session.create_client("s3", "us-east-2", config=config) + url = client.generate_presigned_url(ClientMethod="list_buckets") + self.assertEqual("https://s3.amazonaws.com/", url) + + def test_presign_url_with_ssec(self): + config = Config(signature_version="s3") + client = self.session.create_client("s3", "us-east-1", config=config) + url = client.generate_presigned_url( + ClientMethod="get_object", + Params={ + "Bucket": "mybucket", + "Key": "mykey", + "SSECustomerKey": "a" * 32, + "SSECustomerAlgorithm": "AES256", + }, + ) + # The md5 of the sse-c key will be injected when parameters are + # built so it should show up in the presigned url as well. + self.assertIn("x-amz-server-side-encryption-customer-key-md5=", url) + + def test_presign_s3_accelerate(self): + config = Config( + signature_version=botocore.UNSIGNED, + s3={"use_accelerate_endpoint": True}, + ) + client = self.session.create_client("s3", "us-east-1", config=config) + url = client.generate_presigned_url( + ClientMethod="get_object", + Params={"Bucket": "mybucket", "Key": "mykey"}, + ) + # The url should be the accelerate endpoint + self.assertEqual( + "https://mybucket.s3-accelerate.amazonaws.com/mykey", url + ) + + def test_presign_s3_accelerate_fails_with_fips(self): + config = Config( + signature_version=botocore.UNSIGNED, + s3={"use_accelerate_endpoint": True}, + ) + client = self.session.create_client( + "s3", "fips-us-east-1", config=config + ) + expected_exception = UnsupportedS3ConfigurationError + with self.assertRaisesRegex( + expected_exception, "Accelerate cannot be used with FIPS" + ): + client.generate_presigned_url( + ClientMethod="get_object", + Params={"Bucket": "mybucket", "Key": "mykey"}, + ) + + def test_presign_post_s3_accelerate(self): + config = Config( + signature_version=botocore.UNSIGNED, + s3={"use_accelerate_endpoint": True}, + ) + client = self.session.create_client("s3", "us-east-1", config=config) + parts = client.generate_presigned_post(Bucket="mybucket", Key="mykey") + # The url should be the accelerate endpoint + expected = { + "fields": {"key": "mykey"}, + "url": "https://mybucket.s3-accelerate.amazonaws.com/", + } + self.assertEqual(parts, expected) + + def test_presign_uses_v2_for_aws_global(self): + client = self.session.create_client("s3", "aws-global") + url = client.generate_presigned_url( + "get_object", {"Bucket": "mybucket", "Key": "mykey"} + ) + self.assert_is_v2_presigned_url(url) + + def test_presign_uses_v2_for_default_region_with_us_east_1_regional(self): + config = Config(s3={"us_east_1_regional_endpoint": "regional"}) + client = self.session.create_client("s3", config=config) + url = client.generate_presigned_url( + "get_object", {"Bucket": "mybucket", "Key": "mykey"} + ) + self.assert_is_v2_presigned_url(url) + + def test_presign_uses_v2_for_aws_global_with_us_east_1_regional(self): + config = Config(s3={"us_east_1_regional_endpoint": "regional"}) + client = self.session.create_client("s3", "aws-global", config=config) + url = client.generate_presigned_url( + "get_object", {"Bucket": "mybucket", "Key": "mykey"} + ) + self.assert_is_v2_presigned_url(url) + + def test_presign_uses_v2_for_us_east_1(self): + client = self.session.create_client("s3", "us-east-1") + url = client.generate_presigned_url( + "get_object", {"Bucket": "mybucket", "Key": "mykey"} + ) + self.assert_is_v2_presigned_url(url) + + def test_presign_uses_v2_for_us_east_1_with_us_east_1_regional(self): + config = Config(s3={"us_east_1_regional_endpoint": "regional"}) + client = self.session.create_client("s3", "us-east-1", config=config) + url = client.generate_presigned_url( + "get_object", {"Bucket": "mybucket", "Key": "mykey"} + ) + self.assert_is_v2_presigned_url(url) + + +CHECKSUM_TEST_CASES = [ + ("put_bucket_tagging", {"Bucket": "foo", "Tagging": {"TagSet": []}}), + ( + "put_bucket_lifecycle", + {"Bucket": "foo", "LifecycleConfiguration": {"Rules": []}}, + ), + ( + "put_bucket_lifecycle_configuration", + {"Bucket": "foo", "LifecycleConfiguration": {"Rules": []}}, + ), + ( + "put_bucket_cors", + {"Bucket": "foo", "CORSConfiguration": {"CORSRules": []}}, + ), + ( + "delete_objects", + {"Bucket": "foo", "Delete": {"Objects": [{"Key": "bar"}]}}, + ), + ( + "put_bucket_replication", + { + "Bucket": "foo", + "ReplicationConfiguration": {"Role": "", "Rules": []}, + }, + ), + ("put_bucket_acl", {"Bucket": "foo", "AccessControlPolicy": {}}), + ("put_bucket_logging", {"Bucket": "foo", "BucketLoggingStatus": {}}), + ( + "put_bucket_notification", + {"Bucket": "foo", "NotificationConfiguration": {}}, + ), + ("put_bucket_policy", {"Bucket": "foo", "Policy": ""}), + ( + "put_bucket_request_payment", + {"Bucket": "foo", "RequestPaymentConfiguration": {"Payer": ""}}, + ), + ( + "put_bucket_versioning", + {"Bucket": "foo", "VersioningConfiguration": {}}, + ), + ("put_bucket_website", {"Bucket": "foo", "WebsiteConfiguration": {}}), + ( + "put_object_acl", + {"Bucket": "foo", "Key": "bar", "AccessControlPolicy": {}}, + ), + ( + "put_object_legal_hold", + {"Bucket": "foo", "Key": "bar", "LegalHold": {"Status": "ON"}}, + ), + ( + "put_object_retention", + { + "Bucket": "foo", + "Key": "bar", + "Retention": {"RetainUntilDate": "2020-11-05"}, + }, + ), + ( + "put_object_lock_configuration", + {"Bucket": "foo", "ObjectLockConfiguration": {}}, + ), +] + +accesspoint_arn = "arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint" +accesspoint_arn_cn = ( + "arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint" +) +accesspoint_arn_gov = ( + "arn:aws-us-gov:s3:us-gov-west-1:123456789012:accesspoint:myendpoint" +) +accesspoint_cross_region_arn_gov = ( + "arn:aws-us-gov:s3:us-gov-east-1:123456789012:accesspoint:myendpoint" +) + + +@pytest.mark.parametrize("operation, operation_kwargs", CHECKSUM_TEST_CASES) +def test_checksums_included_in_expected_operations( + operation, operation_kwargs +): + """Validate expected calls include Content-MD5 header""" + client = _create_s3_client() + with ClientHTTPStubber(client) as stub: + stub.add_response() + call = getattr(client, operation) + call(**operation_kwargs) + assert "Content-MD5" in stub.requests[-1].headers + + +@pytest.mark.parametrize( + "content_encoding, expected_header", + [("foo", b"foo,aws-chunked"), (None, b"aws-chunked")], +) +def test_checksum_content_encoding(content_encoding, expected_header): + op_kwargs = { + "Bucket": "mybucket", + "Key": "mykey", + "Body": b"foo", + "ChecksumAlgorithm": "sha256", + } + if content_encoding is not None: + op_kwargs["ContentEncoding"] = content_encoding + s3 = _create_s3_client() + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response() + s3.put_object(**op_kwargs) + request_headers = http_stubber.requests[-1].headers + assert request_headers["Content-Encoding"] == expected_header + + +def _s3_addressing_test_cases(): + # The default behavior for sigv2. DNS compatible buckets + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.us-west-2.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-west-1", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.us-west-1.amazonaws.com/key", + ) + yield dict( + region="us-west-1", + bucket="bucket", + key="key", + signature_version="s3", + is_secure=False, + expected_url="http://bucket.s3.us-west-1.amazonaws.com/key", + ) + + # Virtual host addressing is independent of signature version. + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3v4", + expected_url="https://bucket.s3.us-west-2.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + signature_version="s3v4", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-west-1", + bucket="bucket", + key="key", + signature_version="s3v4", + expected_url="https://bucket.s3.us-west-1.amazonaws.com/key", + ) + yield dict( + region="us-west-1", + bucket="bucket", + key="key", + signature_version="s3v4", + is_secure=False, + expected_url="http://bucket.s3.us-west-1.amazonaws.com/key", + ) + yield dict( + region="us-west-1", + bucket="bucket-with-num-1", + key="key", + signature_version="s3v4", + is_secure=False, + expected_url="http://bucket-with-num-1.s3.us-west-1.amazonaws.com/key", + ) + + # Regions outside of the 'aws' partition. + # These should still default to virtual hosted addressing + # unless explicitly configured otherwise. + yield dict( + region="cn-north-1", + bucket="bucket", + key="key", + signature_version="s3v4", + expected_url="https://bucket.s3.cn-north-1.amazonaws.com.cn/key", + ) + # This isn't actually supported because cn-north-1 is sigv4 only, + # but we'll still double check that our internal logic is correct + # when building the expected url. + yield dict( + region="cn-north-1", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.cn-north-1.amazonaws.com.cn/key", + ) + # If the request is unsigned, we should have the default + # fix_s3_host behavior which is to use virtual hosting where + # possible but fall back to path style when needed. + yield dict( + region="cn-north-1", + bucket="bucket", + key="key", + signature_version=UNSIGNED, + expected_url="https://bucket.s3.cn-north-1.amazonaws.com.cn/key", + ) + yield dict( + region="cn-north-1", + bucket="bucket.dot", + key="key", + signature_version=UNSIGNED, + expected_url="https://s3.cn-north-1.amazonaws.com.cn/bucket.dot/key", + ) + + # And of course you can explicitly specify which style to use. + virtual_hosting = {"addressing_style": "virtual"} + yield dict( + region="cn-north-1", + bucket="bucket", + key="key", + signature_version=UNSIGNED, + s3_config=virtual_hosting, + expected_url="https://bucket.s3.cn-north-1.amazonaws.com.cn/key", + ) + + path_style = {"addressing_style": "path"} + yield dict( + region="cn-north-1", + bucket="bucket", + key="key", + signature_version=UNSIGNED, + s3_config=path_style, + expected_url="https://s3.cn-north-1.amazonaws.com.cn/bucket/key", + ) + + # If you don't have a DNS compatible bucket, we use path style. + yield dict( + region="us-west-2", + bucket="bucket.dot", + key="key", + expected_url="https://s3.us-west-2.amazonaws.com/bucket.dot/key", + ) + yield dict( + region="us-east-1", + bucket="bucket.dot", + key="key", + expected_url="https://s3.amazonaws.com/bucket.dot/key", + ) + yield dict( + region="us-east-1", + bucket="BucketName", + key="key", + expected_url="https://s3.amazonaws.com/BucketName/key", + ) + yield dict( + region="us-west-1", + bucket="bucket_name", + key="key", + expected_url="https://s3.us-west-1.amazonaws.com/bucket_name/key", + ) + yield dict( + region="us-west-1", + bucket="-bucket-name", + key="key", + expected_url="https://s3.us-west-1.amazonaws.com/-bucket-name/key", + ) + yield dict( + region="us-west-1", + bucket="bucket-name-", + key="key", + expected_url="https://s3.us-west-1.amazonaws.com/bucket-name-/key", + ) + yield dict( + region="us-west-1", + bucket="aa", + key="key", + expected_url="https://s3.us-west-1.amazonaws.com/aa/key", + ) + yield dict( + region="us-west-1", + bucket="a" * 64, + key="key", + expected_url=( + "https://s3.us-west-1.amazonaws.com/%s/key" % ("a" * 64) + ), + ) + + # Custom endpoint url should always be used. + yield dict( + customer_provided_endpoint="https://my-custom-s3/", + bucket="foo", + key="bar", + expected_url="https://my-custom-s3/foo/bar", + ) + yield dict( + customer_provided_endpoint="https://my-custom-s3/", + bucket="bucket.dots", + key="bar", + expected_url="https://my-custom-s3/bucket.dots/bar", + ) + # Doesn't matter what region you specify, a custom endpoint url always + # wins. + yield dict( + customer_provided_endpoint="https://my-custom-s3/", + region="us-west-2", + bucket="foo", + key="bar", + expected_url="https://my-custom-s3/foo/bar", + ) + + # Explicitly configuring "virtual" addressing_style. + virtual_hosting = {"addressing_style": "virtual"} + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=virtual_hosting, + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + s3_config=virtual_hosting, + expected_url="https://bucket.s3.us-west-2.amazonaws.com/key", + ) + yield dict( + region="eu-central-1", + bucket="bucket", + key="key", + s3_config=virtual_hosting, + expected_url="https://bucket.s3.eu-central-1.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=virtual_hosting, + customer_provided_endpoint="https://foo.amazonaws.com", + expected_url="https://bucket.foo.amazonaws.com/key", + ) + yield dict( + region="unknown", + bucket="bucket", + key="key", + s3_config=virtual_hosting, + expected_url="https://bucket.s3.unknown.amazonaws.com/key", + ) + + # Test us-gov with virtual addressing. + yield dict( + region="us-gov-west-1", + bucket="bucket", + key="key", + s3_config=virtual_hosting, + expected_url="https://bucket.s3.us-gov-west-1.amazonaws.com/key", + ) + + yield dict( + region="us-gov-west-1", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.us-gov-west-1.amazonaws.com/key", + ) + yield dict( + region="fips-us-gov-west-1", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3-fips.us-gov-west-1.amazonaws.com/key", + ) + + # Test path style addressing. + path_style = {"addressing_style": "path"} + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=path_style, + expected_url="https://s3.amazonaws.com/bucket/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=path_style, + customer_provided_endpoint="https://foo.amazonaws.com/", + expected_url="https://foo.amazonaws.com/bucket/key", + ) + yield dict( + region="unknown", + bucket="bucket", + key="key", + s3_config=path_style, + expected_url="https://s3.unknown.amazonaws.com/bucket/key", + ) + + # S3 accelerate + use_accelerate = {"use_accelerate_endpoint": True} + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_accelerate, + expected_url="https://bucket.s3-accelerate.amazonaws.com/key", + ) + yield dict( + # region is ignored with S3 accelerate. + region="us-west-2", + bucket="bucket", + key="key", + s3_config=use_accelerate, + expected_url="https://bucket.s3-accelerate.amazonaws.com/key", + ) + # Provided endpoints still get recognized as accelerate endpoints. + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + customer_provided_endpoint="https://s3-accelerate.amazonaws.com", + expected_url="https://bucket.s3-accelerate.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + customer_provided_endpoint="http://s3-accelerate.amazonaws.com", + expected_url="http://bucket.s3-accelerate.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_accelerate, + is_secure=False, + # Note we're using http:// because is_secure=False. + expected_url="http://bucket.s3-accelerate.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + # s3-accelerate must be the first part of the url. + customer_provided_endpoint="https://foo.s3-accelerate.amazonaws.com", + expected_url="https://foo.s3-accelerate.amazonaws.com/bucket/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + # The endpoint must be an Amazon endpoint. + customer_provided_endpoint="https://s3-accelerate.notamazon.com", + expected_url="https://s3-accelerate.notamazon.com/bucket/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + # Extra components must be whitelisted. + customer_provided_endpoint="https://s3-accelerate.foo.amazonaws.com", + expected_url="https://s3-accelerate.foo.amazonaws.com/bucket/key", + ) + yield dict( + region="unknown", + bucket="bucket", + key="key", + s3_config=use_accelerate, + expected_url="https://bucket.s3-accelerate.amazonaws.com/key", + ) + # Use virtual even if path is specified for s3 accelerate because + # path style will not work with S3 accelerate. + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config={ + "use_accelerate_endpoint": True, + "addressing_style": "path", + }, + expected_url="https://bucket.s3-accelerate.amazonaws.com/key", + ) + + # S3 dual stack endpoints. + use_dualstack = {"use_dualstack_endpoint": True} + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_dualstack, + signature_version="s3", + # Still default to virtual hosted when possible on sigv2. + expected_url="https://bucket.s3.dualstack.us-east-1.amazonaws.com/key", + ) + yield dict( + region=None, + bucket="bucket", + key="key", + s3_config=use_dualstack, + # Uses us-east-1 for no region set. + expected_url="https://bucket.s3.dualstack.us-east-1.amazonaws.com/key", + ) + yield dict( + region="aws-global", + bucket="bucket", + key="key", + s3_config=use_dualstack, + # The aws-global pseudo region does not support dualstack and should + # be resolved to us-east-1. + expected_url=( + "https://bucket.s3.dualstack.us-east-1.amazonaws.com/key" + ), + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + s3_config=use_dualstack, + signature_version="s3", + # Still default to virtual hosted when possible on sigv2. + expected_url="https://bucket.s3.dualstack.us-west-2.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_dualstack, + signature_version="s3v4", + expected_url="https://bucket.s3.dualstack.us-east-1.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + s3_config=use_dualstack, + signature_version="s3v4", + expected_url="https://bucket.s3.dualstack.us-west-2.amazonaws.com/key", + ) + yield dict( + region="unknown", + bucket="bucket", + key="key", + s3_config=use_dualstack, + signature_version="s3v4", + expected_url="https://bucket.s3.dualstack.unknown.amazonaws.com/key", + ) + # Non DNS compatible buckets use path style for dual stack. + yield dict( + region="us-west-2", + bucket="bucket.dot", + key="key", + s3_config=use_dualstack, + # Still default to virtual hosted when possible. + expected_url=( + "https://s3.dualstack.us-west-2.amazonaws.com/bucket.dot/key" + ), + ) + # Supports is_secure (use_ssl=False in create_client()). + yield dict( + region="us-west-2", + bucket="bucket.dot", + key="key", + is_secure=False, + s3_config=use_dualstack, + # Still default to virtual hosted when possible. + expected_url=( + "http://s3.dualstack.us-west-2.amazonaws.com/bucket.dot/key" + ), + ) + + # Is path style is requested, we should use it, even if the bucket is + # DNS compatible. + force_path_style = { + "use_dualstack_endpoint": True, + "addressing_style": "path", + } + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + s3_config=force_path_style, + # Still default to virtual hosted when possible. + expected_url="https://s3.dualstack.us-west-2.amazonaws.com/bucket/key", + ) + + # Accelerate + dual stack + use_accelerate_dualstack = { + "use_accelerate_endpoint": True, + "use_dualstack_endpoint": True, + } + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_accelerate_dualstack, + expected_url=( + "https://bucket.s3-accelerate.dualstack.amazonaws.com/key" + ), + ) + yield dict( + # Region is ignored with S3 accelerate. + region="us-west-2", + bucket="bucket", + key="key", + s3_config=use_accelerate_dualstack, + expected_url=( + "https://bucket.s3-accelerate.dualstack.amazonaws.com/key" + ), + ) + # Only s3-accelerate overrides a customer endpoint. + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_dualstack, + customer_provided_endpoint="https://s3-accelerate.amazonaws.com", + expected_url=("https://bucket.s3-accelerate.amazonaws.com/key"), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + # Dualstack is whitelisted. + customer_provided_endpoint=( + "https://s3-accelerate.dualstack.amazonaws.com" + ), + expected_url=( + "https://bucket.s3-accelerate.dualstack.amazonaws.com/key" + ), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + # Even whitelisted parts cannot be duplicated. + customer_provided_endpoint=( + "https://s3-accelerate.dualstack.dualstack.amazonaws.com" + ), + expected_url=( + "https://s3-accelerate.dualstack.dualstack" + ".amazonaws.com/bucket/key" + ), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + # More than two extra parts is not allowed. + customer_provided_endpoint=( + "https://s3-accelerate.dualstack.dualstack.dualstack" + ".amazonaws.com" + ), + expected_url=( + "https://s3-accelerate.dualstack.dualstack.dualstack.amazonaws.com" + "/bucket/key" + ), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + # Extra components must be whitelisted. + customer_provided_endpoint="https://s3-accelerate.foo.amazonaws.com", + expected_url="https://s3-accelerate.foo.amazonaws.com/bucket/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_accelerate_dualstack, + is_secure=False, + # Note we're using http:// because is_secure=False. + expected_url=( + "http://bucket.s3-accelerate.dualstack.amazonaws.com/key" + ), + ) + # Use virtual even if path is specified for s3 accelerate because + # path style will not work with S3 accelerate. + use_accelerate_dualstack["addressing_style"] = "path" + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=use_accelerate_dualstack, + expected_url=( + "https://bucket.s3-accelerate.dualstack.amazonaws.com/key" + ), + ) + + # Access-point arn cases + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="myendpoint/key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/myendpoint/key" + ), + ) + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="foo/myendpoint/key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/foo/myendpoint/key" + ), + ) + yield dict( + # Note: The access-point arn has us-west-2 and the client's region is + # us-east-1, for the defauldict the access-point arn region is used. + region="us-east-1", + bucket=accesspoint_arn, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="s3-external-1", + bucket=accesspoint_arn, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + + yield dict( + region="aws-global", + bucket=accesspoint_arn, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="unknown", + bucket=accesspoint_arn, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="cn-north-1", + bucket=accesspoint_arn_cn, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "cn-north-1.amazonaws.com.cn/key" + ), + ) + yield dict( + region="cn-northwest-1", + bucket=accesspoint_arn_cn, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "cn-north-1.amazonaws.com.cn/key" + ), + ) + yield dict( + region="us-gov-west-1", + bucket=accesspoint_arn_gov, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-gov-west-1.amazonaws.com/key" + ), + ) + yield dict( + region="fips-us-gov-west-1", + bucket=accesspoint_arn_gov, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint-fips." + "us-gov-west-1.amazonaws.com/key" + ), + ) + yield dict( + region="fips-us-gov-west-1", + bucket=accesspoint_arn_gov, + key="key", + s3_config={"use_arn_region": False}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint-fips." + "us-gov-west-1.amazonaws.com/key" + ), + ) + yield dict( + region="fips-us-gov-west-1", + bucket=accesspoint_cross_region_arn_gov, + s3_config={"use_arn_region": True}, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint-fips." + "us-gov-east-1.amazonaws.com/key" + ), + ) + yield dict( + region="us-gov-west-1", + bucket=accesspoint_arn_gov, + key="key", + s3_config={"use_arn_region": False}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint-fips." + "us-gov-west-1.amazonaws.com/key" + ), + use_fips_endpoint=True, + ) + yield dict( + region="us-gov-west-1", + bucket=accesspoint_cross_region_arn_gov, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint-fips." + "us-gov-east-1.amazonaws.com/key" + ), + use_fips_endpoint=True, + ) + + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="key", + is_secure=False, + expected_url=( + "http://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + # Dual-stack with access-point arn + yield dict( + # Note: The access-point arn has us-west-2 and the client's region is + # us-east-1, for the defauldict the access-point arn region is used. + region="us-east-1", + bucket=accesspoint_arn, + key="key", + s3_config={ + "use_dualstack_endpoint": True, + }, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint.dualstack." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="us-gov-west-1", + bucket=accesspoint_arn_gov, + key="key", + s3_config={ + "use_dualstack_endpoint": True, + }, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint.dualstack." + "us-gov-west-1.amazonaws.com/key" + ), + ) + yield dict( + region="fips-us-gov-west-1", + bucket=accesspoint_arn_gov, + key="key", + s3_config={ + "use_arn_region": True, + "use_dualstack_endpoint": True, + }, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint-fips.dualstack." + "us-gov-west-1.amazonaws.com/key" + ), + ) + # None of the various s3 settings related to paths should affect what + # endpoint to use when an access-point is provided. + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="key", + s3_config={"addressing_style": "auto"}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="key", + s3_config={"addressing_style": "virtual"}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="key", + s3_config={"addressing_style": "path"}, + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + + # Use us-east-1 regional endpoindicts: regional + us_east_1_regional_endpoint = {"us_east_1_regional_endpoint": "regional"} + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint, + expected_url=("https://bucket.s3.us-east-1.amazonaws.com/key"), + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint, + expected_url=("https://bucket.s3.us-west-2.amazonaws.com/key"), + ) + yield dict( + region=None, + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint, + expected_url=("https://bucket.s3.amazonaws.com/key"), + ) + yield dict( + region="unknown", + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint, + expected_url=("https://bucket.s3.unknown.amazonaws.com/key"), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config={ + "us_east_1_regional_endpoint": "regional", + "use_dualstack_endpoint": True, + }, + expected_url=( + "https://bucket.s3.dualstack.us-east-1.amazonaws.com/key" + ), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config={ + "us_east_1_regional_endpoint": "regional", + "use_accelerate_endpoint": True, + }, + expected_url=("https://bucket.s3-accelerate.amazonaws.com/key"), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config={ + "us_east_1_regional_endpoint": "regional", + "use_accelerate_endpoint": True, + "use_dualstack_endpoint": True, + }, + expected_url=( + "https://bucket.s3-accelerate.dualstack.amazonaws.com/key" + ), + ) + + # Use us-east-1 regional endpoindicts: legacy + us_east_1_regional_endpoint_legacy = { + "us_east_1_regional_endpoint": "legacy" + } + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint_legacy, + expected_url=("https://bucket.s3.amazonaws.com/key"), + ) + + yield dict( + region=None, + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint_legacy, + expected_url=("https://bucket.s3.amazonaws.com/key"), + ) + + yield dict( + region="unknown", + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint_legacy, + expected_url=("https://bucket.s3.unknown.amazonaws.com/key"), + ) + + s3_object_lambda_arn_gov = ( + "arn:aws-us-gov:s3-object-lambda:us-gov-west-1:" + "123456789012:accesspoint:mybanner" + ) + yield dict( + region="fips-us-gov-west-1", + bucket=s3_object_lambda_arn_gov, + key="key", + expected_url=( + "https://mybanner-123456789012.s3-object-lambda-fips." + "us-gov-west-1.amazonaws.com/key" + ), + ) + yield dict( + region="us-gov-west-1", + bucket=s3_object_lambda_arn_gov, + key="key", + expected_url=( + "https://mybanner-123456789012.s3-object-lambda-fips." + "us-gov-west-1.amazonaws.com/key" + ), + use_fips_endpoint=True, + ) + s3_object_lambda_cross_region_arn_gov = ( + "arn:aws-us-gov:s3-object-lambda:us-gov-east-1:" + "123456789012:accesspoint:mybanner" + ) + yield dict( + region="fips-us-gov-west-1", + bucket=s3_object_lambda_cross_region_arn_gov, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://mybanner-123456789012.s3-object-lambda-fips." + "us-gov-east-1.amazonaws.com/key" + ), + ) + yield dict( + region="us-gov-west-1", + bucket=s3_object_lambda_cross_region_arn_gov, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://mybanner-123456789012.s3-object-lambda-fips." + "us-gov-east-1.amazonaws.com/key" + ), + use_fips_endpoint=True, + ) + + s3_object_lambda_arn = ( + "arn:aws:s3-object-lambda:us-east-1:" + "123456789012:accesspoint:mybanner" + ) + yield dict( + region="aws-global", + bucket=s3_object_lambda_arn, + key="key", + s3_config={"use_arn_region": True}, + expected_url=( + "https://mybanner-123456789012.s3-object-lambda." + "us-east-1.amazonaws.com/key" + ), + ) + + +def _s3_addressing_invalid_test_cases(): + # client region does not match access point ARN region and use_arn_region + # is False. If sent to service, this results in an "invalid access point" + # response. We expect it to be caught by the S3 endpoints ruleset. + yield dict( + region="us-east-1", + bucket=accesspoint_arn, + key="key", + s3_config={"use_arn_region": False}, + expected_exception_type=UnsupportedS3AccesspointConfigurationError, + expected_exception_regex=( + "region from ARN `us-west-2` does not match client region " + "`us-east-1`" + ), + ) + yield dict( + region="cn-northwest-1", + bucket=accesspoint_arn_cn, + key="key", + s3_config={"use_arn_region": False}, + expected_exception_type=UnsupportedS3AccesspointConfigurationError, + expected_exception_regex=( + "region from ARN `cn-north-1` does not match client region " + "`cn-northwest-1`" + ), + ) + yield dict( + region="unknown", + bucket=accesspoint_arn, + key="key", + s3_config={"use_arn_region": False}, + expected_exception_type=UnsupportedS3AccesspointConfigurationError, + expected_exception_regex=None, + ) + yield dict( + region="us-east-1", + bucket=accesspoint_arn, + key="key", + s3_config={"use_arn_region": False}, + expected_exception_type=UnsupportedS3AccesspointConfigurationError, + expected_exception_regex=None, + ) + + +@pytest.mark.parametrize("test_case", _s3_addressing_test_cases()) +def test_correct_url_used_for_s3(test_case): + # Test that given various sets of config options and bucket names, + # we construct the expect endpoint url. + _verify_expected_endpoint_url(**test_case) + + +@pytest.mark.parametrize("test_case", _s3_addressing_invalid_test_cases()) +def test_correct_exception_raise_for_s3(test_case): + # Test that invalid sets of config options and bucket names, result in + # appropriate exceptions. + _verify_expected_exception(**test_case) + + +def _verify_expected_endpoint_url( + region=None, + bucket="bucket", + key="key", + s3_config=None, + is_secure=True, + customer_provided_endpoint=None, + expected_url=None, + signature_version=None, + use_fips_endpoint=None, +): + s3 = _create_s3_client( + region=region, + is_secure=is_secure, + endpoint_url=customer_provided_endpoint, + s3_config=s3_config, + signature_version=signature_version, + use_fips_endpoint=use_fips_endpoint, + ) + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response() + s3.put_object(Bucket=bucket, Key=key, Body=b"bar") + assert http_stubber.requests[0].url == expected_url + + +def _verify_expected_exception( + expected_exception_type, + expected_exception_regex=None, + region=None, + bucket="bucket", + key="key", + s3_config=None, + is_secure=True, + customer_provided_endpoint=None, + signature_version=None, + use_fips_endpoint=None, +): + s3 = _create_s3_client( + region=region, + is_secure=is_secure, + endpoint_url=customer_provided_endpoint, + s3_config=s3_config, + signature_version=signature_version, + use_fips_endpoint=use_fips_endpoint, + ) + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response() + with pytest.raises( + expected_exception_type, match=expected_exception_regex + ): + s3.put_object(Bucket=bucket, Key=key, Body=b"bar") + + +def _create_s3_client( + region="us-west-2", + is_secure=True, + endpoint_url=None, + s3_config=None, + signature_version="s3v4", + use_fips_endpoint=None, +): + environ = {} + with mock.patch("os.environ", environ): + environ["AWS_ACCESS_KEY_ID"] = "access_key" + environ["AWS_SECRET_ACCESS_KEY"] = "secret_key" + environ["AWS_CONFIG_FILE"] = "no-exist-foo" + environ["AWS_SHARED_CREDENTIALS_FILE"] = "no-exist-foo" + session = create_session() + session.config_filename = "no-exist-foo" + config = Config( + signature_version=signature_version, + s3=s3_config, + use_fips_endpoint=use_fips_endpoint, + ) + s3 = session.create_client( + "s3", + region_name=region, + use_ssl=is_secure, + config=config, + endpoint_url=endpoint_url, + ) + return s3 + + +def _addressing_for_presigned_url_test_cases(): + # us-east-1, or the "global" endpoint. A signature version of + # None means the user doesn't have signature version configured. + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + signature_version=None, + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + signature_version="s3v4", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + signature_version="s3v4", + s3_config={"addressing_style": "path"}, + expected_url="https://s3.amazonaws.com/bucket/key", + ) + + # A region that supports both 's3' and 's3v4'. + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version=None, + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3v4", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3v4", + s3_config={"addressing_style": "path"}, + expected_url="https://s3.us-west-2.amazonaws.com/bucket/key", + ) + + # An 's3v4' only region. + yield dict( + region="us-east-2", + bucket="bucket", + key="key", + signature_version=None, + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-east-2", + bucket="bucket", + key="key", + signature_version="s3", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-east-2", + bucket="bucket", + key="key", + signature_version="s3v4", + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="us-east-2", + bucket="bucket", + key="key", + signature_version="s3v4", + s3_config={"addressing_style": "path"}, + expected_url="https://s3.us-east-2.amazonaws.com/bucket/key", + ) + + # Dualstack endpoints + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version=None, + s3_config={"use_dualstack_endpoint": True}, + expected_url="https://bucket.s3.dualstack.us-west-2.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3", + s3_config={"use_dualstack_endpoint": True}, + expected_url="https://bucket.s3.dualstack.us-west-2.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3v4", + s3_config={"use_dualstack_endpoint": True}, + expected_url="https://bucket.s3.dualstack.us-west-2.amazonaws.com/key", + ) + + # Accelerate + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version=None, + s3_config={"use_accelerate_endpoint": True}, + expected_url="https://bucket.s3-accelerate.amazonaws.com/key", + ) + + # A region that we don't know about. + yield dict( + region="boto-west-1", + bucket="bucket", + key="key", + signature_version=None, + expected_url="https://bucket.s3.amazonaws.com/key", + ) + + # Customer provided URL results in us leaving the host untouched. + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version=None, + customer_provided_endpoint="https://foo.com/", + expected_url="https://foo.com/bucket/key", + ) + + # Access-point + yield dict( + region="us-west-2", + bucket=accesspoint_arn, + key="key", + expected_url=( + "https://myendpoint-123456789012.s3-accesspoint." + "us-west-2.amazonaws.com/key" + ), + ) + + # Use us-east-1 regional endpoint configuration cases + us_east_1_regional_endpoint = {"us_east_1_regional_endpoint": "regional"} + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint, + signature_version="s3", + expected_url=("https://bucket.s3.us-east-1.amazonaws.com/key"), + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config=us_east_1_regional_endpoint, + signature_version="s3v4", + expected_url=("https://bucket.s3.us-east-1.amazonaws.com/key"), + ) + # Bucket names that contain dots or are otherwise not virtual host style + # compatible should always resolve to a regional endpoint. + # https://github.com/boto/botocore/issues/2798 + yield dict( + region="us-west-1", + bucket="foo.bar.biz", + key="key", + signature_version="s3", + expected_url="https://s3.us-west-1.amazonaws.com/foo.bar.biz/key", + ) + # Bucket names that contain dots and subcomponents that are less than + # 3 characters should still use virtual host style addressing if + # configured by the customer and they provide their own ``endpoint_url`` + # that is insecure. https://github.com/boto/botocore/issues/2938 + yield dict( + bucket="foo.b.biz", + key="key", + s3_config={"addressing_style": "virtual"}, + customer_provided_endpoint="http://s3.us-west-2.amazonaws.com", + expected_url="http://foo.b.biz.s3.us-west-2.amazonaws.com/key", + ) + yield dict( + bucket="foo.b.biz", + key="key", + s3_config={"addressing_style": "virtual"}, + customer_provided_endpoint="https://s3.us-west-2.amazonaws.com", + expected_url="https://s3.us-west-2.amazonaws.com/foo.b.biz/key", + ) + + # virtual style addressing expicitly requested always uses + # regional endpoints except for us-east-1 and aws-global + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + signature_version="s3", + s3_config={"addressing_style": "virtual"}, + expected_url="https://bucket.s3.us-west-2.amazonaws.com/key", + ) + yield dict( + region="us-east-2", + bucket="bucket", + key="key", + signature_version="s3v4", + s3_config={"addressing_style": "virtual"}, + expected_url="https://bucket.s3.us-east-2.amazonaws.com/key", + ) + yield dict( + region="us-west-2", + bucket="bucket", + key="key", + s3_config={"addressing_style": "virtual"}, + expected_url="https://bucket.s3.us-west-2.amazonaws.com/key", + ) + yield dict( + region="us-east-1", + bucket="bucket", + key="key", + s3_config={"addressing_style": "virtual"}, + expected_url="https://bucket.s3.amazonaws.com/key", + ) + yield dict( + region="aws-global", + bucket="bucket", + key="key", + s3_config={"addressing_style": "virtual"}, + expected_url="https://bucket.s3.amazonaws.com/key", + ) + + +@pytest.mark.parametrize( + "test_case", _addressing_for_presigned_url_test_cases() +) +def test_addressing_for_presigned_urls(test_case): + # Here we're just focusing on the addressing mode used for presigned URLs. + # We special case presigned URLs due to backward compatibility. + _verify_presigned_url_addressing(**test_case) + + +def _verify_presigned_url_addressing( + region=None, + bucket="bucket", + key="key", + s3_config=None, + is_secure=True, + customer_provided_endpoint=None, + expected_url=None, + signature_version=None, +): + s3 = _create_s3_client( + region=region, + is_secure=is_secure, + endpoint_url=customer_provided_endpoint, + s3_config=s3_config, + signature_version=signature_version, + ) + url = s3.generate_presigned_url( + "get_object", {"Bucket": bucket, "Key": key} + ) + # We're not trying to verify the params for URL presigning, + # those are tested elsewhere. We just care about the hostname/path. + parts = urlsplit(url) + actual = "{}://{}{}".format(*parts[:3]) + assert actual == expected_url + + +class TestS3XMLPayloadEscape(BaseS3OperationTest): + def assert_correct_content_md5(self, request): + content_md5_bytes = get_md5(request.body).digest() + content_md5 = base64.b64encode(content_md5_bytes) + self.assertEqual(content_md5, request.headers["Content-MD5"]) + + def test_escape_keys_in_xml_delete_objects(self): + self.http_stubber.add_response() + with self.http_stubber: + self.client.delete_objects( + Bucket="mybucket", + Delete={"Objects": [{"Key": "some\r\n\rkey"}]}, + ) + request = self.http_stubber.requests[0] + self.assertNotIn(b"\r\n\r", request.body) + self.assertIn(b" ", request.body) + self.assert_correct_content_md5(request) + + def test_escape_keys_in_xml_put_bucket_lifecycle_configuration(self): + self.http_stubber.add_response() + with self.http_stubber: + self.client.put_bucket_lifecycle_configuration( + Bucket="mybucket", + LifecycleConfiguration={ + "Rules": [ + { + "Prefix": "my\r\n\rprefix", + "Status": "ENABLED", + } + ] + }, + ) + request = self.http_stubber.requests[0] + self.assertNotIn(b"my\r\n\rprefix", request.body) + self.assertIn(b"my prefix", request.body) + self.assert_correct_content_md5(request) + + +class TestExpectContinueBehavior(BaseSessionTest): + def test_sets_100_continute_with_body(self): + op_kwargs = { + "Bucket": "mybucket", + "Key": "mykey", + "Body": b"foo", + } + s3 = _create_s3_client() + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response() + s3.put_object(**op_kwargs) + expect_header = http_stubber.requests[-1].headers.get("Expect") + self.assertIsNotNone(expect_header) + self.assertEqual(expect_header, b"100-continue") + + def test_does_not_set_100_continute_with_empty_body(self): + environ = {'BOTO_EXPERIMENTAL__NO_EMPTY_CONTINUE': "True"} + self.environ_patch = mock.patch('os.environ', environ) + self.environ_patch.start() + op_kwargs = {"Bucket": "mybucket", "Key": "mykey", "Body": ""} + s3 = _create_s3_client() + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response() + s3.put_object(**op_kwargs) + expect_header = http_stubber.requests[-1].headers.get("Expect") + self.assertIsNone(expect_header) + + +class TestParameterInjection(BaseS3OperationTest): + BUCKET = "foo" + KEY = "bar" + + def test_parameter_injection(self): + self.http_stubber.add_response() + self.client.meta.events.register( + 'before-sign.s3', self._verify_bucket_and_key_in_context + ) + with self.http_stubber: + self.client.put_object( + Bucket=self.BUCKET, + Key=self.KEY, + ) + + def _verify_bucket_and_key_in_context(self, request, **kwargs): + self.assertEqual( + request.context['input_params']['Bucket'], self.BUCKET + ) + self.assertEqual(request.context['input_params']['Key'], self.KEY) + + +@pytest.mark.parametrize( + "bucket, key, expected_path, expected_hostname", + [ + ( + "mybucket", + "../key.txt", + "/../key.txt", + "mybucket.s3.us-west-2.amazonaws.com", + ), + ( + "mybucket", + "foo/../key.txt", + "/foo/../key.txt", + "mybucket.s3.us-west-2.amazonaws.com", + ), + ( + "mybucket", + "foo/../../key.txt", + "/foo/../../key.txt", + "mybucket.s3.us-west-2.amazonaws.com", + ), + ], +) +def test_dot_segments_preserved_in_url_path( + patched_session, bucket, key, expected_path, expected_hostname +): + s3 = patched_session.create_client( + 's3', + 'us-west-2', + config=Config( + s3={"addressing_style": "virtual"}, + ), + ) + with ClientHTTPStubber(s3) as http_stubber: + http_stubber.add_response() + s3.get_object(Bucket=bucket, Key=key) + url_parts = urlsplit(http_stubber.requests[0].url) + assert url_parts.path == expected_path + assert url_parts.hostname == expected_hostname diff --git a/testbed/boto__botocore/tests/functional/test_s3_control.py b/testbed/boto__botocore/tests/functional/test_s3_control.py new file mode 100644 index 0000000000000000000000000000000000000000..55c06af87d5f1914dbec528c5434160ff3ad93e7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_s3_control.py @@ -0,0 +1,71 @@ +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.awsrequest import AWSResponse +from botocore.config import Config +from tests import BaseSessionTest, mock + + +class S3ControlOperationTest(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('s3control', self.region) + self.session_send_patch = mock.patch( + 'botocore.endpoint.Endpoint._send' + ) + self.http_session_send_mock = self.session_send_patch.start() + self.http_response = mock.Mock(spec=AWSResponse) + self.http_response.status_code = 200 + self.http_response.headers = {} + self.http_response.content = '' + self.http_session_send_mock.return_value = self.http_response + + def tearDown(self): + super(BaseSessionTest, self).tearDown() + self.session_send_patch.stop() + + def test_does_add_account_id_to_host(self): + self.client.get_public_access_block(AccountId='123') + self.assertEqual(self.http_session_send_mock.call_count, 1) + request = self.http_session_send_mock.call_args_list[0][0][0] + + self.assertTrue( + request.url.startswith( + 'https://123.s3-control.us-west-2.amazonaws.com' + ) + ) + + def test_does_not_remove_account_id_from_headers(self): + self.client.get_public_access_block(AccountId='123') + self.assertEqual(self.http_session_send_mock.call_count, 1) + request = self.http_session_send_mock.call_args_list[0][0][0] + + self.assertIn('x-amz-account-id', request.headers) + + def test_does_support_dualstack_endpoint(self): + # Re-create the client with the use_dualstack_endpoint configuration + # option set to True. + self.client = self.session.create_client( + 's3control', + self.region, + config=Config(s3={'use_dualstack_endpoint': True}), + ) + self.client.get_public_access_block(AccountId='123') + + self.assertEqual(self.http_session_send_mock.call_count, 1) + request = self.http_session_send_mock.call_args_list[0][0][0] + self.assertTrue( + request.url.startswith( + 'https://123.s3-control.dualstack.us-west-2.amazonaws.com' + ) + ) diff --git a/testbed/boto__botocore/tests/functional/test_s3_control_redirects.py b/testbed/boto__botocore/tests/functional/test_s3_control_redirects.py new file mode 100644 index 0000000000000000000000000000000000000000..4ac00123d427881ac2734e3714f000e7f709a531 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_s3_control_redirects.py @@ -0,0 +1,489 @@ +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import re +from contextlib import contextmanager + +import pytest + +from botocore import exceptions +from botocore.compat import urlsplit +from botocore.config import Config +from botocore.exceptions import ( + InvalidHostLabelError, + ParamValidationError, + UnsupportedS3ControlArnError, +) +from botocore.session import Session +from tests import ClientHTTPStubber, unittest + +ACCESSPOINT_ARN_TEST_CASES = [ + # Outpost accesspoint arn test cases + { + 'arn': ( + 'arn:aws:s3-outposts:us-west-2:123456789012:' + 'outpost:op-01234567890123456:accesspoint:myaccesspoint' + ), + 'region': 'us-west-2', + 'config': {}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-west-2.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'region': 'us-west-2', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'region': 'us-west-2', + 'config': {'s3': {'use_arn_region': False}}, + 'assertions': { + 'exception': 'UnsupportedS3ControlConfigurationError', + }, + }, + { + 'arn': 'arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'region': 'us-west-2', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'exception': 'UnsupportedS3ControlConfigurationError', + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'region': 'us-gov-east-1', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-gov-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'region': 'us-gov-east-1-fips', + 'config': {'s3': {'use_arn_region': False}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts-fips.us-gov-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:fips-us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'region': 'fips-us-gov-east-1', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'region': 'us-gov-east-1-fips', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts-fips.us-gov-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'config': {'s3': {'use_dualstack_endpoint': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-west-2.api.aws', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint', + 'config': {'s3': {'use_accelerate_endpoint': True}}, + 'assertions': { + 'exception': 'UnsupportedS3ControlConfigurationError', + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost', + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456', + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:myaccesspoint', + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, +] + + +BUCKET_ARN_TEST_CASES = [ + # Outpost bucket arn test cases + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-west-2', + 'config': {}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-west-2.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-west-2', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-west-2', + 'config': {'s3': {'use_arn_region': False}}, + 'assertions': { + 'exception': 'UnsupportedS3ControlConfigurationError', + }, + }, + { + 'arn': 'arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-west-2', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'exception': 'UnsupportedS3ControlConfigurationError', + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-gov-east-1', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-gov-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-gov-east-1-fips', + 'config': {'s3': {'use_arn_region': False}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts-fips.us-gov-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:fips-us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'fips-us-gov-east-1', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, + { + 'arn': 'arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-gov-east-1-fips', + 'config': {'s3': {'use_arn_region': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts-fips.us-gov-east-1.amazonaws.com', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket:mybucket', + 'region': 'us-west-2', + 'config': {'s3': {'use_dualstack_endpoint': True}}, + 'assertions': { + 'signing_name': 's3-outposts', + 'netloc': 's3-outposts.us-west-2.api.aws', + 'headers': { + 'x-amz-outpost-id': 'op-01234567890123456', + 'x-amz-account-id': '123456789012', + }, + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost', + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456', + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:bucket', + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, + { + 'arn': 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:bucket', + 'assertions': { + 'exception': 'UnsupportedS3ControlArnError', + }, + }, +] + + +V4_AUTH_REGEX = re.compile( + r'AWS4-HMAC-SHA256 Credential=\w+/\d+/' + r'(?P[a-z0-9-]+)/(?P[a-z0-9-]+)/' +) + + +def _assert_signing_name(stubber, expected_name): + request = stubber.requests[0] + auth_header = request.headers['Authorization'].decode('utf-8') + actual_name = V4_AUTH_REGEX.match(auth_header).group('name') + assert expected_name == actual_name + + +def _assert_netloc(stubber, expected_netloc): + request = stubber.requests[0] + url_parts = urlsplit(request.url) + assert expected_netloc == url_parts.netloc + + +def _assert_header(stubber, key, value): + request = stubber.requests[0] + assert key in request.headers + actual_value = request.headers[key] + if isinstance(actual_value, bytes): + actual_value = actual_value.decode('utf-8') + assert value == actual_value + + +def _assert_headers(stubber, headers): + for key, value in headers.items(): + _assert_header(stubber, key, value) + + +def _bootstrap_session(): + session = Session() + session.set_credentials('access_key', 'secret_key') + return session + + +def _bootstrap_client(session, region, **kwargs): + client = session.create_client('s3control', region, **kwargs) + stubber = ClientHTTPStubber(client) + return client, stubber + + +def _bootstrap_test_case_client(session, test_case): + region = test_case.get('region', 'us-west-2') + config = test_case.get('config', {}) + config = Config(**config) + return _bootstrap_client(session, region, config=config) + + +@pytest.mark.parametrize("test_case", ACCESSPOINT_ARN_TEST_CASES) +def test_accesspoint_arn_redirection(test_case): + session = _bootstrap_session() + client, stubber = _bootstrap_test_case_client(session, test_case) + with _assert_test_case(test_case, client, stubber): + client.get_access_point_policy(Name=test_case['arn']) + + +@pytest.mark.parametrize("test_case", BUCKET_ARN_TEST_CASES) +def test_bucket_arn_redirection(test_case): + session = _bootstrap_session() + client, stubber = _bootstrap_test_case_client(session, test_case) + with _assert_test_case(test_case, client, stubber): + client.get_bucket(Bucket=test_case['arn']) + + +@contextmanager +def _assert_test_case(test_case, client, stubber): + stubber.add_response() + assertions = test_case['assertions'] + exception_raised = None + try: + with stubber: + yield + except Exception as e: + if 'exception' not in assertions: + raise + exception_raised = e + if 'exception' in assertions: + exception_cls = getattr(exceptions, assertions['exception']) + if exception_raised is None: + raise RuntimeError( + f'Expected exception "{exception_cls}" was not raised' + ) + error_msg = f'Expected exception "{exception_cls}", got "{type(exception_raised)}"' + assert isinstance(exception_raised, exception_cls), error_msg + else: + assert len(stubber.requests) == 1 + if 'signing_name' in assertions: + _assert_signing_name(stubber, assertions['signing_name']) + if 'headers' in assertions: + _assert_headers(stubber, assertions['headers']) + if 'netloc' in assertions: + _assert_netloc(stubber, assertions['netloc']) + + +class TestS3ControlRedirection(unittest.TestCase): + def setUp(self): + self.session = _bootstrap_session() + self.region = 'us-west-2' + self._bootstrap_client() + + def _bootstrap_client(self, **kwargs): + client, stubber = _bootstrap_client( + self.session, self.region, **kwargs + ) + self.client = client + self.stubber = stubber + + def test_outpost_id_redirection_dualstack(self): + config = Config(s3={'use_dualstack_endpoint': True}) + self._bootstrap_client(config=config) + self.stubber.add_response() + with self.stubber: + self.client.create_bucket(Bucket='foo', OutpostId='op-123') + _assert_netloc(self.stubber, 's3-outposts.us-west-2.api.aws') + _assert_header(self.stubber, 'x-amz-outpost-id', 'op-123') + + def test_outpost_id_redirection_create_bucket(self): + self.stubber.add_response() + with self.stubber: + self.client.create_bucket(Bucket='foo', OutpostId='op-123') + _assert_netloc(self.stubber, 's3-outposts.us-west-2.amazonaws.com') + _assert_header(self.stubber, 'x-amz-outpost-id', 'op-123') + + def test_outpost_id_redirection_list_regional_buckets(self): + self.stubber.add_response() + with self.stubber: + self.client.list_regional_buckets( + OutpostId='op-123', + AccountId='1234', + ) + _assert_netloc(self.stubber, 's3-outposts.us-west-2.amazonaws.com') + _assert_header(self.stubber, 'x-amz-outpost-id', 'op-123') + + def test_outpost_redirection_custom_endpoint(self): + self._bootstrap_client(endpoint_url='https://outpost.foo.com/') + self.stubber.add_response() + with self.stubber: + self.client.create_bucket(Bucket='foo', OutpostId='op-123') + _assert_netloc(self.stubber, 'outpost.foo.com') + _assert_header(self.stubber, 'x-amz-outpost-id', 'op-123') + + def test_normal_ap_request_has_correct_endpoint(self): + self.stubber.add_response() + with self.stubber: + self.client.get_access_point_policy(Name='MyAp', AccountId='1234') + _assert_netloc(self.stubber, '1234.s3-control.us-west-2.amazonaws.com') + + def test_normal_ap_request_custom_endpoint(self): + self._bootstrap_client(endpoint_url='https://example.com/') + self.stubber.add_response() + with self.stubber: + self.client.get_access_point_policy(Name='MyAp', AccountId='1234') + _assert_netloc(self.stubber, '1234.example.com') + + def test_normal_bucket_request_has_correct_endpoint(self): + self.stubber.add_response() + with self.stubber: + self.client.create_bucket(Bucket='foo') + _assert_netloc(self.stubber, 's3-control.us-west-2.amazonaws.com') + + def test_arn_account_id_mismatch(self): + arn = ( + 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:' + 'op-01234567890123456:accesspoint:myaccesspoint' + ) + with self.assertRaises(UnsupportedS3ControlArnError): + self.client.get_access_point_policy(Name=arn, AccountId='1234') + + def test_create_access_point_does_not_expand_name(self): + arn = ( + 'arn:aws:s3-outposts:us-west-2:123456789012:outpost:' + 'op-01234567890123456:accesspoint:myaccesspoint' + ) + # AccountId will not be backfilled by the arn expansion and thus + # fail parameter validation + with self.assertRaises(ParamValidationError): + self.client.create_access_point(Name=arn, Bucket='foo') + + def test_arn_invalid_host_label(self): + config = Config(s3={'use_arn_region': True}) + self._bootstrap_client(config=config) + arn = ( + 'arn:aws:s3-outposts:us-we$t-2:123456789012:outpost:' + 'op-01234567890123456:accesspoint:myaccesspoint' + ) + with self.assertRaises(InvalidHostLabelError): + self.client.get_access_point_policy(Name=arn) + + def test_unknown_arn_format(self): + arn = 'arn:aws:foo:us-west-2:123456789012:bar:myresource' + with self.assertRaises(UnsupportedS3ControlArnError): + self.client.get_access_point_policy(Name=arn) diff --git a/testbed/boto__botocore/tests/functional/test_s3express.py b/testbed/boto__botocore/tests/functional/test_s3express.py new file mode 100644 index 0000000000000000000000000000000000000000..390721ee12317802ecbdb700a73cea6c7fabaf83 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_s3express.py @@ -0,0 +1,308 @@ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import datetime + +import pytest +from dateutil.tz import tzutc + +import botocore.session +from botocore.auth import S3ExpressAuth +from botocore.awsrequest import AWSRequest +from botocore.credentials import Credentials, RefreshableCredentials +from botocore.utils import S3ExpressIdentityCache +from tests import ClientHTTPStubber, mock + +ACCESS_KEY = "AKIDEXAMPLE" +SECRET_KEY = "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY" +TOKEN = "TOKEN" + +EXPRESS_ACCESS_KEY = "EXPRESS_AKIDEXAMPLE" +EXPRESS_SECRET_KEY = "EXPRESS_53cr37" +EXPRESS_TOKEN = "EXPRESS_TOKEN" + +CREDENTIALS = Credentials(ACCESS_KEY, SECRET_KEY, TOKEN) +ENDPOINT = "https://s3.us-west-2.amazonaws.com" + +S3EXPRESS_BUCKET = "mytestbucket--usw2-az5--x-s3" + + +DATE = datetime.datetime(2023, 11, 26, 0, 0, 0, tzinfo=tzutc()) + + +CREATE_SESSION_RESPONSE = ( + b"\n" + b"" + b"EXPRESS_TOKEN" + b"EXPRESS_53cr37" + b"EXPRESS_AKIDEXAMPLE" + b"2023-11-28T01:46:39Z" + b"" +) + + +@pytest.fixture +def default_s3_client(): + session = botocore.session.Session() + return session.create_client( + 's3', + 'us-west-2', + aws_access_key_id=ACCESS_KEY, + aws_secret_access_key=SECRET_KEY, + aws_session_token=TOKEN, + ) + + +@pytest.fixture +def mock_datetime(): + with mock.patch('datetime.datetime', spec=True) as mock_datetime: + yield mock_datetime + + +def _assert_expected_create_session_call(request, bucket): + assert bucket in request.url + assert request.url.endswith('?session') + assert request.method == "GET" + + +class TestS3ExpressAuth: + def _assert_has_expected_headers(self, request, header_list=None): + if header_list is None: + header_list = ["Authorization", "X-Amz-S3Session-Token"] + + for header in header_list: + assert header in request.headers + + def test_s3express_auth_requires_instance_cache(self): + assert hasattr(S3ExpressAuth, "REQUIRES_IDENTITY_CACHE") + assert S3ExpressAuth.REQUIRES_IDENTITY_CACHE is True + + def test_s3_express_auth_headers(self): + request = AWSRequest( + method='GET', + url=ENDPOINT, + ) + auth_instance = S3ExpressAuth( + CREDENTIALS, "s3", "us-west-2", identity_cache={} + ) + + # Confirm there is no existing auth info on request + assert 'Authorization' not in request.headers + auth_instance.add_auth(request) + self._assert_has_expected_headers(request) + + # Confirm we're not including the unsupported X-Amz-Security-Token + # header for S3Express. + assert 'X-Amz-Security-Token' not in request.headers + + +class TestS3ExpressIdentityCache: + def test_default_s3_express_cache(self, default_s3_client, mock_datetime): + mock_datetime.now.return_value = DATE + mock_datetime.utcnow.return_value = DATE + + identity_cache = S3ExpressIdentityCache( + default_s3_client, + RefreshableCredentials, + ) + with ClientHTTPStubber(default_s3_client) as stubber: + stubber.add_response(body=CREATE_SESSION_RESPONSE) + credentials = identity_cache.get_credentials('my_bucket') + + assert credentials.access_key == EXPRESS_ACCESS_KEY + assert credentials.secret_key == EXPRESS_SECRET_KEY + assert credentials.token == EXPRESS_TOKEN + + def test_s3_express_cache_one_network_call( + self, default_s3_client, mock_datetime + ): + mock_datetime.now.return_value = DATE + mock_datetime.utcnow.return_value = DATE + bucket = 'my_bucket' + + identity_cache = S3ExpressIdentityCache( + default_s3_client, + RefreshableCredentials, + ) + with ClientHTTPStubber(default_s3_client) as stubber: + # Only set one response + stubber.add_response(body=CREATE_SESSION_RESPONSE) + + first_creds = identity_cache.get_credentials(bucket) + second_creds = identity_cache.get_credentials(bucket) + + # Confirm we got back the same credentials + assert first_creds == second_creds + + # Confirm we didn't hit the API twice + assert len(stubber.requests) == 1 + _assert_expected_create_session_call(stubber.requests[0], bucket) + + def test_s3_express_cache_multiple_buckets( + self, default_s3_client, mock_datetime + ): + mock_datetime.now.return_value = DATE + mock_datetime.utcnow.return_value = DATE + bucket = 'my_bucket' + other_bucket = 'other_bucket' + + identity_cache = S3ExpressIdentityCache( + default_s3_client, + RefreshableCredentials, + ) + with ClientHTTPStubber(default_s3_client) as stubber: + stubber.add_response(body=CREATE_SESSION_RESPONSE) + stubber.add_response(body=CREATE_SESSION_RESPONSE) + + identity_cache.get_credentials(bucket) + identity_cache.get_credentials(other_bucket) + + # Confirm we hit the API for each bucket + assert len(stubber.requests) == 2 + _assert_expected_create_session_call(stubber.requests[0], bucket) + _assert_expected_create_session_call( + stubber.requests[1], other_bucket + ) + + +class TestS3ExpressRequests: + def _assert_standard_sigv4_signature(self, headers): + sigv4_auth_preamble = ( + b'AWS4-HMAC-SHA256 Credential=' + b'AKIDEXAMPLE/20231126/us-west-2/s3express/aws4_request' + ) + assert 'Authorization' in headers + assert headers['Authorization'].startswith(sigv4_auth_preamble) + + def _assert_s3express_credentials(self, headers): + s3express_auth_preamble = ( + b'AWS4-HMAC-SHA256 Credential=' + b'EXPRESS_AKIDEXAMPLE/20231126/us-west-2/s3express/aws4_request' + ) + assert 'Authorization' in headers + assert 'x-amz-s3session-token' in headers + assert headers['Authorization'].startswith(s3express_auth_preamble) + assert headers['x-amz-s3session-token'] == b'EXPRESS_TOKEN' + + def _assert_checksum_algorithm_added(self, algorithm, headers): + algorithm_header_name = f"x-amz-checksum-{algorithm}" + assert algorithm_header_name in headers + + def _call_get_object(self, client): + return client.get_object( + Bucket=S3EXPRESS_BUCKET, + Key='my-test-object', + ) + + def test_create_bucket(self, default_s3_client, mock_datetime): + mock_datetime.utcnow.return_value = DATE + + with ClientHTTPStubber(default_s3_client) as stubber: + stubber.add_response() + + default_s3_client.create_bucket( + Bucket=S3EXPRESS_BUCKET, + CreateBucketConfiguration={ + 'Location': { + 'Name': 'usw2-az5', + 'Type': 'AvailabilityZone', + }, + 'Bucket': { + "DataRedundancy": "SingleAvailabilityZone", + "Type": "Directory", + }, + }, + ) + + # Confirm we don't call CreateSession for create_bucket + assert len(stubber.requests) == 1 + self._assert_standard_sigv4_signature(stubber.requests[0].headers) + + def test_get_object(self, default_s3_client, mock_datetime): + mock_datetime.utcnow.return_value = DATE + mock_datetime.now.return_value = DATE + + with ClientHTTPStubber(default_s3_client) as stubber: + stubber.add_response(body=CREATE_SESSION_RESPONSE) + stubber.add_response() + + self._call_get_object(default_s3_client) + + # Confirm we called CreateSession for create_bucket + assert len(stubber.requests) == 2 + _assert_expected_create_session_call( + stubber.requests[0], S3EXPRESS_BUCKET + ) + self._assert_standard_sigv4_signature(stubber.requests[0].headers) + + # Confirm actual PutObject request was signed with Session credentials + self._assert_s3express_credentials(stubber.requests[1].headers) + + def test_cache_with_multiple_requests( + self, default_s3_client, mock_datetime + ): + mock_datetime.utcnow.return_value = DATE + mock_datetime.now.return_value = DATE + + with ClientHTTPStubber(default_s3_client) as stubber: + stubber.add_response(body=CREATE_SESSION_RESPONSE) + stubber.add_response() + stubber.add_response() + + self._call_get_object(default_s3_client) + self._call_get_object(default_s3_client) + + # Confirm we called CreateSession for create_bucket once + assert len(stubber.requests) == 3 + _assert_expected_create_session_call( + stubber.requests[0], S3EXPRESS_BUCKET + ) + self._assert_standard_sigv4_signature(stubber.requests[0].headers) + + # Confirm we signed both called with S3Express credentials + self._assert_s3express_credentials(stubber.requests[1].headers) + self._assert_s3express_credentials(stubber.requests[2].headers) + + def test_delete_objects_injects_correct_checksum( + self, default_s3_client, mock_datetime + ): + mock_datetime.utcnow.return_value = DATE + mock_datetime.now.return_value = DATE + + with ClientHTTPStubber(default_s3_client) as stubber: + stubber.add_response(body=CREATE_SESSION_RESPONSE) + stubber.add_response() + + default_s3_client.delete_objects( + Bucket=S3EXPRESS_BUCKET, + Delete={ + "Objects": [ + { + "Key": "my-obj", + "VersionId": "1", + } + ] + }, + ) + + # Confirm we called CreateSession for create_bucket + assert len(stubber.requests) == 2 + _assert_expected_create_session_call( + stubber.requests[0], S3EXPRESS_BUCKET + ) + self._assert_standard_sigv4_signature(stubber.requests[0].headers) + + # Confirm we signed both called with S3Express credentials + self._assert_s3express_credentials(stubber.requests[1].headers) + self._assert_checksum_algorithm_added( + 'crc32', stubber.requests[1].headers + ) diff --git a/testbed/boto__botocore/tests/functional/test_sagemaker.py b/testbed/boto__botocore/tests/functional/test_sagemaker.py new file mode 100644 index 0000000000000000000000000000000000000000..59a5d61434fb40a1f4c6eedba582d0ab98fbf9a7 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_sagemaker.py @@ -0,0 +1,39 @@ +from botocore.stub import Stubber +from tests import BaseSessionTest + + +class TestSagemaker(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('sagemaker', self.region) + self.stubber = Stubber(self.client) + self.stubber.activate() + self.hook_calls = [] + + def _hook(self, **kwargs): + self.hook_calls.append(kwargs['event_name']) + + def tearDown(self): + super().tearDown() + self.stubber.deactivate() + + def test_event_with_old_prefix(self): + self.client.meta.events.register( + 'provide-client-params.sagemaker.ListEndpoints', self._hook + ) + self.stubber.add_response('list_endpoints', {'Endpoints': []}) + self.client.list_endpoints() + self.assertEqual( + self.hook_calls, ['provide-client-params.sagemaker.ListEndpoints'] + ) + + def test_event_with_new_prefix(self): + self.client.meta.events.register( + 'provide-client-params.api.sagemaker.ListEndpoints', self._hook + ) + self.stubber.add_response('list_endpoints', {'Endpoints': []}) + self.client.list_endpoints() + self.assertEqual( + self.hook_calls, ['provide-client-params.sagemaker.ListEndpoints'] + ) diff --git a/testbed/boto__botocore/tests/functional/test_service_alias.py b/testbed/boto__botocore/tests/functional/test_service_alias.py new file mode 100644 index 0000000000000000000000000000000000000000..0263a7a5990dc7302d6261ea05dd44dafda76d44 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_service_alias.py @@ -0,0 +1,39 @@ +# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +import botocore.session +from botocore.handlers import SERVICE_NAME_ALIASES + +CLIENT_KWARGS = { + "region_name": "us-east-1", + "aws_access_key_id": "foo", + "aws_secret_access_key": "bar", +} + + +def _service_alias_test_cases(): + session = botocore.session.get_session() + for alias, name in SERVICE_NAME_ALIASES.items(): + yield session, name, alias + + +@pytest.mark.parametrize( + "session, service_name, service_alias", _service_alias_test_cases() +) +def test_can_use_service_alias(session, service_name, service_alias): + original_client = session.create_client(service_name, **CLIENT_KWARGS) + aliased_client = session.create_client(service_alias, **CLIENT_KWARGS) + original_model_name = original_client.meta.service_model.service_name + aliased_model_name = aliased_client.meta.service_model.service_name + assert original_model_name == aliased_model_name diff --git a/testbed/boto__botocore/tests/functional/test_service_names.py b/testbed/boto__botocore/tests/functional/test_service_names.py new file mode 100644 index 0000000000000000000000000000000000000000..2d453979dc5a69fc3c66f62849120ce0ce966c1d --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_service_names.py @@ -0,0 +1,69 @@ +# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import re + +import pytest + +from botocore.session import get_session + +BLOCKLIST = [] + +# Service names are limited here to 50 characters here as that seems like a +# reasonable limit in the general case. Services can be added to the +# blacklist above to be given an exception. +VALID_NAME_REGEX = re.compile( + ( + '[a-z]' # Starts with a letter + '[a-z0-9]*' # Followed by any number of letters or digits + '(-[a-z0-9]+)*$' # Dashes are allowed as long as they aren't + # consecutive or at the end + ), + re.M, +) +VALID_NAME_EXPLANATION = ( + 'Service names must be made up entirely of lowercase alphanumeric ' + 'characters and dashes. The name must start with a letter and may not end ' + 'with a dash' +) +MIN_NAME_LENGTH_EXPLANATION = ( + 'Service name must be greater than or equal to 2 characters in length.' +) +MAX_NAME_LENGTH_EXPLANATION = ( + 'Service name must be less than or equal to 50 characters in length.' +) +MIN_SERVICE_NAME_LENGTH = 2 +MAX_SERVICE_NAME_LENGTH = 50 + + +def _service_names(): + session = get_session() + loader = session.get_component('data_loader') + return loader.list_available_services('service-2') + + +@pytest.mark.parametrize("service_name", _service_names()) +def test_service_names_are_valid_length(service_name): + if service_name not in BLOCKLIST: + service_name_length = len(service_name) + is_not_too_short = service_name_length >= MIN_SERVICE_NAME_LENGTH + is_not_too_long = service_name_length <= MAX_SERVICE_NAME_LENGTH + + assert is_not_too_short, MIN_NAME_LENGTH_EXPLANATION + assert is_not_too_long, MAX_NAME_LENGTH_EXPLANATION + + +@pytest.mark.parametrize("service_name", _service_names()) +def test_service_names_are_valid_pattern(service_name): + if service_name not in BLOCKLIST: + valid = VALID_NAME_REGEX.match(service_name) is not None + assert valid, VALID_NAME_EXPLANATION diff --git a/testbed/boto__botocore/tests/functional/test_session.py b/testbed/boto__botocore/tests/functional/test_session.py new file mode 100644 index 0000000000000000000000000000000000000000..d48349973b88f73f1b94626466af612329ba3cb5 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_session.py @@ -0,0 +1,102 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from botocore.exceptions import ProfileNotFound +from tests import mock, temporary_file, unittest + + +class TestSession(unittest.TestCase): + def setUp(self): + self.environ = {} + self.env_patch = mock.patch('os.environ', self.environ) + self.env_patch.start() + self.session = botocore.session.get_session() + + def tearDown(self): + self.env_patch.stop() + + def test_profile_precedence(self): + self.environ['AWS_PROFILE'] = 'from_env_var' + self.session.set_config_variable('profile', 'from_session_instance') + self.assertEqual(self.session.profile, 'from_session_instance') + + def test_credentials_with_profile_precedence(self): + self.environ['AWS_PROFILE'] = 'from_env_var' + self.session.set_config_variable('profile', 'from_session_instance') + try: + self.session.get_credentials() + except ProfileNotFound as e: + self.assertNotIn('from_env_var', str(e)) + self.assertIn('from_session_instance', str(e)) + + def test_session_profile_overrides_env_vars(self): + # If the ".profile" attribute is set then the associated + # creds for that profile take precedence over the environment + # variables. + with temporary_file('w') as f: + # We test this by creating creds in two places, + # env vars and a fake shared creds file. We ensure + # that if an explicit profile is set we pull creds + # from the shared creds file. + self.environ['AWS_ACCESS_KEY_ID'] = 'env_var_akid' + self.environ['AWS_SECRET_ACCESS_KEY'] = 'env_var_sak' + self.environ['AWS_SHARED_CREDENTIALS_FILE'] = f.name + f.write( + '[from_session_instance]\n' + 'aws_access_key_id=shared_creds_akid\n' + 'aws_secret_access_key=shared_creds_sak\n' + ) + f.flush() + self.session.set_config_variable( + 'profile', 'from_session_instance' + ) + creds = self.session.get_credentials() + self.assertEqual(creds.access_key, 'shared_creds_akid') + self.assertEqual(creds.secret_key, 'shared_creds_sak') + + def test_profile_does_not_win_if_all_from_env_vars(self): + # Creds should be pulled from the env vars because + # if access_key/secret_key/profile are all specified on + # the same "level", then the explicit creds take + # precedence. + with temporary_file('w') as f: + self.environ['AWS_SHARED_CREDENTIALS_FILE'] = f.name + self.environ['AWS_PROFILE'] = 'myprofile' + # Even though we don't use the profile for credentials, + # if you have a profile configured in any way + # (env vars, set when creating a session, etc.) that profile + # must exist. So we need to create an empty profile + # matching the value from AWS_PROFILE. + f.write('[myprofile]\n') + f.flush() + self.environ['AWS_ACCESS_KEY_ID'] = 'env_var_akid' + self.environ['AWS_SECRET_ACCESS_KEY'] = 'env_var_sak' + + creds = self.session.get_credentials() + + self.assertEqual(creds.access_key, 'env_var_akid') + self.assertEqual(creds.secret_key, 'env_var_sak') + + def test_provides_available_regions_for_same_endpoint_prefix(self): + regions = self.session.get_available_regions('s3') + self.assertTrue(regions) + + def test_provides_available_regions_for_different_endpoint_prefix(self): + regions = self.session.get_available_regions('elb') + self.assertTrue(regions) + + def test_does_not_provide_regions_for_mismatch_service_name(self): + # elb's endpoint prefix is elasticloadbalancing, but users should + # still be using the service name when getting regions + regions = self.session.get_available_regions('elasticloadbalancing') + self.assertEqual(regions, []) diff --git a/testbed/boto__botocore/tests/functional/test_six_imports.py b/testbed/boto__botocore/tests/functional/test_six_imports.py new file mode 100644 index 0000000000000000000000000000000000000000..41086f56f7de7b16fe702b67a9fd3b9734b63da6 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_six_imports.py @@ -0,0 +1,56 @@ +import ast +import os + +import pytest + +import botocore + +ROOTDIR = os.path.dirname(botocore.__file__) + + +def _all_files(): + for rootdir, dirnames, filenames in os.walk(ROOTDIR): + if 'vendored' in dirnames: + # We don't need to lint our vendored packages. + dirnames.remove('vendored') + for filename in filenames: + if not filename.endswith('.py'): + continue + yield os.path.join(rootdir, filename) + + +@pytest.mark.parametrize("filename", _all_files()) +def test_no_bare_six_imports(filename): + with open(filename) as f: + contents = f.read() + parsed = ast.parse(contents, filename) + SixImportChecker(filename).visit(parsed) + + +class SixImportChecker(ast.NodeVisitor): + def __init__(self, filename): + self.filename = filename + + def visit_Import(self, node): + for alias in node.names: + if getattr(alias, 'name', '') == 'six': + line = self._get_line_content(self.filename, node.lineno) + raise AssertionError( + f"A bare 'import six' was found in {self.filename}:\n" + f"\n{node.lineno}: {line}\n" + "Please use 'from botocore.compat import six' instead" + ) + + def visit_ImportFrom(self, node): + if node.module == 'six': + line = self._get_line_content(self.filename, node.lineno) + raise AssertionError( + f"A bare 'from six import ...' was found in {self.filename}:\n" + f"\n{node.lineno}:{line}\n" + "Please use 'from botocore.compat import six' instead" + ) + + def _get_line_content(self, filename, lineno): + with open(filename) as f: + contents = f.readlines() + return contents[lineno - 1] diff --git a/testbed/boto__botocore/tests/functional/test_six_threading.py b/testbed/boto__botocore/tests/functional/test_six_threading.py new file mode 100644 index 0000000000000000000000000000000000000000..c4460f72053ed0807f9a5bf91bb119a451cb6035 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_six_threading.py @@ -0,0 +1,62 @@ +""" +Regression test for six issue #98 (https://github.com/benjaminp/six/issues/98) +""" + +import sys +import threading +import time + +from botocore.vendored import six +from tests import mock + +_original_setattr = six.moves.__class__.__setattr__ + + +def _wrapped_setattr(key, value): + # Monkey patch six.moves.__setattr__ to simulate + # a poorly-timed thread context switch + time.sleep(0.1) + return _original_setattr(six.moves, key, value) + + +def _reload_six(): + # Issue #98 is caused by a race condition in six._LazyDescr.__get__ + # which is only called once per moved module. Reload six so all the + # moved modules are reset. + import importlib + + importlib.reload(six) + + +class _ExampleThread(threading.Thread): + def __init__(self): + super().__init__() + self.daemon = False + self.exc_info = None + + def run(self): + try: + # Simulate use of six by + # botocore.configloader.raw_config_parse() + # Should raise AttributeError if six < 1.9.0 + six.moves.configparser.RawConfigParser() + except Exception: + self.exc_info = sys.exc_info() + + +def test_six_thread_safety(): + _reload_six() + with mock.patch( + 'botocore.vendored.six.moves.__class__.__setattr__', + wraps=_wrapped_setattr, + ): + threads = [] + for i in range(2): + t = _ExampleThread() + threads.append(t) + t.start() + while threads: + t = threads.pop() + t.join() + if t.exc_info: + six.reraise(*t.exc_info) diff --git a/testbed/boto__botocore/tests/functional/test_sqs.py b/testbed/boto__botocore/tests/functional/test_sqs.py new file mode 100644 index 0000000000000000000000000000000000000000..bde70c86ed425f686e8192d5f5d59b3905f4010a --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_sqs.py @@ -0,0 +1,48 @@ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +import pytest + +from tests import BaseSessionTest, ClientHTTPStubber + + +class BaseSQSOperationTest(BaseSessionTest): + def setUp(self): + super().setUp() + self.region = "us-west-2" + self.client = self.session.create_client("sqs", self.region) + self.http_stubber = ClientHTTPStubber(self.client) + + +class SQSQueryCompatibleTest(BaseSQSOperationTest): + def test_query_compatible_error_parsing(self): + """When migrating SQS from the ``query`` protocol to ``json``, + we unintentionally moved from modeled errors to a general ``ClientError``. + This ensures we're not silently regressing that behavior. + """ + + error_body = ( + b'{"__type":"com.amazonaws.sqs#QueueDoesNotExist",' + b'"message":"The specified queue does not exist."}' + ) + error_headers = { + "x-amzn-query-error": "AWS.SimpleQueueService.NonExistentQueue;Sender", + } + with self.http_stubber as stub: + stub.add_response( + status=400, body=error_body, headers=error_headers + ) + with pytest.raises(self.client.exceptions.QueueDoesNotExist): + self.client.delete_queue( + QueueUrl="not-a-real-queue-botocore", + ) diff --git a/testbed/boto__botocore/tests/functional/test_sts.py b/testbed/boto__botocore/tests/functional/test_sts.py new file mode 100644 index 0000000000000000000000000000000000000000..42fac967112b3023938c24928cc3f9c56a2d0d21 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_sts.py @@ -0,0 +1,316 @@ +# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import re +from datetime import datetime + +from botocore.config import Config +from botocore.stub import Stubber +from tests import ( + BaseSessionTest, + ClientHTTPStubber, + assert_url_equal, + mock, + temporary_file, +) + +_V4_SIGNING_REGION_REGEX = re.compile( + r'AWS4-HMAC-SHA256 ' r'Credential=\w+/\d+/(?P[a-z0-9-]+)/' +) + + +class TestSTSPresignedUrl(BaseSessionTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client('sts', 'us-west-2') + # Makes sure that no requests will go through + self.stubber = Stubber(self.client) + self.stubber.activate() + + def test_presigned_url_contains_no_content_type(self): + timestamp = datetime(2017, 3, 22, 0, 0) + with mock.patch('botocore.auth.datetime.datetime') as _datetime: + _datetime.utcnow.return_value = timestamp + url = self.client.generate_presigned_url('get_caller_identity', {}) + + # There should be no 'content-type' in x-amz-signedheaders + expected_url = ( + 'https://sts.amazonaws.com/?Action=GetCallerIdentity&' + 'Version=2011-06-15&X-Amz-Algorithm=AWS4-HMAC-SHA256&' + 'X-Amz-Credential=access_key%2F20170322%2Fus-east-1%2Fsts%2F' + 'aws4_request&X-Amz-Date=20170322T000000Z&X-Amz-Expires=3600&' + 'X-Amz-SignedHeaders=host&X-Amz-Signature=767845d2ee858069a598d5f' + '8b497b75c7d57356885b1b3dba46dbbc0fc62bf5a' + ) + assert_url_equal(url, expected_url) + + +class TestSTSEndpoints(BaseSessionTest): + def create_sts_client( + self, region, endpoint_url=None, use_ssl=True, config=None + ): + return self.session.create_client( + 'sts', + region_name=region, + endpoint_url=endpoint_url, + use_ssl=use_ssl, + config=config, + ) + + def set_sts_regional_for_config_file(self, fileobj, config_val): + fileobj.write('[default]\n' f'sts_regional_endpoints={config_val}\n') + fileobj.flush() + self.environ['AWS_CONFIG_FILE'] = fileobj.name + + def assert_request_sent( + self, sts, expected_url, expected_signing_region=None + ): + body = ( + b'' + b' ' + b' arn:aws:iam::123456789012:user/myuser' + b' UserID' + b' 123456789012' + b' ' + b' ' + b' some-request' + b' ' + b'' + ) + with ClientHTTPStubber(sts) as http_stubber: + http_stubber.add_response(body=body) + sts.get_caller_identity() + captured_request = http_stubber.requests[0] + self.assertEqual(captured_request.url, expected_url) + if expected_signing_region: + self.assertEqual( + self._get_signing_region(captured_request), + expected_signing_region, + ) + + def _get_signing_region(self, request): + authorization_val = request.headers['Authorization'].decode('utf-8') + match = _V4_SIGNING_REGION_REGEX.match(authorization_val) + return match.group('signing_region') + + def test_legacy_region_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client('us-west-2') + self.assert_request_sent( + sts, + expected_url='https://sts.amazonaws.com/', + expected_signing_region='us-east-1', + ) + + def test_legacy_region_with_regional_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client('us-west-2') + self.assert_request_sent( + sts, + expected_url='https://sts.us-west-2.amazonaws.com/', + expected_signing_region='us-west-2', + ) + + def test_fips_endpoint_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client('us-west-2-fips') + self.assert_request_sent( + sts, + expected_url='https://sts-fips.us-west-2.amazonaws.com/', + expected_signing_region='us-west-2', + ) + + def test_fips_endpoint_with_regional_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client('us-west-2-fips') + self.assert_request_sent( + sts, + expected_url='https://sts-fips.us-west-2.amazonaws.com/', + expected_signing_region='us-west-2', + ) + + def test_dualstack_endpoint_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + dualstack_config = Config(use_dualstack_endpoint=True) + sts = self.create_sts_client('us-west-2', config=dualstack_config) + self.assert_request_sent( + sts, + expected_url='https://sts.us-west-2.api.aws/', + expected_signing_region='us-west-2', + ) + + def test_dualstack_endpoint_with_regional_configured(self): + dualstack_config = Config(use_dualstack_endpoint=True) + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client('us-west-2', config=dualstack_config) + self.assert_request_sent( + sts, + expected_url='https://sts.us-west-2.api.aws/', + expected_signing_region='us-west-2', + ) + + def test_nonlegacy_region_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client('ap-east-1') + self.assert_request_sent( + sts, + expected_url='https://sts.ap-east-1.amazonaws.com/', + expected_signing_region='ap-east-1', + ) + + def test_nonlegacy_region_with_regional_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client('ap-east-1') + self.assert_request_sent( + sts, + expected_url='https://sts.ap-east-1.amazonaws.com/', + expected_signing_region='ap-east-1', + ) + + def test_nonaws_partition_region_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client('cn-north-1') + self.assert_request_sent( + sts, + expected_url='https://sts.cn-north-1.amazonaws.com.cn/', + expected_signing_region='cn-north-1', + ) + + def test_nonaws_partition_region_with_regional_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client('cn-north-1') + self.assert_request_sent( + sts, + expected_url='https://sts.cn-north-1.amazonaws.com.cn/', + expected_signing_region='cn-north-1', + ) + + def test_global_region_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client('aws-global') + self.assert_request_sent( + sts, + expected_url='https://sts.amazonaws.com/', + expected_signing_region='us-east-1', + ) + + def test_global_region_with_regional_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client('aws-global') + self.assert_request_sent( + sts, + expected_url='https://sts.amazonaws.com/', + expected_signing_region='us-east-1', + ) + + def test_defaults_to_global_endpoint_for_legacy_region(self): + sts = self.create_sts_client('us-west-2') + self.assert_request_sent( + sts, + expected_url='https://sts.amazonaws.com/', + expected_signing_region='us-east-1', + ) + + def test_defaults_to_regional_endpoint_for_nonlegacy_region(self): + sts = self.create_sts_client('ap-east-1') + self.assert_request_sent( + sts, + expected_url='https://sts.ap-east-1.amazonaws.com/', + expected_signing_region='ap-east-1', + ) + + def test_configure_sts_regional_from_config_file(self): + with temporary_file('w') as f: + self.set_sts_regional_for_config_file(f, 'regional') + sts = self.create_sts_client('us-west-2') + self.assert_request_sent( + sts, + expected_url='https://sts.us-west-2.amazonaws.com/', + ) + + def test_env_var_overrides_config_file(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + with temporary_file('w') as f: + self.set_sts_regional_for_config_file(f, 'regional') + sts = self.create_sts_client('us-west-2') + self.assert_request_sent( + sts, expected_url='https://sts.amazonaws.com/' + ) + + def test_user_provided_endpoint_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client( + 'us-west-2', endpoint_url='https://custom.com' + ) + self.assert_request_sent(sts, expected_url='https://custom.com/') + + def test_user_provided_endpoint_with_regional_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client( + 'us-west-2', endpoint_url='https://custom.com' + ) + self.assert_request_sent(sts, expected_url='https://custom.com/') + + def test_http_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client('us-west-2', use_ssl=False) + self.assert_request_sent(sts, expected_url='http://sts.amazonaws.com/') + + def test_client_for_unknown_region(self): + sts = self.create_sts_client('not-real') + self.assert_request_sent( + sts, + expected_url='https://sts.not-real.amazonaws.com/', + expected_signing_region='not-real', + ) + + def test_client_for_unknown_region_with_legacy_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'legacy' + sts = self.create_sts_client('not-real') + self.assert_request_sent( + sts, expected_url='https://sts.not-real.amazonaws.com/' + ) + + def test_client_for_unknown_region_with_regional_configured(self): + self.environ['AWS_STS_REGIONAL_ENDPOINTS'] = 'regional' + sts = self.create_sts_client('not-real') + self.assert_request_sent( + sts, + expected_url='https://sts.not-real.amazonaws.com/', + expected_signing_region='not-real', + ) + + +def test_assume_role_with_saml_no_region_custom_endpoint(patched_session): + # When an endpoint_url and no region are given, AssumeRoleWithSAML should + # resolve to the endpoint_url and succeed, not fail in endpoint resolution: + # https://github.com/aws/aws-cli/issues/7455 + + client = patched_session.create_client( + 'sts', region_name=None, endpoint_url="https://custom.endpoint.aws" + ) + assert client.meta.region_name is None + + mock_response_body = b"""\ + + + +""" + with ClientHTTPStubber(client) as http_stubber: + http_stubber.add_response(body=mock_response_body) + client.assume_role_with_saml( + RoleArn='arn:aws:iam::123456789:role/RoleA', + PrincipalArn='arn:aws:iam::123456789:role/RoleB', + SAMLAssertion='xxxx', + ) + captured_request = http_stubber.requests[0] + assert captured_request.url == "https://custom.endpoint.aws/" diff --git a/testbed/boto__botocore/tests/functional/test_stub.py b/testbed/boto__botocore/tests/functional/test_stub.py new file mode 100644 index 0000000000000000000000000000000000000000..a10f491351ec32466370da13cc72578797a2dba8 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_stub.py @@ -0,0 +1,403 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore +import botocore.client +import botocore.config +import botocore.retryhandler +import botocore.session +import botocore.stub as stub +import botocore.translate +from botocore.exceptions import ( + ClientError, + ParamValidationError, + StubAssertionError, + StubResponseError, + UnStubbedResponseError, +) +from botocore.stub import Stubber +from tests import unittest + + +class TestStubber(unittest.TestCase): + def setUp(self): + session = botocore.session.get_session() + config = botocore.config.Config( + signature_version=botocore.UNSIGNED, + s3={'addressing_style': 'path'}, + ) + self.client = session.create_client( + 's3', region_name='us-east-1', config=config + ) + self.stubber = Stubber(self.client) + + def test_stubber_returns_response(self): + service_response = {'ResponseMetadata': {'foo': 'bar'}} + self.stubber.add_response('list_objects', service_response) + self.stubber.activate() + response = self.client.list_objects(Bucket='foo') + self.assertEqual(response, service_response) + + def test_context_manager_returns_response(self): + service_response = {'ResponseMetadata': {'foo': 'bar'}} + self.stubber.add_response('list_objects', service_response) + + with self.stubber: + response = self.client.list_objects(Bucket='foo') + self.assertEqual(response, service_response) + + def test_activated_stubber_errors_with_no_registered_stubs(self): + self.stubber.activate() + # Params one per line for readability. + with self.assertRaisesRegex( + UnStubbedResponseError, "Unexpected API Call" + ): + self.client.list_objects( + Bucket='asdfasdfasdfasdf', + Delimiter='asdfasdfasdfasdf', + Prefix='asdfasdfasdfasdf', + EncodingType='url', + ) + + def test_stubber_errors_when_stubs_are_used_up(self): + self.stubber.add_response('list_objects', {}) + self.stubber.activate() + self.client.list_objects(Bucket='foo') + + with self.assertRaises(UnStubbedResponseError): + self.client.list_objects(Bucket='foo') + + def test_client_error_response(self): + error_code = "AccessDenied" + error_message = "Access Denied" + self.stubber.add_client_error( + 'list_objects', error_code, error_message + ) + self.stubber.activate() + + with self.assertRaises(ClientError): + self.client.list_objects(Bucket='foo') + + def test_modeled_client_error_response(self): + error_code = "InvalidObjectState" + error_message = "Object is in invalid state" + modeled_fields = { + 'StorageClass': 'foo', + 'AccessTier': 'bar', + } + self.stubber.add_client_error( + 'get_object', + error_code, + error_message, + modeled_fields=modeled_fields, + ) + self.stubber.activate() + + actual_exception = None + try: + self.client.get_object(Bucket='foo', Key='bar') + except self.client.exceptions.InvalidObjectState as e: + actual_exception = e + self.assertIsNotNone(actual_exception) + response = actual_exception.response + self.assertEqual(response['StorageClass'], 'foo') + self.assertEqual(response['AccessTier'], 'bar') + + def test_modeled_client_error_response_validation_error(self): + error_code = "InvalidObjectState" + error_message = "Object is in invalid state" + modeled_fields = { + 'BadField': 'fail please', + } + with self.assertRaises(ParamValidationError): + self.stubber.add_client_error( + 'get_object', + error_code, + error_message, + modeled_fields=modeled_fields, + ) + + def test_modeled_client_unknown_code_validation_error(self): + error_code = "NotARealError" + error_message = "Message" + modeled_fields = { + 'BadField': 'fail please', + } + with self.assertRaises(ParamValidationError): + self.stubber.add_client_error( + 'get_object', + error_code, + error_message, + modeled_fields=modeled_fields, + ) + + def test_can_add_expected_params_to_client_error(self): + self.stubber.add_client_error( + 'list_objects', 'Error', 'error', expected_params={'Bucket': 'foo'} + ) + self.stubber.activate() + with self.assertRaises(ClientError): + self.client.list_objects(Bucket='foo') + + def test_can_expected_param_fails_in_client_error(self): + self.stubber.add_client_error( + 'list_objects', 'Error', 'error', expected_params={'Bucket': 'foo'} + ) + self.stubber.activate() + # We expect an AssertionError instead of a ClientError + # because we're calling the operation with the wrong + # param value. + with self.assertRaises(AssertionError): + self.client.list_objects(Bucket='wrong-argument-value') + + def test_expected_params_success(self): + service_response = {} + expected_params = {'Bucket': 'foo'} + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + self.stubber.activate() + # This should be called successfully with no errors being thrown + # for mismatching expected params. + response = self.client.list_objects(Bucket='foo') + self.assertEqual(response, service_response) + + def test_expected_params_fail(self): + service_response = {} + expected_params = {'Bucket': 'bar'} + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + self.stubber.activate() + # This should call should raise an for mismatching expected params. + with self.assertRaisesRegex(StubResponseError, "{'Bucket': 'bar'},\n"): + self.client.list_objects(Bucket='foo') + + def test_expected_params_mixed_with_errors_responses(self): + # Add an error response + error_code = "AccessDenied" + error_message = "Access Denied" + self.stubber.add_client_error( + 'list_objects', error_code, error_message + ) + + # Add a response with incorrect expected params + service_response = {} + expected_params = {'Bucket': 'bar'} + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + + self.stubber.activate() + + # The first call should throw and error as expected. + with self.assertRaises(ClientError): + self.client.list_objects(Bucket='foo') + + # The second call should throw an error for unexpected parameters + with self.assertRaisesRegex(StubResponseError, 'Expected parameters'): + self.client.list_objects(Bucket='foo') + + def test_can_continue_to_call_after_expected_params_fail(self): + service_response = {} + expected_params = {'Bucket': 'bar'} + + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + + self.stubber.activate() + # Throw an error for unexpected parameters + with self.assertRaises(StubResponseError): + self.client.list_objects(Bucket='foo') + + # The stubber should still have the responses queued up + # even though the original parameters did not match the expected ones. + self.client.list_objects(Bucket='bar') + self.stubber.assert_no_pending_responses() + + def test_still_relies_on_param_validation_with_expected_params(self): + service_response = {} + expected_params = {'Buck': 'bar'} + + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + + self.stubber.activate() + # Throw an error for invalid parameters + with self.assertRaises(ParamValidationError): + self.client.list_objects(Buck='bar') + + def test_any_ignores_param_for_validation(self): + service_response = {} + expected_params = {'Bucket': stub.ANY} + + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + + try: + with self.stubber: + self.client.list_objects(Bucket='foo') + self.client.list_objects(Bucket='bar') + except StubAssertionError: + self.fail("stub.ANY failed to ignore parameter for validation.") + + def test_mixed_any_and_concrete_params(self): + service_response = {} + expected_params = {'Bucket': stub.ANY, 'Key': 'foo.txt'} + + self.stubber.add_response( + 'head_object', service_response, expected_params + ) + self.stubber.add_response( + 'head_object', service_response, expected_params + ) + + try: + with self.stubber: + self.client.head_object(Bucket='foo', Key='foo.txt') + self.client.head_object(Bucket='bar', Key='foo.txt') + except StubAssertionError: + self.fail("stub.ANY failed to ignore parameter for validation.") + + def test_nested_any_param(self): + service_response = {} + expected_params = { + 'Bucket': 'foo', + 'Key': 'bar.txt', + 'Metadata': { + 'MyMeta': stub.ANY, + }, + } + + self.stubber.add_response( + 'put_object', service_response, expected_params + ) + self.stubber.add_response( + 'put_object', service_response, expected_params + ) + + try: + with self.stubber: + self.client.put_object( + Bucket='foo', + Key='bar.txt', + Metadata={ + 'MyMeta': 'Foo', + }, + ) + self.client.put_object( + Bucket='foo', + Key='bar.txt', + Metadata={ + 'MyMeta': 'Bar', + }, + ) + except StubAssertionError: + self.fail( + "stub.ANY failed to ignore nested parameter for validation." + ) + + def test_ANY_repr(self): + self.assertEqual(repr(stub.ANY), '') + + def test_none_param(self): + service_response = {} + expected_params = {'Buck': None} + + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + + self.stubber.activate() + # Throw an error for invalid parameters + with self.assertRaises(StubAssertionError): + self.client.list_objects(Buck='bar') + + def test_many_expected_params(self): + service_response = {} + expected_params = { + 'Bucket': 'mybucket', + 'Prefix': 'myprefix', + 'Delimiter': '/', + 'EncodingType': 'url', + } + self.stubber.add_response( + 'list_objects', service_response, expected_params + ) + try: + with self.stubber: + self.client.list_objects(**expected_params) + except StubAssertionError: + self.fail( + "Stubber inappropriately raised error for same parameters." + ) + + def test_no_stub_for_presign_url(self): + try: + with self.stubber: + url = self.client.generate_presigned_url( + ClientMethod='get_object', + Params={'Bucket': 'mybucket', 'Key': 'mykey'}, + ) + self.assertEqual( + url, 'https://s3.amazonaws.com/mybucket/mykey' + ) + except StubResponseError: + self.fail( + 'Stubbed responses should not be required for generating ' + 'presigned requests' + ) + + def test_can_stub_with_presign_url_mixed_in(self): + desired_response = {} + expected_params = { + 'Bucket': 'mybucket', + 'Prefix': 'myprefix', + } + self.stubber.add_response( + 'list_objects', desired_response, expected_params + ) + with self.stubber: + url = self.client.generate_presigned_url( + ClientMethod='get_object', + Params={'Bucket': 'myotherbucket', 'Key': 'myotherkey'}, + ) + self.assertEqual( + url, 'https://s3.amazonaws.com/myotherbucket/myotherkey' + ) + actual_response = self.client.list_objects(**expected_params) + self.assertEqual(desired_response, actual_response) + self.stubber.assert_no_pending_responses() + + def test_parse_get_bucket_location(self): + error_code = "NoSuchBucket" + error_message = "The specified bucket does not exist" + self.stubber.add_client_error( + 'get_bucket_location', error_code, error_message + ) + self.stubber.activate() + + with self.assertRaises(ClientError): + self.client.get_bucket_location(Bucket='foo') + + def test_parse_get_bucket_location_returns_response(self): + service_response = {"LocationConstraint": "us-west-2"} + self.stubber.add_response('get_bucket_location', service_response) + self.stubber.activate() + response = self.client.get_bucket_location(Bucket='foo') + self.assertEqual(response, service_response) diff --git a/testbed/boto__botocore/tests/functional/test_tagged_unions_unknown.py b/testbed/boto__botocore/tests/functional/test_tagged_unions_unknown.py new file mode 100644 index 0000000000000000000000000000000000000000..ad67d66388f0984d00adcc7945f036f683b5cc41 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_tagged_unions_unknown.py @@ -0,0 +1,29 @@ +# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.session import Session +from tests import unittest + + +class TestTaggedUnionsUnknown(unittest.TestCase): + def test_tagged_union_member_name_does_not_coincide_with_unknown_key(self): + # This test ensures that operation models do not use SDK_UNKNOWN_MEMBER + # as a member name. Thereby reserving SDK_UNKNOWN_MEMBER for the parser to + # set as a key on the reponse object. This is necessary when the client + # encounters a member that it is unaware of or not modeled. + session = Session() + for service_name in session.get_available_services(): + service_model = session.get_service_model(service_name) + for shape_name in service_model.shape_names: + shape = service_model.shape_for(shape_name) + if hasattr(shape, 'is_tagged_union') and shape.is_tagged_union: + self.assertNotIn('SDK_UNKNOWN_MEMBER', shape.members) diff --git a/testbed/boto__botocore/tests/functional/test_useragent.py b/testbed/boto__botocore/tests/functional/test_useragent.py new file mode 100644 index 0000000000000000000000000000000000000000..79290459ab4d5c402f077765042bd8b2fff24811 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_useragent.py @@ -0,0 +1,298 @@ +# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import logging +from itertools import product + +import pytest + +from botocore import __version__ as botocore_version +from botocore.config import Config +from tests import ClientHTTPStubber + + +class UACapHTTPStubber(ClientHTTPStubber): + """ + Wrapper for ClientHTTPStubber that captures UA header from one request. + """ + + def __init__(self, obj_with_event_emitter): + super().__init__(obj_with_event_emitter, strict=False) + self.add_response() # expect exactly one request + + @property + def captured_ua_string(self): + if len(self.requests) > 0: + return self.requests[0].headers['User-Agent'].decode() + return None + + +@pytest.mark.parametrize( + 'sess_name, sess_version, sess_extra, cfg_extra, cfg_appid', + # Produce every combination of User-Agent related config settings other + # than Config.user_agent which will always be set in this test. + product( + ('sess_name', None), + ('sess_version', None), + ('sess_extra', None), + ('cfg_extra', None), + ('cfg_appid', None), + ), +) +def test_user_agent_from_config_replaces_default( + sess_name, + sess_version, + sess_extra, + cfg_extra, + cfg_appid, + patched_session, +): + # Config.user_agent replaces all parts of the regular User-Agent header + # format except for itself and "extras" set in Session and Config. This + # behavior exists to maintain backwards compatibility for clients who + # expect an exact User-Agent header value. + expected_str = 'my user agent str' + if sess_name: + patched_session.user_agent_name = sess_name + if sess_version: + patched_session.user_agent_version = sess_version + if sess_extra: + patched_session.user_agent_extra = sess_extra + expected_str += f' {sess_extra}' + client_cfg = Config( + user_agent='my user agent str', + user_agent_extra=cfg_extra, + user_agent_appid=cfg_appid, + ) + if cfg_extra: + expected_str += f' {cfg_extra}' + client_s3 = patched_session.create_client('s3', config=client_cfg) + with UACapHTTPStubber(client_s3) as stub_client: + client_s3.list_buckets() + + assert stub_client.captured_ua_string == expected_str + + +@pytest.mark.parametrize( + 'sess_name, sess_version, cfg_appid', + # Produce every combination of User-Agent related config settings other + # than Config.user_agent which is never set in this test + # (``test_user_agent_from_config_replaces_default`` covers all cases where + # it is set) and Session.user_agent_extra and Config.user_agent_extra + # which both are always set in this test + product( + ('sess_name', None), + ('sess_version', None), + ('cfg_appid', None), + ), +) +def test_user_agent_includes_extra( + sess_name, + sess_version, + cfg_appid, + patched_session, +): + # Libraries and apps can use the ``Config.user_agent_extra`` and + # ``Session.user_agent_extra`` to append arbitrary data to the User-Agent + # header. Unless Config.user_agent is also set, these two fields should + # always appear at the end of the header value. + if sess_name: + patched_session.user_agent_name = sess_name + if sess_version: + patched_session.user_agent_version = sess_version + patched_session.user_agent_extra = "sess_extra" + client_cfg = Config( + user_agent=None, + user_agent_extra='cfg_extra', + user_agent_appid=cfg_appid, + ) + client_s3 = patched_session.create_client('s3', config=client_cfg) + with UACapHTTPStubber(client_s3) as stub_client: + client_s3.list_buckets() + + assert stub_client.captured_ua_string.endswith(' sess_extra cfg_extra') + + +@pytest.mark.parametrize( + 'sess_name, sess_version, sess_extra, cfg_extra', + # Produce every combination of User-Agent related config settings other + # than Config.user_agent which is never set in this test and + # Config.user_agent_appid which is always set in this test. + product( + ('sess_name', None), + ('sess_version', None), + ('sess_extra', None), + ('cfg_extra', None), + ), +) +def test_user_agent_includes_appid( + sess_name, + sess_version, + sess_extra, + cfg_extra, + patched_session, +): + # The User-Agent header string should always include the value set in + # ``Config.user_agent_appid``, unless ``Config.user_agent`` is also set + # (this latter case is covered in ``test_user_agent_from_config_replaces_default``). + if sess_name: + patched_session.user_agent_name = sess_name + if sess_version: + patched_session.user_agent_version = sess_version + if sess_extra: + patched_session.user_agent_extra = sess_extra + client_cfg = Config( + user_agent=None, + user_agent_appid='123456', + user_agent_extra=cfg_extra, + ) + client_s3 = patched_session.create_client('s3', config=client_cfg) + with UACapHTTPStubber(client_s3) as stub_client: + client_s3.list_buckets() + + uafields = stub_client.captured_ua_string.split(' ') + assert 'app/123456' in uafields + + +def test_user_agent_long_appid_yields_warning(patched_session, caplog): + # user_agent_appid config values longer than 50 characters should result + # in a warning + sixtychars = '000000000011111111112222222222333333333344444444445555555555' + assert len(sixtychars) > 50 + client_cfg = Config(user_agent_appid=sixtychars) + client_s3 = patched_session.create_client('s3', config=client_cfg) + with UACapHTTPStubber(client_s3): + with caplog.at_level(logging.INFO): + client_s3.list_buckets() + + assert ( + 'The configured value for user_agent_appid exceeds the maximum length' + in caplog.text + ) + + +def test_user_agent_appid_gets_sanitized(patched_session, caplog): + # Parentheses are not valid characters in the user agent string + badchars = '1234(' + client_cfg = Config(user_agent_appid=badchars) + client_s3 = patched_session.create_client('s3', config=client_cfg) + + with UACapHTTPStubber(client_s3) as stub_client: + with caplog.at_level(logging.INFO): + client_s3.list_buckets() + + # given string should be truncated to 50 characters + uafields = stub_client.captured_ua_string.split(' ') + assert 'app/1234-' in uafields + + +def test_boto3_user_agent(patched_session): + # emulate Boto3's behavior + botocore_info = f'Botocore/{patched_session.user_agent_version}' + if patched_session.user_agent_extra: + patched_session.user_agent_extra += ' ' + botocore_info + else: + patched_session.user_agent_extra = botocore_info + patched_session.user_agent_name = 'Boto3' + patched_session.user_agent_version = '9.9.9' # Boto3 version + + client_s3 = patched_session.create_client('s3') + with UACapHTTPStubber(client_s3) as stub_client: + client_s3.list_buckets() + # The user agent string should start with "Boto3/9.9.9" from the setting + # above, followed by Botocore's version info as metadata ("md/..."). + assert stub_client.captured_ua_string.startswith( + f'Boto3/9.9.9 md/Botocore#{botocore_version} ' + ) + # The regular User-Agent header components for platform, language, ... + # should also be present: + assert ' ua/2.0 ' in stub_client.captured_ua_string + assert ' os/' in stub_client.captured_ua_string + assert ' lang/' in stub_client.captured_ua_string + assert ' cfg/' in stub_client.captured_ua_string + + +def test_awscli_v1_user_agent(patched_session): + # emulate behavior from awscli.clidriver._set_user_agent_for_session + patched_session.user_agent_name = 'aws-cli' + patched_session.user_agent_version = '1.1.1' + patched_session.user_agent_extra = f'botocore/{botocore_version}' + + client_s3 = patched_session.create_client('s3') + with UACapHTTPStubber(client_s3) as stub_client: + client_s3.list_buckets() + + # The user agent string should start with "aws-cli/1.1.1" from the setting + # above, followed by Botocore's version info as metadata ("md/..."). + assert stub_client.captured_ua_string.startswith( + f'aws-cli/1.1.1 md/Botocore#{botocore_version} ' + ) + # The regular User-Agent header components for platform, language, ... + # should also be present: + assert ' ua/2.0 ' in stub_client.captured_ua_string + assert ' os/' in stub_client.captured_ua_string + assert ' lang/' in stub_client.captured_ua_string + assert ' cfg/' in stub_client.captured_ua_string + + +def test_awscli_v2_user_agent(patched_session): + # emulate behavior from awscli.clidriver._set_user_agent_for_session + patched_session.user_agent_name = 'aws-cli' + patched_session.user_agent_version = '2.2.2' + patched_session.user_agent_extra = 'sources/x86_64' + # awscli.clidriver.AWSCLIEntrypoint._run_driver + patched_session.user_agent_extra += ' prompt/off' + # from awscli.clidriver.ServiceOperation._add_customization_to_user_agent + patched_session.user_agent_extra += ' command/service-name.op-name' + + client_s3 = patched_session.create_client('s3') + with UACapHTTPStubber(client_s3) as stub_client: + client_s3.list_buckets() + # The user agent string should start with "aws-cli/1.1.1" from the setting + # above, followed by Botocore's version info as metadata ("md/..."). + assert stub_client.captured_ua_string.startswith( + f'aws-cli/2.2.2 md/Botocore#{botocore_version} ' + ) + assert stub_client.captured_ua_string.endswith( + ' sources/x86_64 prompt/off command/service-name.op-name' + ) + # The regular User-Agent header components for platform, language, ... + # should also be present: + assert ' ua/2.0 ' in stub_client.captured_ua_string + assert ' os/' in stub_client.captured_ua_string + assert ' lang/' in stub_client.captured_ua_string + assert ' cfg/' in stub_client.captured_ua_string + + +def test_s3transfer_user_agent(patched_session): + # emulate behavior from s3transfer ClientFactory + cfg = Config(user_agent_extra='s3transfer/0.1.2 processpool') + client = patched_session.create_client('s3', config=cfg) + # s3transfer tests make assertions against the _modified_ `user_agent` field + # in ``client.meta.config.user_agent``. See for example + # ``tests.unit.test_processpool.TestClientFactory`` in s3transfer. + assert 'processpool' in client.meta.config.user_agent + + +def test_chalice_user_agent(patched_session): + # emulate behavior from chalice's cli.factory._add_chalice_user_agent + suffix = f'{patched_session.user_agent_name}/{patched_session.user_agent_version}' + patched_session.user_agent_name = 'aws-chalice' + patched_session.user_agent_version = '0.1.2' + patched_session.user_agent_extra = suffix + client_s3 = patched_session.create_client('s3') + + with UACapHTTPStubber(client_s3) as stub_client: + client_s3.list_buckets() + assert stub_client.captured_ua_string.startswith( + f'aws-chalice/0.1.2 md/Botocore#{botocore_version} ' + ) diff --git a/testbed/boto__botocore/tests/functional/test_utils.py b/testbed/boto__botocore/tests/functional/test_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..6b5b810b6548c653793472fc58abe0e08f1ad542 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_utils.py @@ -0,0 +1,75 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import os +import shutil +import tempfile + +from urllib3.exceptions import LocationParseError + +from botocore.exceptions import ( + ConnectionClosedError, + HTTPClientError, + InvalidIMDSEndpointError, +) +from botocore.utils import FileWebIdentityTokenLoader, InstanceMetadataFetcher +from tests import mock, unittest + + +class TestFileWebIdentityTokenLoader(unittest.TestCase): + def setUp(self): + super().setUp() + self.tempdir = tempfile.mkdtemp() + self.token = 'totally.a.token' + self.token_file = os.path.join(self.tempdir, 'token.jwt') + self.write_token(self.token) + + def tearDown(self): + shutil.rmtree(self.tempdir) + super().tearDown() + + def write_token(self, token, path=None): + if path is None: + path = self.token_file + with open(path, 'w') as f: + f.write(token) + + def test_can_load_token(self): + loader = FileWebIdentityTokenLoader(self.token_file) + token = loader() + self.assertEqual(self.token, token) + + +class TestInstanceMetadataFetcher(unittest.TestCase): + def test_catch_retryable_http_errors(self): + with mock.patch( + 'botocore.httpsession.URLLib3Session.send' + ) as send_mock: + fetcher = InstanceMetadataFetcher() + send_mock.side_effect = ConnectionClosedError(endpoint_url="foo") + creds = fetcher.retrieve_iam_role_credentials() + self.assertEqual(send_mock.call_count, 2) + for call_instance in send_mock.call_args_list: + self.assertTrue( + call_instance[0][0].url.startswith(fetcher.get_base_url()) + ) + self.assertEqual(creds, {}) + + def test_catch_invalid_imds_error(self): + with mock.patch( + 'botocore.httpsession.URLLib3Session.send' + ) as send_mock: + fetcher = InstanceMetadataFetcher() + e = LocationParseError(location="foo") + send_mock.side_effect = HTTPClientError(error=e) + with self.assertRaises(InvalidIMDSEndpointError): + fetcher.retrieve_iam_role_credentials() diff --git a/testbed/boto__botocore/tests/functional/test_waiter_config.py b/testbed/boto__botocore/tests/functional/test_waiter_config.py new file mode 100644 index 0000000000000000000000000000000000000000..fc1ab619fb128857539293bb7b2c1c09d7588177 --- /dev/null +++ b/testbed/boto__botocore/tests/functional/test_waiter_config.py @@ -0,0 +1,174 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import jmespath +import pytest +from jsonschema import Draft4Validator + +import botocore.session +from botocore.exceptions import UnknownServiceError +from botocore.utils import ArgumentGenerator + +WAITER_SCHEMA = { + "type": "object", + "properties": { + "version": {"type": "number"}, + "waiters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": {"type": "string", "enum": ["api"]}, + "operation": {"type": "string"}, + "description": {"type": "string"}, + "delay": { + "type": "number", + "minimum": 0, + }, + "maxAttempts": {"type": "integer", "minimum": 1}, + "acceptors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": ["success", "retry", "failure"], + }, + "matcher": { + "type": "string", + "enum": [ + "path", + "pathAll", + "pathAny", + "status", + "error", + ], + }, + "argument": {"type": "string"}, + "expected": { + "oneOf": [ + {"type": "string"}, + {"type": "number"}, + {"type": "boolean"}, + ] + }, + }, + "required": ["state", "matcher", "expected"], + "additionalProperties": False, + }, + }, + }, + "required": ["operation", "delay", "maxAttempts", "acceptors"], + "additionalProperties": False, + }, + }, + }, + "additionalProperties": False, +} + + +def _waiter_configs(): + session = botocore.session.get_session() + validator = Draft4Validator(WAITER_SCHEMA) + for service_name in session.get_available_services(): + client = session.create_client(service_name, 'us-east-1') + try: + # We use the loader directly here because we need the entire + # json document, not just the portions exposed (either + # internally or externally) by the WaiterModel class. + loader = session.get_component('data_loader') + waiter_model = loader.load_service_model(service_name, 'waiters-2') + except UnknownServiceError: + # The service doesn't have waiters + continue + yield validator, waiter_model, client + + +@pytest.mark.parametrize("validator, waiter_model, client", _waiter_configs()) +def test_lint_waiter_configs(validator, waiter_model, client): + _validate_schema(validator, waiter_model) + for waiter_name in client.waiter_names: + _lint_single_waiter(client, waiter_name, client.meta.service_model) + + +def _lint_single_waiter(client, waiter_name, service_model): + try: + waiter = client.get_waiter(waiter_name) + # The 'acceptors' property is dynamic and will create + # the acceptor configs when first accessed. This is still + # considered a failure to construct the waiter which is + # why it's in this try/except block. + # This catches things like: + # * jmespath expression compiles + # * matcher has a known value + acceptors = waiter.config.acceptors + except Exception as e: + raise AssertionError(f"Could not create waiter '{waiter_name}': {e}") + operation_name = waiter.config.operation + # Needs to reference an existing operation name. + if operation_name not in service_model.operation_names: + raise AssertionError( + "Waiter config references unknown " f"operation: {operation_name}" + ) + # Needs to have at least one acceptor. + if not waiter.config.acceptors: + raise AssertionError( + "Waiter config must have at least " + f"one acceptor state: {waiter.name}" + ) + op_model = service_model.operation_model(operation_name) + for acceptor in acceptors: + _validate_acceptor(acceptor, op_model, waiter.name) + + if not waiter.name.isalnum(): + raise AssertionError(f"Waiter name {waiter_name} is not alphanumeric.") + + +def _validate_schema(validator, waiter_json): + errors = list(e.message for e in validator.iter_errors(waiter_json)) + if errors: + raise AssertionError('\n'.join(errors)) + + +def _validate_acceptor(acceptor, op_model, waiter_name): + if acceptor.matcher.startswith('path'): + expression = acceptor.argument + # The JMESPath expression should have the potential to match something + # in the response shape. + output_shape = op_model.output_shape + assert ( + output_shape is not None + ), f"Waiter '{waiter_name}' has JMESPath expression with no output shape: {op_model}" + # We want to check if the JMESPath expression makes sense. + # To do this, we'll generate sample output and evaluate the + # JMESPath expression against the output. We'll then + # check a few things about this returned search result. + search_result = _search_jmespath_expression(expression, op_model) + if search_result is None: + raise AssertionError( + f"JMESPath expression did not match anything for waiter " + f"'{waiter_name}': {expression}" + ) + if acceptor.matcher in ['pathAll', 'pathAny']: + assert isinstance(search_result, list), ( + f"Attempted to use '{acceptor.matcher}' matcher in waiter " + f"'{waiter_name}' with non list result in JMESPath expression: " + f"{expression}" + ) + + +def _search_jmespath_expression(expression, op_model): + arg_gen = ArgumentGenerator(use_member_names=True) + sample_output = arg_gen.generate_skeleton(op_model.output_shape) + search_result = jmespath.search(expression, sample_output) + return search_result diff --git a/testbed/boto__botocore/tests/integration/__init__.py b/testbed/boto__botocore/tests/integration/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b175e077a1691dbf4a78b6564fdcf43375a68858 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/__init__.py @@ -0,0 +1,12 @@ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. diff --git a/testbed/boto__botocore/tests/integration/test-credentials b/testbed/boto__botocore/tests/integration/test-credentials new file mode 100644 index 0000000000000000000000000000000000000000..3bf3ae1ddfcc01df47655b4c7a73b59ac583cf9e --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test-credentials @@ -0,0 +1,7 @@ +[default] +aws_access_key_id = default +aws_secret_access_key = default-secret + +[test] +aws_access_key_id = test +aws_secret_access_key = test-secret diff --git a/testbed/boto__botocore/tests/integration/test_apigateway.py b/testbed/boto__botocore/tests/integration/test_apigateway.py new file mode 100644 index 0000000000000000000000000000000000000000..04077dcdce00a4adba60728aa123caeea4a0fcec --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_apigateway.py @@ -0,0 +1,80 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import time + +import botocore.session +from botocore import exceptions +from tests import unittest + + +class TestApigateway(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('apigateway', 'us-east-1') + + # Create a resource to use with this client. + self.api_name = 'mytestapi' + self.api_id = self.create_rest_api_or_skip() + + def create_rest_api_or_skip(self): + try: + api_id = self.client.create_rest_api(name=self.api_name)['id'] + except exceptions.ClientError as e: + if e.response['Error']['Code'] == 'TooManyRequestsException': + raise unittest.SkipTest( + "Hit API gateway throttle limit, skipping test." + ) + raise + return api_id + + def delete_api(self): + retries = 0 + while retries < 10: + try: + self.client.delete_rest_api(restApiId=self.api_id) + break + except exceptions.ClientError as e: + if e.response['Error']['Code'] == 'TooManyRequestsException': + retries += 1 + time.sleep(5) + else: + raise + + def tearDown(self): + self.delete_api() + + def test_put_integration(self): + # The only resource on a brand new api is the path. So use that ID. + path_resource_id = self.client.get_resources(restApiId=self.api_id)[ + 'items' + ][0]['id'] + + # Create a method for the resource. + self.client.put_method( + restApiId=self.api_id, + resourceId=path_resource_id, + httpMethod='GET', + authorizationType='None', + ) + + # Put an integration on the method. + response = self.client.put_integration( + restApiId=self.api_id, + resourceId=path_resource_id, + httpMethod='GET', + type='HTTP', + integrationHttpMethod='GET', + uri='https://api.endpoint.com', + ) + # Assert the response was successful by checking the integration type + self.assertEqual(response['type'], 'HTTP') diff --git a/testbed/boto__botocore/tests/integration/test_client.py b/testbed/boto__botocore/tests/integration/test_client.py new file mode 100644 index 0000000000000000000000000000000000000000..ed1970c2c15773a99d2621b7047d31f00e9679dd --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_client.py @@ -0,0 +1,168 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import datetime +import logging +from io import StringIO + +import botocore.session +from botocore.client import ClientError +from botocore.exceptions import EndpointConnectionError +from tests import unittest + + +# This is really a combination of testing the debug logging mechanism +# as well as the response wire log, which theoretically could be +# implemented in any number of modules, which makes it hard to pick +# which integration test module this code should live in, so I picked +# the client module. +class TestResponseLog(unittest.TestCase): + def test_debug_log_contains_headers_and_body(self): + # This test just verifies that the response headers/body + # are in the debug log. It's an integration test so that + # we can refactor the code however we want, as long as we don't + # lose this feature. + session = botocore.session.get_session() + client = session.create_client('s3', region_name='us-west-2') + debug_log = StringIO() + session.set_stream_logger('', logging.DEBUG, debug_log) + client.list_buckets() + debug_log_contents = debug_log.getvalue() + self.assertIn('Response headers', debug_log_contents) + self.assertIn('Response body', debug_log_contents) + + +class TestAcceptedDateTimeFormats(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('emr', 'us-west-2') + + def test_accepts_datetime_object(self): + response = self.client.list_clusters( + CreatedAfter=datetime.datetime.now() + ) + self.assertIn('Clusters', response) + + def test_accepts_epoch_format(self): + response = self.client.list_clusters(CreatedAfter=0) + self.assertIn('Clusters', response) + + def test_accepts_iso_8601_unaware(self): + response = self.client.list_clusters( + CreatedAfter='2014-01-01T00:00:00' + ) + self.assertIn('Clusters', response) + + def test_accepts_iso_8601_utc(self): + response = self.client.list_clusters( + CreatedAfter='2014-01-01T00:00:00Z' + ) + self.assertIn('Clusters', response) + + def test_accepts_iso_8701_local(self): + response = self.client.list_clusters( + CreatedAfter='2014-01-01T00:00:00-08:00' + ) + self.assertIn('Clusters', response) + + +class TestClientErrors(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + + def test_region_mentioned_in_invalid_region(self): + client = self.session.create_client( + 'cloudformation', region_name='us-east-999' + ) + with self.assertRaisesRegex( + EndpointConnectionError, 'Could not connect to the endpoint URL' + ): + client.list_stacks() + + def test_client_modeled_exception(self): + client = self.session.create_client( + 'dynamodb', region_name='us-west-2' + ) + with self.assertRaises(client.exceptions.ResourceNotFoundException): + client.describe_table(TableName="NonexistentTable") + + def test_client_modeleded_exception_with_differing_code(self): + client = self.session.create_client('iam', region_name='us-west-2') + # The NoSuchEntityException should be raised on NoSuchEntity error + # code. + with self.assertRaises(client.exceptions.NoSuchEntityException): + client.get_role(RoleName="NonexistentIAMRole") + + def test_raises_general_client_error_for_non_modeled_exception(self): + client = self.session.create_client('ec2', region_name='us-west-2') + try: + client.describe_regions(DryRun=True) + except client.exceptions.ClientError as e: + self.assertIs(e.__class__, ClientError) + + def test_can_catch_client_exceptions_across_two_different_clients(self): + client = self.session.create_client( + 'dynamodb', region_name='us-west-2' + ) + client2 = self.session.create_client( + 'dynamodb', region_name='us-west-2' + ) + with self.assertRaises(client2.exceptions.ResourceNotFoundException): + client.describe_table(TableName="NonexistentTable") + + +class TestClientMeta(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + + def test_region_name_on_meta(self): + client = self.session.create_client('s3', 'us-west-2') + self.assertEqual(client.meta.region_name, 'us-west-2') + + def test_endpoint_url_on_meta(self): + client = self.session.create_client( + 's3', 'us-west-2', endpoint_url='https://foo' + ) + self.assertEqual(client.meta.endpoint_url, 'https://foo') + + +class TestClientInjection(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + + def test_can_inject_client_methods(self): + def extra_client_method(self, name): + return name + + def inject_client_method(class_attributes, **kwargs): + class_attributes['extra_client_method'] = extra_client_method + + self.session.register('creating-client-class.s3', inject_client_method) + + client = self.session.create_client('s3', 'us-west-2') + + # We should now have access to the extra_client_method above. + self.assertEqual(client.extra_client_method('foo'), 'foo') + + +class TestMixedEndpointCasing(unittest.TestCase): + def setUp(self): + self.url = 'https://EC2.US-WEST-2.amazonaws.com/' + self.session = botocore.session.get_session() + self.client = self.session.create_client( + 'ec2', 'us-west-2', endpoint_url=self.url + ) + + def test_sigv4_is_correct_when_mixed_endpoint_casing(self): + res = self.client.describe_regions() + status_code = res['ResponseMetadata']['HTTPStatusCode'] + self.assertEqual(status_code, 200) diff --git a/testbed/boto__botocore/tests/integration/test_client_http.py b/testbed/boto__botocore/tests/integration/test_client_http.py new file mode 100644 index 0000000000000000000000000000000000000000..7a2b3d94b64058133959ad6a726ef71b7e649476 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_client_http.py @@ -0,0 +1,303 @@ +import contextlib +import select +import socket +import socketserver +import threading +from contextlib import contextmanager +from http.server import BaseHTTPRequestHandler + +import botocore.session +from botocore.config import Config +from botocore.exceptions import ( + ClientError, + ConnectionClosedError, + ConnectTimeoutError, + EndpointConnectionError, + ProxyConnectionError, + ReadTimeoutError, +) +from botocore.vendored.requests import exceptions as requests_exceptions +from tests import mock, unittest + + +class TestClientHTTPBehavior(unittest.TestCase): + def setUp(self): + self.port = unused_port() + self.localhost = f'http://localhost:{self.port}/' + self.session = botocore.session.get_session() + # We need to set fake credentials to ensure credentials aren't searched + # for which might make additional API calls (assume role, etc). + self.session.set_credentials('fakeakid', 'fakesecret') + + @unittest.skip('Test has suddenly become extremely flakey.') + def test_can_proxy_https_request_with_auth(self): + proxy_url = f'http://user:pass@localhost:{self.port}/' + config = Config(proxies={'https': proxy_url}, region_name='us-west-1') + client = self.session.create_client('ec2', config=config) + + class AuthProxyHandler(ProxyHandler): + event = threading.Event() + + def validate_auth(self): + proxy_auth = self.headers.get('Proxy-Authorization') + return proxy_auth == 'Basic dXNlcjpwYXNz' + + try: + with background(run_server, args=(AuthProxyHandler, self.port)): + AuthProxyHandler.event.wait(timeout=60) + client.describe_regions() + except BackgroundTaskFailed: + self.fail('Background task did not exit, proxy was not used.') + + @unittest.skip('Proxy cannot connect to service when run in CodeBuild.') + def test_proxy_request_includes_host_header(self): + proxy_url = f'http://user:pass@localhost:{self.port}/' + config = Config( + proxies={'https': proxy_url}, + proxies_config={'proxy_use_forwarding_for_https': True}, + region_name='us-west-1', + ) + environ = {'BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER': "True"} + self.environ_patch = mock.patch('os.environ', environ) + self.environ_patch.start() + client = self.session.create_client('ec2', config=config) + + class ConnectProxyHandler(ProxyHandler): + event = threading.Event() + + def do_CONNECT(self): + remote_host, remote_port = self.path.split(':') + + # Ensure we're sending the correct host header in CONNECT + if self.headers.get('host') != remote_host: + self.send_response(400) + self.end_headers() + return + + self.send_response(200) + self.end_headers() + + remote_host, remote_port = self.path.split(':') + remote_socket = socket.socket( + socket.AF_INET, socket.SOCK_STREAM + ) + remote_socket.connect((remote_host, int(remote_port))) + + self._tunnel(self.request, remote_socket) + remote_socket.close() + + try: + with background(run_server, args=(ConnectProxyHandler, self.port)): + ConnectProxyHandler.event.wait(timeout=60) + client.describe_regions() + except BackgroundTaskFailed: + self.fail('Background task did not exit, proxy was not used.') + except ProxyConnectionError: + self.fail('Proxy CONNECT failed, unable to establish connection.') + except ClientError as e: + # Fake credentials won't resolve against service + # but we've successfully contacted through the proxy + assert e.response['Error']['Code'] == 'AuthFailure' + finally: + self.environ_patch.stop() + + def _read_timeout_server(self): + config = Config( + read_timeout=0.1, + retries={'max_attempts': 0}, + region_name='us-weast-2', + ) + client = self.session.create_client( + 'ec2', endpoint_url=self.localhost, config=config + ) + client_call_ended_event = threading.Event() + + class FakeEC2(SimpleHandler): + event = threading.Event() + msg = b'' + + def get_length(self): + return len(self.msg) + + def get_body(self): + client_call_ended_event.wait(timeout=60) + return self.msg + + try: + with background(run_server, args=(FakeEC2, self.port)): + try: + FakeEC2.event.wait(timeout=60) + client.describe_regions() + finally: + client_call_ended_event.set() + except BackgroundTaskFailed: + self.fail('Fake EC2 service was not called.') + + def test_read_timeout_exception(self): + with self.assertRaises(ReadTimeoutError): + self._read_timeout_server() + + def test_old_read_timeout_exception(self): + with self.assertRaises(requests_exceptions.ReadTimeout): + self._read_timeout_server() + + @unittest.skip('The current implementation will fail to timeout on linux') + def test_connect_timeout_exception(self): + config = Config( + connect_timeout=0.2, + retries={'max_attempts': 0}, + region_name='us-weast-2', + ) + client = self.session.create_client( + 'ec2', endpoint_url=self.localhost, config=config + ) + server_bound_event = threading.Event() + client_call_ended_event = threading.Event() + + def no_accept_server(): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + sock.bind(('', self.port)) + server_bound_event.set() + client_call_ended_event.wait(timeout=60) + sock.close() + + with background(no_accept_server): + server_bound_event.wait(timeout=60) + with self.assertRaises(ConnectTimeoutError): + client.describe_regions() + client_call_ended_event.set() + + def test_invalid_host_gaierror(self): + config = Config(retries={'max_attempts': 0}, region_name='us-weast-1') + endpoint = 'https://ec2.us-weast-1.amazonaws.com/' + client = self.session.create_client( + 'ec2', endpoint_url=endpoint, config=config + ) + with self.assertRaises(EndpointConnectionError): + client.describe_regions() + + def test_bad_status_line(self): + config = Config(retries={'max_attempts': 0}, region_name='us-weast-2') + client = self.session.create_client( + 'ec2', endpoint_url=self.localhost, config=config + ) + + class BadStatusHandler(BaseHTTPRequestHandler): + event = threading.Event() + + def do_POST(self): + self.wfile.write(b'garbage') + + with background(run_server, args=(BadStatusHandler, self.port)): + with self.assertRaises(ConnectionClosedError): + BadStatusHandler.event.wait(timeout=60) + client.describe_regions() + + +def unused_port(): + with contextlib.closing(socket.socket()) as sock: + sock.bind(('127.0.0.1', 0)) + return sock.getsockname()[1] + + +class SimpleHandler(BaseHTTPRequestHandler): + status = 200 + + def get_length(self): + return 0 + + def get_body(self): + return b'' + + def do_GET(self): + length = str(self.get_length()) + self.send_response(self.status) + self.send_header('Content-Length', length) + self.end_headers() + self.wfile.write(self.get_body()) + + do_POST = do_PUT = do_GET + + +class ProxyHandler(BaseHTTPRequestHandler): + tunnel_chunk_size = 1024 + poll_limit = 10**4 + + def _tunnel(self, client, remote): + client.setblocking(0) + remote.setblocking(0) + sockets = [client, remote] + noop_count = 0 + while True: + readable, writeable, _ = select.select(sockets, sockets, [], 1) + if client in readable and remote in writeable: + noop_count = 0 + client_bytes = client.recv(self.tunnel_chunk_size) + if not client_bytes: + break + remote.sendall(client_bytes) + if remote in readable and client in writeable: + noop_count = 0 + remote_bytes = remote.recv(self.tunnel_chunk_size) + if not remote_bytes: + break + client.sendall(remote_bytes) + + if noop_count > self.poll_limit: + # We have a case where all communication has + # finished but we never saw an empty read. + # This will leave both sockets as writeable + # indefinitely. We'll force a break here if + # we've crossed our polling limit. + break + + noop_count += 1 + + def do_CONNECT(self): + if not self.validate_auth(): + self.send_response(401) + self.end_headers() + return + + self.send_response(200) + self.end_headers() + + remote_host, remote_port = self.path.split(':') + remote_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + remote_socket.connect((remote_host, int(remote_port))) + + self._tunnel(self.request, remote_socket) + remote_socket.close() + + def validate_auth(self): + return True + + +class BackgroundTaskFailed(Exception): + pass + + +@contextmanager +def background(target, args=(), timeout=60): + thread = threading.Thread(target=target, args=args) + thread.daemon = True + thread.start() + try: + yield target + finally: + thread.join(timeout=timeout) + if thread.is_alive(): + msg = 'Background task did not exit in a timely manner.' + raise BackgroundTaskFailed(msg) + + +def run_server(handler, port): + address = ('', port) + httpd = socketserver.TCPServer(address, handler, bind_and_activate=False) + httpd.allow_reuse_address = True + httpd.server_bind() + httpd.server_activate() + handler.event.set() + httpd.handle_request() + httpd.server_close() diff --git a/testbed/boto__botocore/tests/integration/test_cloudformation.py b/testbed/boto__botocore/tests/integration/test_cloudformation.py new file mode 100644 index 0000000000000000000000000000000000000000..fdc354de179d908c3482dcfa50d80e4cc562a645 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_cloudformation.py @@ -0,0 +1,33 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from botocore.exceptions import ClientError +from tests import random_chars, unittest + + +class TestCloudformation(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('cloudformation', 'us-east-1') + + def test_handles_errors_with_template_body(self): + # GetTemplate has a customization in handlers.py, so we're ensuring + # it handles the case when a stack does not exist. + with self.assertRaises(ClientError): + self.client.get_template( + StackName=f'does-not-exist-{random_chars(10)}' + ) + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_cognito_identity.py b/testbed/boto__botocore/tests/integration/test_cognito_identity.py new file mode 100644 index 0000000000000000000000000000000000000000..bce7b2d7b74de98a55400e754b8535f3042af703 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_cognito_identity.py @@ -0,0 +1,35 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from tests import random_chars, unittest + + +class TestCognitoIdentity(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client( + 'cognito-identity', 'us-east-1' + ) + + def test_can_create_and_delete_identity_pool(self): + pool_name = f'test{random_chars(10)}' + response = self.client.create_identity_pool( + IdentityPoolName=pool_name, AllowUnauthenticatedIdentities=True + ) + self.client.delete_identity_pool( + IdentityPoolId=response['IdentityPoolId'] + ) + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_credentials.py b/testbed/boto__botocore/tests/integration/test_credentials.py new file mode 100644 index 0000000000000000000000000000000000000000..d49c266e2e48570dc14f61a4dad1da65f697de17 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_credentials.py @@ -0,0 +1,383 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import json +import os +import shutil +import tempfile +import time +from uuid import uuid4 + +from botocore.exceptions import ClientError +from botocore.session import Session +from tests import BaseEnvVar, mock, random_chars, temporary_file + +S3_READ_POLICY_ARN = 'arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess' + + +class TestCredentialPrecedence(BaseEnvVar): + def setUp(self): + super().setUp() + + # Set the config file to something that doesn't exist so + # that we don't accidentally load a config. + os.environ['AWS_CONFIG_FILE'] = '~/.aws/config-missing' + + def create_session(self, *args, **kwargs): + """ + Create a new session with the given arguments. Additionally, + this method will set the credentials file to the test credentials + used by the following test cases. + """ + kwargs['session_vars'] = { + 'credentials_file': ( + None, + None, + os.path.join(os.path.dirname(__file__), 'test-credentials'), + None, + ) + } + + return Session(*args, **kwargs) + + def test_access_secret_vs_profile_env(self): + # If all three are given, then the access/secret keys should + # take precedence. + os.environ['AWS_ACCESS_KEY_ID'] = 'env' + os.environ['AWS_SECRET_ACCESS_KEY'] = 'env-secret' + os.environ['AWS_DEFAULT_PROFILE'] = 'test' + + s = self.create_session() + credentials = s.get_credentials() + + self.assertEqual(credentials.access_key, 'env') + self.assertEqual(credentials.secret_key, 'env-secret') + + @mock.patch('botocore.credentials.Credentials') + def test_access_secret_vs_profile_code(self, credentials_cls): + # If all three are given, then the access/secret keys should + # take precedence. + s = self.create_session(profile='test') + s.create_client( + 's3', aws_access_key_id='code', aws_secret_access_key='code-secret' + ) + + credentials_cls.assert_called_with( + access_key='code', secret_key='code-secret', token=mock.ANY + ) + + def test_profile_env_vs_code(self): + # If the profile is set both by the env var and by code, + # then the one set by code should take precedence. + os.environ['AWS_DEFAULT_PROFILE'] = 'test' + s = self.create_session(profile='default') + credentials = s.get_credentials() + + self.assertEqual(credentials.access_key, 'default') + self.assertEqual(credentials.secret_key, 'default-secret') + + @mock.patch('botocore.credentials.Credentials') + def test_access_secret_env_vs_code(self, credentials_cls): + # If the access/secret keys are set both as env vars and via + # code, then those set by code should take precedence. + os.environ['AWS_ACCESS_KEY_ID'] = 'env' + os.environ['AWS_SECRET_ACCESS_KEY'] = 'secret' + s = self.create_session() + s.create_client( + 's3', aws_access_key_id='code', aws_secret_access_key='code-secret' + ) + + credentials_cls.assert_called_with( + access_key='code', secret_key='code-secret', token=mock.ANY + ) + + def test_access_secret_env_vs_profile_code(self): + # If access/secret keys are set in the environment, but then a + # specific profile is passed via code, then the access/secret + # keys defined in that profile should take precedence over + # the environment variables. Example: + # + # ``aws --profile dev s3 ls`` + # + os.environ['AWS_ACCESS_KEY_ID'] = 'env' + os.environ['AWS_SECRET_ACCESS_KEY'] = 'env-secret' + s = self.create_session(profile='test') + + credentials = s.get_credentials() + + self.assertEqual(credentials.access_key, 'test') + self.assertEqual(credentials.secret_key, 'test-secret') + + def test_honors_aws_shared_credentials_file_env_var(self): + with temporary_file('w') as f: + f.write( + '[default]\n' + 'aws_access_key_id=custom1\n' + 'aws_secret_access_key=custom2\n' + ) + f.flush() + os.environ['AWS_SHARED_CREDENTIALS_FILE'] = f.name + s = Session() + credentials = s.get_credentials() + + self.assertEqual(credentials.access_key, 'custom1') + self.assertEqual(credentials.secret_key, 'custom2') + + +class TestAssumeRoleCredentials(BaseEnvVar): + def setUp(self): + self.env_original = os.environ.copy() + self.environ_copy = os.environ.copy() + super().setUp() + os.environ = self.environ_copy + # The tests rely on manipulating AWS_CONFIG_FILE, + # but we also need to make sure we don't accidentally + # pick up the ~/.aws/credentials file either. + os.environ['AWS_SHARED_CREDENTIALS_FILE'] = str(uuid4()) + self.parent_session = Session() + self.iam = self.parent_session.create_client('iam') + self.sts = self.parent_session.create_client('sts') + self.tempdir = tempfile.mkdtemp() + self.config_file = os.path.join(self.tempdir, 'config') + + # A role trust policy that allows the current account to call assume + # role on itself. + account_id = self.sts.get_caller_identity()['Account'] + self.role_policy = { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": {"AWS": f"arn:aws:iam::{account_id}:root"}, + "Action": "sts:AssumeRole", + } + ], + } + + def tearDown(self): + super().tearDown() + shutil.rmtree(self.tempdir) + os.environ = self.env_original.copy() + + def random_name(self): + return 'botocoretest-' + random_chars(10) + + def create_role(self, policy_document, policy_arn=None): + name = self.random_name() + response = self.iam.create_role( + RoleName=name, AssumeRolePolicyDocument=json.dumps(policy_document) + ) + self.addCleanup(self.iam.delete_role, RoleName=name) + if policy_arn: + self.iam.attach_role_policy(RoleName=name, PolicyArn=policy_arn) + self.addCleanup( + self.iam.detach_role_policy, + RoleName=name, + PolicyArn=policy_arn, + ) + return response['Role'] + + def create_user(self, policy_arns): + name = self.random_name() + user = self.iam.create_user(UserName=name)['User'] + self.addCleanup(self.iam.delete_user, UserName=name) + + for arn in policy_arns: + self.iam.attach_user_policy(UserName=name, PolicyArn=arn) + self.addCleanup( + self.iam.detach_user_policy, UserName=name, PolicyArn=arn + ) + + return user + + def create_creds(self, user_name): + creds = self.iam.create_access_key(UserName=user_name)['AccessKey'] + self.addCleanup( + self.iam.delete_access_key, + UserName=user_name, + AccessKeyId=creds['AccessKeyId'], + ) + return creds + + def wait_for_assume_role( + self, + role_arn, + access_key, + secret_key, + token=None, + attempts=30, + delay=10, + success_delay=1, + num_success=4, + ): + for _ in range(num_success): + creds = self._wait_for_assume_role( + role_arn, access_key, secret_key, token, attempts, delay + ) + time.sleep(success_delay) + return creds + + def _wait_for_assume_role( + self, role_arn, access_key, secret_key, token, attempts, delay + ): + # "Why not use the policy simulator?" you might ask. The answer is + # that the policy simulator will return success far before you can + # actually make the calls. + client = self.parent_session.create_client( + 'sts', + aws_access_key_id=access_key, + aws_secret_access_key=secret_key, + aws_session_token=token, + ) + attempts_remaining = attempts + role_session_name = random_chars(10) + while attempts_remaining > 0: + attempts_remaining -= 1 + try: + result = client.assume_role( + RoleArn=role_arn, RoleSessionName=role_session_name + ) + return result['Credentials'] + except ClientError as e: + code = e.response.get('Error', {}).get('Code') + if code in ["InvalidClientTokenId", "AccessDenied"]: + time.sleep(delay) + else: + raise + + raise Exception(f"Unable to assume role {role_arn}") + + def create_assume_policy(self, role_arn): + policy_document = { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Resource": role_arn, + "Action": "sts:AssumeRole", + } + ], + } + name = self.random_name() + response = self.iam.create_policy( + PolicyName=name, PolicyDocument=json.dumps(policy_document) + ) + self.addCleanup( + self.iam.delete_policy, PolicyArn=response['Policy']['Arn'] + ) + return response['Policy']['Arn'] + + def assert_s3_read_only_session(self, session): + # Calls to S3 should succeed + s3 = session.create_client('s3') + s3.list_buckets() + + # Calls to other services should not + iam = session.create_client('iam') + try: + iam.list_groups() + self.fail("Expected call to list_groups to fail, but it passed.") + except ClientError as e: + code = e.response.get('Error', {}).get('Code') + if code != 'AccessDenied': + raise + + def test_recursive_assume_role(self): + # Create the final role, the one that will actually have access to s3 + final_role = self.create_role(self.role_policy, S3_READ_POLICY_ARN) + + # Create the role that can assume the final role + middle_policy_arn = self.create_assume_policy(final_role['Arn']) + middle_role = self.create_role(self.role_policy, middle_policy_arn) + + # Create a user that can only assume the middle-man role, and then get + # static credentials for it. + user_policy_arn = self.create_assume_policy(middle_role['Arn']) + user = self.create_user([user_policy_arn]) + user_creds = self.create_creds(user['UserName']) + + # Setup the config file with the profiles we'll be using. For + # convenience static credentials are placed here instead of putting + # them in the credentials file. + config = ( + '[default]\n' + 'aws_access_key_id = %s\n' + 'aws_secret_access_key = %s\n' + '[profile middle]\n' + 'source_profile = default\n' + 'role_arn = %s\n' + '[profile final]\n' + 'source_profile = middle\n' + 'role_arn = %s\n' + ) + config = config % ( + user_creds['AccessKeyId'], + user_creds['SecretAccessKey'], + middle_role['Arn'], + final_role['Arn'], + ) + with open(self.config_file, 'w') as f: + f.write(config) + + # Wait for IAM permissions to propagate + middle_creds = self.wait_for_assume_role( + role_arn=middle_role['Arn'], + access_key=user_creds['AccessKeyId'], + secret_key=user_creds['SecretAccessKey'], + ) + self.wait_for_assume_role( + role_arn=final_role['Arn'], + access_key=middle_creds['AccessKeyId'], + secret_key=middle_creds['SecretAccessKey'], + token=middle_creds['SessionToken'], + ) + + # Configure our credentials file to be THE credentials file + os.environ['AWS_CONFIG_FILE'] = self.config_file + + self.assert_s3_read_only_session(Session(profile='final')) + + def test_assume_role_with_credential_source(self): + # Create a role with read access to S3 + role = self.create_role(self.role_policy, S3_READ_POLICY_ARN) + + # Create a user that can assume the role and get static credentials + # for it. + user_policy_arn = self.create_assume_policy(role['Arn']) + user = self.create_user([user_policy_arn]) + user_creds = self.create_creds(user['UserName']) + + # Setup the config file with the profile we'll be using. + config = ( + '[profile assume]\n' + 'role_arn = %s\n' + 'credential_source = Environment\n' + ) + config = config % role['Arn'] + with open(self.config_file, 'w') as f: + f.write(config) + + # Wait for IAM permissions to propagate + self.wait_for_assume_role( + role_arn=role['Arn'], + access_key=user_creds['AccessKeyId'], + secret_key=user_creds['SecretAccessKey'], + ) + + # Setup the environment so that our new config file is THE config + # file and add the expected credentials since we're using the + # environment as our credential source. + os.environ['AWS_CONFIG_FILE'] = self.config_file + os.environ['AWS_SECRET_ACCESS_KEY'] = user_creds['SecretAccessKey'] + os.environ['AWS_ACCESS_KEY_ID'] = user_creds['AccessKeyId'] + + self.assert_s3_read_only_session(Session(profile='assume')) diff --git a/testbed/boto__botocore/tests/integration/test_ec2.py b/testbed/boto__botocore/tests/integration/test_ec2.py new file mode 100644 index 0000000000000000000000000000000000000000..5ce1bc19ff5576b71d7cd5add2cda4266c4b72cf --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_ec2.py @@ -0,0 +1,91 @@ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import itertools + +import botocore.session +from botocore.exceptions import ClientError +from tests import unittest + + +class TestEC2(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client( + 'ec2', region_name='us-west-2' + ) + + def test_can_make_request(self): + # Basic smoke test to ensure we can talk to ec2. + result = self.client.describe_availability_zones() + zones = list( + sorted(a['ZoneName'] for a in result['AvailabilityZones']) + ) + self.assertTrue( + {'us-west-2a', 'us-west-2b', 'us-west-2c'}.issubset(zones) + ) + + def test_get_console_output_handles_error(self): + # Want to ensure the underlying ClientError is propogated + # on error. + with self.assertRaises(ClientError): + self.client.get_console_output(InstanceId='i-12345') + + +class TestEC2Pagination(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client( + 'ec2', region_name='us-west-2' + ) + + def test_can_paginate(self): + # Using an operation that we know will paginate. + paginator = self.client.get_paginator( + 'describe_reserved_instances_offerings' + ) + pages = paginator.paginate() + results = list(itertools.islice(pages, 0, 3)) + self.assertEqual(len(results), 3) + self.assertTrue(results[0]['NextToken'] != results[1]['NextToken']) + + def test_can_paginate_with_page_size(self): + # Using an operation that we know will paginate. + paginator = self.client.get_paginator( + 'describe_reserved_instances_offerings' + ) + pages = paginator.paginate(PaginationConfig={'PageSize': 1}) + results = list(itertools.islice(pages, 0, 3)) + self.assertEqual(len(results), 3) + for parsed in results: + reserved_inst_offer = parsed['ReservedInstancesOfferings'] + # There should be no more than one reserved instance + # offering on each page. + self.assertLessEqual(len(reserved_inst_offer), 1) + + def test_can_fall_back_to_old_starting_token(self): + # Using an operation that we know will paginate. + paginator = self.client.get_paginator( + 'describe_reserved_instances_offerings' + ) + pages = paginator.paginate(PaginationConfig={'NextToken': 'None___1'}) + + try: + results = list(itertools.islice(pages, 0, 3)) + self.assertEqual(len(results), 3) + self.assertTrue(results[0]['NextToken'] != results[1]['NextToken']) + except ValueError: + self.fail("Old style paginator failed.") + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_elastictranscoder.py b/testbed/boto__botocore/tests/integration/test_elastictranscoder.py new file mode 100644 index 0000000000000000000000000000000000000000..a72e7236216339de0481fe0db5ee3f5aab1dee2c --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_elastictranscoder.py @@ -0,0 +1,91 @@ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +import botocore.session +from tests import random_chars, unittest + +DEFAULT_ROLE_POLICY = """\ +{"Statement": [ + { + "Action": "sts:AssumeRole", + "Principal": { + "Service": "elastictranscoder.amazonaws.com" + }, + "Effect": "Allow", + "Sid": "1" + } +]} +""" + + +class TestElasticTranscoder(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client( + 'elastictranscoder', 'us-east-1' + ) + self.s3_client = self.session.create_client('s3', 'us-east-1') + self.iam_client = self.session.create_client('iam', 'us-east-1') + + def create_bucket(self): + bucket_name = f'ets-bucket-1-{random_chars(50)}' + self.s3_client.create_bucket(Bucket=bucket_name) + waiter = self.s3_client.get_waiter('bucket_exists') + waiter.wait(Bucket=bucket_name) + self.addCleanup(self.s3_client.delete_bucket, Bucket=bucket_name) + return bucket_name + + def create_iam_role(self): + role_name = f'ets-role-name-1-{random_chars(10)}' + parsed = self.iam_client.create_role( + RoleName=role_name, AssumeRolePolicyDocument=DEFAULT_ROLE_POLICY + ) + arn = parsed['Role']['Arn'] + self.addCleanup(self.iam_client.delete_role, RoleName=role_name) + return arn + + def test_list_streams(self): + parsed = self.client.list_pipelines() + self.assertIn('Pipelines', parsed) + + def test_list_presets(self): + parsed = self.client.list_presets(Ascending='true') + self.assertIn('Presets', parsed) + + def test_create_pipeline(self): + # In order to create a pipeline, we need to create 2 s3 buckets + # and 1 iam role. + input_bucket = self.create_bucket() + output_bucket = self.create_bucket() + role = self.create_iam_role() + pipeline_name = f'botocore-test-create-{random_chars(10)}' + + parsed = self.client.create_pipeline( + InputBucket=input_bucket, + OutputBucket=output_bucket, + Role=role, + Name=pipeline_name, + Notifications={ + 'Progressing': '', + 'Completed': '', + 'Warning': '', + 'Error': '', + }, + ) + pipeline_id = parsed['Pipeline']['Id'] + self.addCleanup(self.client.delete_pipeline, Id=pipeline_id) + self.assertIn('Pipeline', parsed) + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_emr.py b/testbed/boto__botocore/tests/integration/test_emr.py new file mode 100644 index 0000000000000000000000000000000000000000..25840d7c4d07c8ad6e8611ddf13f8d78426e3b7f --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_emr.py @@ -0,0 +1,78 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +import botocore.session +from botocore.exceptions import OperationNotPageableError +from botocore.paginate import PageIterator +from tests import unittest + + +@pytest.fixture() +def botocore_session(): + return botocore.session.get_session() + + +@pytest.mark.parametrize( + "region", + [ + 'us-east-1', + 'us-west-2', + 'us-west-2', + 'ap-northeast-1', + 'ap-southeast-1', + 'ap-southeast-2', + 'sa-east-1', + 'eu-west-1', + 'eu-central-1', + ], +) +def test_emr_endpoints_work_with_py26(botocore_session, region): + # Verify that we can talk to all currently supported EMR endpoints. + # Python2.6 has an SSL cert bug where it can't read the SAN of + # certain SSL certs. We therefore need to always use the CN + # as the hostname. + client = botocore_session.create_client('emr', region_name=region) + response = client.list_clusters() + assert 'Clusters' in response + + +# I consider these integration tests because they're +# testing more than a single unit, we're ensuring everything +# accessible from the session works as expected. +class TestEMRGetExtraResources(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('emr', 'us-west-2') + + def test_can_access_pagination_configs(self): + # Using an operation that we know will paginate. + paginator = self.client.get_paginator('list_clusters') + page_iterator = paginator.paginate() + self.assertIsInstance(page_iterator, PageIterator) + + def test_operation_cant_be_paginated(self): + with self.assertRaises(OperationNotPageableError): + self.client.get_paginator('add_instance_groups') + + def test_can_get_waiters(self): + waiter = self.client.get_waiter('cluster_running') + self.assertTrue(hasattr(waiter, 'wait')) + + def test_waiter_does_not_exist(self): + with self.assertRaises(ValueError): + self.client.get_waiter('does_not_exist') + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_glacier.py b/testbed/boto__botocore/tests/integration/test_glacier.py new file mode 100644 index 0000000000000000000000000000000000000000..feb06d38b657ed0ea343b94df9ab8e84e369efee --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_glacier.py @@ -0,0 +1,76 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import io + +import botocore.session +from botocore.exceptions import ClientError +from tests import unittest + + +class TestGlacier(unittest.TestCase): + # We have to use a single vault for all the integration tests. + # This is because if we create a vault and upload then delete + # an archive, we cannot immediately clean up and delete the vault. + # The compromise is that we'll use a single vault and use + # get_or_create semantics for the integ tests. This does mean you + # need to be careful when writing tests. Assume that other code + # is also using this vault in parallel, so don't rely on things like + # number of archives in a vault. + + VAULT_NAME = 'botocore-integ-test-vault' + + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('glacier', 'us-west-2') + # There's no error if the vault already exists so we don't + # need to catch any exceptions here. + self.client.create_vault(vaultName=self.VAULT_NAME) + + def test_can_list_vaults_without_account_id(self): + response = self.client.list_vaults() + self.assertIn('VaultList', response) + + def test_can_handle_error_responses(self): + with self.assertRaises(ClientError): + self.client.list_vaults(accountId='asdf') + + def test_can_upload_archive(self): + body = io.BytesIO(b"bytes content") + response = self.client.upload_archive( + vaultName=self.VAULT_NAME, + archiveDescription='test upload', + body=body, + ) + self.assertEqual(response['ResponseMetadata']['HTTPStatusCode'], 201) + archive_id = response['archiveId'] + response = self.client.delete_archive( + vaultName=self.VAULT_NAME, archiveId=archive_id + ) + self.assertEqual(response['ResponseMetadata']['HTTPStatusCode'], 204) + + def test_can_upload_archive_from_bytes(self): + response = self.client.upload_archive( + vaultName=self.VAULT_NAME, + archiveDescription='test upload', + body=b'bytes body', + ) + self.assertEqual(response['ResponseMetadata']['HTTPStatusCode'], 201) + archive_id = response['archiveId'] + response = self.client.delete_archive( + vaultName=self.VAULT_NAME, archiveId=archive_id + ) + self.assertEqual(response['ResponseMetadata']['HTTPStatusCode'], 204) + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_loaders.py b/testbed/boto__botocore/tests/integration/test_loaders.py new file mode 100644 index 0000000000000000000000000000000000000000..43b3e3dfcde51cf1eeab1789d8a880ebf895349f --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_loaders.py @@ -0,0 +1,72 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import os + +import botocore.session +from tests import mock, unittest + + +# Basic sanity checks for loader functionality. +# We're not using BaseEnvVar here because we don't actually +# want to patch out all of os.environ, we just want to ensure +# AWS_DATA_PATH doesn't affect our test results. +class TestLoaderBasicFunctionality(unittest.TestCase): + def setUp(self): + self.environ = os.environ.copy() + self.patched = mock.patch('os.environ', self.environ) + self.patched.start() + self.environ.pop('AWS_DATA_PATH', None) + + self.session = botocore.session.get_session() + self.loader = self.session.get_component('data_loader') + + def tearDown(self): + self.patched.stop() + + def test_search_path_has_at_least_one_entry(self): + self.assertTrue(len(self.loader.search_paths) > 0) + + def test_can_list_available_services(self): + # We don't want an exact check, as this list changes over time. + # We just need a basic sanity check. + available_services = self.loader.list_available_services( + type_name='service-2' + ) + self.assertIn('ec2', available_services) + self.assertIn('s3', available_services) + + def test_can_determine_latest_version(self): + api_versions = self.loader.list_api_versions( + service_name='ec2', type_name='service-2' + ) + self.assertEqual( + self.loader.determine_latest_version( + service_name='ec2', type_name='service-2' + ), + max(api_versions), + ) + + def test_can_load_service_model(self): + waiters = self.loader.load_service_model( + service_name='ec2', type_name='waiters-2' + ) + self.assertIn('waiters', waiters) + + def test_can_load_data(self): + api_version = self.loader.determine_latest_version( + service_name='ec2', type_name='service-2' + ) + data = self.loader.load_data( + os.path.join('ec2', api_version, 'service-2') + ) + self.assertIn('metadata', data) diff --git a/testbed/boto__botocore/tests/integration/test_rds.py b/testbed/boto__botocore/tests/integration/test_rds.py new file mode 100644 index 0000000000000000000000000000000000000000..89f9e46cc008de209713dfebc2ccb2e94e7b0f04 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_rds.py @@ -0,0 +1,45 @@ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import itertools + +import botocore.session +from tests import unittest + + +class TestRDSPagination(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('rds', 'us-west-2') + + def test_can_paginate_reserved_instances(self): + # Using an operation that we know will paginate. + paginator = self.client.get_paginator( + 'describe_reserved_db_instances_offerings' + ) + generator = paginator.paginate() + results = list(itertools.islice(generator, 0, 3)) + self.assertEqual(len(results), 3) + self.assertTrue(results[0]['Marker'] != results[1]['Marker']) + + def test_can_paginate_orderable_db(self): + paginator = self.client.get_paginator( + 'describe_orderable_db_instance_options' + ) + generator = paginator.paginate(Engine='mysql') + results = list(itertools.islice(generator, 0, 2)) + self.assertEqual(len(results), 2) + self.assertTrue(results[0].get('Marker') != results[1].get('Marker')) + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_route53.py b/testbed/boto__botocore/tests/integration/test_route53.py new file mode 100644 index 0000000000000000000000000000000000000000..6a0ab7cc571f64618b07e0feaccdd9210303ed11 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_route53.py @@ -0,0 +1,50 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from botocore.exceptions import ClientError +from tests import unittest + + +class TestRoute53Pagination(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('route53', 'us-west-2') + + def test_paginate_with_max_items(self): + # Route53 has a string type for MaxItems. We need to ensure that this + # still works without any issues. + paginator = self.client.get_paginator('list_hosted_zones') + results = list(paginator.paginate(PaginationConfig={'MaxItems': '1'})) + self.assertTrue(len(results) >= 0) + + def test_paginate_with_deprecated_paginator_and_limited_input_tokens(self): + paginator = self.client.get_paginator('list_resource_record_sets') + + # We're making sure the paginator gets set without failing locally, so + # a ClientError is acceptable. In this case, the Hosted Zone specified + # does not exist. + with self.assertRaises(ClientError): + results = list( + paginator.paginate( + PaginationConfig={ + 'MaxItems': '1', + 'StartingToken': 'my.domain.name.', + }, + HostedZoneId="foo", + ) + ) + self.assertTrue(len(results) >= 0) + + +if __name__ == '__main__': + unittest.main() diff --git a/testbed/boto__botocore/tests/integration/test_s3.py b/testbed/boto__botocore/tests/integration/test_s3.py new file mode 100644 index 0000000000000000000000000000000000000000..712f9f357c7c8f0efcd483871f54fb2b1b5c3581 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_s3.py @@ -0,0 +1,1469 @@ +# Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import logging +import os +import shutil +import tempfile +import threading +import time +from collections import defaultdict +from contextlib import closing +from io import BytesIO +from tarfile import TarFile + +import pytest +import urllib3 + +import botocore.auth +import botocore.credentials +import botocore.session +from botocore.compat import OrderedDict, zip_longest +from botocore.config import Config +from botocore.exceptions import ClientError, ConnectionClosedError, WaiterError +from tests import ( + ClientHTTPStubber, + ConsistencyWaiter, + random_chars, + temporary_file, + unittest, +) + + +def random_bucketname(): + return 'botocoretest-' + random_chars(50) + + +LOG = logging.getLogger('botocore.tests.integration') +_SHARED_BUCKET = random_bucketname() +_DEFAULT_REGION = 'us-west-2' + + +def http_get(url): + http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED') + response = http.request('GET', url) + return response + + +def http_post(url, data, files): + http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED') + merged_data = OrderedDict() + merged_data.update(data) + merged_data.update(files) + response = http.request( + 'POST', + url, + fields=merged_data, + ) + return response + + +def setup_module(): + s3 = botocore.session.get_session().create_client('s3') + waiter = s3.get_waiter('bucket_exists') + params = { + 'Bucket': _SHARED_BUCKET, + 'CreateBucketConfiguration': { + 'LocationConstraint': _DEFAULT_REGION, + }, + 'ObjectOwnership': 'ObjectWriter', + } + try: + s3.create_bucket(**params) + except Exception as e: + # A create_bucket can fail for a number of reasons. + # We're going to defer to the waiter below to make the + # final call as to whether or not the bucket exists. + LOG.debug("create_bucket() raised an exception: %s", e, exc_info=True) + waiter.wait(Bucket=_SHARED_BUCKET) + s3.delete_public_access_block(Bucket=_SHARED_BUCKET) + + +def clear_out_bucket(bucket, region, delete_bucket=False): + s3 = botocore.session.get_session().create_client('s3', region_name=region) + # Ensure the bucket exists before attempting to wipe it out + exists_waiter = s3.get_waiter('bucket_exists') + exists_waiter.wait(Bucket=bucket) + page = s3.get_paginator('list_objects') + # Use pages paired with batch delete_objects(). + for page in page.paginate(Bucket=bucket): + keys = [{'Key': obj['Key']} for obj in page.get('Contents', [])] + if keys: + s3.delete_objects(Bucket=bucket, Delete={'Objects': keys}) + if delete_bucket: + for _ in range(5): + try: + s3.delete_bucket(Bucket=bucket) + break + except s3.exceptions.NoSuchBucket: + exists_waiter.wait(Bucket=bucket) + except Exception as e: + # We can sometimes get exceptions when trying to + # delete a bucket. We'll let the waiter make + # the final call as to whether the bucket was able + # to be deleted. + LOG.debug( + "delete_bucket() raised an exception: %s", e, exc_info=True + ) + not_exists_waiter = s3.get_waiter('bucket_not_exists') + not_exists_waiter.wait(Bucket=bucket) + except WaiterError: + continue + + +def teardown_module(): + clear_out_bucket(_SHARED_BUCKET, _DEFAULT_REGION, delete_bucket=True) + + +class BaseS3ClientTest(unittest.TestCase): + DEFAULT_DELAY = 5 + + def setUp(self): + self.bucket_name = _SHARED_BUCKET + self.region = _DEFAULT_REGION + clear_out_bucket(self.bucket_name, self.region) + self.session = botocore.session.get_session() + self.client = self.session.create_client('s3', region_name=self.region) + + def assert_status_code(self, response, status_code): + self.assertEqual( + response['ResponseMetadata']['HTTPStatusCode'], status_code + ) + + def create_bucket(self, region_name, bucket_name=None, client=None): + bucket_client = client or self.client + if bucket_name is None: + bucket_name = random_bucketname() + bucket_kwargs = { + 'Bucket': bucket_name, + 'ObjectOwnership': 'ObjectWriter', + } + if region_name != 'us-east-1': + bucket_kwargs['CreateBucketConfiguration'] = { + 'LocationConstraint': region_name, + } + response = bucket_client.create_bucket(**bucket_kwargs) + self.assert_status_code(response, 200) + waiter = bucket_client.get_waiter('bucket_exists') + consistency_waiter = ConsistencyWaiter( + min_successes=3, delay=self.DEFAULT_DELAY, delay_initial_poll=True + ) + consistency_waiter.wait( + lambda: waiter.wait(Bucket=bucket_name) is None + ) + bucket_client.delete_public_access_block(Bucket=bucket_name) + self.addCleanup(clear_out_bucket, bucket_name, region_name, True) + return bucket_name + + def create_object(self, key_name, body='foo', num_attempts=3): + for _ in range(num_attempts): + try: + self.client.put_object( + Bucket=self.bucket_name, Key=key_name, Body=body + ) + break + except self.client.exceptions.NoSuchBucket: + time.sleep(self.DEFAULT_DELAY) + self.wait_until_key_exists(self.bucket_name, key_name) + + def make_tempdir(self): + tempdir = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, tempdir) + return tempdir + + def wait_until_key_exists( + self, bucket_name, key_name, extra_params=None, min_successes=3 + ): + self._wait_for_key( + bucket_name, key_name, extra_params, min_successes, exists=True + ) + + def wait_until_key_not_exists( + self, bucket_name, key_name, extra_params=None, min_successes=3 + ): + self._wait_for_key( + bucket_name, key_name, extra_params, min_successes, exists=False + ) + + def _wait_for_key( + self, + bucket_name, + key_name, + extra_params=None, + min_successes=3, + exists=True, + ): + if exists: + waiter = self.client.get_waiter('object_exists') + else: + waiter = self.client.get_waiter('object_not_exists') + params = {'Bucket': bucket_name, 'Key': key_name} + if extra_params is not None: + params.update(extra_params) + for _ in range(min_successes): + waiter.wait(**params) + + def _check_bucket_versioning(self, bucket, enabled=True): + client = self.session.create_client('s3', region_name=self.region) + response = client.get_bucket_versioning(Bucket=bucket) + status = response.get('Status') + return status == 'Enabled' if enabled else status != 'Enabled' + + def wait_until_versioning_enabled(self, bucket, min_successes=3): + waiter = ConsistencyWaiter( + min_successes=min_successes, + delay=self.DEFAULT_DELAY, + delay_initial_poll=True, + ) + waiter.wait(self._check_bucket_versioning, bucket) + + +class TestS3BaseWithBucket(BaseS3ClientTest): + def setUp(self): + super().setUp() + self.caught_exceptions = [] + + def create_multipart_upload(self, key_name): + parsed = self.client.create_multipart_upload( + Bucket=self.bucket_name, Key=key_name + ) + upload_id = parsed['UploadId'] + self.addCleanup( + self.client.abort_multipart_upload, + UploadId=upload_id, + Bucket=self.bucket_name, + Key=key_name, + ) + + def abort_multipart_upload(self, bucket_name, key, upload_id): + self.client.abort_multipart_upload( + UploadId=upload_id, Bucket=self.bucket_name, Key=key + ) + + def delete_object(self, key, bucket_name): + response = self.client.delete_object(Bucket=bucket_name, Key=key) + self.assert_status_code(response, 204) + + def delete_bucket(self, bucket_name): + response = self.client.delete_bucket(Bucket=bucket_name) + self.assert_status_code(response, 204) + + def create_object_catch_exceptions(self, key_name): + try: + self.create_object(key_name=key_name) + except Exception as e: + self.caught_exceptions.append(e) + + def assert_num_uploads_found( + self, operation, num_uploads, max_items=None, num_attempts=5 + ): + amount_seen = None + paginator = self.client.get_paginator(operation) + for _ in range(num_attempts): + pages = paginator.paginate( + Bucket=self.bucket_name, + PaginationConfig={'MaxItems': max_items}, + ) + iterators = pages.result_key_iters() + self.assertEqual(len(iterators), 2) + self.assertEqual(iterators[0].result_key.expression, 'Uploads') + # It sometimes takes a while for all the uploads to show up, + # especially if the upload was just created. If we don't + # see the expected amount, we retry up to num_attempts time + # before failing. + amount_seen = len(list(iterators[0])) + if amount_seen == num_uploads: + # Test passed. + return + else: + # Sleep and try again. + time.sleep(2) + self.fail( + f"Expected to see {num_uploads} uploads, instead saw: {amount_seen}" + ) + + def create_client(self): + # Even though the default signature_version is s3, + # we're being explicit in case this ever changes. + client_config = Config(signature_version='s3') + return self.session.create_client( + 's3', self.region, config=client_config + ) + + def assert_can_put_object(self, body): + client = self.create_client() + response = client.put_object( + Bucket=self.bucket_name, Key='foo', Body=body + ) + self.assert_status_code(response, 200) + self.addCleanup( + client.delete_object, Bucket=self.bucket_name, Key='foo' + ) + + +class TestS3Buckets(TestS3BaseWithBucket): + def setUp(self): + super().setUp() + + def test_can_make_request(self): + # Basic smoke test to ensure we can talk to s3. + result = self.client.list_buckets() + # Can't really assume anything about whether or not they have buckets, + # but we can assume something about the structure of the response. + self.assertEqual( + sorted(list(result.keys())), + ['Buckets', 'Owner', 'ResponseMetadata'], + ) + + def test_can_get_bucket_location(self): + result = self.client.get_bucket_location(Bucket=self.bucket_name) + self.assertIn('LocationConstraint', result) + self.assertEqual(result['LocationConstraint'], self.region) + + +class TestS3Objects(TestS3BaseWithBucket): + def increment_auth(self, request, **kwargs): + self.auth_paths.append(request.auth_path) + + def test_can_delete_urlencoded_object(self): + key_name = 'a+b/foo' + self.create_object(key_name=key_name) + bucket_contents = self.client.list_objects(Bucket=self.bucket_name)[ + 'Contents' + ] + self.assertEqual(len(bucket_contents), 1) + self.assertEqual(bucket_contents[0]['Key'], 'a+b/foo') + + subdir_contents = self.client.list_objects( + Bucket=self.bucket_name, Prefix='a+b' + )['Contents'] + self.assertEqual(len(subdir_contents), 1) + self.assertEqual(subdir_contents[0]['Key'], 'a+b/foo') + + response = self.client.delete_object( + Bucket=self.bucket_name, Key=key_name + ) + self.assert_status_code(response, 204) + + @pytest.mark.slow + def test_can_paginate(self): + for i in range(5): + key_name = f'key{i}' + self.create_object(key_name) + # Eventual consistency. + time.sleep(3) + paginator = self.client.get_paginator('list_objects') + generator = paginator.paginate(MaxKeys=1, Bucket=self.bucket_name) + responses = list(generator) + self.assertEqual(len(responses), 5, responses) + key_names = [el['Contents'][0]['Key'] for el in responses] + self.assertEqual(key_names, ['key0', 'key1', 'key2', 'key3', 'key4']) + + @pytest.mark.slow + def test_can_paginate_with_page_size(self): + for i in range(5): + key_name = f'key{i}' + self.create_object(key_name) + # Eventual consistency. + time.sleep(3) + paginator = self.client.get_paginator('list_objects') + generator = paginator.paginate( + PaginationConfig={'PageSize': 1}, Bucket=self.bucket_name + ) + responses = list(generator) + self.assertEqual(len(responses), 5, responses) + data = [r for r in responses] + key_names = [el['Contents'][0]['Key'] for el in data] + self.assertEqual(key_names, ['key0', 'key1', 'key2', 'key3', 'key4']) + + @pytest.mark.slow + def test_result_key_iters(self): + for i in range(5): + key_name = f'key/{i}/{i}' + self.create_object(key_name) + key_name2 = f'key/{i}' + self.create_object(key_name2) + time.sleep(3) + paginator = self.client.get_paginator('list_objects') + generator = paginator.paginate( + MaxKeys=2, Prefix='key/', Delimiter='/', Bucket=self.bucket_name + ) + iterators = generator.result_key_iters() + response = defaultdict(list) + key_names = [i.result_key for i in iterators] + for vals in zip_longest(*iterators): + for k, val in zip(key_names, vals): + response.setdefault(k.expression, []) + response[k.expression].append(val) + self.assertIn('Contents', response) + self.assertIn('CommonPrefixes', response) + + @pytest.mark.slow + def test_can_get_and_put_object(self): + self.create_object('foobarbaz', body='body contents') + time.sleep(3) + + data = self.client.get_object(Bucket=self.bucket_name, Key='foobarbaz') + self.assertEqual(data['Body'].read().decode('utf-8'), 'body contents') + + def test_can_put_large_string_body_on_new_bucket(self): + body = '*' * (5 * (1024**2)) + self.assert_can_put_object(body) + + def test_can_put_object_bytearray(self): + body_bytes = b'*' * 1024 + body = bytearray(body_bytes) + self.assert_can_put_object(body) + + def test_get_object_stream_wrapper(self): + self.create_object('foobarbaz', body='body contents') + response = self.client.get_object( + Bucket=self.bucket_name, Key='foobarbaz' + ) + body = response['Body'] + # Am able to set a socket timeout + body.set_socket_timeout(10) + self.assertEqual(body.read(amt=1).decode('utf-8'), 'b') + self.assertEqual(body.read().decode('utf-8'), 'ody contents') + + def test_paginate_max_items(self): + self.create_multipart_upload('foo/key1') + self.create_multipart_upload('foo/key1') + self.create_multipart_upload('foo/key1') + self.create_multipart_upload('foo/key2') + self.create_multipart_upload('foobar/key1') + self.create_multipart_upload('foobar/key2') + self.create_multipart_upload('bar/key1') + self.create_multipart_upload('bar/key2') + + # Verify when we have MaxItems=None, we get back all 8 uploads. + self.assert_num_uploads_found( + 'list_multipart_uploads', max_items=None, num_uploads=8 + ) + + # Verify when we have MaxItems=1, we get back 1 upload. + self.assert_num_uploads_found( + 'list_multipart_uploads', max_items=1, num_uploads=1 + ) + + paginator = self.client.get_paginator('list_multipart_uploads') + # Works similar with build_full_result() + pages = paginator.paginate( + PaginationConfig={'MaxItems': 1}, Bucket=self.bucket_name + ) + full_result = pages.build_full_result() + self.assertEqual(len(full_result['Uploads']), 1) + + def test_paginate_within_page_boundaries(self): + self.create_object('a') + self.create_object('b') + self.create_object('c') + self.create_object('d') + paginator = self.client.get_paginator('list_objects') + # First do it without a max keys so we're operating on a single page of + # results. + pages = paginator.paginate( + PaginationConfig={'MaxItems': 1}, Bucket=self.bucket_name + ) + first = pages.build_full_result() + t1 = first['NextToken'] + + pages = paginator.paginate( + PaginationConfig={'MaxItems': 1, 'StartingToken': t1}, + Bucket=self.bucket_name, + ) + second = pages.build_full_result() + t2 = second['NextToken'] + + pages = paginator.paginate( + PaginationConfig={'MaxItems': 1, 'StartingToken': t2}, + Bucket=self.bucket_name, + ) + third = pages.build_full_result() + t3 = third['NextToken'] + + pages = paginator.paginate( + PaginationConfig={'MaxItems': 1, 'StartingToken': t3}, + Bucket=self.bucket_name, + ) + fourth = pages.build_full_result() + + self.assertEqual(first['Contents'][-1]['Key'], 'a') + self.assertEqual(second['Contents'][-1]['Key'], 'b') + self.assertEqual(third['Contents'][-1]['Key'], 'c') + self.assertEqual(fourth['Contents'][-1]['Key'], 'd') + + def test_unicode_key_put_list(self): + # Verify we can upload a key with a unicode char and list it as well. + key_name = '\u2713' + self.create_object(key_name) + parsed = self.client.list_objects(Bucket=self.bucket_name) + self.assertEqual(len(parsed['Contents']), 1) + self.assertEqual(parsed['Contents'][0]['Key'], key_name) + parsed = self.client.get_object(Bucket=self.bucket_name, Key=key_name) + self.assertEqual(parsed['Body'].read().decode('utf-8'), 'foo') + + def test_unicode_system_character(self): + # Verify we can use a unicode system character which would normally + # break the xml parser + key_name = 'foo\x08' + self.create_object(key_name) + self.addCleanup(self.delete_object, key_name, self.bucket_name) + parsed = self.client.list_objects(Bucket=self.bucket_name) + self.assertEqual(len(parsed['Contents']), 1) + self.assertEqual(parsed['Contents'][0]['Key'], key_name) + + parsed = self.client.list_objects( + Bucket=self.bucket_name, EncodingType='url' + ) + self.assertEqual(len(parsed['Contents']), 1) + self.assertEqual(parsed['Contents'][0]['Key'], 'foo%08') + + def test_unicode_system_character_with_list_v2(self): + # Verify we can use a unicode system character which would normally + # break the xml parser + key_name = 'foo\x08' + self.create_object(key_name) + self.addCleanup(self.delete_object, key_name, self.bucket_name) + parsed = self.client.list_objects_v2(Bucket=self.bucket_name) + self.assertEqual(len(parsed['Contents']), 1) + self.assertEqual(parsed['Contents'][0]['Key'], key_name) + + parsed = self.client.list_objects_v2( + Bucket=self.bucket_name, EncodingType='url' + ) + self.assertEqual(len(parsed['Contents']), 1) + self.assertEqual(parsed['Contents'][0]['Key'], 'foo%08') + + def test_unicode_system_character_with_list_object_versions(self): + # Verify we can use a unicode system character which would normally + # break the xml parser + key_name = 'foo\x03' + self.create_object(key_name) + self.addCleanup(self.delete_object, key_name, self.bucket_name) + parsed = self.client.list_object_versions(Bucket=self.bucket_name) + self.assertEqual(len(parsed['Versions']), 1) + self.assertEqual(parsed['Versions'][0]['Key'], key_name) + + parsed = self.client.list_object_versions( + Bucket=self.bucket_name, EncodingType='url' + ) + self.assertEqual(len(parsed['Versions']), 1) + self.assertEqual(parsed['Versions'][0]['Key'], 'foo%03') + + def test_thread_safe_auth(self): + self.auth_paths = [] + emitter = self.session.get_component('event_emitter') + emitter.register_last('before-sign.s3', self.increment_auth) + # This test depends on auth_path, which is only added in virtual host + # style requests. + config = Config(s3={'addressing_style': 'virtual'}) + self.client = self.session.create_client( + 's3', self.region, config=config + ) + self.create_object(key_name='foo1') + threads = [] + for i in range(10): + t = threading.Thread( + target=self.create_object_catch_exceptions, args=(f'foo{i}',) + ) + t.daemon = True + threads.append(t) + for thread in threads: + thread.start() + for thread in threads: + thread.join() + self.assertEqual( + self.caught_exceptions, + [], + f"Unexpectedly caught exceptions: {self.caught_exceptions}", + ) + self.assertEqual( + len(set(self.auth_paths)), + 10, + f"Expected 10 unique auth paths, instead received: {self.auth_paths}", + ) + + def test_non_normalized_key_paths(self): + # The create_object method has assertEqual checks for 200 status. + self.create_object('key./././name') + bucket_contents = self.client.list_objects(Bucket=self.bucket_name)[ + 'Contents' + ] + self.assertEqual(len(bucket_contents), 1) + self.assertEqual(bucket_contents[0]['Key'], 'key./././name') + + +class TestS3Regions(BaseS3ClientTest): + def setUp(self): + super().setUp() + self.region = 'us-west-2' + self.client = self.session.create_client('s3', region_name=self.region) + + def test_reset_stream_on_redirects(self): + # Create a bucket in a non classic region. + bucket_name = self.create_bucket(self.region) + # Then try to put a file like object to this location. + tempdir = self.make_tempdir() + filename = os.path.join(tempdir, 'foo') + with open(filename, 'wb') as f: + f.write(b'foo' * 1024) + with open(filename, 'rb') as f: + self.client.put_object(Bucket=bucket_name, Key='foo', Body=f) + + data = self.client.get_object(Bucket=bucket_name, Key='foo') + self.assertEqual(data['Body'].read(), b'foo' * 1024) + + +class TestS3Copy(TestS3BaseWithBucket): + def test_copy_with_quoted_char(self): + key_name = 'a+b/foo' + self.create_object(key_name=key_name) + + key_name2 = key_name + 'bar' + self.client.copy_object( + Bucket=self.bucket_name, + Key=key_name2, + CopySource=f'{self.bucket_name}/{key_name}', + ) + + # Now verify we can retrieve the copied object. + data = self.client.get_object(Bucket=self.bucket_name, Key=key_name2) + self.assertEqual(data['Body'].read().decode('utf-8'), 'foo') + + def test_copy_with_query_string(self): + key_name = 'a+b/foo?notVersionid=bar' + self.create_object(key_name=key_name) + + key_name2 = key_name + 'bar' + self.client.copy_object( + Bucket=self.bucket_name, + Key=key_name2, + CopySource=f'{self.bucket_name}/{key_name}', + ) + + # Now verify we can retrieve the copied object. + data = self.client.get_object(Bucket=self.bucket_name, Key=key_name2) + self.assertEqual(data['Body'].read().decode('utf-8'), 'foo') + + def test_can_copy_with_dict_form(self): + key_name = 'a+b/foo?versionId=abcd' + self.create_object(key_name=key_name) + + key_name2 = key_name + 'bar' + self.client.copy_object( + Bucket=self.bucket_name, + Key=key_name2, + CopySource={'Bucket': self.bucket_name, 'Key': key_name}, + ) + + # Now verify we can retrieve the copied object. + data = self.client.get_object(Bucket=self.bucket_name, Key=key_name2) + self.assertEqual(data['Body'].read().decode('utf-8'), 'foo') + + def test_copy_with_s3_metadata(self): + key_name = 'foo.txt' + self.create_object(key_name=key_name) + copied_key = 'copied.txt' + parsed = self.client.copy_object( + Bucket=self.bucket_name, + Key=copied_key, + CopySource=f'{self.bucket_name}/{key_name}', + MetadataDirective='REPLACE', + Metadata={"mykey": "myvalue", "mykey2": "myvalue2"}, + ) + self.assert_status_code(parsed, 200) + + +class BaseS3PresignTest(BaseS3ClientTest): + def setup_bucket(self): + self.key = 'myobject' + self.create_object(key_name=self.key) + + +class TestS3PresignUsStandard(BaseS3PresignTest): + def setUp(self): + super().setUp() + self.region = 'us-east-1' + self.client_config = Config(region_name=self.region) + self.client = self.session.create_client( + 's3', config=self.client_config + ) + self.bucket_name = self.create_bucket(self.region) + self.setup_bucket() + + def test_presign_sigv2(self): + self.client_config.signature_version = 's3' + self.client = self.session.create_client( + 's3', config=self.client_config + ) + presigned_url = self.client.generate_presigned_url( + 'get_object', Params={'Bucket': self.bucket_name, 'Key': self.key} + ) + self.assertTrue( + presigned_url.startswith( + f'https://{self.bucket_name}.s3.amazonaws.com/{self.key}' + ), + "Host was suppose to use DNS style, instead " + f"got: {presigned_url}", + ) + # Try to retrieve the object using the presigned url. + self.assertEqual(http_get(presigned_url).data, b'foo') + + def test_presign_with_existing_query_string_values(self): + content_disposition = 'attachment; filename=foo.txt;' + presigned_url = self.client.generate_presigned_url( + 'get_object', + Params={ + 'Bucket': self.bucket_name, + 'Key': self.key, + 'ResponseContentDisposition': content_disposition, + }, + ) + response = http_get(presigned_url) + self.assertEqual( + response.headers['Content-Disposition'], content_disposition + ) + self.assertEqual(response.data, b'foo') + + def test_presign_sigv4(self): + self.client_config.signature_version = 's3v4' + self.client = self.session.create_client( + 's3', config=self.client_config + ) + presigned_url = self.client.generate_presigned_url( + 'get_object', Params={'Bucket': self.bucket_name, 'Key': self.key} + ) + self.assertTrue( + presigned_url.startswith( + f'https://{self.bucket_name}.s3.amazonaws.com/{self.key}' + ), + "Host was suppose to be the us-east-1 endpoint, instead " + f"got: {presigned_url}", + ) + # Try to retrieve the object using the presigned url. + self.assertEqual(http_get(presigned_url).data, b'foo') + + def test_presign_post_sigv2(self): + self.client_config.signature_version = 's3' + self.client = self.session.create_client( + 's3', config=self.client_config + ) + + # Create some of the various supported conditions. + conditions = [ + {"acl": "public-read"}, + ] + + # Create the fields that follow the policy. + fields = { + 'acl': 'public-read', + } + + # Retrieve the args for the presigned post. + post_args = self.client.generate_presigned_post( + self.bucket_name, self.key, Fields=fields, Conditions=conditions + ) + + # Make sure that the form can be posted successfully. + files = {'file': ('baz', 'some data')} + + # Make sure the correct endpoint is being used + self.assertTrue( + post_args['url'].startswith( + f'https://{self.bucket_name}.s3.amazonaws.com' + ), + "Host was suppose to use DNS style, instead " "got: {}".format( + post_args['url'] + ), + ) + + # Try to retrieve the object using the presigned url. + r = http_post(post_args['url'], data=post_args['fields'], files=files) + self.assertEqual(r.status, 204) + + def test_presign_post_sigv4(self): + self.client_config.signature_version = 's3v4' + self.client = self.session.create_client( + 's3', config=self.client_config + ) + + # Create some of the various supported conditions. + conditions = [ + {"acl": 'public-read'}, + ] + + # Create the fields that follow the policy. + fields = { + 'acl': 'public-read', + } + + # Retrieve the args for the presigned post. + post_args = self.client.generate_presigned_post( + self.bucket_name, self.key, Fields=fields, Conditions=conditions + ) + + # Make sure that the form can be posted successfully. + files = {'file': ('baz', 'some data')} + + # Make sure the correct endpoint is being used + self.assertTrue( + post_args['url'].startswith( + f'https://{self.bucket_name}.s3.amazonaws.com/' + ), + "Host was suppose to use us-east-1 endpoint, instead " + "got: {}".format(post_args['url']), + ) + + r = http_post(post_args['url'], data=post_args['fields'], files=files) + self.assertEqual(r.status, 204) + + +class TestS3PresignNonUsStandard(BaseS3PresignTest): + def setUp(self): + super().setUp() + self.client_config = Config(region_name=self.region) + self.client = self.session.create_client( + 's3', config=self.client_config + ) + self.setup_bucket() + + def test_presign_sigv2(self): + self.client_config.signature_version = 's3' + self.client = self.session.create_client( + 's3', config=self.client_config + ) + + presigned_url = self.client.generate_presigned_url( + 'get_object', Params={'Bucket': self.bucket_name, 'Key': self.key} + ) + self.assertTrue( + presigned_url.startswith( + f'https://{self.bucket_name}.s3.amazonaws.com/{self.key}' + ), + "Host was suppose to use DNS style, instead " + f"got: {presigned_url}", + ) + # Try to retrieve the object using the presigned url. + self.assertEqual(http_get(presigned_url).data, b'foo') + + def test_presign_sigv4(self): + # For a newly created bucket, you can't use virtualhosted + # addressing and 's3v4' due to the backwards compat behavior + # using '.s3.amazonaws.com' for anything in the AWS partition. + # Instead you either have to use the older 's3' signature version + # of you have to use path style addressing. The latter is being + # done here. + self.client_config.signature_version = 's3v4' + self.client_config.s3 = {'addressing_style': 'path'} + self.client = self.session.create_client( + 's3', config=self.client_config + ) + presigned_url = self.client.generate_presigned_url( + 'get_object', Params={'Bucket': self.bucket_name, 'Key': self.key} + ) + + self.assertTrue( + presigned_url.startswith( + f'https://s3.us-west-2.amazonaws.com/{self.bucket_name}/{self.key}' + ), + "Host was suppose to be the us-west-2 endpoint, instead " + f"got: {presigned_url}", + ) + # Try to retrieve the object using the presigned url. + self.assertEqual(http_get(presigned_url).data, b'foo') + + def test_presign_post_sigv2(self): + self.client_config.signature_version = 's3' + self.client = self.session.create_client( + 's3', config=self.client_config + ) + + # Create some of the various supported conditions. + conditions = [ + {"acl": "public-read"}, + ] + + # Create the fields that follow the policy. + fields = { + 'acl': 'public-read', + } + + # Retrieve the args for the presigned post. + post_args = self.client.generate_presigned_post( + self.bucket_name, self.key, Fields=fields, Conditions=conditions + ) + + # Make sure that the form can be posted successfully. + files = {'file': ('baz', 'some data')} + + # Make sure the correct endpoint is being used + self.assertTrue( + post_args['url'].startswith( + f'https://{self.bucket_name}.s3.amazonaws.com' + ), + "Host was suppose to use DNS style, instead " "got: {}".format( + post_args['url'] + ), + ) + + r = http_post(post_args['url'], data=post_args['fields'], files=files) + self.assertEqual(r.status, 204) + + def test_presign_post_sigv4(self): + self.client_config.signature_version = 's3v4' + self.client = self.session.create_client( + 's3', config=self.client_config + ) + + # Create some of the various supported conditions. + conditions = [ + {"acl": "public-read"}, + ] + + # Create the fields that follow the policy. + fields = { + 'acl': 'public-read', + } + + # Retrieve the args for the presigned post. + post_args = self.client.generate_presigned_post( + self.bucket_name, self.key, Fields=fields, Conditions=conditions + ) + + # Make sure that the form can be posted successfully. + files = {'file': ('baz', 'some data')} + + # Make sure the correct endpoint is being used + self.assertTrue( + post_args['url'].startswith( + f'https://{self.bucket_name}.s3.amazonaws.com/' + ), + "Host was suppose to use DNS style, instead " "got: {}".format( + post_args['url'] + ), + ) + + r = http_post(post_args['url'], data=post_args['fields'], files=files) + self.assertEqual(r.status, 204) + + +class TestCreateBucketInOtherRegion(TestS3BaseWithBucket): + def test_bucket_in_other_region(self): + # This verifies expect 100-continue behavior. We previously + # had a bug where we did not support this behavior and trying to + # create a bucket and immediately PutObject with a file like object + # would actually cause errors. + client = self.session.create_client('s3', 'us-east-1') + with temporary_file('w') as f: + f.write('foobarbaz' * 1024 * 1024) + f.flush() + with open(f.name, 'rb') as body_file: + response = client.put_object( + Bucket=self.bucket_name, Key='foo.txt', Body=body_file + ) + self.assert_status_code(response, 200) + + def test_bucket_in_other_region_using_http(self): + client = self.session.create_client('s3', 'us-east-1', use_ssl=False) + with temporary_file('w') as f: + f.write('foobarbaz' * 1024 * 1024) + f.flush() + with open(f.name, 'rb') as body_file: + response = client.put_object( + Bucket=self.bucket_name, Key='foo.txt', Body=body_file + ) + self.assert_status_code(response, 200) + + +class TestS3SigV4Client(BaseS3ClientTest): + def setUp(self): + super().setUp() + self.client = self.session.create_client( + 's3', self.region, config=Config(signature_version='s3v4') + ) + self.http_stubber = ClientHTTPStubber(self.client) + + def test_can_get_bucket_location(self): + # Even though the bucket is in us-west-2, we should still be able to + # use the us-east-1 endpoint class to get the bucket location. + client = self.session.create_client('s3', 'us-east-1') + # Also keep in mind that while this test is useful, it doesn't test + # what happens once DNS propogates which is arguably more interesting, + # as DNS will point us to the eu-central-1 endpoint. + response = client.get_bucket_location(Bucket=self.bucket_name) + self.assertEqual(response['LocationConstraint'], 'us-west-2') + + def test_request_retried_for_sigv4(self): + body = BytesIO(b"Hello world!") + exception = ConnectionClosedError(endpoint_url='') + self.http_stubber.responses.append(exception) + self.http_stubber.responses.append(None) + with self.http_stubber: + response = self.client.put_object( + Bucket=self.bucket_name, Key='foo.txt', Body=body + ) + self.assert_status_code(response, 200) + + @pytest.mark.slow + def test_paginate_list_objects_unicode(self): + key_names = [ + 'non-ascii-key-\xe4\xf6\xfc-01.txt', + 'non-ascii-key-\xe4\xf6\xfc-02.txt', + 'non-ascii-key-\xe4\xf6\xfc-03.txt', + 'non-ascii-key-\xe4\xf6\xfc-04.txt', + ] + for key in key_names: + response = self.client.put_object( + Bucket=self.bucket_name, Key=key, Body='' + ) + self.assert_status_code(response, 200) + + list_objs_paginator = self.client.get_paginator('list_objects') + key_refs = [] + for response in list_objs_paginator.paginate( + Bucket=self.bucket_name, PaginationConfig={'PageSize': 2} + ): + for content in response['Contents']: + key_refs.append(content['Key']) + + self.assertEqual(key_names, key_refs) + + @pytest.mark.slow + def test_paginate_list_objects_safe_chars(self): + key_names = [ + '-._~safe-chars-key-01.txt', + '-._~safe-chars-key-02.txt', + '-._~safe-chars-key-03.txt', + '-._~safe-chars-key-04.txt', + ] + for key in key_names: + response = self.client.put_object( + Bucket=self.bucket_name, Key=key, Body='' + ) + self.assert_status_code(response, 200) + + list_objs_paginator = self.client.get_paginator('list_objects') + key_refs = [] + for response in list_objs_paginator.paginate( + Bucket=self.bucket_name, PaginationConfig={'PageSize': 2} + ): + for content in response['Contents']: + key_refs.append(content['Key']) + + self.assertEqual(key_names, key_refs) + + def test_create_multipart_upload(self): + key = 'mymultipartupload' + response = self.client.create_multipart_upload( + Bucket=self.bucket_name, Key=key + ) + self.assert_status_code(response, 200) + upload_id = response['UploadId'] + self.addCleanup( + self.client.abort_multipart_upload, + Bucket=self.bucket_name, + Key=key, + UploadId=upload_id, + ) + + response = self.client.list_multipart_uploads( + Bucket=self.bucket_name, Prefix=key + ) + + # Make sure there is only one multipart upload. + self.assertEqual(len(response['Uploads']), 1) + # Make sure the upload id is as expected. + self.assertEqual(response['Uploads'][0]['UploadId'], upload_id) + + def test_can_add_double_space_metadata(self): + # Ensure we get no sigv4 errors when we send + # metadata with consecutive spaces. + response = self.client.put_object( + Bucket=self.bucket_name, + Key='foo.txt', + Body=b'foobar', + Metadata={'foo': ' multi spaces '}, + ) + self.assert_status_code(response, 200) + + def test_bad_request_on_invalid_credentials(self): + # A previous bug would cause this to hang. We want + # to verify we get the 400 response. + # In order to test we need a key that actually + # exists so we use the properly configured self.client. + self.client.put_object( + Bucket=self.bucket_name, Key='foo.txt', Body=b'asdfasdf' + ) + # Now we create a client with a bad session token + # which should give us a 400 response. + creds = self.session.get_credentials() + client = self.session.create_client( + 's3', + self.region, + config=Config(signature_version='s3v4'), + aws_access_key_id=creds.access_key, + aws_secret_access_key=creds.secret_key, + aws_session_token='bad-token-causes-400', + ) + with self.assertRaises(ClientError) as e: + client.head_object( + Bucket=self.bucket_name, + Key='foo.txt', + ) + self.assertEqual(e.exception.response['Error']['Code'], '400') + + +class TestSSEKeyParamValidation(BaseS3ClientTest): + def test_make_request_with_sse(self): + key_bytes = os.urandom(32) + # Obviously a bad key here, but we just want to ensure we can use + # a str/unicode type as a key. + key_str = 'abcd' * 8 + + # Put two objects with an sse key, one with random bytes, + # one with str/unicode. Then verify we can GetObject() both + # objects. + self.client.put_object( + Bucket=self.bucket_name, + Key='foo.txt', + Body=BytesIO(b'mycontents'), + SSECustomerAlgorithm='AES256', + SSECustomerKey=key_bytes, + ) + self.addCleanup( + self.client.delete_object, Bucket=self.bucket_name, Key='foo.txt' + ) + self.client.put_object( + Bucket=self.bucket_name, + Key='foo2.txt', + Body=BytesIO(b'mycontents2'), + SSECustomerAlgorithm='AES256', + SSECustomerKey=key_str, + ) + self.addCleanup( + self.client.delete_object, Bucket=self.bucket_name, Key='foo2.txt' + ) + + self.assertEqual( + self.client.get_object( + Bucket=self.bucket_name, + Key='foo.txt', + SSECustomerAlgorithm='AES256', + SSECustomerKey=key_bytes, + )['Body'].read(), + b'mycontents', + ) + self.assertEqual( + self.client.get_object( + Bucket=self.bucket_name, + Key='foo2.txt', + SSECustomerAlgorithm='AES256', + SSECustomerKey=key_str, + )['Body'].read(), + b'mycontents2', + ) + + def test_make_request_with_sse_copy_source(self): + encrypt_key = 'a' * 32 + other_encrypt_key = 'b' * 32 + + # Upload the object using one encrypt key + self.client.put_object( + Bucket=self.bucket_name, + Key='foo.txt', + Body=BytesIO(b'mycontents'), + SSECustomerAlgorithm='AES256', + SSECustomerKey=encrypt_key, + ) + self.addCleanup( + self.client.delete_object, Bucket=self.bucket_name, Key='foo.txt' + ) + + # Copy the object using the original encryption key as the copy source + # and encrypt with a new encryption key. + self.client.copy_object( + Bucket=self.bucket_name, + CopySource=self.bucket_name + '/foo.txt', + Key='bar.txt', + CopySourceSSECustomerAlgorithm='AES256', + CopySourceSSECustomerKey=encrypt_key, + SSECustomerAlgorithm='AES256', + SSECustomerKey=other_encrypt_key, + ) + self.addCleanup( + self.client.delete_object, Bucket=self.bucket_name, Key='bar.txt' + ) + + # Download the object using the new encryption key. + # The content should not have changed. + self.assertEqual( + self.client.get_object( + Bucket=self.bucket_name, + Key='bar.txt', + SSECustomerAlgorithm='AES256', + SSECustomerKey=other_encrypt_key, + )['Body'].read(), + b'mycontents', + ) + + +class TestS3UTF8Headers(BaseS3ClientTest): + def test_can_set_utf_8_headers(self): + bucket_name = _SHARED_BUCKET + body = BytesIO(b"Hello world!") + response = self.client.put_object( + Bucket=bucket_name, + Key="foo.txt", + Body=body, + ContentDisposition="attachment; filename=5小時接力起跑.jpg;", + ) + self.assert_status_code(response, 200) + self.addCleanup( + self.client.delete_object, Bucket=bucket_name, Key="foo.txt" + ) + + +class TestSupportedPutObjectBodyTypes(TestS3BaseWithBucket): + def test_can_put_unicode_content(self): + self.assert_can_put_object(body='\u2713') + + def test_can_put_non_ascii_bytes(self): + self.assert_can_put_object(body='\u2713'.encode()) + + def test_can_put_arbitrary_binary_data(self): + body = os.urandom(5 * (1024**2)) + self.assert_can_put_object(body) + + def test_can_put_binary_file(self): + tempdir = self.make_tempdir() + filename = os.path.join(tempdir, 'foo') + with open(filename, 'wb') as f: + f.write('\u2713'.encode()) + with open(filename, 'rb') as binary_file: + self.assert_can_put_object(body=binary_file) + + def test_can_put_extracted_file_from_tar(self): + tempdir = self.make_tempdir() + tarname = os.path.join(tempdir, 'mytar.tar') + filename = os.path.join(tempdir, 'foo') + + # Set up a file to add the tarfile. + with open(filename, 'w') as f: + f.write('bar') + + # Setup the tar file by adding the file to it. + # Note there is no context handler for TarFile in python 2.6 + try: + tar = TarFile(tarname, 'w') + tar.add(filename, 'foo') + finally: + tar.close() + + # See if an extracted file can be uploaded to s3. + try: + tar = TarFile(tarname, 'r') + with closing(tar.extractfile('foo')) as f: + self.assert_can_put_object(body=f) + finally: + tar.close() + + +class TestSupportedPutObjectBodyTypesSigv4(TestSupportedPutObjectBodyTypes): + def create_client(self): + client_config = Config(signature_version='s3v4') + return self.session.create_client( + 's3', self.region, config=client_config + ) + + +class TestAutoS3Addressing(BaseS3ClientTest): + def setUp(self): + super().setUp() + self.addressing_style = 'auto' + self.client = self.create_client() + + def create_client(self, signature_version='s3'): + return self.session.create_client( + 's3', + region_name=self.region, + config=Config( + s3={ + 'addressing_style': self.addressing_style, + 'signature_version': signature_version, + } + ), + ) + + def test_can_list_buckets(self): + response = self.client.list_buckets() + self.assertIn('Buckets', response) + + def test_can_make_bucket_and_put_object(self): + response = self.client.put_object( + Bucket=self.bucket_name, Key='foo', Body='contents' + ) + self.assertEqual(response['ResponseMetadata']['HTTPStatusCode'], 200) + + def test_can_make_bucket_and_put_object_with_sigv4(self): + self.region = 'eu-central-1' + self.client = self.create_client() + bucket_name = self.create_bucket(self.region) + response = self.client.put_object( + Bucket=bucket_name, Key='foo', Body='contents' + ) + self.assertEqual(response['ResponseMetadata']['HTTPStatusCode'], 200) + + +class TestS3VirtualAddressing(TestAutoS3Addressing): + def setUp(self): + super().setUp() + self.addressing_style = 'virtual' + self.client = self.create_client() + + +class TestS3PathAddressing(TestAutoS3Addressing): + def setUp(self): + super().setUp() + self.addressing_style = 'path' + self.client = self.create_client() + + +class TestRegionRedirect(BaseS3ClientTest): + def setUp(self): + super().setUp() + self.bucket_region = self.region + self.client_region = 'eu-central-1' + + self.client = self.session.create_client( + 's3', + region_name=self.client_region, + config=Config(signature_version='s3v4'), + ) + + self.bucket_client = self.session.create_client( + 's3', + region_name=self.bucket_region, + config=Config(signature_version='s3v4'), + ) + + def test_region_redirects(self): + try: + response = self.client.list_objects(Bucket=self.bucket_name) + self.assertEqual( + response['ResponseMetadata']['HTTPStatusCode'], 200 + ) + except ClientError as e: + error = e.response['Error'].get('Code', None) + if error == 'PermanentRedirect': + self.fail("S3 client failed to redirect to the proper region.") + + def test_region_redirect_sigv2_to_sigv4_raises_error(self): + self.bucket_region = 'eu-central-1' + sigv2_client = self.session.create_client( + 's3', + region_name=self.client_region, + config=Config(signature_version='s3'), + ) + + eu_bucket = self.create_bucket(self.bucket_region) + msg = 'The authorization mechanism you have provided is not supported.' + with self.assertRaisesRegex(ClientError, msg): + sigv2_client.list_objects(Bucket=eu_bucket) + + def test_region_redirects_multiple_requests(self): + try: + response = self.client.list_objects(Bucket=self.bucket_name) + self.assertEqual( + response['ResponseMetadata']['HTTPStatusCode'], 200 + ) + second_response = self.client.list_objects(Bucket=self.bucket_name) + self.assertEqual( + second_response['ResponseMetadata']['HTTPStatusCode'], 200 + ) + except ClientError as e: + error = e.response['Error'].get('Code', None) + if error == 'PermanentRedirect': + self.fail("S3 client failed to redirect to the proper region.") + + def test_redirects_head_bucket(self): + response = self.client.head_bucket(Bucket=self.bucket_name) + headers = response['ResponseMetadata']['HTTPHeaders'] + region = headers.get('x-amz-bucket-region') + self.assertEqual(region, self.bucket_region) + + def test_redirects_head_object(self): + key = 'foo' + self.bucket_client.put_object( + Bucket=self.bucket_name, Key=key, Body='bar' + ) + self.wait_until_key_exists(self.bucket_name, key) + try: + response = self.client.head_object( + Bucket=self.bucket_name, Key=key + ) + self.assertEqual(response.get('ContentLength'), len(key)) + except ClientError as e: + self.fail(f"S3 Client failed to redirect Head Object: {e}") + + +class TestBucketWithVersions(BaseS3ClientTest): + def extract_version_ids(self, versions): + version_ids = [] + for marker in versions['DeleteMarkers']: + version_ids.append(marker['VersionId']) + for version in versions['Versions']: + version_ids.append(version['VersionId']) + return version_ids + + def test_create_versioned_bucket(self): + # Verifies we can: + # 1. Create a bucket + # 2. Enable versioning + # 3. Put an Object + bucket = self.create_bucket(self.region) + + self.client.put_bucket_versioning( + Bucket=bucket, + VersioningConfiguration={"Status": "Enabled"}, + ) + self.wait_until_versioning_enabled(bucket) + + key = 'testkey' + body = b'bytes body' + response = self.client.put_object(Bucket=bucket, Key=key, Body=body) + self.addCleanup( + self.client.delete_object, + Bucket=bucket, + Key=key, + VersionId=response['VersionId'], + ) + self.wait_until_key_exists(bucket, key) + + response = self.client.get_object(Bucket=bucket, Key=key) + self.assertEqual(response['Body'].read(), body) + + response = self.client.delete_object(Bucket=bucket, Key=key) + # This cleanup step removes the DeleteMarker that's created + # from the delete_object call above. + self.addCleanup( + self.client.delete_object, + Bucket=bucket, + Key=key, + VersionId=response['VersionId'], + ) + # Object does not exist anymore. + with self.assertRaises(ClientError): + self.client.get_object(Bucket=bucket, Key=key) + versions = self.client.list_object_versions(Bucket=bucket) + version_ids = self.extract_version_ids(versions) + self.assertEqual(len(version_ids), 2) diff --git a/testbed/boto__botocore/tests/integration/test_session.py b/testbed/boto__botocore/tests/integration/test_session.py new file mode 100644 index 0000000000000000000000000000000000000000..95d2ec1626a59bcaee90557d385b955a92f204d1 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_session.py @@ -0,0 +1,48 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from tests import unittest + + +class TestCanChangeParsing(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + + def test_can_change_timestamp_with_clients(self): + factory = self.session.get_component('response_parser_factory') + factory.set_parser_defaults(timestamp_parser=lambda x: str(x)) + + # Now if we get a response with timestamps in the model, they + # will be returned as strings. We're testing service/operation + # objects, but we should also add a test for clients. + s3 = self.session.create_client('s3', 'us-west-2') + parsed = s3.list_buckets() + dates = [bucket['CreationDate'] for bucket in parsed['Buckets']] + self.assertTrue( + all(isinstance(date, str) for date in dates), + f"Expected all str types but instead got: {dates}", + ) + + def test_maps_service_name_when_overriden(self): + ses = self.session.get_service_model('ses') + self.assertEqual(ses.endpoint_prefix, 'email') + # But we should map the service_name to be the same name + # used when calling get_service_model which is different + # than the endpoint_prefix. + self.assertEqual(ses.service_name, 'ses') + + def test_maps_service_name_from_client(self): + # Same thing as test_maps_service_name_from_client, + # except through the client interface. + client = self.session.create_client('ses', region_name='us-east-1') + self.assertEqual(client.meta.service_model.service_name, 'ses') diff --git a/testbed/boto__botocore/tests/integration/test_smoke.py b/testbed/boto__botocore/tests/integration/test_smoke.py new file mode 100644 index 0000000000000000000000000000000000000000..e31a5c92870be40e10ef9533d211cf4ce72a406f --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_smoke.py @@ -0,0 +1,324 @@ +"""Smoke tests to verify basic communication to all AWS services. + +If you want to control what services/regions are used you can +also provide two separate env vars: + + * AWS_SMOKE_TEST_REGION - The region used to create clients. + * AWS_SMOKE_TEST_SERVICES - A CSV list of service names to test. + +Otherwise, the ``REGION`` variable specifies the default region +to use and all the services in SMOKE_TESTS/ERROR_TESTS will be tested. + +""" + +import logging +import os +import warnings +from pprint import pformat + +import pytest + +import botocore.session +from botocore import xform_name +from botocore.client import ClientError +from botocore.exceptions import ConnectionClosedError +from tests import ClientHTTPStubber + +# Mapping of service -> api calls to try. +# Each api call is a dict of OperationName->params. +# Empty params means that the operation will be called with no params. This is +# used as a quick verification that we can successfully make calls to services. +SMOKE_TESTS = { + 'acm': {'ListCertificates': {}}, + 'apigateway': {'GetRestApis': {}}, + 'application-autoscaling': { + 'DescribeScalableTargets': {'ServiceNamespace': 'ecs'} + }, + 'autoscaling': { + 'DescribeAccountLimits': {}, + 'DescribeAdjustmentTypes': {}, + }, + 'cloudformation': {'DescribeStacks': {}, 'ListStacks': {}}, + 'cloudfront': {'ListDistributions': {}, 'ListStreamingDistributions': {}}, + 'cloudhsmv2': {'DescribeBackups': {}}, + 'cloudsearch': {'DescribeDomains': {}, 'ListDomainNames': {}}, + 'cloudtrail': {'DescribeTrails': {}}, + 'cloudwatch': {'ListMetrics': {}}, + 'codecommit': {'ListRepositories': {}}, + 'codedeploy': {'ListApplications': {}}, + 'codepipeline': {'ListActionTypes': {}}, + 'cognito-identity': {'ListIdentityPools': {'MaxResults': 1}}, + 'cognito-sync': {'ListIdentityPoolUsage': {}}, + 'config': {'DescribeDeliveryChannels': {}}, + 'datapipeline': {'ListPipelines': {}}, + 'devicefarm': {'ListProjects': {}}, + 'directconnect': {'DescribeConnections': {}}, + 'ds': {'DescribeDirectories': {}}, + 'dynamodb': {'ListTables': {}}, + 'dynamodbstreams': {'ListStreams': {}}, + 'ec2': {'DescribeRegions': {}, 'DescribeInstances': {}}, + 'ecr': {'DescribeRepositories': {}}, + 'ecs': {'DescribeClusters': {}}, + 'elasticache': {'DescribeCacheClusters': {}}, + 'elasticbeanstalk': {'DescribeApplications': {}}, + 'elastictranscoder': {'ListPipelines': {}}, + 'elb': {'DescribeLoadBalancers': {}}, + 'emr': {'ListClusters': {}}, + 'es': {'ListDomainNames': {}}, + 'events': {'ListRules': {}}, + 'firehose': {'ListDeliveryStreams': {}}, + 'gamelift': {'ListBuilds': {}}, + 'glacier': {'ListVaults': {}}, + 'iam': {'ListUsers': {}}, + # Does not work with session credentials so + # importexport tests are not run. + # 'importexport': {'ListJobs': {}}, + 'importexport': {}, + 'inspector': {'DescribeCrossAccountAccessRole': {}}, + 'iot': {'DescribeEndpoint': {}}, + 'kinesis': {'ListStreams': {}}, + 'kms': {'ListKeys': {}}, + 'lambda': {'ListFunctions': {}}, + 'logs': {'DescribeLogGroups': {}}, + # 'opsworks': {'DescribeStacks': {}}, + 'rds': {'DescribeDBInstances': {}}, + 'redshift': {'DescribeClusters': {}}, + 'route53': {'ListHostedZones': {}}, + 'route53domains': {'ListDomains': {}}, + 's3': {'ListBuckets': {}}, + 'sdb': {'ListDomains': {}}, + 'ses': {'ListIdentities': {}}, + 'shield': {'GetSubscriptionState': {}}, + 'sns': {'ListTopics': {}}, + 'sqs': {'ListQueues': {}}, + 'ssm': {'ListDocuments': {}}, + 'storagegateway': {'ListGateways': {}}, + # sts tests would normally go here, but + # there aren't any calls you can make when + # using session credentials so we don't run any + # sts tests. + 'sts': {}, + # 'sts': {'GetSessionToken': {}}, + # Subscription needed for support API calls. + 'support': {}, + 'swf': {'ListDomains': {'registrationStatus': 'REGISTERED'}}, + 'waf': {'ListWebACLs': {'Limit': 1}}, + 'workspaces': {'DescribeWorkspaces': {}}, +} + + +# Same thing as the SMOKE_TESTS hash above, except these verify +# that we get an error response back from the server because +# we've sent invalid params. +ERROR_TESTS = { + 'apigateway': {'GetRestApi': {'restApiId': 'fake-id'}}, + 'application-autoscaling': { + 'DescribeScalableTargets': { + 'ServiceNamespace': 'fake-service-namespace' + } + }, + 'autoscaling': { + 'CreateLaunchConfiguration': { + 'LaunchConfigurationName': 'foo', + 'ImageId': 'ami-12345678', + 'InstanceType': 'm1.small', + } + }, + 'cloudformation': { + 'CreateStack': { + 'StackName': 'fake', + 'TemplateURL': 'http://s3.amazonaws.com/foo/bar', + } + }, + 'cloudfront': {'GetDistribution': {'Id': 'fake-id'}}, + 'cloudhsmv2': {'ListTags': {'ResourceId': 'fake-id'}}, + 'cloudsearch': {'DescribeIndexFields': {'DomainName': 'fakedomain'}}, + 'cloudtrail': {'DeleteTrail': {'Name': 'fake-trail'}}, + 'cloudwatch': { + 'SetAlarmState': { + 'AlarmName': 'abc', + 'StateValue': 'mno', + 'StateReason': 'xyz', + } + }, + 'logs': {'GetLogEvents': {'logGroupName': 'a', 'logStreamName': 'b'}}, + 'codecommit': {'ListBranches': {'repositoryName': 'fake-repo'}}, + 'codedeploy': {'GetDeployment': {'deploymentId': 'fake-id'}}, + 'codepipeline': {'GetPipeline': {'name': 'fake-pipeline'}}, + 'cognito-identity': {'DescribeIdentityPool': {'IdentityPoolId': 'fake'}}, + 'cognito-sync': {'DescribeIdentityPoolUsage': {'IdentityPoolId': 'fake'}}, + 'config': { + 'GetResourceConfigHistory': {'resourceType': '', 'resourceId': 'fake'}, + }, + 'datapipeline': {'GetPipelineDefinition': {'pipelineId': 'fake'}}, + 'devicefarm': { + 'GetDevice': {'arn': 'arn:aws:devicefarm:REGION::device:f'} + }, + 'directconnect': {'DescribeConnections': {'connectionId': 'fake'}}, + 'ds': {'CreateDirectory': {'Name': 'n', 'Password': 'p', 'Size': '1'}}, + 'dynamodb': {'DescribeTable': {'TableName': 'fake'}}, + 'dynamodbstreams': {'DescribeStream': {'StreamArn': 'x' * 37}}, + 'ec2': {'DescribeInstances': {'InstanceIds': ['i-12345678']}}, + 'ecs': {'StopTask': {'task': 'fake'}}, + 'efs': {'DeleteFileSystem': {'FileSystemId': 'fake'}}, + 'elasticache': {'DescribeCacheClusters': {'CacheClusterId': 'fake'}}, + 'elasticbeanstalk': { + 'DescribeEnvironmentResources': {'EnvironmentId': 'x'}, + }, + 'elb': {'DescribeLoadBalancers': {'LoadBalancerNames': ['fake']}}, + 'elastictranscoder': {'ReadJob': {'Id': 'fake'}}, + 'emr': {'DescribeCluster': {'ClusterId': 'fake'}}, + 'es': {'DescribeElasticsearchDomain': {'DomainName': 'not-a-domain'}}, + 'gamelift': {'DescribeBuild': {'BuildId': 'fake-build-id'}}, + 'glacier': {'ListVaults': {'accountId': 'fake'}}, + 'iam': {'GetUser': {'UserName': 'fake'}}, + 'kinesis': {'DescribeStream': {'StreamName': 'fake'}}, + 'kms': {'GetKeyPolicy': {'KeyId': 'fake', 'PolicyName': 'fake'}}, + 'lambda': {'Invoke': {'FunctionName': 'fake'}}, + # 'opsworks': {'DescribeLayers': {'StackId': 'fake'}}, + 'rds': {'DescribeDBInstances': {'DBInstanceIdentifier': 'fake'}}, + 'redshift': {'DescribeClusters': {'ClusterIdentifier': 'fake'}}, + 'route53': {'GetHostedZone': {'Id': 'fake'}}, + 'route53domains': {'GetDomainDetail': {'DomainName': 'fake'}}, + 's3': {'ListObjects': {'Bucket': 'thisbucketdoesnotexistasdf'}}, + 'ses': {'VerifyEmailIdentity': {'EmailAddress': 'fake'}}, + 'sdb': {'CreateDomain': {'DomainName': ''}}, + 'sns': { + 'ConfirmSubscription': {'TopicArn': 'a', 'Token': 'b'}, + 'Publish': {'Message': 'hello', 'TopicArn': 'fake'}, + }, + 'sqs': {'GetQueueUrl': {'QueueName': 'fake'}}, + 'ssm': {'GetDocument': {'Name': 'fake'}}, + 'storagegateway': {'ListVolumes': {'GatewayARN': 'x' * 50}}, + 'sts': {'GetFederationToken': {'Name': 'fake', 'Policy': 'fake'}}, + 'support': { + 'CreateCase': { + 'subject': 'x', + 'communicationBody': 'x', + 'categoryCode': 'x', + 'serviceCode': 'x', + 'severityCode': 'low', + } + }, + 'swf': {'DescribeDomain': {'name': 'fake'}}, + 'waf': {'GetWebACL': {'WebACLId': 'fake'}}, + 'workspaces': {'DescribeWorkspaces': {'DirectoryId': 'fake-directory-id'}}, +} + +REGION = 'us-east-1' +REGION_OVERRIDES = { + 'devicefarm': 'us-west-2', + 'efs': 'us-west-2', + 'inspector': 'us-west-2', +} +MAX_RETRIES = 8 +logger = logging.getLogger(__name__) + + +def _get_client(session, service): + if os.environ.get('AWS_SMOKE_TEST_REGION', ''): + region_name = os.environ['AWS_SMOKE_TEST_REGION'] + else: + region_name = REGION_OVERRIDES.get(service, REGION) + client = session.create_client(service, region_name=region_name) + client.meta.events.register_first('needs-retry.*.*', retry_handler) + return client + + +def retry_handler(response, attempts, **kwargs): + if response is not None: + _, parsed = response + code = parsed.get('Error', {}).get('Code') + # Catch ThrottleException, Throttling. + is_throttle_error = code is not None and 'throttl' in code.lower() + if is_throttle_error and attempts <= MAX_RETRIES: + # We want the exponential behavior with a fixed 10 second + # minimum, e.g. 11, 12, 14, 18, 26. With a max retries of 8, + # this is about 7-8 minutes total we'll retry. + retry_delay = (2 ** (attempts - 1)) + 10 + logger.debug("Using custom retry delay of: %s", retry_delay) + return retry_delay + + +def _list_services(dict_entries): + # List all services in the provided dict_entry. + # If the AWS_SMOKE_TEST_SERVICES is provided, + # it's a comma separated list of services you can provide + # if you only want to run the smoke tests for certain services. + if 'AWS_SMOKE_TEST_SERVICES' not in os.environ: + return dict_entries.keys() + else: + wanted_services = os.environ.get('AWS_SMOKE_TEST_SERVICES', '').split( + ',' + ) + return [key for key in dict_entries if key in wanted_services] + + +@pytest.fixture() +def botocore_session(): + return botocore.session.get_session() + + +def _smoke_tests(): + for service_name in _list_services(SMOKE_TESTS): + for operation_name in SMOKE_TESTS[service_name]: + kwargs = SMOKE_TESTS[service_name][operation_name] + yield service_name, operation_name, kwargs + + +def _error_tests(): + for service_name in _list_services(ERROR_TESTS): + for operation_name in ERROR_TESTS[service_name]: + kwargs = ERROR_TESTS[service_name][operation_name] + yield service_name, operation_name, kwargs + + +@pytest.mark.parametrize( + "service_name, operation_name, kwargs", _smoke_tests() +) +def test_can_make_request_with_client( + botocore_session, service_name, operation_name, kwargs +): + # Same as test_can_make_request, but with Client objects + # instead of service/operations. + client = _get_client(botocore_session, service_name) + method = getattr(client, xform_name(operation_name)) + with warnings.catch_warnings(record=True) as caught_warnings: + response = method(**kwargs) + err_msg = f"Warnings were emitted during smoke test: {caught_warnings}" + assert len(caught_warnings) == 0, err_msg + assert 'Errors' not in response + + +@pytest.mark.parametrize( + "service_name, operation_name, kwargs", _error_tests() +) +def test_can_make_request_and_understand_errors_with_client( + botocore_session, service_name, operation_name, kwargs +): + client = _get_client(botocore_session, service_name) + method = getattr(client, xform_name(operation_name)) + with pytest.raises(ClientError): + method(**kwargs) + + +@pytest.mark.parametrize( + "service_name, operation_name, kwargs", _smoke_tests() +) +def test_client_can_retry_request_properly( + botocore_session, service_name, operation_name, kwargs +): + client = _get_client(botocore_session, service_name) + operation = getattr(client, xform_name(operation_name)) + exception = ConnectionClosedError(endpoint_url='https://mock.eror') + with ClientHTTPStubber(client, strict=False) as http_stubber: + http_stubber.responses.append(exception) + try: + operation(**kwargs) + except ClientError as e: + assert False, ( + 'Request was not retried properly, ' + f'received error:\n{pformat(e)}' + ) + # Ensure we used the stubber as we're not using it in strict mode + assert len(http_stubber.responses) == 0, 'Stubber was not used!' diff --git a/testbed/boto__botocore/tests/integration/test_sts.py b/testbed/boto__botocore/tests/integration/test_sts.py new file mode 100644 index 0000000000000000000000000000000000000000..8a096de8ff0ee5ec345e866479dc82d92cb8f8d7 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_sts.py @@ -0,0 +1,45 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import botocore.session +from botocore.exceptions import ClientError +from tests import unittest + + +class TestSTS(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + credentials = self.session.get_credentials() + if credentials.token is not None: + self.skipTest('STS tests require long-term credentials') + + def test_regionalized_endpoints(self): + sts = self.session.create_client('sts', region_name='ap-southeast-1') + response = sts.get_session_token() + # Do not want to be revealing any temporary keys if the assertion fails + self.assertIn('Credentials', response.keys()) + + # Since we have to activate STS regionalization, we will test + # that you can send an STS request to a regionalized endpoint + # by making a call with the explicitly wrong region name + sts = self.session.create_client( + 'sts', + region_name='ap-southeast-1', + endpoint_url='https://sts.us-west-2.amazonaws.com', + ) + self.assertEqual(sts.meta.region_name, 'ap-southeast-1') + self.assertEqual( + sts.meta.endpoint_url, 'https://sts.us-west-2.amazonaws.com' + ) + # Signing error will be thrown with the incorrect region name included. + with self.assertRaisesRegex(ClientError, 'ap-southeast-1'): + sts.get_session_token() diff --git a/testbed/boto__botocore/tests/integration/test_utils.py b/testbed/boto__botocore/tests/integration/test_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..6209a9ff3c0a5bf81f54a21518cf6c77badabcbc --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_utils.py @@ -0,0 +1,49 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +import botocore.session +from botocore.utils import ArgumentGenerator + + +@pytest.fixture(scope="module") +def generator(): + return ArgumentGenerator() + + +def _all_inputs(): + session = botocore.session.get_session() + for service_name in session.get_available_services(): + service_model = session.get_service_model(service_name) + for operation_name in service_model.operation_names: + operation_model = service_model.operation_model(operation_name) + input_shape = operation_model.input_shape + if input_shape is not None and input_shape.members: + yield input_shape, service_name, operation_name + + +@pytest.mark.parametrize( + "input_shape, service_name, operation_name", _all_inputs() +) +def test_can_generate_all_inputs( + generator, input_shape, service_name, operation_name +): + generated = generator.generate_skeleton(input_shape) + # Do some basic sanity checks to make sure the generated shape + # looks right. We're mostly just ensuring that the generate_skeleton + # doesn't throw an exception. + assert isinstance(generated, dict) + + # The generated skeleton also shouldn't be empty (the test + # generator has already filtered out input_shapes of None). + assert len(generated) > 0 diff --git a/testbed/boto__botocore/tests/integration/test_waiters.py b/testbed/boto__botocore/tests/integration/test_waiters.py new file mode 100644 index 0000000000000000000000000000000000000000..a627cec0dec4bd65d447432d35547d3274ca9ab1 --- /dev/null +++ b/testbed/boto__botocore/tests/integration/test_waiters.py @@ -0,0 +1,70 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import pytest + +import botocore.session +from botocore.exceptions import WaiterError +from tests import random_chars, unittest + + +@pytest.mark.slow +class TestWaiterForDynamoDB(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client('dynamodb', 'us-west-2') + + def test_create_table_and_wait(self): + table_name = f'botocoretest-{random_chars(10)}' + self.client.create_table( + TableName=table_name, + ProvisionedThroughput={ + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5, + }, + KeySchema=[{"AttributeName": "foo", "KeyType": "HASH"}], + AttributeDefinitions=[ + {"AttributeName": "foo", "AttributeType": "S"} + ], + ) + self.addCleanup(self.client.delete_table, TableName=table_name) + waiter = self.client.get_waiter('table_exists') + waiter.wait(TableName=table_name) + parsed = self.client.describe_table(TableName=table_name) + self.assertEqual(parsed['Table']['TableStatus'], 'ACTIVE') + + +class TestCanGetWaitersThroughClientInterface(unittest.TestCase): + def test_get_ses_waiter(self): + # We're checking this because ses is not the endpoint prefix + # for the service, it's email. We want to make sure this does + # not affect the lookup process. + session = botocore.session.get_session() + client = session.create_client('ses', 'us-east-1') + # If we have at least one waiter in the list, we know that we have + # actually loaded the waiters and this test has passed. + self.assertTrue(len(client.waiter_names) > 0) + + +class TestMatchersWithErrors(unittest.TestCase): + def setUp(self): + self.session = botocore.session.get_session() + self.client = self.session.create_client( + 'ec2', region_name='us-west-2' + ) + + def test_dont_search_on_error_responses(self): + """Test that InstanceExists can handle a nonexistent instance.""" + waiter = self.client.get_waiter('instance_exists') + waiter.config.max_attempts = 1 + with self.assertRaises(WaiterError): + waiter.wait(InstanceIds=['i-12345']) diff --git a/testbed/boto__botocore/tests/unit/auth/__init__.py b/testbed/boto__botocore/tests/unit/auth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..17ca6e9ad046e05c601bd27b5bacdea7d1dffc87 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/LICENSE b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/NOTICE b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..a0821aefa02983e322901d4ad503a20e75419efd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/NOTICE @@ -0,0 +1,2 @@ +AWS Signature Version 4 Test Suite +Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.authz new file mode 100644 index 0000000000000000000000000000000000000000..ade3ec7537b4e5381ed8e1117f13a09a5a10f27e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.creq new file mode 100644 index 0000000000000000000000000000000000000000..fa8f49a1cfe7cf46641e17cba81a2c520d406d6b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value2,value2,value1 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.req new file mode 100644 index 0000000000000000000000000000000000000000..08a0364c82f165af8cc37dfce4b4ba52bc694ec7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.req @@ -0,0 +1,6 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value2 +My-Header1:value2 +My-Header1:value1 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sreq new file mode 100644 index 0000000000000000000000000000000000000000..f0166e18c2c7351684674199859b8afa3e691bde --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sreq @@ -0,0 +1,7 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value2 +My-Header1:value2 +My-Header1:value1 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sts new file mode 100644 index 0000000000000000000000000000000000000000..48a135ecedb5dbb1b7883b0ad6c57a4e83f279aa --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +dc7f04a3abfde8d472b0ab1a418b741b7c67174dad1551b4117b15527fbe966c \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.authz new file mode 100644 index 0000000000000000000000000000000000000000..9f455693b063771f39780885780a92706946f6a8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cfd34249e4b1c8d6b91ef74165d41a32e5fab3306300901bb65a51a73575eefd \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.creq new file mode 100644 index 0000000000000000000000000000000000000000..8cb54769ddb72fcd36818b53cc84b2b5157bf0b7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value1 value2 value3 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.req new file mode 100644 index 0000000000000000000000000000000000000000..7caa6acc235d6e9b377dff345af376a7a890539d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.req @@ -0,0 +1,6 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 + value2 + value3 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sreq new file mode 100644 index 0000000000000000000000000000000000000000..49513e3bd529a20d30e926f00ede40500e9038c7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sreq @@ -0,0 +1,7 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 + value2 + value3 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cfd34249e4b1c8d6b91ef74165d41a32e5fab3306300901bb65a51a73575eefd \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sts new file mode 100644 index 0000000000000000000000000000000000000000..97c74309917336e1364430b8d8f55a6a17ddf0f1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +e99419459a677bc11de234014be3c4e72c1ea5b454ceb58b613061f5d7a162e8 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.authz new file mode 100644 index 0000000000000000000000000000000000000000..c0409ab2a3d498e2b6107a0a0db288cef8b784e1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.creq new file mode 100644 index 0000000000000000000000000000000000000000..e336bc94b905a9e6778c938d9b89dc49fc8df154 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value4,value1,value3,value2 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.req new file mode 100644 index 0000000000000000000000000000000000000000..f7bd9e6685f3da136c5e5c066516e32a278c5aee --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.req @@ -0,0 +1,7 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value4 +My-Header1:value1 +My-Header1:value3 +My-Header1:value2 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sreq new file mode 100644 index 0000000000000000000000000000000000000000..79e16a95370026e88054b38246d5b79b8be53048 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sreq @@ -0,0 +1,8 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value4 +My-Header1:value1 +My-Header1:value3 +My-Header1:value2 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sts new file mode 100644 index 0000000000000000000000000000000000000000..711a8d4d69fb38543413e039809e2fe2feb72664 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +31ce73cd3f3d9f66977ad3dd957dc47af14df92fcd8509f59b349e9137c58b86 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.authz new file mode 100644 index 0000000000000000000000000000000000000000..4874ac0b1f45c4be096ac6384234c0ee8a8ee39a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.creq new file mode 100644 index 0000000000000000000000000000000000000000..a59087c9a4ee49c1082e805a7fcf8f84e655b969 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.creq @@ -0,0 +1,10 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value1 +my-header2:"a b c" +x-amz-date:20150830T123600Z + +host;my-header1;my-header2;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.req new file mode 100644 index 0000000000000000000000000000000000000000..901f36c3593bc333d2adc1fb9e94d49994c655a2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.req @@ -0,0 +1,5 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1: value1 +My-Header2: "a b c" +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sreq new file mode 100644 index 0000000000000000000000000000000000000000..98224c9bde6806b3c92222d0bb6a5dba5913f7bc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sreq @@ -0,0 +1,6 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1: value1 +My-Header2: "a b c" +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sts new file mode 100644 index 0000000000000000000000000000000000000000..a0b15cc70432d9ae5563d977670d17c153c82337 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +a726db9b0df21c14f559d0a978e563112acb1b9e05476f0a6a1c7d68f28605c7 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.authz new file mode 100644 index 0000000000000000000000000000000000000000..2943ec89d207a4c7e0001537b07fb38afa7196c4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.creq new file mode 100644 index 0000000000000000000000000000000000000000..8af54df27eca59e77da83c5c5d2cb8fc45ace72b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.creq @@ -0,0 +1,8 @@ +GET +/-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.req new file mode 100644 index 0000000000000000000000000000000000000000..da760cdb3285eeaeb708e78415dccf650d104d0a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.req @@ -0,0 +1,3 @@ +GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sreq new file mode 100644 index 0000000000000000000000000000000000000000..8001b3d6b51ce4b08b7cb181b8b4c757e5cc77b4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sreq @@ -0,0 +1,4 @@ +GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sts new file mode 100644 index 0000000000000000000000000000000000000000..e9dc541460afedbccafaf479ff31040056df723b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +6a968768eefaa713e2a6b16b589a8ea192661f098f37349f4e2c0082757446f9 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.authz new file mode 100644 index 0000000000000000000000000000000000000000..738b3fbd863c7f1cf6361c7d5deff885ebe68590 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.creq new file mode 100644 index 0000000000000000000000000000000000000000..5d4b9f619d574eb5375aa94c9bd5f59d51943997 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.creq @@ -0,0 +1,8 @@ +GET +/%E1%88%B4 + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.req new file mode 100644 index 0000000000000000000000000000000000000000..da4808d0bcdeb7c80f87821491667dab11f43975 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.req @@ -0,0 +1,3 @@ +GET /ሴ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sreq new file mode 100644 index 0000000000000000000000000000000000000000..94eadb6d2bc82d49ba20f2e0d71e0b77b025d675 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sreq @@ -0,0 +1,4 @@ +GET /ሴ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sts new file mode 100644 index 0000000000000000000000000000000000000000..5edc8f456bca14d3a07f022ad16698915dd74238 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +2a0a97d02205e45ce2e994789806b19270cfbbb0921b278ccf58f5249ac42102 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz new file mode 100644 index 0000000000000000000000000000000000000000..65b5c7ce4e4d6c1539b6fb7c6bc2430c76216e98 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq new file mode 100644 index 0000000000000000000000000000000000000000..c6cdceda17d3808c55291c0a34365e38e6d93f0f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=value1 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req new file mode 100644 index 0000000000000000000000000000000000000000..970d0a050eac39883357c58926eddc01d6a28843 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req @@ -0,0 +1,3 @@ +GET /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq new file mode 100644 index 0000000000000000000000000000000000000000..f0815913fbb149858fb1d41999cf262d71920e06 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq @@ -0,0 +1,4 @@ +GET /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts new file mode 100644 index 0000000000000000000000000000000000000000..c4ed216c13cfbbf2f201cb9fbfa033eee6d5eb7a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +1e24db194ed7d0eec2de28d7369675a243488e08526e8c1c73571282f7c517ab \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.authz new file mode 100644 index 0000000000000000000000000000000000000000..99e972571751b4f9fa11b54342abb3d2010c6687 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=371d3713e185cc334048618a97f809c9ffe339c62934c032af5a0e595648fcac \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.creq new file mode 100644 index 0000000000000000000000000000000000000000..0c8ba21f3dfae13ba9a54e3675c12d2c4c4ef8fd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.creq @@ -0,0 +1,8 @@ +GET +/ +%E1%88%B4=Value1&Param=Value2&Param-3=Value3 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.req new file mode 100644 index 0000000000000000000000000000000000000000..c539437dde005dbe767112eda3f8367d96d46f60 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.req @@ -0,0 +1,3 @@ +GET /?Param-3=Value3&Param=Value2&%E1%88%B4=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sreq new file mode 100644 index 0000000000000000000000000000000000000000..7d43616449ca3147b47389ee3cb4eddbb9e33a1c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sreq @@ -0,0 +1,4 @@ +GET /?Param-3=Value3&Param=Value2&%E1%88%B4=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=371d3713e185cc334048618a97f809c9ffe339c62934c032af5a0e595648fcac \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sts new file mode 100644 index 0000000000000000000000000000000000000000..bf674ad63827bbc6dce2239ba2cc3c60e893599d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +868294f5c38bd141c4972a373a76654f1418a8e4fc18b2e7903ae45e8ae0ec71 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz new file mode 100644 index 0000000000000000000000000000000000000000..c781fe665e6423aab2f5cdea7b9ca431ea511a38 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq new file mode 100644 index 0000000000000000000000000000000000000000..8ae02cd6001af25cdcbfc2f6c601494d072bccc8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=value1&Param2=value2 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req new file mode 100644 index 0000000000000000000000000000000000000000..8a56f15f7472db57eac753e0958163efbcd9bff1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req @@ -0,0 +1,3 @@ +GET /?Param2=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq new file mode 100644 index 0000000000000000000000000000000000000000..aa3162d8e93c694bbb04e8f26e0fb9930a8d2605 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq @@ -0,0 +1,4 @@ +GET /?Param2=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts new file mode 100644 index 0000000000000000000000000000000000000000..f773de5947c8bc86ee7aa42c65cbaf1d3919d692 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +816cd5b414d056048ba4f7c5386d6e0533120fb1fcfa93762cf0fc39e2cf19e0 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz new file mode 100644 index 0000000000000000000000000000000000000000..812cd3fdf1a84586d197bf13afe52d91f856d95d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq new file mode 100644 index 0000000000000000000000000000000000000000..36c3cdfaef24654513564f178825b42b2ca2fe7b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=Value1&Param1=value2 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.req new file mode 100644 index 0000000000000000000000000000000000000000..375a4965587614cc0ec50cd59a5c45d1d8d1c399 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.req @@ -0,0 +1,3 @@ +GET /?Param1=value2&Param1=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq new file mode 100644 index 0000000000000000000000000000000000000000..bc8e652013a1bac159620c0f8efe44859d36400b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq @@ -0,0 +1,4 @@ +GET /?Param1=value2&Param1=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts new file mode 100644 index 0000000000000000000000000000000000000000..fd43a414ce8575f75c7d2a87e577d5b929495e61 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +704b4cef673542d84cdff252633f065e8daeba5f168b77116f8b1bcaf3d38f89 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz new file mode 100644 index 0000000000000000000000000000000000000000..b8ad91f661db954eb26e56591d98e9e4567d1ec4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq new file mode 100644 index 0000000000000000000000000000000000000000..26898ebebf63bc068b409b7b3aa4bc9ded2d47b4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=value1&Param1=value2 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.req new file mode 100644 index 0000000000000000000000000000000000000000..9255bee055375c7b12e3aad0dfe09be41077b880 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.req @@ -0,0 +1,3 @@ +GET /?Param1=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq new file mode 100644 index 0000000000000000000000000000000000000000..4793e218c30c2d8cfb401d38daf6bdf28c8ff511 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq @@ -0,0 +1,4 @@ +GET /?Param1=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts new file mode 100644 index 0000000000000000000000000000000000000000..90e66b8da5c8a430fa085ed8a46a00af9289087d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +c968629d70850097a2d8781c9bf7edcb988b04cac14cca9be4acc3595f884606 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz new file mode 100644 index 0000000000000000000000000000000000000000..a44ca5be80c4c14760e0a2dac0b9966ece44674b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq new file mode 100644 index 0000000000000000000000000000000000000000..5249be3bf83e1b098040cd677da9c9633193ac7b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq @@ -0,0 +1,8 @@ +GET +/ +-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req new file mode 100644 index 0000000000000000000000000000000000000000..d2833b32f999040840fc9af81960dc6ac9207789 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req @@ -0,0 +1,3 @@ +GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq new file mode 100644 index 0000000000000000000000000000000000000000..ba1ef402353799c40e500b75e4531c883bbe527e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq @@ -0,0 +1,4 @@ +GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts new file mode 100644 index 0000000000000000000000000000000000000000..24a97d209b9cb4587054192dd7970d8fb7b0c1c1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +c30d4703d9f799439be92736156d47ccfb2d879ddf56f5befa6d1d6aab979177 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.authz new file mode 100644 index 0000000000000000000000000000000000000000..551c0271d4a5ebf8aff478f5286eb12701a41182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.creq new file mode 100644 index 0000000000000000000000000000000000000000..ed91561f4a655e84f814005e58dc82ccefad6c9a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.creq @@ -0,0 +1,8 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.req new file mode 100644 index 0000000000000000000000000000000000000000..0f7a9bfae3680836a2746b5bf7a33a6fa2b93c34 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.req @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sreq new file mode 100644 index 0000000000000000000000000000000000000000..d739b01fd1510b2702ed1c57ae1575c32a449c54 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sreq @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sts new file mode 100644 index 0000000000000000000000000000000000000000..b187649cb3171e99285b62583a4d1805d764083c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz new file mode 100644 index 0000000000000000000000000000000000000000..e016c3da090dc4c9a3ec0ccd5ae909461d4f0213 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq new file mode 100644 index 0000000000000000000000000000000000000000..a835c9e491be62c7ba5e988d7836d30a4983d0c0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq @@ -0,0 +1,8 @@ +GET +/ +%E1%88%B4=bar +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.req new file mode 100644 index 0000000000000000000000000000000000000000..cc2757e167d2197abfe9a31aac1a71487e436f1b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.req @@ -0,0 +1,3 @@ +GET /?ሴ=bar HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq new file mode 100644 index 0000000000000000000000000000000000000000..7baf4c82f3d5cc7db3fb266802b60b1e015ac924 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq @@ -0,0 +1,4 @@ +GET /?ሴ=bar HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts new file mode 100644 index 0000000000000000000000000000000000000000..51ee71b749eb94dd9abc184ea3bbf3e4b4c4a504 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +eb30c5bed55734080471a834cc727ae56beb50e5f39d1bff6d0d38cb192a7073 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.authz new file mode 100644 index 0000000000000000000000000000000000000000..cb7ae61e1a7c8f8e36172f976b544257c2acd376 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=07ec1639c89043aa0e3e2de82b96708f198cceab042d4a97044c66dd9f74e7f8 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.creq new file mode 100644 index 0000000000000000000000000000000000000000..ccacdeb490c2b98972e62f4cc94871598958f107 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z +x-amz-security-token:6e86291e8372ff2a2260956d9b8aae1d763fbf315fa00fa31553b73ebf194267 + +host;x-amz-date;x-amz-security-token +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.req new file mode 100644 index 0000000000000000000000000000000000000000..0f7a9bfae3680836a2746b5bf7a33a6fa2b93c34 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.req @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sreq new file mode 100644 index 0000000000000000000000000000000000000000..406ac5690c18d4830a5e942c4ffa58fe81282a93 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sreq @@ -0,0 +1,5 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:6e86291e8372ff2a2260956d9b8aae1d763fbf315fa00fa31553b73ebf194267 +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sts new file mode 100644 index 0000000000000000000000000000000000000000..742b880cb0a8b33268e99efe649e9b65ad7a2479 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +067b36aa60031588cea4a4cde1f21215227a047690c72247f1d70b32fbbfad2b \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.authz new file mode 100644 index 0000000000000000000000000000000000000000..551c0271d4a5ebf8aff478f5286eb12701a41182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.creq new file mode 100644 index 0000000000000000000000000000000000000000..ed91561f4a655e84f814005e58dc82ccefad6c9a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.creq @@ -0,0 +1,8 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.req new file mode 100644 index 0000000000000000000000000000000000000000..0f7a9bfae3680836a2746b5bf7a33a6fa2b93c34 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.req @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sreq new file mode 100644 index 0000000000000000000000000000000000000000..d739b01fd1510b2702ed1c57ae1575c32a449c54 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sreq @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sts new file mode 100644 index 0000000000000000000000000000000000000000..b187649cb3171e99285b62583a4d1805d764083c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.authz new file mode 100644 index 0000000000000000000000000000000000000000..551c0271d4a5ebf8aff478f5286eb12701a41182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.creq new file mode 100644 index 0000000000000000000000000000000000000000..ed91561f4a655e84f814005e58dc82ccefad6c9a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.creq @@ -0,0 +1,8 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.req new file mode 100644 index 0000000000000000000000000000000000000000..cfd4e8b74cc5195ea6d51d56c6360b9a6d464e87 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.req @@ -0,0 +1,3 @@ +GET /example1/example2/../.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sreq new file mode 100644 index 0000000000000000000000000000000000000000..cbdebe2cca662a6bbe0b369e8bcfdec9d13db563 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sreq @@ -0,0 +1,4 @@ +GET /example1/example2/../.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sts new file mode 100644 index 0000000000000000000000000000000000000000..b187649cb3171e99285b62583a4d1805d764083c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.authz new file mode 100644 index 0000000000000000000000000000000000000000..551c0271d4a5ebf8aff478f5286eb12701a41182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.creq new file mode 100644 index 0000000000000000000000000000000000000000..ed91561f4a655e84f814005e58dc82ccefad6c9a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.creq @@ -0,0 +1,8 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.req new file mode 100644 index 0000000000000000000000000000000000000000..9d6d7ca20acba52f73f1e208a78f828ffef0c9f5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.req @@ -0,0 +1,3 @@ +GET /example/.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sreq new file mode 100644 index 0000000000000000000000000000000000000000..4f59e7d20cd71f6a43e83f8110681456dcefc394 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sreq @@ -0,0 +1,4 @@ +GET /example/.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sts new file mode 100644 index 0000000000000000000000000000000000000000..b187649cb3171e99285b62583a4d1805d764083c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz new file mode 100644 index 0000000000000000000000000000000000000000..551c0271d4a5ebf8aff478f5286eb12701a41182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq new file mode 100644 index 0000000000000000000000000000000000000000..ed91561f4a655e84f814005e58dc82ccefad6c9a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq @@ -0,0 +1,8 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req new file mode 100644 index 0000000000000000000000000000000000000000..f3537b709597ed1ebece4dab953cad9c56524163 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req @@ -0,0 +1,3 @@ +GET /./ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq new file mode 100644 index 0000000000000000000000000000000000000000..23a2b41ced9f2460dc47afb3ed46e8c9511ed8de --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq @@ -0,0 +1,4 @@ +GET /./ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts new file mode 100644 index 0000000000000000000000000000000000000000..b187649cb3171e99285b62583a4d1805d764083c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz new file mode 100644 index 0000000000000000000000000000000000000000..b76ca1e2d48a12cb90934aeca85a581bf7e835dd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq new file mode 100644 index 0000000000000000000000000000000000000000..915c57f214717722f6fbf7b59ac7327fe68c8780 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq @@ -0,0 +1,8 @@ +GET +/example + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req new file mode 100644 index 0000000000000000000000000000000000000000..3c9107171a1b4502570a73379e708b22bda6553b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req @@ -0,0 +1,3 @@ +GET /./example HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq new file mode 100644 index 0000000000000000000000000000000000000000..80966096531ec8cb41b50082d04961a38a571464 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq @@ -0,0 +1,4 @@ +GET /./example HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts new file mode 100644 index 0000000000000000000000000000000000000000..7429923e6b23bbe501c3f340a45004b0bc2a8fc1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +214d50c111a8edc4819da6a636336472c916b5240f51e9a51b5c3305180cf702 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.authz new file mode 100644 index 0000000000000000000000000000000000000000..551c0271d4a5ebf8aff478f5286eb12701a41182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.creq new file mode 100644 index 0000000000000000000000000000000000000000..ed91561f4a655e84f814005e58dc82ccefad6c9a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.creq @@ -0,0 +1,8 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.req new file mode 100644 index 0000000000000000000000000000000000000000..ede8e3c8eabe74fafb62f9f61326e56ed073fab9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.req @@ -0,0 +1,3 @@ +GET // HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sreq new file mode 100644 index 0000000000000000000000000000000000000000..cde31b4381598fda7c8d08f575691e98f655bc87 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sreq @@ -0,0 +1,4 @@ +GET // HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sts new file mode 100644 index 0000000000000000000000000000000000000000..b187649cb3171e99285b62583a4d1805d764083c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.authz new file mode 100644 index 0000000000000000000000000000000000000000..307c1051d5f2ef4f4255df78f647ff209a48cbfc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.creq new file mode 100644 index 0000000000000000000000000000000000000000..2bdaf7479bae12882938873ed56a65e9ebb312cb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.creq @@ -0,0 +1,8 @@ +GET +/example/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.req new file mode 100644 index 0000000000000000000000000000000000000000..a4307ce425898f4ce58e5cd0f248c77e42542576 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.req @@ -0,0 +1,3 @@ +GET //example// HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sreq new file mode 100644 index 0000000000000000000000000000000000000000..c84a80d56aee65c2e4a92d42ee4feee6737568c7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sreq @@ -0,0 +1,4 @@ +GET //example// HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sts new file mode 100644 index 0000000000000000000000000000000000000000..95d1fc2584073b68468f4db432c9c426c3dd1c15 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +cb96b4ac96d501f7c5c15bc6d67b3035061cfced4af6585ad927f7e6c985c015 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.authz new file mode 100644 index 0000000000000000000000000000000000000000..832d8a50d29838451b582c1dc8c2865920c484d7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.creq new file mode 100644 index 0000000000000000000000000000000000000000..124a7096a13016c8d0b315f2228d0a212382f245 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.creq @@ -0,0 +1,8 @@ +GET +/example%20space/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.req new file mode 100644 index 0000000000000000000000000000000000000000..b7d5e8bb95d07bfba807336eca060818f9ba00cf --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.req @@ -0,0 +1,3 @@ +GET /example space/ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sreq new file mode 100644 index 0000000000000000000000000000000000000000..eefa20c48c49e34eab1c8ff7aa68953008f8b39e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sreq @@ -0,0 +1,4 @@ +GET /example space/ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sts new file mode 100644 index 0000000000000000000000000000000000000000..a633f0c052c7a81d2e3760c6c1261a7e4692b142 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +63ee75631ed7234ae61b5f736dfc7754cdccfedbff4b5128a915706ee9390d86 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.authz new file mode 100644 index 0000000000000000000000000000000000000000..858b601bb34cd3276ee5c7b660aa85c03886dc11 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a853c9b21b528b19643d00910d35b83a10c366a10833ceefb45edd6c80e40f27 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.creq new file mode 100644 index 0000000000000000000000000000000000000000..236b8f27d5723a0f46c07197449fcad3a76b4cb4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.creq @@ -0,0 +1,8 @@ +GET +/example/%24delete + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.req new file mode 100644 index 0000000000000000000000000000000000000000..e657d8858a4382ca97aedcc172067524a73df3ff --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.req @@ -0,0 +1,3 @@ +GET /example/$delete HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sreq new file mode 100644 index 0000000000000000000000000000000000000000..d3a607188a389318b4f0621b6690d9bcb982d238 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sreq @@ -0,0 +1,4 @@ +GET /example/$delete HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a853c9b21b528b19643d00910d35b83a10c366a10833ceefb45edd6c80e40f27 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sts new file mode 100644 index 0000000000000000000000000000000000000000..df29bc44dff4548e36652cf85720f075df231864 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +4053e45b5cef7cec5e17f736b1c12b3faf0388fd4c0bd24326386f132039ce5c \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/normalize-path.txt b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/normalize-path.txt new file mode 100644 index 0000000000000000000000000000000000000000..caaf34fb5ea44551f27c28db273139e23720fa75 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/normalize-path/normalize-path.txt @@ -0,0 +1,3 @@ +A note about signing requests to Amazon S3: + +In exception to this, you do not normalize URI paths for requests to Amazon S3. For example, if you have a bucket with an object named my-object//example//photo.user, use that path. Normalizing the path to my-object/example/photo.user will cause the request to fail. For more information, see Task 1: Create a Canonical Request in the Amazon Simple Storage Service API Reference: http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html#canonical-request \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.authz new file mode 100644 index 0000000000000000000000000000000000000000..89e572e60969c3f869aead6b670bf21987ff25f5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.creq new file mode 100644 index 0000000000000000000000000000000000000000..5c3a9434ec316b593104a700037047ae1704a58e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.creq @@ -0,0 +1,8 @@ +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.req new file mode 100644 index 0000000000000000000000000000000000000000..3dc4179013f314eaef6fdb7ebff4f0bb35f9da4f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.req @@ -0,0 +1,3 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sreq new file mode 100644 index 0000000000000000000000000000000000000000..a5ada0d940a9c8e59c5fca2db64fd12f128f7e47 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sreq @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sts new file mode 100644 index 0000000000000000000000000000000000000000..a63670394947b33fbc1dcc46d12e7be342903ccc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.authz new file mode 100644 index 0000000000000000000000000000000000000000..a62589ff7ea9c4bb0fb4d85769418f7b9ceda1c5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.creq new file mode 100644 index 0000000000000000000000000000000000000000..ebe943e8953da59cf58e7526c473ebed85d93c90 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.creq @@ -0,0 +1,9 @@ +POST +/ + +host:example.amazonaws.com +my-header1:value1 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.req new file mode 100644 index 0000000000000000000000000000000000000000..0253f19456b1b565e78ac795242bbd49b5e048a2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.req @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sreq new file mode 100644 index 0000000000000000000000000000000000000000..b4b78a1668e616c3f1b6449da44d3e5bbcee9c6e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sts new file mode 100644 index 0000000000000000000000000000000000000000..eb66362697e5cde00492747c87fdf2480c9e0445 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +9368318c2967cf6de74404b30c65a91e8f6253e0a8659d6d5319f1a812f87d65 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.authz new file mode 100644 index 0000000000000000000000000000000000000000..d9e52a379aea8a544ea8d68869abb6f58ed75274 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.creq new file mode 100644 index 0000000000000000000000000000000000000000..af824c889945453cbe08e621d66b0063e20c8a5f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.creq @@ -0,0 +1,9 @@ +POST +/ + +host:example.amazonaws.com +my-header1:VALUE1 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.req new file mode 100644 index 0000000000000000000000000000000000000000..3f9987af7f307af052392ae9b62262415b8a9f37 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.req @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:VALUE1 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sreq new file mode 100644 index 0000000000000000000000000000000000000000..99c3210c9988c9abe961a9a4b0db322a798c4a34 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:VALUE1 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sts new file mode 100644 index 0000000000000000000000000000000000000000..40062c79f874a999fa49d5331805670693fea4df --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +d51ced243e649e3de6ef63afbbdcbca03131a21a7103a1583706a64618606a93 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.authz new file mode 100644 index 0000000000000000000000000000000000000000..89e572e60969c3f869aead6b670bf21987ff25f5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.creq new file mode 100644 index 0000000000000000000000000000000000000000..5c3a9434ec316b593104a700037047ae1704a58e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.creq @@ -0,0 +1,8 @@ +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.req new file mode 100644 index 0000000000000000000000000000000000000000..3dc4179013f314eaef6fdb7ebff4f0bb35f9da4f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.req @@ -0,0 +1,3 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq new file mode 100644 index 0000000000000000000000000000000000000000..291ed0756bf24578c78bef56273b33e517faa98a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sts new file mode 100644 index 0000000000000000000000000000000000000000..a63670394947b33fbc1dcc46d12e7be342903ccc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.authz new file mode 100644 index 0000000000000000000000000000000000000000..64aa046dbbfb03c8c47bd57b19ea9fad491a7522 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.creq new file mode 100644 index 0000000000000000000000000000000000000000..1d5a462ee2a56a8b1f067e4d535b666a657982b7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.creq @@ -0,0 +1,9 @@ +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z +x-amz-security-token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== + +host;x-amz-date;x-amz-security-token +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.req new file mode 100644 index 0000000000000000000000000000000000000000..9d917755f4093666862ab6aa54f4c9ec17d7794a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.req @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq new file mode 100644 index 0000000000000000000000000000000000000000..37b2f0419099086beffb32d2bc6ada995538ba7d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sts new file mode 100644 index 0000000000000000000000000000000000000000..bc39ccfc5b963ef1b60dc9ce97476b81c5d68277 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +c237e1b440d4c63c32ca95b5b99481081cb7b13c7e40434868e71567c1a882f6 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/readme.txt b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..3731a30128d41b8ab60c0dcf38cb389d305aecb2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-sts-token/readme.txt @@ -0,0 +1,15 @@ +A note about using temporary security credentials: + +You can use temporary security credentials provided by the AWS Security Token Service (AWS STS) to sign a request. The process is the same as using long-term credentials but requires an additional HTTP header or query string parameter for the security token. The name of the header or query string parameter is X-Amz-Security-Token, and the value is the session token (the string that you received from AWS STS when you obtained temporary security credentials). + +When you add X-Amz-Security-Token, some services require that you include this parameter in the canonical (signed) request. For other services, you add this parameter at the end, after you calculate the signature. For details see the API reference documentation for that service. + +The test suite has 2 examples: + +post-sts-header-before - The X-Amz-Security-Token header is part of the canonical request. + +post-sts-header-after - The X-Amz-Security-Token header is added to the request after you calculate the signature. + +The test suite uses this example value for X-Amz-Security-Token: + +AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz new file mode 100644 index 0000000000000000000000000000000000000000..44280cd7bb689c3b586b749a5bd40bb91474c177 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq new file mode 100644 index 0000000000000000000000000000000000000000..f5058d430b50061a9178a60e65261f17d4fdf9dd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq @@ -0,0 +1,8 @@ +POST +/ +Param1=value1 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req new file mode 100644 index 0000000000000000000000000000000000000000..9157bc74de342129400eb9f2a4961250539c0c5e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req @@ -0,0 +1,3 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq new file mode 100644 index 0000000000000000000000000000000000000000..82af1505e2ed23707752ffbead454a0a3614a4ca --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq @@ -0,0 +1,4 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts new file mode 100644 index 0000000000000000000000000000000000000000..ca7cc661d1e72ebe4e1e54986e12eee9d5e23f69 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.authz new file mode 100644 index 0000000000000000000000000000000000000000..44280cd7bb689c3b586b749a5bd40bb91474c177 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.creq new file mode 100644 index 0000000000000000000000000000000000000000..f5058d430b50061a9178a60e65261f17d4fdf9dd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.creq @@ -0,0 +1,8 @@ +POST +/ +Param1=value1 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.req new file mode 100644 index 0000000000000000000000000000000000000000..9157bc74de342129400eb9f2a4961250539c0c5e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.req @@ -0,0 +1,3 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sreq new file mode 100644 index 0000000000000000000000000000000000000000..82af1505e2ed23707752ffbead454a0a3614a4ca --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sreq @@ -0,0 +1,4 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sts new file mode 100644 index 0000000000000000000000000000000000000000..ca7cc661d1e72ebe4e1e54986e12eee9d5e23f69 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.authz new file mode 100644 index 0000000000000000000000000000000000000000..89e572e60969c3f869aead6b670bf21987ff25f5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.creq new file mode 100644 index 0000000000000000000000000000000000000000..5c3a9434ec316b593104a700037047ae1704a58e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.creq @@ -0,0 +1,8 @@ +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.req new file mode 100644 index 0000000000000000000000000000000000000000..3dc4179013f314eaef6fdb7ebff4f0bb35f9da4f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.req @@ -0,0 +1,3 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sreq new file mode 100644 index 0000000000000000000000000000000000000000..a5ada0d940a9c8e59c5fca2db64fd12f128f7e47 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sreq @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sts new file mode 100644 index 0000000000000000000000000000000000000000..a63670394947b33fbc1dcc46d12e7be342903ccc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz new file mode 100644 index 0000000000000000000000000000000000000000..531b89b45b172003b8815ab13e4c51a6e4b92680 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq new file mode 100644 index 0000000000000000000000000000000000000000..8ec0d6cf0a996ac374badc071ce2134731d5e5a2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq @@ -0,0 +1,9 @@ +POST +/ + +content-type:application/x-www-form-urlencoded; charset=utf8 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +content-type;host;x-amz-date +9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req new file mode 100644 index 0000000000000000000000000000000000000000..5ce537e674f945cc19b9b944499dad6138608727 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded; charset=utf8 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z + +Param1=value1 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq new file mode 100644 index 0000000000000000000000000000000000000000..88beb82a3808277969a1946ae085b24c3f000d07 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq @@ -0,0 +1,7 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded; charset=utf8 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe + +Param1=value1 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts new file mode 100644 index 0000000000000000000000000000000000000000..3e83c524b0536ee3bace6314d7f75dc002e85b41 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +2e1cf7ed91881a30569e46552437e4156c823447bf1781b921b5d486c568dd1c \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz new file mode 100644 index 0000000000000000000000000000000000000000..d7baf535401261756381dca8ff299704d93d5883 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq new file mode 100644 index 0000000000000000000000000000000000000000..d7197f17ec3bf799ab3c2c853bfd87df4323f886 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq @@ -0,0 +1,9 @@ +POST +/ + +content-type:application/x-www-form-urlencoded +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +content-type;host;x-amz-date +9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req new file mode 100644 index 0000000000000000000000000000000000000000..ada7f87760b63f907cfe10aab13f166c250a7dee --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z + +Param1=value1 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq new file mode 100644 index 0000000000000000000000000000000000000000..9bac9311ba7282b9bc329a26f9187b97e4de86ab --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq @@ -0,0 +1,7 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a + +Param1=value1 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts new file mode 100644 index 0000000000000000000000000000000000000000..65ab663719ebf95d66f34576988932fb398b6a68 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +42a5e5bb34198acb3e84da4f085bb7927f2bc277ca766e6d19c73c2154021281 \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/auth/test_auth_trait.py b/testbed/boto__botocore/tests/unit/auth/test_auth_trait.py new file mode 100644 index 0000000000000000000000000000000000000000..c1209a576cd3b77d05a40c585efbebdf6fc6ec76 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/test_auth_trait.py @@ -0,0 +1,42 @@ +# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +from botocore.auth import BaseSigner, resolve_auth_type +from botocore.exceptions import ( + UnknownSignatureVersionError, + UnsupportedSignatureVersionError, +) +from tests import mock, unittest + + +class TestAuthTraitResolution(unittest.TestCase): + def test_auth_resolves_first_available(self): + auth = ['aws.auth#foo', 'aws.auth#bar'] + # Don't declare a signer for "foo" + auth_types = {'bar': mock.Mock(spec=BaseSigner)} + auth_type_conversions = {'aws.auth#foo': 'foo', 'aws.auth#bar': 'bar'} + + with mock.patch('botocore.auth.AUTH_TYPE_MAPS', auth_types): + with mock.patch( + 'botocore.auth.AUTH_TYPE_TO_SIGNATURE_VERSION', + auth_type_conversions, + ): + assert resolve_auth_type(auth) == 'bar' + + def test_invalid_auth_type_error(self): + with self.assertRaises(UnknownSignatureVersionError): + resolve_auth_type(['aws.auth#invalidAuth']) + + def test_no_known_auth_type(self): + with self.assertRaises(UnsupportedSignatureVersionError): + resolve_auth_type([]) diff --git a/testbed/boto__botocore/tests/unit/auth/test_signers.py b/testbed/boto__botocore/tests/unit/auth/test_signers.py new file mode 100644 index 0000000000000000000000000000000000000000..d1b301e35dc478cc49fc5a2a5cc3a5e2c72df3b7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/test_signers.py @@ -0,0 +1,1178 @@ +#!/usr/bin/env +# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import base64 +import datetime +import io +import json +import time + +import botocore.auth +import botocore.credentials +from botocore.awsrequest import AWSRequest +from botocore.compat import HTTPHeaders, parse_qs, urlsplit +from tests import mock, unittest + + +class BaseTestWithFixedDate(unittest.TestCase): + def setUp(self): + self.fixed_date = datetime.datetime(2014, 3, 10, 17, 2, 55, 0) + self.datetime_patch = mock.patch('botocore.auth.datetime.datetime') + self.datetime_mock = self.datetime_patch.start() + self.datetime_mock.utcnow.return_value = self.fixed_date + self.datetime_mock.strptime.return_value = self.fixed_date + + def tearDown(self): + self.datetime_patch.stop() + + +class TestHMACV1(unittest.TestCase): + maxDiff = None + + def setUp(self): + access_key = '44CF9590006BF252F707' + secret_key = 'OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV' + self.credentials = botocore.credentials.Credentials( + access_key, secret_key + ) + self.hmacv1 = botocore.auth.HmacV1Auth(self.credentials, None, None) + self.date_mock = mock.patch('botocore.auth.formatdate') + self.formatdate = self.date_mock.start() + self.formatdate.return_value = 'Thu, 17 Nov 2005 18:49:58 GMT' + + def tearDown(self): + self.date_mock.stop() + + def test_put(self): + headers = { + 'Date': 'Thu, 17 Nov 2005 18:49:58 GMT', + 'Content-Md5': 'c8fdb181845a4ca6b8fec737b3581d76', + 'Content-Type': 'text/html', + 'X-Amz-Meta-Author': 'foo@bar.com', + 'X-Amz-Magic': 'abracadabra', + } + http_headers = HTTPHeaders.from_dict(headers) + split = urlsplit('/quotes/nelson') + cs = self.hmacv1.canonical_string('PUT', split, http_headers) + expected_canonical = ( + "PUT\nc8fdb181845a4ca6b8fec737b3581d76\ntext/html\n" + "Thu, 17 Nov 2005 18:49:58 GMT\nx-amz-magic:abracadabra\n" + "x-amz-meta-author:foo@bar.com\n/quotes/nelson" + ) + expected_signature = 'jZNOcbfWmD/A/f3hSvVzXZjM2HU=' + self.assertEqual(cs, expected_canonical) + sig = self.hmacv1.get_signature('PUT', split, http_headers) + self.assertEqual(sig, expected_signature) + + def test_duplicate_headers(self): + pairs = [ + ('Date', 'Thu, 17 Nov 2005 18:49:58 GMT'), + ('Content-Md5', 'c8fdb181845a4ca6b8fec737b3581d76'), + ('Content-Type', 'text/html'), + ('X-Amz-Meta-Author', 'bar@baz.com'), + ('X-Amz-Meta-Author', 'foo@bar.com'), + ('X-Amz-Magic', 'abracadabra'), + ] + + http_headers = HTTPHeaders.from_pairs(pairs) + split = urlsplit('/quotes/nelson') + sig = self.hmacv1.get_signature('PUT', split, http_headers) + self.assertEqual(sig, 'kIdMxyiYB+F+83zYGR6sSb3ICcE=') + + def test_query_string(self): + split = urlsplit('/quotes/nelson?uploads') + pairs = [('Date', 'Thu, 17 Nov 2005 18:49:58 GMT')] + sig = self.hmacv1.get_signature( + 'PUT', split, HTTPHeaders.from_pairs(pairs) + ) + self.assertEqual(sig, 'P7pBz3Z4p3GxysRSJ/gR8nk7D4o=') + + def test_bucket_operations(self): + # Check that the standard operations on buckets that are + # specified as query strings end up in the canonical resource. + operations = ( + 'acl', + 'cors', + 'lifecycle', + 'policy', + 'notification', + 'logging', + 'tagging', + 'requestPayment', + 'versioning', + 'website', + 'object-lock', + ) + for operation in operations: + url = f'/quotes?{operation}' + split = urlsplit(url) + cr = self.hmacv1.canonical_resource(split) + self.assertEqual(cr, f'/quotes?{operation}') + + def test_sign_with_token(self): + credentials = botocore.credentials.Credentials( + access_key='foo', secret_key='bar', token='baz' + ) + auth = botocore.auth.HmacV1Auth(credentials) + request = AWSRequest() + request.headers['Date'] = 'Thu, 17 Nov 2005 18:49:58 GMT' + request.headers['Content-Type'] = 'text/html' + request.method = 'PUT' + request.url = 'https://s3.amazonaws.com/bucket/key' + auth.add_auth(request) + self.assertIn('Authorization', request.headers) + # We're not actually checking the signature here, we're + # just making sure the auth header has the right format. + self.assertTrue(request.headers['Authorization'].startswith('AWS ')) + + def test_resign_with_token(self): + credentials = botocore.credentials.Credentials( + access_key='foo', secret_key='bar', token='baz' + ) + auth = botocore.auth.HmacV1Auth(credentials) + request = AWSRequest() + request.headers['Date'] = 'Thu, 17 Nov 2005 18:49:58 GMT' + request.headers['Content-Type'] = 'text/html' + request.method = 'PUT' + request.url = 'https://s3.amazonaws.com/bucket/key' + + auth.add_auth(request) + original_auth = request.headers['Authorization'] + # Resigning the request shouldn't change the authorization + # header. We are also ensuring that the date stays the same + # because we're mocking out the formatdate() call. There's + # another unit test that verifies we use the latest time + # when we sign the request. + auth.add_auth(request) + self.assertEqual( + request.headers.get_all('Authorization'), [original_auth] + ) + + def test_resign_uses_most_recent_date(self): + dates = [ + 'Thu, 17 Nov 2005 18:49:58 GMT', + 'Thu, 17 Nov 2014 20:00:00 GMT', + ] + self.formatdate.side_effect = dates + + request = AWSRequest() + request.headers['Content-Type'] = 'text/html' + request.method = 'PUT' + request.url = 'https://s3.amazonaws.com/bucket/key' + + self.hmacv1.add_auth(request) + original_date = request.headers['Date'] + + self.hmacv1.add_auth(request) + modified_date = request.headers['Date'] + + # Each time we sign a request, we make another call to formatdate() + # so we should have a different date header each time. + self.assertEqual(original_date, dates[0]) + self.assertEqual(modified_date, dates[1]) + + +class TestSigV2(unittest.TestCase): + maxDiff = None + + def setUp(self): + access_key = 'foo' + secret_key = 'bar' + self.credentials = botocore.credentials.Credentials( + access_key, secret_key + ) + self.signer = botocore.auth.SigV2Auth(self.credentials) + self.time_patcher = mock.patch.object( + botocore.auth.time, 'gmtime', mock.Mock(wraps=time.gmtime) + ) + mocked_time = self.time_patcher.start() + mocked_time.return_value = time.struct_time( + [2014, 6, 20, 8, 40, 23, 4, 171, 0] + ) + + def tearDown(self): + self.time_patcher.stop() + + def test_put(self): + request = mock.Mock() + request.url = '/' + request.method = 'POST' + params = {'Foo': '\u2713'} + result = self.signer.calc_signature(request, params) + self.assertEqual( + result, + ('Foo=%E2%9C%93', 'VCtWuwaOL0yMffAT8W4y0AFW3W4KUykBqah9S40rB+Q='), + ) + + def test_fields(self): + request = AWSRequest() + request.url = '/' + request.method = 'POST' + request.data = {'Foo': '\u2713'} + self.signer.add_auth(request) + self.assertEqual(request.data['AWSAccessKeyId'], 'foo') + self.assertEqual(request.data['Foo'], '\u2713') + self.assertEqual(request.data['Timestamp'], '2014-06-20T08:40:23Z') + self.assertEqual( + request.data['Signature'], + 'Tiecw+t51tok4dTT8B4bg47zxHEM/KcD55f2/x6K22o=', + ) + self.assertEqual(request.data['SignatureMethod'], 'HmacSHA256') + self.assertEqual(request.data['SignatureVersion'], '2') + + def test_resign(self): + # Make sure that resigning after e.g. retries works + request = AWSRequest() + request.url = '/' + request.method = 'POST' + params = { + 'Foo': '\u2713', + 'Signature': 'VCtWuwaOL0yMffAT8W4y0AFW3W4KUykBqah9S40rB+Q=', + } + result = self.signer.calc_signature(request, params) + self.assertEqual( + result, + ('Foo=%E2%9C%93', 'VCtWuwaOL0yMffAT8W4y0AFW3W4KUykBqah9S40rB+Q='), + ) + + def test_get(self): + request = AWSRequest() + request.url = '/' + request.method = 'GET' + request.params = {'Foo': '\u2713'} + self.signer.add_auth(request) + self.assertEqual(request.params['AWSAccessKeyId'], 'foo') + self.assertEqual(request.params['Foo'], '\u2713') + self.assertEqual(request.params['Timestamp'], '2014-06-20T08:40:23Z') + self.assertEqual( + request.params['Signature'], + 'Un97klqZCONP65bA1+Iv4H3AcB2I40I4DBvw5ZERFPw=', + ) + self.assertEqual(request.params['SignatureMethod'], 'HmacSHA256') + self.assertEqual(request.params['SignatureVersion'], '2') + + +class TestSigV3(unittest.TestCase): + maxDiff = None + + def setUp(self): + self.access_key = 'access_key' + self.secret_key = 'secret_key' + self.credentials = botocore.credentials.Credentials( + self.access_key, self.secret_key + ) + self.auth = botocore.auth.SigV3Auth(self.credentials) + self.date_mock = mock.patch('botocore.auth.formatdate') + self.formatdate = self.date_mock.start() + self.formatdate.return_value = 'Thu, 17 Nov 2005 18:49:58 GMT' + + def tearDown(self): + self.date_mock.stop() + + def test_signature_with_date_headers(self): + request = AWSRequest() + request.headers = {'Date': 'Thu, 17 Nov 2005 18:49:58 GMT'} + request.url = 'https://route53.amazonaws.com' + self.auth.add_auth(request) + self.assertEqual( + request.headers['X-Amzn-Authorization'], + ( + 'AWS3-HTTPS AWSAccessKeyId=access_key,Algorithm=HmacSHA256,' + 'Signature=M245fo86nVKI8rLpH4HgWs841sBTUKuwciiTpjMDgPs=' + ), + ) + + def test_resign_with_token(self): + credentials = botocore.credentials.Credentials( + access_key='foo', secret_key='bar', token='baz' + ) + auth = botocore.auth.SigV3Auth(credentials) + request = AWSRequest() + request.headers['Date'] = 'Thu, 17 Nov 2005 18:49:58 GMT' + request.method = 'PUT' + request.url = 'https://route53.amazonaws.com/' + auth.add_auth(request) + original_auth = request.headers['X-Amzn-Authorization'] + # Resigning the request shouldn't change the authorization + # header. + auth.add_auth(request) + self.assertEqual( + request.headers.get_all('X-Amzn-Authorization'), [original_auth] + ) + + +class TestS3SigV4Auth(BaseTestWithFixedDate): + AuthClass = botocore.auth.S3SigV4Auth + maxDiff = None + + def setUp(self): + super().setUp() + self.credentials = botocore.credentials.Credentials( + access_key='foo', secret_key='bar', token='baz' + ) + self.auth = self.AuthClass(self.credentials, 'ec2', 'eu-central-1') + self.request = AWSRequest(data=io.BytesIO(b"foo bar baz")) + self.request.method = 'PUT' + self.request.url = 'https://s3.eu-central-1.amazonaws.com/' + + self.client_config = mock.Mock() + self.s3_config = {} + self.client_config.s3 = self.s3_config + + self.request.context = {'client_config': self.client_config} + + def test_resign_with_content_hash(self): + self.auth.add_auth(self.request) + original_auth = self.request.headers['Authorization'] + + self.auth.add_auth(self.request) + self.assertEqual( + self.request.headers.get_all('Authorization'), [original_auth] + ) + + def test_signature_is_not_normalized(self): + request = AWSRequest() + request.url = 'https://s3.amazonaws.com/bucket/foo/./bar/../bar' + request.method = 'GET' + credentials = botocore.credentials.Credentials( + 'access_key', 'secret_key' + ) + auth = self.AuthClass(credentials, 's3', 'us-east-1') + auth.add_auth(request) + self.assertTrue( + request.headers['Authorization'].startswith('AWS4-HMAC-SHA256') + ) + + def test_query_string_params_in_urls(self): + if not hasattr(self.AuthClass, 'canonical_query_string'): + raise unittest.SkipTest( + f'{self.AuthClass.__name__} does not expose interim steps' + ) + + request = AWSRequest() + request.url = ( + 'https://s3.amazonaws.com/bucket?' + 'marker=%C3%A4%C3%B6%C3%BC-01.txt&prefix' + ) + request.data = {'Action': 'MyOperation'} + request.method = 'GET' + + # Check that the canonical query string is correct formatting + # by ensuring that query string paramters that are added to the + # canonical query string are correctly formatted. + cqs = self.auth.canonical_query_string(request) + self.assertEqual('marker=%C3%A4%C3%B6%C3%BC-01.txt&prefix=', cqs) + + def _test_blacklist_header(self, header, value): + request = AWSRequest() + request.url = 'https://s3.amazonaws.com/bucket/foo' + request.method = 'PUT' + request.headers[header] = value + credentials = botocore.credentials.Credentials( + 'access_key', 'secret_key' + ) + auth = self.AuthClass(credentials, 's3', 'us-east-1') + auth.add_auth(request) + self.assertNotIn(header, request.headers['Authorization']) + + def test_blacklist_expect_headers(self): + self._test_blacklist_header('expect', '100-continue') + + def test_blacklist_trace_id(self): + self._test_blacklist_header( + 'x-amzn-trace-id', 'Root=foo;Parent=bar;Sampleid=1' + ) + + def test_blacklist_headers(self): + self._test_blacklist_header('user-agent', 'botocore/1.4.11') + + def test_uses_sha256_if_config_value_is_true(self): + self.client_config.s3['payload_signing_enabled'] = True + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertNotEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_does_not_use_sha256_if_config_value_is_false(self): + self.client_config.s3['payload_signing_enabled'] = False + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_uses_sha256_if_md5_unset(self): + self.request.context['has_streaming_input'] = True + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertNotEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_uses_sha256_if_not_https(self): + self.request.context['has_streaming_input'] = True + self.request.headers.add_header('Content-MD5', 'foo') + self.request.url = 'http://s3.amazonaws.com/bucket' + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertNotEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_uses_sha256_if_not_streaming_upload(self): + self.request.context['has_streaming_input'] = False + self.request.headers.add_header('Content-MD5', 'foo') + self.request.url = 'https://s3.amazonaws.com/bucket' + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertNotEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_does_not_use_sha256_if_md5_set(self): + self.request.context['has_streaming_input'] = True + self.request.headers.add_header('Content-MD5', 'foo') + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_does_not_use_sha256_if_checksum_set(self): + self.request.context['has_streaming_input'] = True + self.request.context['checksum'] = { + 'request_algorithm': { + 'in': 'header', + 'name': 'x-amz-checksum-sha256', + 'algorithm': 'sha256', + } + } + self.request.headers.add_header('X-Amz-Checksum-sha256', 'foo') + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_does_not_use_sha256_if_context_config_set(self): + self.request.context['payload_signing_enabled'] = False + self.request.headers.add_header('Content-MD5', 'foo') + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_sha256_if_context_set_on_http(self): + self.request.context['payload_signing_enabled'] = False + self.request.headers.add_header('Content-MD5', 'foo') + self.request.url = 'http://s3.amazonaws.com/bucket' + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertNotEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_sha256_if_context_set_without_md5(self): + self.request.context['payload_signing_enabled'] = False + self.request.url = 'https://s3.amazonaws.com/bucket' + self.auth.add_auth(self.request) + sha_header = self.request.headers['X-Amz-Content-SHA256'] + self.assertNotEqual(sha_header, 'UNSIGNED-PAYLOAD') + + +class TestSigV4(unittest.TestCase): + def setUp(self): + self.credentials = botocore.credentials.Credentials( + access_key='foo', secret_key='bar' + ) + + def create_signer(self, service_name='myservice', region='us-west-2'): + auth = botocore.auth.SigV4Auth(self.credentials, service_name, region) + return auth + + def test_canonical_query_string(self): + request = AWSRequest() + request.url = ( + 'https://search-testdomain1-j67dwxlet67gf7ghwfmik2c67i.us-west-2.' + 'cloudsearch.amazonaws.com/' + '2013-01-01/search?format=sdk&pretty=true&' + 'q.options=%7B%22defaultOperator%22%3A%20%22and%22%2C%20%22' + 'fields%22%3A%5B%22directors%5E10%22%5D%7D&q=George%20Lucas' + ) + request.method = 'GET' + auth = self.create_signer('cloudsearchdomain', 'us-west-2') + actual = auth.canonical_query_string(request) + # Here 'q' should come before 'q.options'. + expected = ( + "format=sdk&pretty=true&q=George%20Lucas&q.options=%7B%22" + "defaultOperator%22%3A%20%22and%22%2C%20%22fields%22%3A%5B" + "%22directors%5E10%22%5D%7D" + ) + self.assertEqual(actual, expected) + + def test_thread_safe_timestamp(self): + request = AWSRequest() + request.url = ( + 'https://search-testdomain1-j67dwxlet67gf7ghwfmik2c67i.us-west-2.' + 'cloudsearch.amazonaws.com/' + '2013-01-01/search?format=sdk&pretty=true&' + 'q.options=%7B%22defaultOperator%22%3A%20%22and%22%2C%20%22' + 'fields%22%3A%5B%22directors%5E10%22%5D%7D&q=George%20Lucas' + ) + request.method = 'GET' + auth = self.create_signer('cloudsearchdomain', 'us-west-2') + with mock.patch.object( + botocore.auth.datetime, + 'datetime', + mock.Mock(wraps=datetime.datetime), + ) as mock_datetime: + original_utcnow = datetime.datetime(2014, 1, 1, 0, 0) + + mock_datetime.utcnow.return_value = original_utcnow + # Go through the add_auth process once. This will attach + # a timestamp to the request at the beginning of auth. + auth.add_auth(request) + self.assertEqual(request.context['timestamp'], '20140101T000000Z') + # Ensure the date is in the Authorization header + self.assertIn('20140101', request.headers['Authorization']) + # Now suppose the utc time becomes the next day all of a sudden + mock_datetime.utcnow.return_value = datetime.datetime( + 2014, 1, 2, 0, 0 + ) + # Smaller methods like the canonical request and string_to_sign + # should have the timestamp attached to the request in their + # body and not what the time is now mocked as. This is to ensure + # there is no mismatching in timestamps when signing. + cr = auth.canonical_request(request) + self.assertIn('x-amz-date:20140101T000000Z', cr) + self.assertNotIn('x-amz-date:20140102T000000Z', cr) + + sts = auth.string_to_sign(request, cr) + self.assertIn('20140101T000000Z', sts) + self.assertNotIn('20140102T000000Z', sts) + + def test_payload_is_binary_file(self): + request = AWSRequest() + request.data = io.BytesIO('\u2713'.encode()) + request.url = 'https://amazonaws.com' + auth = self.create_signer() + payload = auth.payload(request) + self.assertEqual( + payload, + '1dabba21cdad44541f6b15796f8d22978fc7ea10c46aeceeeeb66c23b3ac7604', + ) + + def test_payload_is_bytes_type(self): + request = AWSRequest() + request.data = '\u2713'.encode() + request.url = 'https://amazonaws.com' + auth = self.create_signer() + payload = auth.payload(request) + self.assertEqual( + payload, + '1dabba21cdad44541f6b15796f8d22978fc7ea10c46aeceeeeb66c23b3ac7604', + ) + + def test_payload_not_signed_if_disabled_in_context(self): + request = AWSRequest() + request.data = '\u2713'.encode() + request.url = 'https://amazonaws.com' + request.context['payload_signing_enabled'] = False + auth = self.create_signer() + payload = auth.payload(request) + self.assertEqual(payload, 'UNSIGNED-PAYLOAD') + + def test_content_sha256_set_if_payload_signing_disabled(self): + request = AWSRequest() + request.data = io.BytesIO('\u2713'.encode()) + request.url = 'https://amazonaws.com' + request.context['payload_signing_enabled'] = False + request.method = 'PUT' + auth = self.create_signer() + auth.add_auth(request) + sha_header = request.headers['X-Amz-Content-SHA256'] + self.assertEqual(sha_header, 'UNSIGNED-PAYLOAD') + + def test_collapse_multiple_spaces(self): + auth = self.create_signer() + original = HTTPHeaders() + original['foo'] = 'double space' + headers = auth.canonical_headers(original) + self.assertEqual(headers, 'foo:double space') + + def test_trims_leading_trailing_spaces(self): + auth = self.create_signer() + original = HTTPHeaders() + original['foo'] = ' leading and trailing ' + headers = auth.canonical_headers(original) + self.assertEqual(headers, 'foo:leading and trailing') + + def test_strips_http_default_port(self): + request = AWSRequest() + request.url = 'http://s3.us-west-2.amazonaws.com:80/' + request.method = 'GET' + auth = self.create_signer('s3', 'us-west-2') + actual = auth.headers_to_sign(request)['host'] + expected = 's3.us-west-2.amazonaws.com' + self.assertEqual(actual, expected) + + def test_strips_https_default_port(self): + request = AWSRequest() + request.url = 'https://s3.us-west-2.amazonaws.com:443/' + request.method = 'GET' + auth = self.create_signer('s3', 'us-west-2') + actual = auth.headers_to_sign(request)['host'] + expected = 's3.us-west-2.amazonaws.com' + self.assertEqual(actual, expected) + + def test_strips_http_auth(self): + request = AWSRequest() + request.url = 'https://username:password@s3.us-west-2.amazonaws.com/' + request.method = 'GET' + auth = self.create_signer('s3', 'us-west-2') + actual = auth.headers_to_sign(request)['host'] + expected = 's3.us-west-2.amazonaws.com' + self.assertEqual(actual, expected) + + def test_strips_default_port_and_http_auth(self): + request = AWSRequest() + request.url = 'http://username:password@s3.us-west-2.amazonaws.com:80/' + request.method = 'GET' + auth = self.create_signer('s3', 'us-west-2') + actual = auth.headers_to_sign(request)['host'] + expected = 's3.us-west-2.amazonaws.com' + self.assertEqual(actual, expected) + + +class TestSigV4Resign(BaseTestWithFixedDate): + maxDiff = None + AuthClass = botocore.auth.SigV4Auth + + def setUp(self): + super().setUp() + self.credentials = botocore.credentials.Credentials( + access_key='foo', secret_key='bar', token='baz' + ) + self.auth = self.AuthClass(self.credentials, 'ec2', 'us-west-2') + self.request = AWSRequest() + self.request.method = 'PUT' + self.request.url = 'https://ec2.amazonaws.com/' + + def test_resign_request_with_date(self): + self.request.headers['Date'] = 'Thu, 17 Nov 2005 18:49:58 GMT' + self.auth.add_auth(self.request) + original_auth = self.request.headers['Authorization'] + + self.auth.add_auth(self.request) + self.assertEqual( + self.request.headers.get_all('Authorization'), [original_auth] + ) + + def test_sigv4_without_date(self): + self.auth.add_auth(self.request) + original_auth = self.request.headers['Authorization'] + + self.auth.add_auth(self.request) + self.assertEqual( + self.request.headers.get_all('Authorization'), [original_auth] + ) + + +class BasePresignTest(unittest.TestCase): + def get_parsed_query_string(self, request): + query_string_dict = parse_qs(urlsplit(request.url).query) + # Also, parse_qs sets each value in the dict to be a list, but + # because we know that we won't have repeated keys, we simplify + # the dict and convert it back to a single value. + for key in query_string_dict: + query_string_dict[key] = query_string_dict[key][0] + return query_string_dict + + +class TestS3SigV2Presign(BasePresignTest): + def setUp(self): + self.access_key = 'access_key' + self.secret_key = 'secret_key' + self.credentials = botocore.credentials.Credentials( + self.access_key, self.secret_key + ) + self.expires = 3000 + self.auth = botocore.auth.HmacV1QueryAuth( + self.credentials, expires=self.expires + ) + + self.current_epoch_time = 1427427247.465591 + self.time_patch = mock.patch('time.time') + self.time_mock = self.time_patch.start() + self.time_mock.return_value = self.current_epoch_time + + self.request = AWSRequest() + self.bucket = 'mybucket' + self.key = 'myobject' + self.path = f'https://s3.amazonaws.com/{self.bucket}/{self.key}' + self.request.url = self.path + self.request.method = 'GET' + + def tearDown(self): + self.time_patch.stop() + super().tearDown() + + def test_presign_with_query_string(self): + self.request.url = ( + 'https://foo-bucket.s3.amazonaws.com/image.jpg' + '?response-content-disposition=' + 'attachment%3B%20filename%3D%22download.jpg%22' + ) + self.auth.add_auth(self.request) + query_string = self.get_parsed_query_string(self.request) + # We should have still kept the response-content-disposition + # in the query string. + self.assertIn('response-content-disposition', query_string) + self.assertEqual( + query_string['response-content-disposition'], + 'attachment; filename="download.jpg"', + ) + # But we should have also added the parts from the signer. + self.assertEqual(query_string['AWSAccessKeyId'], self.access_key) + + def test_presign_no_headers(self): + self.auth.add_auth(self.request) + self.assertTrue(self.request.url.startswith(self.path + '?')) + query_string = self.get_parsed_query_string(self.request) + self.assertEqual(query_string['AWSAccessKeyId'], self.access_key) + self.assertEqual( + query_string['Expires'], + str(int(self.current_epoch_time) + self.expires), + ) + self.assertEqual( + query_string['Signature'], 'ZRSgywstwIruKLTLt/Bcrf9H1K4=' + ) + + def test_presign_with_x_amz_headers(self): + self.request.headers['x-amz-security-token'] = 'foo' + self.request.headers['x-amz-acl'] = 'read-only' + self.auth.add_auth(self.request) + query_string = self.get_parsed_query_string(self.request) + self.assertEqual(query_string['x-amz-security-token'], 'foo') + self.assertEqual(query_string['x-amz-acl'], 'read-only') + self.assertEqual( + query_string['Signature'], '5oyMAGiUk1E5Ry2BnFr6cIS3Gus=' + ) + + def test_presign_with_content_headers(self): + self.request.headers['content-type'] = 'txt' + self.request.headers['content-md5'] = 'foo' + self.auth.add_auth(self.request) + query_string = self.get_parsed_query_string(self.request) + self.assertEqual(query_string['content-type'], 'txt') + self.assertEqual(query_string['content-md5'], 'foo') + self.assertEqual( + query_string['Signature'], '/YQRFdQGywXP74WrOx2ET/RUqz8=' + ) + + def test_presign_with_unused_headers(self): + self.request.headers['user-agent'] = 'botocore' + self.auth.add_auth(self.request) + query_string = self.get_parsed_query_string(self.request) + self.assertNotIn('user-agent', query_string) + self.assertEqual( + query_string['Signature'], 'ZRSgywstwIruKLTLt/Bcrf9H1K4=' + ) + + +class TestSigV4Presign(BasePresignTest): + maxDiff = None + AuthClass = botocore.auth.SigV4QueryAuth + + def setUp(self): + self.access_key = 'access_key' + self.secret_key = 'secret_key' + self.credentials = botocore.credentials.Credentials( + self.access_key, self.secret_key + ) + self.service_name = 'myservice' + self.region_name = 'myregion' + self.auth = self.AuthClass( + self.credentials, self.service_name, self.region_name, expires=60 + ) + self.datetime_patcher = mock.patch.object( + botocore.auth.datetime, + 'datetime', + mock.Mock(wraps=datetime.datetime), + ) + mocked_datetime = self.datetime_patcher.start() + mocked_datetime.utcnow.return_value = datetime.datetime( + 2014, 1, 1, 0, 0 + ) + + def tearDown(self): + self.datetime_patcher.stop() + super().tearDown() + + def test_presign_no_params(self): + request = AWSRequest() + request.method = 'GET' + request.url = 'https://ec2.us-east-1.amazonaws.com/' + self.auth.add_auth(request) + query_string = self.get_parsed_query_string(request) + self.assertEqual( + query_string, + { + 'X-Amz-Algorithm': 'AWS4-HMAC-SHA256', + 'X-Amz-Credential': ( + 'access_key/20140101/myregion/' 'myservice/aws4_request' + ), + 'X-Amz-Date': '20140101T000000Z', + 'X-Amz-Expires': '60', + 'X-Amz-Signature': ( + 'c70e0bcdb4cd3ee324f71c78195445b878' + '8315af0800bbbdbbb6d05a616fb84c' + ), + 'X-Amz-SignedHeaders': 'host', + }, + ) + + def test_operation_params_before_auth_params(self): + # The spec is picky about this. + request = AWSRequest() + request.method = 'GET' + request.url = 'https://ec2.us-east-1.amazonaws.com/?Action=MyOperation' + self.auth.add_auth(request) + # Verify auth params come after the existing params. + self.assertIn('?Action=MyOperation&X-Amz', request.url) + + def test_operation_params_before_auth_params_in_body(self): + request = AWSRequest() + request.method = 'GET' + request.url = 'https://ec2.us-east-1.amazonaws.com/' + request.data = {'Action': 'MyOperation'} + self.auth.add_auth(request) + # Same situation, the params from request.data come before the auth + # params in the query string. + self.assertIn('?Action=MyOperation&X-Amz', request.url) + + def test_operation_params_before_auth_params_in_params(self): + request = AWSRequest() + request.method = 'GET' + request.url = 'https://ec2.us-east-1.amazonaws.com/' + request.params = {'Action': 'MyOperation'} + self.auth.add_auth(request) + # Same situation, the params from request.param come before the + # auth params in the query string. + self.assertIn('?Action=MyOperation&X-Amz', request.url) + + def test_request_params_not_duplicated_in_prepare(self): + """ + params should be moved to query string in add_auth + and not rewritten at the end with request.prepare() + """ + request = AWSRequest( + method='GET', + url='https://ec2.us-east-1.amazonaws.com/', + params={'Action': 'MyOperation'}, + ) + self.auth.add_auth(request) + self.assertIn('?Action=MyOperation&X-Amz', request.url) + prep = request.prepare() + assert not prep.url.endswith('Action=MyOperation') + + def test_presign_with_spaces_in_param(self): + request = AWSRequest() + request.method = 'GET' + request.url = 'https://ec2.us-east-1.amazonaws.com/' + request.data = {'Action': 'MyOperation', 'Description': 'With Spaces'} + self.auth.add_auth(request) + # Verify we encode spaces as '%20, and we don't use '+'. + self.assertIn('Description=With%20Spaces', request.url) + + def test_presign_with_empty_param_value(self): + request = AWSRequest() + request.method = 'POST' + # actual URL format for creating a multipart upload + request.url = 'https://s3.amazonaws.com/mybucket/mykey?uploads' + self.auth.add_auth(request) + # verify that uploads param is still in URL + self.assertIn('uploads', request.url) + + def test_s3_sigv4_presign(self): + auth = botocore.auth.S3SigV4QueryAuth( + self.credentials, self.service_name, self.region_name, expires=60 + ) + request = AWSRequest() + request.method = 'GET' + request.url = ( + 'https://s3.us-west-2.amazonaws.com/mybucket/keyname/.bar' + ) + auth.add_auth(request) + query_string = self.get_parsed_query_string(request) + # We use a different payload: + self.assertEqual(auth.payload(request), 'UNSIGNED-PAYLOAD') + # which will result in a different X-Amz-Signature: + self.assertEqual( + query_string, + { + 'X-Amz-Algorithm': 'AWS4-HMAC-SHA256', + 'X-Amz-Credential': ( + 'access_key/20140101/myregion/' 'myservice/aws4_request' + ), + 'X-Amz-Date': '20140101T000000Z', + 'X-Amz-Expires': '60', + 'X-Amz-Signature': ( + 'ac1b8b9e47e8685c5c963d75e35e8741d55251' + 'cd955239cc1efad4dc7201db66' + ), + 'X-Amz-SignedHeaders': 'host', + }, + ) + + def test_presign_with_security_token(self): + self.credentials.token = 'security-token' + auth = botocore.auth.S3SigV4QueryAuth( + self.credentials, self.service_name, self.region_name, expires=60 + ) + request = AWSRequest() + request.method = 'GET' + request.url = 'https://ec2.us-east-1.amazonaws.com/' + auth.add_auth(request) + query_string = self.get_parsed_query_string(request) + self.assertEqual( + query_string['X-Amz-Security-Token'], 'security-token' + ) + + def test_presign_where_body_is_json_bytes(self): + request = AWSRequest() + request.method = 'GET' + request.url = 'https://myservice.us-east-1.amazonaws.com/' + request.data = b'{"Param": "value"}' + self.auth.add_auth(request) + query_string = self.get_parsed_query_string(request) + expected_query_string = { + 'X-Amz-Algorithm': 'AWS4-HMAC-SHA256', + 'X-Amz-Credential': ( + 'access_key/20140101/myregion/myservice/aws4_request' + ), + 'X-Amz-Expires': '60', + 'X-Amz-Date': '20140101T000000Z', + 'X-Amz-Signature': ( + '8e1d372d168d532313ce6df8f64a7dc51d' + 'e6f312a9cfba6e5b345d8a771e839c' + ), + 'X-Amz-SignedHeaders': 'host', + 'Param': 'value', + } + self.assertEqual(query_string, expected_query_string) + + def test_presign_where_body_is_json_string(self): + request = AWSRequest() + request.method = 'GET' + request.url = 'https://myservice.us-east-1.amazonaws.com/' + request.data = '{"Param": "value"}' + self.auth.add_auth(request) + query_string = self.get_parsed_query_string(request) + expected_query_string = { + 'X-Amz-Algorithm': 'AWS4-HMAC-SHA256', + 'X-Amz-Credential': ( + 'access_key/20140101/myregion/myservice/aws4_request' + ), + 'X-Amz-Expires': '60', + 'X-Amz-Date': '20140101T000000Z', + 'X-Amz-Signature': ( + '8e1d372d168d532313ce6df8f64a7dc51d' + 'e6f312a9cfba6e5b345d8a771e839c' + ), + 'X-Amz-SignedHeaders': 'host', + 'Param': 'value', + } + self.assertEqual(query_string, expected_query_string) + + def test_presign_content_type_form_encoded_not_signed(self): + request = AWSRequest() + request.method = 'GET' + request.url = 'https://myservice.us-east-1.amazonaws.com/' + request.headers['Content-Type'] = ( + 'application/x-www-form-urlencoded; charset=utf-8' + ) + self.auth.add_auth(request) + query_string = self.get_parsed_query_string(request) + signed_headers = query_string.get('X-Amz-SignedHeaders') + self.assertNotIn('content-type', signed_headers) + + +class BaseS3PresignPostTest(unittest.TestCase): + def setUp(self): + self.access_key = 'access_key' + self.secret_key = 'secret_key' + self.credentials = botocore.credentials.Credentials( + self.access_key, self.secret_key + ) + + self.service_name = 'myservice' + self.region_name = 'myregion' + + self.bucket = 'mybucket' + self.key = 'mykey' + self.policy = { + "expiration": "2007-12-01T12:00:00.000Z", + "conditions": [ + {"acl": "public-read"}, + {"bucket": self.bucket}, + ["starts-with", "$key", self.key], + ], + } + self.fields = { + 'key': self.key, + 'acl': 'public-read', + } + + self.request = AWSRequest() + self.request.url = f'https://s3.amazonaws.com/{self.bucket}' + self.request.method = 'POST' + + self.request.context['s3-presign-post-fields'] = self.fields + self.request.context['s3-presign-post-policy'] = self.policy + + +class TestS3SigV2Post(BaseS3PresignPostTest): + def setUp(self): + super().setUp() + self.auth = botocore.auth.HmacV1PostAuth(self.credentials) + + self.current_epoch_time = 1427427247.465591 + self.time_patch = mock.patch('time.time') + self.time_mock = self.time_patch.start() + self.time_mock.return_value = self.current_epoch_time + + def tearDown(self): + self.time_patch.stop() + super().tearDown() + + def test_presign_post(self): + self.auth.add_auth(self.request) + result_fields = self.request.context['s3-presign-post-fields'] + self.assertEqual( + result_fields['AWSAccessKeyId'], self.credentials.access_key + ) + + result_policy = json.loads( + base64.b64decode(result_fields['policy']).decode('utf-8') + ) + self.assertEqual( + result_policy['expiration'], '2007-12-01T12:00:00.000Z' + ) + self.assertEqual( + result_policy['conditions'], + [ + {"acl": "public-read"}, + {"bucket": "mybucket"}, + ["starts-with", "$key", "mykey"], + ], + ) + self.assertIn('signature', result_fields) + + def test_presign_post_with_security_token(self): + self.credentials.token = 'my-token' + self.auth = botocore.auth.HmacV1PostAuth(self.credentials) + self.auth.add_auth(self.request) + result_fields = self.request.context['s3-presign-post-fields'] + self.assertEqual(result_fields['x-amz-security-token'], 'my-token') + + def test_empty_fields_and_policy(self): + self.request = AWSRequest() + self.request.url = f'https://s3.amazonaws.com/{self.bucket}' + self.request.method = 'POST' + self.auth.add_auth(self.request) + + result_fields = self.request.context['s3-presign-post-fields'] + self.assertEqual( + result_fields['AWSAccessKeyId'], self.credentials.access_key + ) + result_policy = json.loads( + base64.b64decode(result_fields['policy']).decode('utf-8') + ) + self.assertEqual(result_policy['conditions'], []) + self.assertIn('signature', result_fields) + + +class TestS3SigV4Post(BaseS3PresignPostTest): + def setUp(self): + super().setUp() + self.auth = botocore.auth.S3SigV4PostAuth( + self.credentials, self.service_name, self.region_name + ) + self.datetime_patcher = mock.patch.object( + botocore.auth.datetime, + 'datetime', + mock.Mock(wraps=datetime.datetime), + ) + mocked_datetime = self.datetime_patcher.start() + mocked_datetime.utcnow.return_value = datetime.datetime( + 2014, 1, 1, 0, 0 + ) + + def tearDown(self): + self.datetime_patcher.stop() + super().tearDown() + + def test_presign_post(self): + self.auth.add_auth(self.request) + result_fields = self.request.context['s3-presign-post-fields'] + self.assertEqual(result_fields['x-amz-algorithm'], 'AWS4-HMAC-SHA256') + self.assertEqual( + result_fields['x-amz-credential'], + 'access_key/20140101/myregion/myservice/aws4_request', + ) + self.assertEqual(result_fields['x-amz-date'], '20140101T000000Z') + + result_policy = json.loads( + base64.b64decode(result_fields['policy']).decode('utf-8') + ) + self.assertEqual( + result_policy['expiration'], '2007-12-01T12:00:00.000Z' + ) + self.assertEqual( + result_policy['conditions'], + [ + {"acl": "public-read"}, + {"bucket": "mybucket"}, + ["starts-with", "$key", "mykey"], + {"x-amz-algorithm": "AWS4-HMAC-SHA256"}, + { + "x-amz-credential": "access_key/20140101/myregion/myservice/aws4_request" + }, + {"x-amz-date": "20140101T000000Z"}, + ], + ) + self.assertIn('x-amz-signature', result_fields) + + def test_presign_post_with_security_token(self): + self.credentials.token = 'my-token' + self.auth = botocore.auth.S3SigV4PostAuth( + self.credentials, self.service_name, self.region_name + ) + self.auth.add_auth(self.request) + result_fields = self.request.context['s3-presign-post-fields'] + self.assertEqual(result_fields['x-amz-security-token'], 'my-token') + + def test_empty_fields_and_policy(self): + self.request = AWSRequest() + self.request.url = f'https://s3.amazonaws.com/{self.bucket}' + self.request.method = 'POST' + self.auth.add_auth(self.request) + + result_fields = self.request.context['s3-presign-post-fields'] + self.assertEqual(result_fields['x-amz-algorithm'], 'AWS4-HMAC-SHA256') + self.assertEqual( + result_fields['x-amz-credential'], + 'access_key/20140101/myregion/myservice/aws4_request', + ) + self.assertEqual(result_fields['x-amz-date'], '20140101T000000Z') + + result_policy = json.loads( + base64.b64decode(result_fields['policy']).decode('utf-8') + ) + self.assertEqual( + result_policy['conditions'], + [ + {"x-amz-algorithm": "AWS4-HMAC-SHA256"}, + { + "x-amz-credential": "access_key/20140101/myregion/myservice/aws4_request" + }, + {"x-amz-date": "20140101T000000Z"}, + ], + ) + self.assertIn('x-amz-signature', result_fields) diff --git a/testbed/boto__botocore/tests/unit/auth/test_sigv4.py b/testbed/boto__botocore/tests/unit/auth/test_sigv4.py new file mode 100644 index 0000000000000000000000000000000000000000..e09220f11ec48d979a749c6673c3de00d11f8c5f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/auth/test_sigv4.py @@ -0,0 +1,198 @@ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +"""Signature Version 4 test suite. + +AWS provides a test suite for signature version 4: + +https://github.com/awslabs/aws-c-auth/tree/v0.3.15/tests/aws-sig-v4-test-suite + +This module contains logic to run these tests. The test files were +placed in ./aws4_testsuite, and we're using those to dynamically +generate testcases based on these files. + +""" + +import datetime +import io +import logging +import os +import re +from http.server import BaseHTTPRequestHandler + +import pytest + +import botocore.auth +from botocore.awsrequest import AWSRequest +from botocore.compat import parse_qsl, urlsplit +from botocore.credentials import Credentials +from tests import FreezeTime + +SECRET_KEY = "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY" +ACCESS_KEY = 'AKIDEXAMPLE' +DATE = datetime.datetime(2015, 8, 30, 12, 36, 0) +SERVICE = 'service' +REGION = 'us-east-1' + +TESTSUITE_DIR = os.path.join( + os.path.dirname(os.path.abspath(__file__)), 'aws4_testsuite' +) + +# The following tests are not run. Each test has a comment as +# to why the test is being ignored. +TESTS_TO_IGNORE = [ + # Bad request-line syntax, python's HTTP parser chokes on this. + 'normalize-path/get-space', + # Multiple query params of the same key not supported by the SDKs. + 'get-vanilla-query-order-key-case', + 'get-vanilla-query-order-key', + 'get-vanilla-query-order-value', +] + +log = logging.getLogger(__name__) + + +class RawHTTPRequest(BaseHTTPRequestHandler): + def __init__(self, raw_request): + if isinstance(raw_request, str): + raw_request = raw_request.encode('utf-8') + self.rfile = io.BytesIO(raw_request) + self.raw_requestline = self.rfile.readline() + self.error_code = None + self.error_message = None + self.parse_request() + + def send_error(self, code, message): + self.error_code = code + self.error_message = message + + +def generate_test_cases(): + for dirpath, dirnames, filenames in os.walk(TESTSUITE_DIR): + if not any(f.endswith('.req') for f in filenames): + continue + + test_case = os.path.relpath(dirpath, TESTSUITE_DIR).replace( + os.sep, '/' + ) + if test_case in TESTS_TO_IGNORE: + log.debug("Skipping test: %s", test_case) + continue + + yield test_case + + +@pytest.mark.parametrize("test_case", generate_test_cases()) +@FreezeTime(module=botocore.auth.datetime, date=DATE) +def test_signature_version_4(test_case): + _test_signature_version_4(test_case) + + +def create_request_from_raw_request(raw_request): + request = AWSRequest() + raw = RawHTTPRequest(raw_request) + if raw.error_code is not None: + raise Exception(raw.error_message) + request.method = raw.command + datetime_now = DATE + request.context['timestamp'] = datetime_now.strftime('%Y%m%dT%H%M%SZ') + for key, val in raw.headers.items(): + request.headers[key] = val + request.data = raw.rfile.read() + host = raw.headers.get('host', '') + # For whatever reason, the BaseHTTPRequestHandler encodes + # the first line of the response as 'iso-8859-1', + # so we need decode this into utf-8. + if isinstance(raw.path, str): + raw.path = raw.path.encode('iso-8859-1').decode('utf-8') + url = f'https://{host}{raw.path}' + if '?' in url: + split_url = urlsplit(url) + params = dict(parse_qsl(split_url.query)) + request.url = split_url.path + request.params = params + else: + request.url = url + return request + + +def _test_signature_version_4(test_case): + test_case = SignatureTestCase(test_case) + request = create_request_from_raw_request(test_case.raw_request) + + auth = botocore.auth.SigV4Auth(test_case.credentials, SERVICE, REGION) + actual_canonical_request = auth.canonical_request(request) + actual_string_to_sign = auth.string_to_sign( + request, actual_canonical_request + ) + auth.add_auth(request) + actual_auth_header = request.headers['Authorization'] + + # Some stuff only works right when you go through auth.add_auth() + # So don't assert the interim steps unless the end result was wrong. + if actual_auth_header != test_case.authorization_header: + assert_equal( + actual_canonical_request, + test_case.canonical_request, + test_case.raw_request, + 'canonical_request', + ) + + assert_equal( + actual_string_to_sign, + test_case.string_to_sign, + test_case.raw_request, + 'string_to_sign', + ) + + assert_equal( + actual_auth_header, + test_case.authorization_header, + test_case.raw_request, + 'authheader', + ) + + +def assert_equal(actual, expected, raw_request, part): + if actual != expected: + message = f"The {part} did not match" + message += f"\nACTUAL:{actual!r} !=\nEXPECT:{expected!r}" + message += f'\nThe raw request was:\n{raw_request}' + raise AssertionError(message) + + +class SignatureTestCase: + def __init__(self, test_case): + filepath = os.path.join( + TESTSUITE_DIR, test_case, os.path.basename(test_case) + ) + self.raw_request = open(filepath + '.req', encoding='utf-8').read() + self.canonical_request = ( + open(filepath + '.creq', encoding='utf-8').read().replace('\r', '') + ) + self.string_to_sign = ( + open(filepath + '.sts', encoding='utf-8').read().replace('\r', '') + ) + self.authorization_header = ( + open(filepath + '.authz', encoding='utf-8') + .read() + .replace('\r', '') + ) + self.signed_request = open(filepath + '.sreq', encoding='utf-8').read() + + token_pattern = r'^x-amz-security-token:(.*)$' + token_match = re.search( + token_pattern, self.canonical_request, re.MULTILINE + ) + token = token_match.group(1) if token_match else None + self.credentials = Credentials(ACCESS_KEY, SECRET_KEY, token) diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_bad_profile b/testbed/boto__botocore/tests/unit/cfg/aws_bad_profile new file mode 100644 index 0000000000000000000000000000000000000000..12d8374aae3eccc2b813d1a88530c50954f3ed50 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_bad_profile @@ -0,0 +1,21 @@ +[default] +aws_access_key_id = default +aws_secret_access_key = default + +# Bad format, must be 'profile "name"' for profiles. +[profile "personal" "otherkey"] +aws_access_key_id = default +aws_secret_access_key = default + +# Spaces are allowed +[profile "my profile"] +aws_access_key_id = default +aws_secret_access_key = default + +# Missing quote +[profile "missing end quote] + +# Doesn't need to be in quotes +[profile personal1] +aws_access_key_id = access_personal1 +aws_secret_access_key = key_personal1 diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_config b/testbed/boto__botocore/tests/unit/cfg/aws_config new file mode 100644 index 0000000000000000000000000000000000000000..07adb69f711c81cde7cbfb3e9c3af0d844303a88 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_config @@ -0,0 +1,8 @@ +[default] +aws_access_key_id = foo +aws_secret_access_key = bar + +[profile "personal"] +aws_access_key_id = fie +aws_secret_access_key = baz +aws_security_token = fiebaz diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_config_bad b/testbed/boto__botocore/tests/unit/cfg/aws_config_bad new file mode 100644 index 0000000000000000000000000000000000000000..ea3830d597533e4420f74396e2f7ff6c0c54a7d9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_config_bad @@ -0,0 +1,6 @@ +aws_access_key_id = foo +aws_secret_access_key = bar + +[profile "personal"] +aws_access_key_id = fie +aws_secret_access_key = baz diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_config_badbytes b/testbed/boto__botocore/tests/unit/cfg/aws_config_badbytes new file mode 100644 index 0000000000000000000000000000000000000000..afca1577557276ce55b3280caf49c67e60d54e60 Binary files /dev/null and b/testbed/boto__botocore/tests/unit/cfg/aws_config_badbytes differ diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_config_nested b/testbed/boto__botocore/tests/unit/cfg/aws_config_nested new file mode 100644 index 0000000000000000000000000000000000000000..2d6e5d0dca10f635a1d12e30861782a989792e91 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_config_nested @@ -0,0 +1,9 @@ +[default] +aws_access_key_id = foo +aws_secret_access_key = bar +s3 = + signature_version = s3v4 + addressing_style = path +cloudwatch = + signature_version = v4 +region=us-west-2 diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_config_nested_bad b/testbed/boto__botocore/tests/unit/cfg/aws_config_nested_bad new file mode 100644 index 0000000000000000000000000000000000000000..f898780850fdfa8156ec01a08fe994230c4ca73c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_config_nested_bad @@ -0,0 +1,8 @@ +[default] +aws_access_key_id = foo +aws_secret_access_key = bar +s3 = + bad_syntax @ s3v4 +cloudwatch = + signature_version = v4 +region=us-west-2 diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_config_nocreds b/testbed/boto__botocore/tests/unit/cfg/aws_config_nocreds new file mode 100644 index 0000000000000000000000000000000000000000..235b0209ee482f9ffc5215074fd870ffabfcec3e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_config_nocreds @@ -0,0 +1,2 @@ +[default] +region = us-west-2 diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_config_other b/testbed/boto__botocore/tests/unit/cfg/aws_config_other new file mode 100644 index 0000000000000000000000000000000000000000..0e5b02b143bf36cf76497ca9bec35db2302d46f8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_config_other @@ -0,0 +1,8 @@ +[default] +aws_access_key_id = other_foo +aws_secret_access_key = other_bar + +[profile "personal"] +aws_access_key_id = fie +aws_secret_access_key = baz +aws_security_token = fiebaz diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_credentials b/testbed/boto__botocore/tests/unit/cfg/aws_credentials new file mode 100644 index 0000000000000000000000000000000000000000..fe88df4f345d82fe18a82812dded614636591588 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_credentials @@ -0,0 +1,2 @@ +AWSAccessKeyId=foo +AWSSecretKey=bar diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_services_config b/testbed/boto__botocore/tests/unit/cfg/aws_services_config new file mode 100644 index 0000000000000000000000000000000000000000..cf9040c2a4c6d3e9eec35905d0b7f66fcdaae6b2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_services_config @@ -0,0 +1,9 @@ +[default] +endpoint_url = https://localhost:1234/ +services = my-services + +[services my-services] +s3 = + endpoint_url = https://localhost:5678/ +dynamodb = + endpoint_url = https://localhost:8888/ diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_sso_session_config b/testbed/boto__botocore/tests/unit/cfg/aws_sso_session_config new file mode 100644 index 0000000000000000000000000000000000000000..d5fc0d37d11d1c1aeea093ebcc0d6010732a62eb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_sso_session_config @@ -0,0 +1,6 @@ +[default] +sso_session = sso + +[sso-session sso] +sso_start_url = https://example.com +sso_region = us-east-1 diff --git a/testbed/boto__botocore/tests/unit/cfg/aws_third_config b/testbed/boto__botocore/tests/unit/cfg/aws_third_config new file mode 100644 index 0000000000000000000000000000000000000000..e718adbf806cd723e8dcb91d19705ca7df81e92f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/aws_third_config @@ -0,0 +1,8 @@ +[default] +aws_access_key_id = third_foo +aws_secret_access_key = third_bar + +[profile "third"] +aws_access_key_id = third_fie +aws_secret_access_key = third_baz +aws_security_token = third_fiebaz diff --git a/testbed/boto__botocore/tests/unit/cfg/boto_config b/testbed/boto__botocore/tests/unit/cfg/boto_config new file mode 100644 index 0000000000000000000000000000000000000000..ec6fb0a61e4e0e45004054c19aa9a558659329cc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/boto_config @@ -0,0 +1,3 @@ +[Credentials] +aws_access_key_id = foo +aws_secret_access_key = bar diff --git a/testbed/boto__botocore/tests/unit/cfg/boto_config_empty b/testbed/boto__botocore/tests/unit/cfg/boto_config_empty new file mode 100644 index 0000000000000000000000000000000000000000..93221550f6ed70b16b9bff2716b306158793ec2a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/boto_config_empty @@ -0,0 +1,2 @@ +[Credentials] +# Missing secret/access keys. diff --git a/testbed/boto__botocore/tests/unit/cfg/foo_config b/testbed/boto__botocore/tests/unit/cfg/foo_config new file mode 100644 index 0000000000000000000000000000000000000000..5932d4c3a4c416c60b84acebf78a3749bea3b79c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/cfg/foo_config @@ -0,0 +1,8 @@ +[default] +aws_access_key_id = foo +aws_secret_access_key = bar +foo_region = us-west-1 + +[profile "foo"] +aws_access_key_id = fie +aws_secret_access_key = baz diff --git a/testbed/boto__botocore/tests/unit/crt/__init__.py b/testbed/boto__botocore/tests/unit/crt/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/testbed/boto__botocore/tests/unit/crt/auth/__init__.py b/testbed/boto__botocore/tests/unit/crt/auth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/testbed/boto__botocore/tests/unit/crt/auth/test_crt_signers.py b/testbed/boto__botocore/tests/unit/crt/auth/test_crt_signers.py new file mode 100644 index 0000000000000000000000000000000000000000..6b9f714c1f0fa2fcd5df471f62d048754d6d0efe --- /dev/null +++ b/testbed/boto__botocore/tests/unit/crt/auth/test_crt_signers.py @@ -0,0 +1,39 @@ +import botocore +from botocore.compat import HAS_CRT +from tests import requires_crt +from tests.unit.auth.test_signers import ( + TestS3SigV4Auth, + TestSigV4Presign, + TestSigV4Resign, +) + + +@requires_crt() +def test_crt_supported_auth_types_list(): + # The list CRT_SUPPORTED_AUTH_TYPES is available even when awscrt is not + # installed. Its entries must always match the keys of the + # CRT_AUTH_TYPE_MAPS dict which is only available when CRT is installed. + with_crt_list = set(botocore.crt.CRT_SUPPORTED_AUTH_TYPES) + without_crt_list = set(botocore.crt.auth.CRT_AUTH_TYPE_MAPS.keys()) + assert with_crt_list == without_crt_list + + +@requires_crt() +class TestCrtS3SigV4Auth(TestS3SigV4Auth): + # Repeat TestS3SigV4Auth tests, but using CRT signer + if HAS_CRT: + AuthClass = botocore.crt.auth.CrtS3SigV4Auth + + +@requires_crt() +class TestCrtSigV4Resign(TestSigV4Resign): + # Run same tests against CRT auth + if HAS_CRT: + AuthClass = botocore.crt.auth.CrtSigV4Auth + + +@requires_crt() +class TestCrtSigV4Presign(TestSigV4Presign): + # Run same tests against CRT auth + if HAS_CRT: + AuthClass = botocore.crt.auth.CrtSigV4QueryAuth diff --git a/testbed/boto__botocore/tests/unit/crt/auth/test_crt_sigv4.py b/testbed/boto__botocore/tests/unit/crt/auth/test_crt_sigv4.py new file mode 100644 index 0000000000000000000000000000000000000000..9ada22ffb9104db2f43fcf3143af80fa96366c9e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/crt/auth/test_crt_sigv4.py @@ -0,0 +1,40 @@ +import pytest + +import botocore +from tests import FreezeTime, requires_crt +from tests.unit.auth.test_sigv4 import ( + DATE, + REGION, + SERVICE, + SignatureTestCase, + assert_equal, + create_request_from_raw_request, + generate_test_cases, +) + + +def _test_crt_signature_version_4(test_case): + test_case = SignatureTestCase(test_case) + request = create_request_from_raw_request(test_case.raw_request) + + # Use CRT logging to diagnose interim steps (canonical request, etc) + # import awscrt.io + # awscrt.io.init_logging(awscrt.io.LogLevel.Trace, 'stdout') + auth = botocore.crt.auth.CrtSigV4Auth( + test_case.credentials, SERVICE, REGION + ) + auth.add_auth(request) + actual_auth_header = request.headers["Authorization"] + assert_equal( + actual_auth_header, + test_case.authorization_header, + test_case.raw_request, + "authheader", + ) + + +@requires_crt() +@pytest.mark.parametrize("test_case", generate_test_cases()) +@FreezeTime(module=botocore.auth.datetime, date=DATE) +def test_signature_version_4(test_case): + _test_crt_signature_version_4(test_case) diff --git a/testbed/boto__botocore/tests/unit/data/aws/s3/2006-03-01.normal.json b/testbed/boto__botocore/tests/unit/data/aws/s3/2006-03-01.normal.json new file mode 100644 index 0000000000000000000000000000000000000000..c268580a3fa08e49541d4dddbf05e2260214e855 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/aws/s3/2006-03-01.normal.json @@ -0,0 +1,3 @@ +{ + "WAS_OVERRIDEN_VIA_DATA_PATH": true +} diff --git a/testbed/boto__botocore/tests/unit/data/baz.json b/testbed/boto__botocore/tests/unit/data/baz.json new file mode 100644 index 0000000000000000000000000000000000000000..adb4e66b7c39f25f028eb5cc3f213f603d3543ef --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/baz.json @@ -0,0 +1,2 @@ +{"bad": "json", + } diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/aws-region.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/aws-region.json new file mode 100644 index 0000000000000000000000000000000000000000..0f0f40316e1a1866d316fa7eed706f63cba86482 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/aws-region.json @@ -0,0 +1,32 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "basic region templating", + "params": { + "Region": "us-east-1" + }, + "expect": { + "endpoint": { + "url": "https://us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-east-1", + "signingName": "serviceName" + } + ] + } + } + } + }, + { + "documentation": "test case where region is unset", + "params": {}, + "expect": { + "error": "Region must be set to resolve a valid endpoint" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/default-values.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/default-values.json new file mode 100644 index 0000000000000000000000000000000000000000..84e23c86807bce926333058c5e04cfc74cf86565 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/default-values.json @@ -0,0 +1,45 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "default endpoint", + "params": {}, + "expect": { + "endpoint": { + "url": "https://fips.us-west-5.amazonaws.com" + } + } + }, + { + "documentation": "test case where FIPS is disabled", + "params": { + "UseFips": false + }, + "expect": { + "error": "UseFips = false" + } + }, + { + "documentation": "test case where FIPS is enabled explicitly", + "params": { + "UseFips": true + }, + "expect": { + "endpoint": { + "url": "https://fips.us-west-5.amazonaws.com" + } + } + }, + { + "documentation": "defaults can be overridden", + "params": { + "Region": "us-east-1" + }, + "expect": { + "endpoint": { + "url": "https://fips.us-east-1.amazonaws.com" + } + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/eventbridge.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/eventbridge.json new file mode 100644 index 0000000000000000000000000000000000000000..9fede903e4bb61b724d05f84750cde909ae2810d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/eventbridge.json @@ -0,0 +1,48 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "simple region endpoint", + "params": { + "region": "us-east-1" + }, + "expect": { + "endpoint": { + "url": "https://events.us-east-1.amazonaws.com" + } + } + }, + { + "documentation": "basic case of endpointId", + "params": { + "region": "us-east-1", + "endpointId": "myendpoint" + }, + "expect": { + "endpoint": { + "url": "https://myendpoint.endpoint.events.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "events", + "signingRegionSet": ["*"] + } + ] + } + } + } + }, + { + "documentation": "endpointId & FIPS", + "params": { + "region": "us-east-1", + "endpointId": "myendpoint", + "useFIPSEndpoint": true + }, + "expect": { + "error": "FIPS endpoints not supported with multi-region endpoints" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/fns.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/fns.json new file mode 100644 index 0000000000000000000000000000000000000000..be0baad302e11d7215f9950e31b92463478707e4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/fns.json @@ -0,0 +1,50 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "test where URI is set and flows to URI and header", + "params": { + "Uri": "https://www.example.com", + "Arn": "arn:aws:s3:us-east-2:012345678:outpost:op-1234" + }, + "expect": { + "endpoint": { + "url": "https://www.example.com", + "headers": { + "x-uri": [ + "https://www.example.com" + ], + "x-arn-region": [ + "us-east-2" + ] + } + } + } + }, + { + "documentation": "test where explicit error is set", + "params": { + "CustomError": "This is an error!" + }, + "expect": { + "error": "This is an error!" + } + }, + { + "documentation": "test where an ARN field is used in the error directly", + "params": { + "Arn": "arn:This is an error!:s3:us-east-2:012345678:outpost:op-1234" + }, + "expect": { + "error": "This is an error!" + } + }, + { + "documentation": "test case where no fields are set", + "params": {}, + "expect": { + "error": "No fields were set" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/headers.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/headers.json new file mode 100644 index 0000000000000000000000000000000000000000..32186eef66d3b286b3b158c6f18e4f8b3a8506a4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/headers.json @@ -0,0 +1,25 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "header set to region", + "params": { + "Region": "us-east-1" + }, + "expect": { + "endpoint": { + "url": "https://us-east-1.amazonaws.com", + "headers": { + "x-amz-region": [ + "us-east-1" + ], + "x-amz-multi": [ + "*", + "us-east-1" + ] + } + } + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/is-virtual-hostable-s3-bucket.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/is-virtual-hostable-s3-bucket.json new file mode 100644 index 0000000000000000000000000000000000000000..f67cc6147b43e4d3487047c9efc144195022dfe3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/is-virtual-hostable-s3-bucket.json @@ -0,0 +1,148 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "bucket-name: isVirtualHostable", + "params": { + "BucketName": "bucket-name" + }, + "expect": { + "endpoint": { + "url": "https://bucket-name.s3.amazonaws.com" + } + } + }, + { + "documentation": "bucket-with-number-1: isVirtualHostable", + "params": { + "BucketName": "bucket-with-number-1" + }, + "expect": { + "endpoint": { + "url": "https://bucket-with-number-1.s3.amazonaws.com" + } + } + }, + { + "documentation": "BucketName: not isVirtualHostable (uppercase characters)", + "params": { + "BucketName": "BucketName" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket_name: not isVirtualHostable (underscore)", + "params": { + "BucketName": "bucket_name" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket.name: isVirtualHostable (http only)", + "params": { + "BucketName": "bucket.name" + }, + "expect": { + "endpoint": { + "url": "http://bucket.name.s3.amazonaws.com" + } + } + }, + { + "documentation": "bucket.name.multiple.dots1: isVirtualHostable (http only)", + "params": { + "BucketName": "bucket.name.multiple.dots1" + }, + "expect": { + "endpoint": { + "url": "http://bucket.name.multiple.dots1.s3.amazonaws.com" + } + } + }, + { + "documentation": "-bucket-name: not isVirtualHostable (leading dash)", + "params": { + "BucketName": "-bucket-name" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket-name-: not isVirtualHostable (trailing dash)", + "params": { + "BucketName": "bucket-name-" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "aa: not isVirtualHostable (< 3 characters)", + "params": { + "BucketName": "aa" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "'a'*64: not isVirtualHostable (> 63 characters)", + "params": { + "BucketName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": ".bucket-name: not isVirtualHostable (leading dot)", + "params": { + "BucketName": ".bucket-name" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket-name.: not isVirtualHostable (trailing dot)", + "params": { + "BucketName": "bucket-name." + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "192.168.5.4: not isVirtualHostable (formatted like an ip address)", + "params": { + "BucketName": "192.168.5.4" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket-.name: not isVirtualHostable (invalid label, ends with a -)", + "params": { + "BucketName": "bucket-.name" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + }, + { + "documentation": "bucket.-name: not isVirtualHostable (invalid label, starts with a -)", + "params": { + "BucketName": "bucket.-name" + }, + "expect": { + "error": "not isVirtualHostableS3Bucket" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/local-region-override.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/local-region-override.json new file mode 100644 index 0000000000000000000000000000000000000000..674105d4be212f5be09ee1c6a9b27c4ee1bd6400 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/local-region-override.json @@ -0,0 +1,27 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "local region override", + "params": { + "Region": "local" + }, + "expect": { + "endpoint": { + "url": "http://localhost:8080" + } + } + }, + { + "documentation": "standard region templated", + "params": { + "Region": "us-east-2" + }, + "expect": { + "endpoint": { + "url": "https://us-east-2.someservice.amazonaws.com" + } + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/parse-arn.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/parse-arn.json new file mode 100644 index 0000000000000000000000000000000000000000..3cb90f6f6c7ae33a9a06746e6efe1e56dcc9dc50 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/parse-arn.json @@ -0,0 +1,152 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "arn + region resolution", + "params": { + "Bucket": "arn:aws:s3:us-east-2:012345678:outpost:op-1234", + "Region": "us-east-2" + }, + "expect": { + "endpoint": { + "url": "https://op-1234-012345678.us-east-2.amazonaws.com" + } + } + }, + { + "documentation": "arn, unset outpost id", + "params": { + "Bucket": "arn:aws:s3:us-east-2:012345678:outpost", + "Region": "us-east-2" + }, + "expect": { + "error": "Invalid ARN: outpostId was not set" + } + }, + { + "documentation": "arn, empty outpost id (tests that empty strings are handled properly during matching)", + "params": { + "Bucket": "arn:aws:s3:us-east-2:012345678:outpost::", + "Region": "us-east-2" + }, + "expect": { + "error": "OutpostId was empty" + } + }, + { + "documentation": "arn, empty outpost id (tests that ARN parsing considers a trailing colon)", + "params": { + "Bucket": "arn:aws:s3:us-east-2:012345678:outpost:", + "Region": "us-east-2" + }, + "expect": { + "error": "OutpostId was empty" + } + }, + { + "documentation": "valid hostlabel + region resolution", + "params": { + "Bucket": "mybucket", + "Region": "us-east-2" + }, + "expect": { + "endpoint": { + "url": "https://mybucket.us-east-2.amazonaws.com" + } + } + }, + { + "documentation": "not a valid hostlabel + region resolution", + "params": { + "Bucket": "99_a", + "Region": "us-east-2" + }, + "expect": { + "endpoint": { + "url": "https://us-east-2.amazonaws.com/99_a" + } + } + }, + { + "documentation": "no bucket", + "params": { + "Region": "us-east-2" + }, + "expect": { + "endpoint": { + "url": "https://us-east-2.amazonaws.com" + } + } + }, + { + "documentation": "a string that is not a 6-part ARN", + "params": { + "TestCaseId": "invalid-arn", + "Bucket": "asdf" + }, + "expect": { + "error": "Test case passed: `asdf` is not a valid ARN." + } + }, + { + "documentation": "resource id MUST not be null", + "params": { + "TestCaseId": "invalid-arn", + "Bucket": "arn:aws:s3:us-west-2:123456789012:" + }, + "expect": { + "error": "Test case passed: `arn:aws:s3:us-west-2:123456789012:` is not a valid ARN." + } + }, + { + "documentation": "service MUST not be null", + "params": { + "TestCaseId": "invalid-arn", + "Bucket": "arn:aws::us-west-2:123456789012:resource-id" + }, + "expect": { + "error": "Test case passed: `arn:aws::us-west-2:123456789012:resource-id` is not a valid ARN." + } + }, + { + "documentation": "partition MUST not be null", + "params": { + "TestCaseId": "invalid-arn", + "Bucket": "arn::s3:us-west-2:123456789012:resource-id" + }, + "expect": { + "error": "Test case passed: `arn::s3:us-west-2:123456789012:resource-id` is not a valid ARN." + } + }, + { + "documentation": "region MAY be null", + "params": { + "TestCaseId": "valid-arn", + "Bucket": "arn:aws:s3::123456789012:resource-id" + }, + "expect": { + "error": "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: ``, accountId: `123456789012`, resource: `resource-id`" + } + }, + { + "documentation": "accountId MAY be null", + "params": { + "TestCaseId": "valid-arn", + "Bucket": "arn:aws:s3:us-east-1::resource-id" + }, + "expect": { + "error": "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: ``, resource: `resource-id`" + } + }, + { + "documentation": "accountId MAY be non-numeric", + "params": { + "TestCaseId": "valid-arn", + "Bucket": "arn:aws:s3:us-east-1:abcd:resource-id" + }, + "expect": { + "error": "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: `abcd`, resource: `resource-id`" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/parse-url.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/parse-url.json new file mode 100644 index 0000000000000000000000000000000000000000..1117dad52cc86960306bfc2021aa3547d38269c5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/parse-url.json @@ -0,0 +1,153 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "simple URL parsing", + "params": { + "Endpoint": "https://authority.com/custom-path" + }, + "expect": { + "endpoint": { + "url": "https://https-authority.com.example.com/path-is/custom-path" + } + } + }, + { + "documentation": "empty path no slash", + "params": { + "Endpoint": "https://authority.com" + }, + "expect": { + "endpoint": { + "url": "https://https-authority.com-nopath.example.com" + } + } + }, + { + "documentation": "empty path with slash", + "params": { + "Endpoint": "https://authority.com/" + }, + "expect": { + "endpoint": { + "url": "https://https-authority.com-nopath.example.com" + } + } + }, + { + "documentation": "authority with port", + "params": { + "Endpoint": "https://authority.com:8000/port" + }, + "expect": { + "endpoint": { + "url": "https://authority.com:8000/uri-with-port" + } + } + }, + { + "documentation": "http schemes", + "params": { + "Endpoint": "http://authority.com:8000/port" + }, + "expect": { + "endpoint": { + "url": "http://authority.com:8000/uri-with-port" + } + } + }, + { + "documentation": "arbitrary schemes are not supported", + "params": { + "Endpoint": "acbd://example.com" + }, + "expect": { + "error": "endpoint was invalid" + } + }, + { + "documentation": "host labels are not validated", + "params": { + "Endpoint": "http://99_ab.com" + }, + "expect": { + "endpoint": { + "url": "https://http-99_ab.com-nopath.example.com" + } + } + }, + { + "documentation": "host labels are not validated", + "params": { + "Endpoint": "http://99_ab-.com" + }, + "expect": { + "endpoint": { + "url": "https://http-99_ab-.com-nopath.example.com" + } + } + }, + { + "documentation": "invalid URL", + "params": { + "Endpoint": "http://abc.com:a/foo" + }, + "expect": { + "error": "endpoint was invalid" + } + }, + { + "documentation": "IP Address", + "params": { + "Endpoint": "http://192.168.1.1/foo/" + }, + "expect": { + "endpoint": { + "url": "http://192.168.1.1/foo/is-ip-addr" + } + } + }, + { + "documentation": "IP Address with port", + "params": { + "Endpoint": "http://192.168.1.1:1234/foo/" + }, + "expect": { + "endpoint": { + "url": "http://192.168.1.1:1234/foo/is-ip-addr" + } + } + }, + { + "documentation": "IPv6 Address", + "params": { + "Endpoint": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443" + }, + "expect": { + "endpoint": { + "url": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/is-ip-addr" + } + } + }, + { + "documentation": "weird DNS name", + "params": { + "Endpoint": "https://999.999.abc.blah" + }, + "expect": { + "endpoint": { + "url": "https://https-999.999.abc.blah-nopath.example.com" + } + } + }, + { + "documentation": "query in resolved endpoint is not supported", + "params": { + "Endpoint": "https://example.com/path?query1=foo" + }, + "expect": { + "error": "endpoint was invalid" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/partition-fn.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/partition-fn.json new file mode 100644 index 0000000000000000000000000000000000000000..5efc6a708ce9b0f2f754dff5aa072cf07f16017f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/partition-fn.json @@ -0,0 +1,125 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "standard AWS region", + "params": { + "Region": "us-east-2" + }, + "expect": { + "endpoint": { + "url": "https://aws-partition.us-east-2.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "us-east-2" + } + ], + "meta": { + "baseSuffix": "amazonaws.com", + "dualStackSuffix": "api.aws" + } + } + } + } + }, + { + "documentation": "AWS region that doesn't match any regexes", + "params": { + "Region": "mars-global" + }, + "expect": { + "endpoint": { + "url": "https://aws-partition.mars-global.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "mars-global" + } + ], + "meta": { + "baseSuffix": "amazonaws.com", + "dualStackSuffix": "api.aws" + } + } + } + } + }, + { + "documentation": "AWS region that matches the AWS regex", + "params": { + "Region": "us-east-10" + }, + "expect": { + "endpoint": { + "url": "https://aws-partition.us-east-10.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "us-east-10" + } + ], + "meta": { + "baseSuffix": "amazonaws.com", + "dualStackSuffix": "api.aws" + } + } + } + } + }, + { + "documentation": "CN region that matches the AWS regex", + "params": { + "Region": "cn-north-5" + }, + "expect": { + "endpoint": { + "url": "https://aws-cn.cn-north-5.amazonaws.com.cn", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "cn-north-5" + } + ], + "meta": { + "baseSuffix": "amazonaws.com.cn", + "dualStackSuffix": "api.amazonwebservices.com.cn" + } + } + } + } + }, + { + "documentation": "CN region that is in the explicit list", + "params": { + "Region": "aws-cn-global" + }, + "expect": { + "endpoint": { + "url": "https://aws-cn.aws-cn-global.amazonaws.com.cn", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "aws-cn-global" + } + ], + "meta": { + "baseSuffix": "amazonaws.com.cn", + "dualStackSuffix": "api.amazonwebservices.com.cn" + } + } + } + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/substring.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/substring.json new file mode 100644 index 0000000000000000000000000000000000000000..c1e2912f9747dae8a65016c2efdcb3b8ab4f38ec --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/substring.json @@ -0,0 +1,185 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "substring when string is long enough", + "params": { + "TestCaseId": "1", + "Input": "abcdefg" + }, + "expect": { + "error": "The value is: `abcd`" + } + }, + { + "documentation": "substring when string is exactly the right length", + "params": { + "TestCaseId": "1", + "Input": "abcd" + }, + "expect": { + "error": "The value is: `abcd`" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "1", + "Input": "abc" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "1", + "Input": "" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", + "params": { + "TestCaseId": "1", + "Input": "\ufdfd" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "unicode characters always return `None`", + "params": { + "TestCaseId": "1", + "Input": "abcdef\uD83D\uDC31" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "non-ascii cause substring to always return `None`", + "params": { + "TestCaseId": "1", + "Input": "abcdef\u0080" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "the full set of ascii is supported, including non-printable characters", + "params": { + "TestCaseId": "1", + "Input": "\u007Fabcdef" + }, + "expect": { + "error": "The value is: `\u007Fabc`" + } + }, + { + "documentation": "substring when string is long enough", + "params": { + "TestCaseId": "2", + "Input": "abcdefg" + }, + "expect": { + "error": "The value is: `defg`" + } + }, + { + "documentation": "substring when string is exactly the right length", + "params": { + "TestCaseId": "2", + "Input": "defg" + }, + "expect": { + "error": "The value is: `defg`" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "2", + "Input": "abc" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "2", + "Input": "" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", + "params": { + "TestCaseId": "2", + "Input": "\ufdfd" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is longer", + "params": { + "TestCaseId": "3", + "Input": "defg" + }, + "expect": { + "error": "The value is: `ef`" + } + }, + { + "documentation": "substring when string is exact length", + "params": { + "TestCaseId": "3", + "Input": "def" + }, + "expect": { + "error": "The value is: `ef`" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "3", + "Input": "ab" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring when string is too short", + "params": { + "TestCaseId": "3", + "Input": "" + }, + "expect": { + "error": "No tests matched" + } + }, + { + "documentation": "substring on wide characters (ensure that unicode code points are properly counted)", + "params": { + "TestCaseId": "3", + "Input": "\ufdfd" + }, + "expect": { + "error": "No tests matched" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/uri-encode.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/uri-encode.json new file mode 100644 index 0000000000000000000000000000000000000000..6da5f21b547b817ed05559547dc232e539f08414 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/uri-encode.json @@ -0,0 +1,75 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "uriEncode when the string has nothing to encode returns the input", + "params": { + "TestCaseId": "1", + "Input": "abcdefg" + }, + "expect": { + "error": "The value is: `abcdefg`" + } + }, + { + "documentation": "uriEncode with single character to encode encodes only that character", + "params": { + "TestCaseId": "1", + "Input": "abc:defg" + }, + "expect": { + "error": "The value is: `abc%3Adefg`" + } + }, + { + "documentation": "uriEncode with all ASCII characters to encode encodes all characters", + "params": { + "TestCaseId": "1", + "Input": "/:,?#[]{}|@! $&'()*+;=%<>\"^`\\" + }, + "expect": { + "error": "The value is: `%2F%3A%2C%3F%23%5B%5D%7B%7D%7C%40%21%20%24%26%27%28%29%2A%2B%3B%3D%25%3C%3E%22%5E%60%5C`" + } + }, + { + "documentation": "uriEncode with ASCII characters that should not be encoded returns the input", + "params": { + "TestCaseId": "1", + "Input": "0123456789.underscore_dash-Tilda~" + }, + "expect": { + "error": "The value is: `0123456789.underscore_dash-Tilda~`" + } + }, + { + "documentation": "uriEncode encodes unicode characters", + "params": { + "TestCaseId": "1", + "Input": "\ud83d\ude39" + }, + "expect": { + "error": "The value is: `%F0%9F%98%B9`" + } + }, + { + "documentation": "uriEncode on all printable ASCII characters", + "params": { + "TestCaseId": "1", + "Input": " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" + }, + "expect": { + "error": "The value is: `%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~`" + } + }, + { + "documentation": "uriEncode on an empty string", + "params": { + "TestCaseId": "1", + "Input": "" + }, + "expect": { + "error": "The value is: ``" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/valid-hostlabel.json b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/valid-hostlabel.json new file mode 100644 index 0000000000000000000000000000000000000000..82287b727b1c927cd24f54750a73cee70240eae6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/test-cases/valid-hostlabel.json @@ -0,0 +1,56 @@ +{ + "version": "1.0", + "testCases": [ + { + "documentation": "standard region is a valid hostlabel", + "params": { + "Region": "us-east-1" + }, + "expect": { + "endpoint": { + "url": "https://us-east-1.amazonaws.com" + } + } + }, + { + "documentation": "starting with a number is a valid hostlabel", + "params": { + "Region": "3aws4" + }, + "expect": { + "endpoint": { + "url": "https://3aws4.amazonaws.com" + } + } + }, + { + "documentation": "when there are dots, only match if subdomains are allowed", + "params": { + "Region": "part1.part2" + }, + "expect": { + "endpoint": { + "url": "https://part1.part2-subdomains.amazonaws.com" + } + } + }, + { + "documentation": "a space is never a valid hostlabel", + "params": { + "Region": "part1 part2" + }, + "expect": { + "error": "Invalid hostlabel" + } + }, + { + "documentation": "an empty string is not a valid hostlabel", + "params": { + "Region": "" + }, + "expect": { + "error": "Invalid hostlabel" + } + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/aws-region.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/aws-region.json new file mode 100644 index 0000000000000000000000000000000000000000..2bb8e7fa644aad936dd9f9eff5fa869909e90951 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/aws-region.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "documentation": "The region to dispatch this request, eg. `us-east-1`." + } + }, + "rules": [ + { + "documentation": "Template the region into the URI when region is set", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "endpoint": { + "url": "https://{Region}.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "{Region}" + } + ] + } + }, + "type": "endpoint" + }, + { + "documentation": "fallback when region is unset", + "conditions": [], + "error": "Region must be set to resolve a valid endpoint", + "type": "error" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/default-values.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/default-values.json new file mode 100644 index 0000000000000000000000000000000000000000..42c95b43c1ffa57e618300b72e0008972ebf81ae --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/default-values.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "documentation": "The region to dispatch this request, eg. `us-east-1`.", + "default": "us-west-5", + "required": true + }, + "UseFips": { + "type": "boolean", + "builtIn": "AWS::UseFIPS", + "default": true, + "required": true + } + }, + "rules": [ + { + "documentation": "Template the region into the URI when FIPS is enabled", + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFips" + }, + true + ] + } + ], + "endpoint": { + "url": "https://fips.{Region}.amazonaws.com" + }, + "type": "endpoint" + }, + { + "documentation": "error when fips is disabled", + "conditions": [], + "error": "UseFips = false", + "type": "error" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/deprecated-param.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/deprecated-param.json new file mode 100644 index 0000000000000000000000000000000000000000..52b312a00402750bf4b9f0a676b387df0e4716a4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/deprecated-param.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "required": false, + "deprecated": { + "message": "use blahdeblah region instead" + } + } + }, + "rules": [ + { + "documentation": "base rule", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "endpoint": { + "url": "https://{Region}.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "{Region}" + } + ] + } + }, + "type": "endpoint" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/eventbridge.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/eventbridge.json new file mode 100644 index 0000000000000000000000000000000000000000..81e684437d640d52853fee42c6a795527fc54b38 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/eventbridge.json @@ -0,0 +1,323 @@ +{ + "version": "1.3", + "parameters": { + "region": { + "type": "string", + "builtIn": "AWS::Region", + "required": true + }, + "useDualStackEndpoint": { + "type": "boolean", + "builtIn": "AWS::UseDualStack" + }, + "useFIPSEndpoint": { + "type": "boolean", + "builtIn": "AWS::UseFIPS" + }, + "endpointId": { + "type": "string" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "region" + } + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "endpointId" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "useFIPSEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "useFIPSEndpoint" + }, + true + ] + } + ], + "error": "FIPS endpoints not supported with multi-region endpoints", + "type": "error" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "useFIPSEndpoint" + } + ] + } + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "useDualStackEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "useDualStackEndpoint" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "events", + "signingRegionSet": [ + "*" + ] + } + ] + } + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "events", + "signingRegionSet": [ + "*" + ] + } + ] + } + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "region" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "useFIPSEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "useFIPSEndpoint" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "useDualStackEndpoint" + } + ] + } + ] + } + ], + "endpoint": { + "url": "https://events-fips.{region}.{partitionResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "events", + "signingRegionSet": [ + "*" + ] + } + ] + } + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "useDualStackEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "useDualStackEndpoint" + }, + true + ] + }, + { + "fn": "not", + "argv": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "useFIPSEndpoint" + } + ] + } + ] + } + ], + "endpoint": { + "url": "https://events.{region}.{partitionResult#dualStackDnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "events", + "signingRegionSet": [ + "*" + ] + } + ] + } + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "useDualStackEndpoint" + } + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "useFIPSEndpoint" + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "useDualStackEndpoint" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "useFIPSEndpoint" + }, + true + ] + } + ], + "endpoint": { + "url": "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4a", + "signingName": "events", + "signingRegionSet": [ + "*" + ] + } + ] + } + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://events.{region}.{partitionResult#dnsSuffix}" + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "{region} is not a valid HTTP host-label", + "type": "error" + } + ], + "type": "tree" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/fns.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/fns.json new file mode 100644 index 0000000000000000000000000000000000000000..526b101c7527a1d376c63435d8b31a9c72fa7e09 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/fns.json @@ -0,0 +1,128 @@ +{ + "documentation": "functions in more places", + "parameters": { + "Uri": { + "type": "string", + "documentation": "A URI to use" + }, + "Arn": { + "type": "string", + "documentation": "an ARN to extract fields from" + }, + "CustomError": { + "type": "string", + "documentation": "when set, a custom error message" + } + }, + "rules": [ + { + "documentation": "when URI is set, use it directly", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Uri" + } + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Arn" + } + ] + }, + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Arn" + } + ], + "assign": "parsedArn" + } + ], + "endpoint": { + "url": { + "ref": "Uri" + }, + "headers": { + "x-uri": [ + { + "ref": "Uri" + } + ], + "x-arn-region": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "parsedArn" + }, + "region" + ] + } + ] + } + }, + "type": "endpoint" + }, + { + "documentation": "A custom error", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "CustomError" + } + ] + } + ], + "type": "error", + "error": { + "ref": "CustomError" + } + }, + { + "type": "error", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Arn" + } + ] + }, + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Arn" + } + ], + "assign": "parsedArn" + } + ], + "error": { + "fn": "getAttr", + "argv": [ + { + "ref": "parsedArn" + }, + "partition" + ] + } + }, + { + "documentation": "fallback when nothing is set", + "conditions": [], + "error": "No fields were set", + "type": "error" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/get-attr-type-inference.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/get-attr-type-inference.json new file mode 100644 index 0000000000000000000000000000000000000000..cb631fc174a1102950a1adb170fb82c95f1744ea --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/get-attr-type-inference.json @@ -0,0 +1,46 @@ +{ + "version": "1.3", + "parameters": { + "Bucket": { + "type": "string" + } + }, + "rules": [ + { + "documentation": "bucket is set, handle bucket specific endpoints", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + }, + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "bucketArn" + }, + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[2]" + ], + "assign": "outpostId" + } + ], + "endpoint": { + "url": "https://{bucketArn#accountId}.{outpostId}.{bucketArn#region}" + }, + "type": "endpoint" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/headers.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/headers.json new file mode 100644 index 0000000000000000000000000000000000000000..6145f852c886d4265a18431782aa868aa762a2ad --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/headers.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "documentation": "The region to dispatch this request, eg. `us-east-1`." + } + }, + "rules": [ + { + "documentation": "Template the region into the URI when region is set", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "endpoint": { + "url": "https://{Region}.amazonaws.com", + "headers": { + "x-amz-region": [ + "{Region}" + ], + "x-amz-multi": [ + "*", + "{Region}" + ] + } + }, + "type": "endpoint" + }, + { + "documentation": "fallback when region is unset", + "conditions": [], + "error": "Region must be set to resolve a valid endpoint", + "type": "error" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/is-virtual-hostable-s3-bucket.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/is-virtual-hostable-s3-bucket.json new file mode 100644 index 0000000000000000000000000000000000000000..7ece9b5342a9caf98b9d69612213111adb1d928f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/is-virtual-hostable-s3-bucket.json @@ -0,0 +1,48 @@ +{ + "version": "1.3", + "parameters": { + "BucketName": { + "type": "string", + "required": true, + "documentation": "the input used to test isVirtualHostableS3Bucket" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + "{BucketName}", + false + ] + } + ], + "endpoint": { + "url": "https://{BucketName}.s3.amazonaws.com" + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "aws.isVirtualHostableS3Bucket", + "argv": [ + "{BucketName}", + true + ] + } + ], + "endpoint": { + "url": "http://{BucketName}.s3.amazonaws.com" + }, + "type": "endpoint" + }, + { + "conditions": [ + ], + "error": "not isVirtualHostableS3Bucket", + "type": "error" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/local-region-override.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/local-region-override.json new file mode 100644 index 0000000000000000000000000000000000000000..2100b4ec13bc1fd5828146c08e3b3717e8623564 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/local-region-override.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "required": true + } + }, + "rules": [ + { + "documentation": "override rule for the local pseduo region", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "local", + "{Region}" + ] + } + ], + "endpoint": { + "url": "http://localhost:8080" + }, + "type": "endpoint" + }, + { + "documentation": "base rule", + "conditions": [], + "endpoint": { + "url": "https://{Region}.someservice.amazonaws.com" + }, + "type": "endpoint" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/minimal-ruleset.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/minimal-ruleset.json new file mode 100644 index 0000000000000000000000000000000000000000..8c629f842309f0261316f43060b33c4134be813a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/minimal-ruleset.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "required": true + } + }, + "rules": [ + { + "documentation": "base rule", + "conditions": [], + "endpoint": { + "url": "https://{Region}.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "{Region}" + } + ] + } + }, + "type": "endpoint" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/parse-arn.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/parse-arn.json new file mode 100644 index 0000000000000000000000000000000000000000..27664e64e5179f96113d9951eac44be21bbb48a8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/parse-arn.json @@ -0,0 +1,251 @@ +{ + "version": "1.3", + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region" + }, + "Bucket": { + "type": "string" + }, + "TestCaseId": { + "type": "string" + } + }, + "rules": [ + { + "documentation": "tests of invalid arns", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "TestCaseId" + } + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "invalid-arn" + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.parseArn", + "argv": ["{Bucket}"] + } + ], + "type": "error", + "error": "A valid ARN was parsed but `{Bucket}` is not a valid ARN" + }, + { + "conditions": [], + "type": "error", + "error": "Test case passed: `{Bucket}` is not a valid ARN." + } + ] + }, + { + "documentation": "tests of valid arns", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "TestCaseId" + } + ] + }, + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + }, + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "valid-arn" + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.parseArn", + "argv": ["{Bucket}"], + "assign": "arn" + }, + { + "fn": "getAttr", + "argv": [{"ref": "arn"}, "resourceId[0]"], + "assign": "resource" + } + ], + "type": "error", + "error": "Test case passed: A valid ARN was parsed: service: `{arn#service}`, partition: `{arn#partition}, region: `{arn#region}`, accountId: `{arn#accountId}`, resource: `{resource}`" + }, + { + "conditions": [], + "type": "error", + "error": "Test case failed: `{Bucket}` is a valid ARN but parseArn failed to parse it." + } + ] + }, + { + "documentation": "region is set", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + }, + { + "fn": "aws.partition", + "argv": [ + "{Region}" + ], + "assign": "partitionResult" + } + ], + "rules": [ + { + "documentation": "bucket is set, handle bucket specific endpoints", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Bucket" + } + ] + } + ], + "rules": [ + { + "documentation": "bucket is set and is an arn", + "conditions": [ + { + "fn": "aws.parseArn", + "argv": [ + { + "ref": "Bucket" + } + ], + "assign": "bucketArn" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "bucketArn" + }, + "resourceId[1]" + ], + "assign": "outpostId" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{outpostId}", + "" + ] + } + ], + "error": "OutpostId was empty", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{outpostId}-{bucketArn#accountId}.{bucketArn#region}.{partitionResult#dnsSuffix}" + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid ARN: outpostId was not set", + "type": "error" + } + ], + "type": "tree" + }, + { + "documentation": "bucket can be used as a host label", + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + "{Bucket}", + false + ] + } + ], + "endpoint": { + "url": "https://{Bucket}.{Region}.amazonaws.com" + }, + "type": "endpoint" + }, + { + "conditions": [], + "documentation": "fallback: use bucket in the path", + "endpoint": { + "url": "https://{Region}.amazonaws.com/{Bucket}" + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "documentation": "region is set, bucket is not", + "conditions": [], + "endpoint": { + "url": "https://{Region}.{partitionResult#dnsSuffix}" + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "documentation": "fallback when region is unset", + "conditions": [], + "error": "Region must be set to resolve a valid endpoint", + "type": "error" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/parse-url.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/parse-url.json new file mode 100644 index 0000000000000000000000000000000000000000..7c6dc985deed81315b46c27c249eaa65bf068ac6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/parse-url.json @@ -0,0 +1,102 @@ +{ + "version": "1.3", + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region" + }, + "Endpoint": { + "type": "string" + } + }, + "rules": [ + { + "documentation": "endpoint is set and is a valid URL", + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + }, + { + "fn": "parseURL", + "argv": [ + "{Endpoint}" + ], + "assign": "url" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "url" + }, + "isIp" + ] + }, + true + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}{url#normalizedPath}is-ip-addr" + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{url#path}", + "/port" + ] + } + ], + "endpoint": { + "url": "{url#scheme}://{url#authority}/uri-with-port" + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{url#normalizedPath}", + "/" + ] + } + ], + "endpoint": { + "url": "https://{url#scheme}-{url#authority}-nopath.example.com" + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://{url#scheme}-{url#authority}.example.com/path-is{url#path}" + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "error": "endpoint was invalid", + "conditions": [], + "type": "error" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/partition-fn.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/partition-fn.json new file mode 100644 index 0000000000000000000000000000000000000000..79f94e53a65e8cf309fb464a5ef20efadbeff764 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/partition-fn.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "required": true + }, + "PropertyOne": { + "type": "boolean" + }, + "PropertyTwo": { + "type": "string" + }, + "PropertyThree": { + "type": "boolean" + } + }, + "rules": [ + { + "documentation": "base rule", + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartResult" + } + ], + "rules": [ + { + "documentation": "the AWS partition", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://aws-partition.{Region}.{PartResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "{Region}" + } + ], + "meta": { + "baseSuffix": "{PartResult#dnsSuffix}", + "dualStackSuffix": "{PartResult#dualStackDnsSuffix}" + } + } + }, + "type": "endpoint" + }, + { + "documentation": "the other partitions", + "conditions": [], + "endpoint": { + "url": "https://{PartResult#name}.{Region}.{PartResult#dnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "serviceName", + "signingRegion": "{Region}" + } + ], + "meta": { + "baseSuffix": "{PartResult#dnsSuffix}", + "dualStackSuffix": "{PartResult#dualStackDnsSuffix}" + } + } + }, + "type": "endpoint" + }, + { + "conditions": [], + "error": "no rules matched", + "type": "error" + } + ], + "type": "tree" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/substring.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/substring.json new file mode 100644 index 0000000000000000000000000000000000000000..4342d0501faf410c76dc6d4ba78d6f9c2a031a96 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/substring.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "TestCaseId": { + "type": "string", + "required": true, + "documentation": "Test case id used to select the test case to use" + }, + "Input": { + "type": "string", + "required": true, + "documentation": "the input used to test substring" + } + }, + "rules": [ + { + "documentation": "Substring from beginning of input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "1" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 0, + 4, + false + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "Substring from end of input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "2" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 0, + 4, + true + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "Substring the middle of the string", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "3" + ] + }, + { + "fn": "substring", + "argv": [ + "{Input}", + 1, + 3, + false + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "fallback when no tests match", + "conditions": [], + "error": "No tests matched", + "type": "error" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/uri-encode.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/uri-encode.json new file mode 100644 index 0000000000000000000000000000000000000000..7c2f62fac1f1883e8644eab9043aa2e426dae42f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/uri-encode.json @@ -0,0 +1,44 @@ +{ + "version": "1.3", + "parameters": { + "TestCaseId": { + "type": "string", + "required": true, + "documentation": "Test case id used to select the test case to use" + }, + "Input": { + "type": "string", + "required": true, + "documentation": "the input used to test uriEncode" + } + }, + "rules": [ + { + "documentation": "uriEncode on input", + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "{TestCaseId}", + "1" + ] + }, + { + "fn": "uriEncode", + "argv": [ + "{Input}" + ], + "assign": "output" + } + ], + "error": "The value is: `{output}`", + "type": "error" + }, + { + "documentation": "fallback when no tests match", + "conditions": [], + "error": "No tests matched", + "type": "error" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/valid-hostlabel.json b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/valid-hostlabel.json new file mode 100644 index 0000000000000000000000000000000000000000..d62e25af3ac8e094b478467adaa79b8d90011e2d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/endpoints/valid-rules/valid-hostlabel.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "Region": { + "type": "string", + "builtIn": "AWS::Region", + "required": true, + "documentation": "The region to dispatch this request, eg. `us-east-1`." + } + }, + "rules": [ + { + "documentation": "Template the region into the URI when region is set", + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + false + ] + } + ], + "endpoint": { + "url": "https://{Region}.amazonaws.com" + }, + "type": "endpoint" + }, + { + "documentation": "Template the region into the URI when region is set", + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "ref": "Region" + }, + true + ] + } + ], + "endpoint": { + "url": "https://{Region}-subdomains.amazonaws.com" + }, + "type": "endpoint" + }, + { + "documentation": "Region was not a valid host label", + "conditions": [], + "error": "Invalid hostlabel", + "type": "error" + } + ], + "version": "1.3" +} diff --git a/testbed/boto__botocore/tests/unit/data/foo.json b/testbed/boto__botocore/tests/unit/data/foo.json new file mode 100644 index 0000000000000000000000000000000000000000..99bff57d8e0c8e04540ece8ce3e1e793c861249f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/foo.json @@ -0,0 +1,6 @@ +{ + "test_key_1": "test_value_1", + "test_key_2": ["test_value_2_1", "test_value_2_2"], + "test_key_3": [{"name": "test_list_1", "value": "test_list_value_1"}, + {"name": "test_list_2", "value":"test_list_value_2"}] + } diff --git a/testbed/boto__botocore/tests/unit/data/non_ascii.json b/testbed/boto__botocore/tests/unit/data/non_ascii.json new file mode 100644 index 0000000000000000000000000000000000000000..174897f343004eca3b8540b21e09eebd6b34e67a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/non_ascii.json @@ -0,0 +1,11 @@ +{ + "Note": "The following special characters show up in doc occasionally", + + "dash_in_ascii": "-", + "dash_0x93": "–", + "dash_0x94": "—", + + "quotation_mark_0x9d": "”", + + "normal": "ascii" +} diff --git a/testbed/boto__botocore/tests/unit/data/someservice/2012-10-01.normal.json b/testbed/boto__botocore/tests/unit/data/someservice/2012-10-01.normal.json new file mode 100644 index 0000000000000000000000000000000000000000..285bd63a8dc279de2fa24e248450259fa3a6829d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/someservice/2012-10-01.normal.json @@ -0,0 +1,4 @@ +{ + "api_version": "2012-10-01", + "something-else": "another" +} diff --git a/testbed/boto__botocore/tests/unit/data/someservice/2013-08-21.normal.json b/testbed/boto__botocore/tests/unit/data/someservice/2013-08-21.normal.json new file mode 100644 index 0000000000000000000000000000000000000000..1e1ff83f8e50646bdfdad298c9c5ab7b3409a01a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/someservice/2013-08-21.normal.json @@ -0,0 +1,4 @@ +{ + "api_version": "2013-08-21", + "something-else": "whatever" +} diff --git a/testbed/boto__botocore/tests/unit/data/sub/fie.normal.json b/testbed/boto__botocore/tests/unit/data/sub/fie.normal.json new file mode 100644 index 0000000000000000000000000000000000000000..fa548b3cc5fbf72bfd0769c608ec78aefec169c5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data/sub/fie.normal.json @@ -0,0 +1,3 @@ +{ + "test_key_1": "test_value_1" +} diff --git a/testbed/boto__botocore/tests/unit/data_overrides/someservice/2012-10-01.json b/testbed/boto__botocore/tests/unit/data_overrides/someservice/2012-10-01.json new file mode 100644 index 0000000000000000000000000000000000000000..ecea8dd8c03c0f424a526942b133752ae2d5dd6b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/data_overrides/someservice/2012-10-01.json @@ -0,0 +1,4 @@ +{ + "Purpose": "Prove that files that come first in the path 'win', overwriting values later in the path.", + "api_version": "2013-09-06" +} diff --git a/testbed/boto__botocore/tests/unit/docs/__init__.py b/testbed/boto__botocore/tests/unit/docs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0f51a852d219b9ead74df845732453da42f65f5e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/__init__.py @@ -0,0 +1,267 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import json +import os +import shutil +import tempfile + +from botocore.client import ClientCreator +from botocore.compat import OrderedDict +from botocore.configprovider import ConfigValueStore +from botocore.docs.bcdoc.restdoc import DocumentStructure +from botocore.hooks import HierarchicalEmitter +from botocore.loaders import Loader +from botocore.model import OperationModel, ServiceModel +from tests import mock, unittest + + +class BaseDocsTest(unittest.TestCase): + def setUp(self): + self.root_dir = tempfile.mkdtemp() + self.version_dirs = os.path.join( + self.root_dir, 'myservice', '2014-01-01' + ) + os.makedirs(self.version_dirs) + self.model_file = os.path.join(self.version_dirs, 'service-2.json') + self.waiter_model_file = os.path.join( + self.version_dirs, 'waiters-2.json' + ) + self.paginator_model_file = os.path.join( + self.version_dirs, 'paginators-1.json' + ) + self.example_model_file = os.path.join( + self.version_dirs, 'examples-1.json' + ) + self.docs_root_dir = tempfile.mkdtemp() + self.root_services_path = os.path.join( + self.docs_root_dir, 'reference', 'services' + ) + + self.json_model = {} + self.nested_json_model = {} + self._setup_models() + self.build_models() + self.events = HierarchicalEmitter() + self.setup_client() + self.doc_name = 'MyDoc' + self.doc_structure = DocumentStructure(self.doc_name, target='html') + + def tearDown(self): + shutil.rmtree(self.root_dir) + shutil.rmtree(self.docs_root_dir) + + def setup_client(self): + with open(self.example_model_file, 'w') as f: + json.dump(self.example_json_model, f) + + with open(self.waiter_model_file, 'w') as f: + json.dump(self.waiter_json_model, f) + + with open(self.paginator_model_file, 'w') as f: + json.dump(self.paginator_json_model, f) + + with open(self.model_file, 'w') as f: + json.dump(self.json_model, f) + + myservice_endpoint_rule_set = { + "version": "1.3", + "parameters": {}, + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://example.com", + "properties": {}, + "headers": {}, + }, + "type": "endpoint", + } + ], + } + + def load_service_mock(*args, **kwargs): + if args[1] == "endpoint-rule-set-1": + return myservice_endpoint_rule_set + else: + return Loader( + extra_search_paths=[self.root_dir] + ).load_service_model(*args, **kwargs) + + self.loader = Loader(extra_search_paths=[self.root_dir]) + self.loader.load_service_model = mock.Mock() + self.loader.load_service_model.side_effect = load_service_mock + + endpoint_resolver = mock.Mock() + endpoint_resolver.construct_endpoint.return_value = { + 'hostname': 'foo.us-east-1', + 'partition': 'aws', + 'endpointName': 'us-east-1', + 'signatureVersions': ['v4'], + } + + self.creator = ClientCreator( + loader=self.loader, + endpoint_resolver=endpoint_resolver, + user_agent='user-agent', + event_emitter=self.events, + retry_handler_factory=mock.Mock(), + retry_config_translator=mock.Mock(), + exceptions_factory=mock.Mock(), + config_store=ConfigValueStore(), + ) + + self.client = self.creator.create_client('myservice', 'us-east-1') + + def _setup_models(self): + self.json_model = { + 'metadata': { + 'apiVersion': '2014-01-01', + 'endpointPrefix': 'myservice', + 'signatureVersion': 'v4', + 'serviceFullName': 'AWS MyService', + 'uid': 'myservice-2014-01-01', + 'protocol': 'query', + 'serviceId': 'MyService', + }, + 'operations': { + 'SampleOperation': { + 'name': 'SampleOperation', + 'input': {'shape': 'SampleOperationInputOutput'}, + 'output': {'shape': 'SampleOperationInputOutput'}, + } + }, + 'shapes': { + 'SampleOperationInputOutput': { + 'type': 'structure', + 'members': OrderedDict(), + }, + 'String': {'type': 'string'}, + }, + 'documentation': 'AWS MyService Description', + } + + self.waiter_json_model = { + "version": 2, + "waiters": { + "SampleOperationComplete": { + "delay": 15, + "operation": "SampleOperation", + "maxAttempts": 40, + "acceptors": [ + { + "expected": "complete", + "matcher": "pathAll", + "state": "success", + "argument": "Biz", + }, + { + "expected": "failed", + "matcher": "pathAny", + "state": "failure", + "argument": "Biz", + }, + ], + } + }, + } + + self.paginator_json_model = { + "pagination": { + "SampleOperation": { + "input_token": "NextResult", + "output_token": "NextResult", + "limit_key": "MaxResults", + "result_key": "Biz", + } + } + } + + self.example_json_model = { + "version": 1, + "examples": { + "SampleOperation": [ + { + "id": "sample-id", + "title": "sample-title", + "description": "Sample Description.", + "input": OrderedDict( + [ + ("Biz", "foo"), + ] + ), + "comments": { + "input": {"Biz": "bar"}, + }, + } + ] + }, + } + + def get_nested_service_contents(self, service, type, name): + service_file_path = os.path.join( + self.root_services_path, service, type, f'{name}.rst' + ) + with open(service_file_path, 'rb') as f: + return f.read().decode('utf-8') + + def build_models(self): + self.service_model = ServiceModel(self.json_model) + self.operation_model = OperationModel( + self.json_model['operations']['SampleOperation'], + self.service_model, + ) + + def add_shape(self, shape): + shape_name = list(shape.keys())[0] + self.json_model['shapes'][shape_name] = shape[shape_name] + + def add_shape_to_params( + self, param_name, shape_name, documentation=None, is_required=False + ): + params_shape = self.json_model['shapes']['SampleOperationInputOutput'] + member = {'shape': shape_name} + if documentation is not None: + member['documentation'] = documentation + params_shape['members'][param_name] = member + + if is_required: + required_list = params_shape.get('required', []) + required_list.append(param_name) + params_shape['required'] = required_list + + def add_shape_to_errors(self, shape_name): + operation = self.json_model['operations']['SampleOperation'] + errors = operation.get('errors', []) + errors.append({'shape': shape_name}) + operation['errors'] = errors + + def assert_contains_line(self, line): + contents = self.doc_structure.flush_structure().decode('utf-8') + self.assertIn(line, contents) + + def assert_contains_lines_in_order(self, lines, contents=None): + if contents is None: + contents = self.doc_structure.flush_structure().decode('utf-8') + for line in lines: + self.assertIn(line, contents) + beginning = contents.find(line) + contents = contents[(beginning + len(line)) :] + + def assert_not_contains_line(self, line): + contents = self.doc_structure.flush_structure().decode('utf-8') + self.assertNotIn(line, contents) + + def assert_not_contains_lines(self, lines): + contents = self.doc_structure.flush_structure().decode('utf-8') + for line in lines: + self.assertNotIn(line, contents) diff --git a/testbed/boto__botocore/tests/unit/docs/bcdoc/__init__.py b/testbed/boto__botocore/tests/unit/docs/bcdoc/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a4018327e46fc5849f6ecf7411183a0c1921c449 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/bcdoc/__init__.py @@ -0,0 +1,12 @@ +# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. diff --git a/testbed/boto__botocore/tests/unit/docs/bcdoc/test_docstringparser.py b/testbed/boto__botocore/tests/unit/docs/bcdoc/test_docstringparser.py new file mode 100644 index 0000000000000000000000000000000000000000..94b1d98350be2bbadfc7f984639ac05509d74ee1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/bcdoc/test_docstringparser.py @@ -0,0 +1,362 @@ +# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# 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, dis- +# tribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the fol- +# lowing conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- +# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +# SHALL THE AUTHOR 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. +import pytest + +import botocore.docs.bcdoc.docstringparser as parser +from botocore.docs.bcdoc.restdoc import ReSTDocument +from tests import mock, unittest + + +class TestDocStringParser(unittest.TestCase): + def parse(self, html): + docstring_parser = parser.DocStringParser(ReSTDocument()) + docstring_parser.feed(html) + docstring_parser.close() + return docstring_parser.doc.getvalue() + + def assert_contains_exact_lines_in_order(self, actual, expected): + # Get each line and filter out empty lines + contents = actual.split(b'\n') + contents = [line for line in contents if line and not line.isspace()] + + for line in expected: + self.assertIn(line, contents) + beginning = contents.index(line) + contents = contents[beginning:] + + def test_tag_with_collapsible_spaces(self): + html = "

a bcd efg

" + result = self.parse(html) + self.assert_contains_exact_lines_in_order(result, [b'a bcd efg']) + + def test_nested_lists(self): + html = "
  • Wello
    • Horld
" + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, [b'* Wello', b' * Horld'] + ) + + def test_nested_lists_with_extra_white_space(self): + html = "
  • Wello
    • Horld
" + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, [b'* Wello', b' * Horld'] + ) + + def test_link_with_no_period(self): + html = "

This is a test Link

" + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, [b'This is a test `Link `__'] + ) + + def test_link_with_period(self): + html = "

This is a test Link.

" + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, [b'This is a test `Link `__.'] + ) + + def test_code_with_empty_link(self): + html = "

Foo Link

" + result = self.parse(html) + self.assert_contains_exact_lines_in_order(result, [b'Foo ``Link``']) + + def test_code_with_link_spaces(self): + html = "

Foo Link

" + result = self.parse(html) + self.assert_contains_exact_lines_in_order(result, [b'Foo ``Link``']) + + def test_code_with_link_no_spaces(self): + html = "

Foo Link

" + result = self.parse(html) + self.assert_contains_exact_lines_in_order(result, [b'Foo ``Link``']) + + def test_href_with_spaces(self): + html = "

Link

" + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, [b' `Link `__'] + ) + + def test_bold_with_nested_formatting(self): + html = "TesttestLink" + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, [b'``Test``test `Link `__'] + ) + + def test_link_with_nested_formatting(self): + html = "Test" + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, [b'`Test `__'] + ) + + def test_indentation_with_spaces_between_tags(self): + # Leading spaces inserted as padding between HTML tags can lead to + # unexpected indentation in RST. For example, consider the space between + # ``

`` and ```` in the third line of this example: + html = ( + "

First paragraph

" + "

Second paragraph in note

" + "

Bold statement: Third paragraph

" + "

Last paragraph

" + ) + # If kept, it will appear as indentation in RST and have the effect of + # pulling the third paragraph into the note: + # + # ``` + # First paragraph + # + # ..note:: + # Second paragraph in note <-- intentionally indented + # + # **Bold statement:** Third paragraph <-- unintentionally indented + # + # Last paragraph <-- first non-indented paragraph after note + # ``` + result = self.parse(html) + self.assert_contains_exact_lines_in_order( + result, + # ↓ no whitespace here + [b'**Bold statement:** Third paragraph'], + ) + + +class TestHTMLTree(unittest.TestCase): + def setUp(self): + self.style = mock.Mock() + self.doc = mock.Mock() + self.doc.style = self.style + self.tree = parser.HTMLTree(self.doc) + + def test_add_tag(self): + self.tree.add_tag('foo') + self.assertIsInstance(self.tree.current_node, parser.TagNode) + self.assertEqual(self.tree.current_node.tag, 'foo') + + def test_add_unsupported_tag(self): + del self.style.start_foo + del self.style.end_foo + self.tree.add_tag('foo') + self.assertIn('foo', self.tree.unhandled_tags) + + def test_add_data(self): + self.tree.add_data('foo') + self.assertNotIsInstance(self.tree.current_node, parser.DataNode) + node = self.tree.head.children[0] + self.assertIsInstance(node, parser.DataNode) + self.assertEqual(node.data, 'foo') + + +class TestStemNode(unittest.TestCase): + def setUp(self): + self.style = mock.Mock() + self.doc = mock.Mock() + self.doc.style = self.style + self.node = parser.StemNode() + + def test_add_child(self): + child = parser.StemNode() + self.node.add_child(child) + self.assertIn(child, self.node.children) + self.assertEqual(child.parent, self.node) + + def test_write(self): + self.node.add_child(mock.Mock()) + self.node.add_child(mock.Mock()) + + self.node.write(mock.Mock()) + for child in self.node.children: + self.assertTrue(child.write.called) + + +class TestTagNode(unittest.TestCase): + def setUp(self): + self.style = mock.Mock() + self.doc = mock.Mock() + self.doc.style = self.style + self.tag = 'foo' + self.node = parser.TagNode(self.tag) + + def test_write_calls_style(self): + self.node.write(self.doc) + self.assertTrue(self.style.start_foo.called) + self.assertTrue(self.style.end_foo.called) + + def test_write_unsupported_tag(self): + del self.style.start_foo + del self.style.end_foo + + try: + self.node.write(self.doc) + except AttributeError as e: + self.fail(str(e)) + + +class TestDataNode(unittest.TestCase): + def setUp(self): + self.style = mock.Mock() + self.doc = mock.Mock() + self.doc.style = self.style + self.doc.translate_words.return_value = [] + + def test_string_data(self): + node = parser.DataNode('foo') + self.assertEqual(node.data, 'foo') + + def test_non_string_data_raises_error(self): + with self.assertRaises(ValueError): + parser.DataNode(5) + + def test_lstrip(self): + node = parser.DataNode(' foo') + node.lstrip() + self.assertEqual(node.data, 'foo') + + def test_write(self): + node = parser.DataNode('foo bar baz') + self.doc.translate_words.return_value = ['foo', 'bar', 'baz'] + node.write(self.doc) + self.doc.handle_data.assert_called_once_with('foo bar baz') + + def test_write_empty_string(self): + node = parser.DataNode('') + node.write(self.doc) + self.assertFalse(self.doc.handle_data.called) + + +@pytest.mark.parametrize( + 'data, lstrip, rstrip, both', + [ + ('foo', 'foo', 'foo', 'foo'), + (' foo', 'foo', ' foo', 'foo'), + (' foo', 'foo', ' foo', 'foo'), + ('\tfoo', 'foo', '\tfoo', 'foo'), + ('\t \t foo', 'foo', '\t \t foo', 'foo'), + ('foo ', 'foo ', 'foo', 'foo'), + ('foo ', 'foo ', 'foo', 'foo'), + ('foo\t\t', 'foo\t\t', 'foo', 'foo'), + ], +) +def test_datanode_stripping(data, lstrip, rstrip, both): + doc = mock.Mock() + doc.style = mock.Mock() + doc.translate_words.side_effect = lambda words: words + + node = parser.DataNode(data) + node.lstrip() + node.write(doc) + doc.handle_data.assert_called_once_with(lstrip) + doc.handle_data.reset_mock() + + node = parser.DataNode(data) + node.rstrip() + node.write(doc) + doc.handle_data.assert_called_once_with(rstrip) + doc.handle_data.reset_mock() + + node = parser.DataNode(data) + node.lstrip() + node.rstrip() + node.write(doc) + doc.handle_data.assert_called_once_with(both) + + +@pytest.mark.parametrize( + 'data', + [ + (' '), + (' '), + ('\t'), + ('\t \t '), + ], +) +def test_datanode_stripping_empty_string(data): + doc = mock.Mock() + doc.style = mock.Mock() + doc.translate_words.side_effect = lambda words: words + node = parser.DataNode(data) + node.lstrip() + node.write(doc) + doc.handle_data.assert_not_called() + + +@pytest.mark.parametrize( + 'html, expected_lines', + [ + ('

foo

', [b'foo']), + ('

\tfoo

', [b'foo']), + ('

foo

', [b'foo']), + ('

foo

', [b'foo']), + ('

foo\t

', [b'foo']), + ('

foo

', [b'foo']), + ('

foo

', [b'foo']), + ('

foo

', [b'foo']), + ('

foo

', [b'foo']), + ('

foo

', [b'foo']), + # various nested markup examples + ('italic', [b'*italic*']), + ('

italic

', [b'*italic*']), + ('

italic

', [b'*italic*']), + ('

italic

', [b'*italic*']), + ('

foo italic bar

', [b'foo *italic* bar']), + ('

foo bar

', [b'foo *bar*']), + ('

foo bar

', [b'foo* bar*']), + ('

foo bar

', [b'foo *bar*']), + # links + ('foo bar', [b'`foo `__ *bar*']), + # ReST does not support link text starting with whitespace + ('

abc foo

', [b'abc `foo `__']), + ('

abc foo bar

', [b'abc `foo `__ bar']), + # code-in-a removed and whitespace removed + (' foo bar', [b'`foo `__ bar']), + # list items + ('
  • foo
  • ', [b'* foo']), + ('
  • foo
  • ', [b'* foo']), + ('
  • foo
  • ', [b'* foo']), + ('
  • foo bar
  • ', [b'* foo bar']), + ('
  • foo bar
  • ', [b'* foo bar']), + ('
  • foo bar
  • ', [b'* foo bar']), + # multiple block tags in sequence are each left and right stripped + ('

    foo

    bar\t

    ', [b'foo', b'bar']), + ('

    foo

  • bar
  • ', [b'foo', b'* bar']), + # nested block tags also work + ( + '

    foo

    bar

    ', + [b'foo', b'bar'], + ), + ], +) +def test_whitespace_collapsing(html, expected_lines): + docstring_parser = parser.DocStringParser(ReSTDocument()) + docstring_parser.feed(html) + docstring_parser.close() + actual = docstring_parser.doc.getvalue() + + # Get each line and filter out empty lines + contents = actual.split(b'\n') + contents = [line for line in contents if line and not line.isspace()] + for line in expected_lines: + assert line in contents + beginning = contents.index(line) + contents = contents[beginning:] diff --git a/testbed/boto__botocore/tests/unit/docs/bcdoc/test_document.py b/testbed/boto__botocore/tests/unit/docs/bcdoc/test_document.py new file mode 100644 index 0000000000000000000000000000000000000000..10a8d065defa0efe5a91b6a1ca35224819859c7f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/bcdoc/test_document.py @@ -0,0 +1,158 @@ +# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ +# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# 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, dis- +# tribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the fol- +# lowing conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- +# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +# SHALL THE AUTHOR 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. +# +from botocore.docs.bcdoc.restdoc import DocumentStructure, ReSTDocument +from tests import unittest + + +class TestReSTDocument(unittest.TestCase): + def test_write(self): + doc = ReSTDocument() + doc.write('foo') + self.assertEqual(doc.getvalue(), b'foo') + + def test_writeln(self): + doc = ReSTDocument() + doc.writeln('foo') + self.assertEqual(doc.getvalue(), b'foo\n') + + def test_include_doc_string(self): + doc = ReSTDocument() + doc.include_doc_string('

    this is a test

    ') + self.assertEqual(doc.getvalue(), b'\n\nthis is a ``test``\n\n') + + def test_remove_doc_string(self): + doc = ReSTDocument() + doc.writeln('foo') + doc.include_doc_string('

    this is a test

    ') + doc.remove_last_doc_string() + self.assertEqual(doc.getvalue(), b'foo\n') + + def test_add_links(self): + doc = ReSTDocument() + doc.hrefs['foo'] = 'https://example.com/' + self.assertEqual( + doc.getvalue(), b'\n\n.. _foo: https://example.com/\n' + ) + + +class TestDocumentStructure(unittest.TestCase): + def setUp(self): + self.name = 'mydoc' + self.doc_structure = DocumentStructure(self.name) + + def test_name(self): + self.assertEqual(self.doc_structure.name, self.name) + + def test_path(self): + self.assertEqual(self.doc_structure.path, [self.name]) + self.doc_structure.path = ['foo'] + self.assertEqual(self.doc_structure.path, ['foo']) + + def test_add_new_section(self): + section = self.doc_structure.add_new_section('mysection') + + # Ensure the name of the section is correct + self.assertEqual(section.name, 'mysection') + + # Ensure we can get the section. + self.assertEqual(self.doc_structure.get_section('mysection'), section) + + # Ensure the path is correct + self.assertEqual(section.path, ['mydoc', 'mysection']) + + # Ensure some of the necessary attributes are passed to the + # the section. + self.assertEqual( + section.style.indentation, self.doc_structure.style.indentation + ) + self.assertEqual( + section.translation_map, self.doc_structure.translation_map + ) + self.assertEqual(section.hrefs, self.doc_structure.hrefs) + + def test_delete_section(self): + section = self.doc_structure.add_new_section('mysection') + self.assertEqual(self.doc_structure.get_section('mysection'), section) + self.doc_structure.delete_section('mysection') + with self.assertRaises(KeyError): + section.get_section('mysection') + + def test_create_sections_at_instantiation(self): + sections = ['intro', 'middle', 'end'] + self.doc_structure = DocumentStructure( + self.name, section_names=sections + ) + # Ensure the sections are attached to the new document structure. + for section_name in sections: + section = self.doc_structure.get_section(section_name) + self.assertEqual(section.name, section_name) + + def test_flush_structure(self): + section = self.doc_structure.add_new_section('mysection') + subsection = section.add_new_section('mysubsection') + self.doc_structure.writeln('1') + section.writeln('2') + subsection.writeln('3') + second_section = self.doc_structure.add_new_section('mysection2') + second_section.writeln('4') + contents = self.doc_structure.flush_structure() + + # Ensure the contents were flushed out correctly + self.assertEqual(contents, b'1\n2\n3\n4\n') + + def test_flush_structure_hrefs(self): + section = self.doc_structure.add_new_section('mysection') + section.writeln('section contents') + self.doc_structure.hrefs['foo'] = 'www.foo.com' + section.hrefs['bar'] = 'www.bar.com' + contents = self.doc_structure.flush_structure() + self.assertIn(b'.. _foo: www.foo.com', contents) + self.assertIn(b'.. _bar: www.bar.com', contents) + + def test_available_sections(self): + self.doc_structure.add_new_section('mysection') + self.doc_structure.add_new_section('mysection2') + self.assertEqual( + self.doc_structure.available_sections, ['mysection', 'mysection2'] + ) + + def test_context(self): + context = {'Foo': 'Bar'} + section = self.doc_structure.add_new_section( + 'mysection', context=context + ) + self.assertEqual(section.context, context) + + # Make sure if context is not specified it is empty. + section = self.doc_structure.add_new_section('mysection2') + self.assertEqual(section.context, {}) + + def test_remove_all_sections(self): + self.doc_structure.add_new_section('mysection2') + self.doc_structure.remove_all_sections() + self.assertEqual(self.doc_structure.available_sections, []) + + def test_clear_text(self): + self.doc_structure.write('Foo') + self.doc_structure.clear_text() + self.assertEqual(self.doc_structure.flush_structure(), b'') diff --git a/testbed/boto__botocore/tests/unit/docs/bcdoc/test_style.py b/testbed/boto__botocore/tests/unit/docs/bcdoc/test_style.py new file mode 100644 index 0000000000000000000000000000000000000000..05bf179f563c4dfdc7ab83401fe70818375088ef --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/bcdoc/test_style.py @@ -0,0 +1,363 @@ +# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ +# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# 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, dis- +# tribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the fol- +# lowing conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- +# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +# SHALL THE AUTHOR 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. +# +from botocore.docs.bcdoc.restdoc import ReSTDocument +from botocore.docs.bcdoc.style import ReSTStyle +from tests import unittest + + +class TestStyle(unittest.TestCase): + def test_spaces(self): + style = ReSTStyle(None, 4) + self.assertEqual(style.spaces(), '') + style.indent() + self.assertEqual(style.spaces(), ' ') + style.indent() + self.assertEqual(style.spaces(), ' ') + style.dedent() + self.assertEqual(style.spaces(), ' ') + style.dedent() + self.assertEqual(style.spaces(), '') + style.dedent() + self.assertEqual(style.spaces(), '') + + def test_bold(self): + style = ReSTStyle(ReSTDocument()) + style.bold('foobar') + self.assertEqual(style.doc.getvalue(), b'**foobar**') + + def test_empty_bold(self): + style = ReSTStyle(ReSTDocument()) + style.start_b() + style.end_b() + self.assertEqual(style.doc.getvalue(), b'') + + def test_italics(self): + style = ReSTStyle(ReSTDocument()) + style.italics('foobar') + self.assertEqual(style.doc.getvalue(), b'*foobar*') + + def test_empty_italics(self): + style = ReSTStyle(ReSTDocument()) + style.start_i() + style.end_i() + self.assertEqual(style.doc.getvalue(), b'') + + def test_p(self): + style = ReSTStyle(ReSTDocument()) + style.start_p() + style.doc.write('foo') + style.end_p() + self.assertEqual(style.doc.getvalue(), b'\n\nfoo\n\n') + + def test_code(self): + style = ReSTStyle(ReSTDocument()) + style.code('foobar') + self.assertEqual(style.doc.getvalue(), b'``foobar``') + + def test_empty_code(self): + style = ReSTStyle(ReSTDocument()) + style.start_code() + style.end_code() + self.assertEqual(style.doc.getvalue(), b'') + + def test_h1(self): + style = ReSTStyle(ReSTDocument()) + style.h1('foobar fiebaz') + self.assertEqual( + style.doc.getvalue(), + b'\n\n*************\nfoobar fiebaz\n*************\n\n', + ) + + def test_h2(self): + style = ReSTStyle(ReSTDocument()) + style.h2('foobar fiebaz') + self.assertEqual( + style.doc.getvalue(), + b'\n\n=============\nfoobar fiebaz\n=============\n\n', + ) + + def test_h3(self): + style = ReSTStyle(ReSTDocument()) + style.h3('foobar fiebaz') + self.assertEqual( + style.doc.getvalue(), + b'\n\n-------------\nfoobar fiebaz\n-------------\n\n', + ) + + def test_ref(self): + style = ReSTStyle(ReSTDocument()) + style.ref('foobar', 'http://foo.bar.com') + self.assertEqual( + style.doc.getvalue(), b':doc:`foobar `' + ) + + def test_examples(self): + style = ReSTStyle(ReSTDocument()) + self.assertTrue(style.doc.keep_data) + style.start_examples() + self.assertFalse(style.doc.keep_data) + style.end_examples() + self.assertTrue(style.doc.keep_data) + + def test_codeblock(self): + style = ReSTStyle(ReSTDocument()) + style.codeblock('foobar') + self.assertEqual(style.doc.getvalue(), b'::\n\n foobar\n\n\n') + + def test_important(self): + style = ReSTStyle(ReSTDocument()) + style.start_important() + style.end_important() + self.assertEqual(style.doc.getvalue(), b'\n\n.. warning::\n\n \n\n') + + def test_note(self): + style = ReSTStyle(ReSTDocument()) + style.start_note() + style.end_note() + self.assertEqual(style.doc.getvalue(), b'\n\n.. note::\n\n \n\n') + + def test_danger(self): + style = ReSTStyle(ReSTDocument()) + style.start_danger() + style.end_danger() + self.assertEqual(style.doc.getvalue(), b'\n\n.. danger::\n\n \n\n') + + def test_toctree_html(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'html' + style.toctree() + style.tocitem('foo') + style.tocitem('bar') + self.assertEqual( + style.doc.getvalue(), + ( + b'\n.. toctree::\n :maxdepth: 1' + b'\n :titlesonly:\n\n foo\n bar\n' + ), + ) + + def test_toctree_man(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'man' + style.toctree() + style.tocitem('foo') + style.tocitem('bar') + self.assertEqual(style.doc.getvalue(), b'\n\n\n* foo\n\n\n* bar\n\n') + + def test_hidden_toctree_html(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'html' + style.hidden_toctree() + style.hidden_tocitem('foo') + style.hidden_tocitem('bar') + self.assertEqual( + style.doc.getvalue(), + ( + b'\n.. toctree::\n :maxdepth: 1' + b'\n :hidden:\n\n foo\n bar\n' + ), + ) + + def test_hidden_toctree_non_html(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'man' + style.hidden_toctree() + style.hidden_tocitem('foo') + style.hidden_tocitem('bar') + self.assertEqual(style.doc.getvalue(), b'') + + def test_href_link(self): + style = ReSTStyle(ReSTDocument()) + style.start_a(attrs=[('href', 'http://example.org')]) + style.doc.write('example') + style.end_a() + self.assertEqual( + style.doc.getvalue(), b'`example `__' + ) + + def test_escape_href_link(self): + style = ReSTStyle(ReSTDocument()) + style.start_a(attrs=[('href', 'http://example.org')]) + style.doc.write('foo: the next bar') + style.end_a() + self.assertEqual( + style.doc.getvalue(), + b'`foo\\: the next bar `__', + ) + + def test_handle_no_text_hrefs(self): + style = ReSTStyle(ReSTDocument()) + style.start_a(attrs=[('href', 'http://example.org')]) + style.end_a() + self.assertEqual(style.doc.getvalue(), b'``__') + + def test_sphinx_reference_label_html(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'html' + style.sphinx_reference_label('foo', 'bar') + self.assertEqual(style.doc.getvalue(), b':ref:`bar `') + + def test_sphinx_reference_label_html_no_text(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'html' + style.sphinx_reference_label('foo') + self.assertEqual(style.doc.getvalue(), b':ref:`foo `') + + def test_sphinx_reference_label_non_html(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'man' + style.sphinx_reference_label('foo', 'bar') + self.assertEqual(style.doc.getvalue(), b'bar') + + def test_sphinx_reference_label_non_html_no_text(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'man' + style.sphinx_reference_label('foo') + self.assertEqual(style.doc.getvalue(), b'foo') + + def test_table_of_contents(self): + style = ReSTStyle(ReSTDocument()) + style.table_of_contents() + self.assertEqual(style.doc.getvalue(), b'.. contents:: ') + + def test_table_of_contents_with_title(self): + style = ReSTStyle(ReSTDocument()) + style.table_of_contents(title='Foo') + self.assertEqual(style.doc.getvalue(), b'.. contents:: Foo\n') + + def test_table_of_contents_with_title_and_depth(self): + style = ReSTStyle(ReSTDocument()) + style.table_of_contents(title='Foo', depth=2) + self.assertEqual( + style.doc.getvalue(), b'.. contents:: Foo\n :depth: 2\n' + ) + + def test_sphinx_py_class(self): + style = ReSTStyle(ReSTDocument()) + style.start_sphinx_py_class('FooClass') + style.end_sphinx_py_class() + self.assertEqual( + style.doc.getvalue(), b'\n\n.. py:class:: FooClass\n\n \n\n' + ) + + def test_sphinx_py_method(self): + style = ReSTStyle(ReSTDocument()) + style.start_sphinx_py_method('method') + style.end_sphinx_py_method() + self.assertEqual( + style.doc.getvalue(), b'\n\n.. py:method:: method\n\n \n\n' + ) + + def test_sphinx_py_method_with_params(self): + style = ReSTStyle(ReSTDocument()) + style.start_sphinx_py_method('method', 'foo=None') + style.end_sphinx_py_method() + self.assertEqual( + style.doc.getvalue(), + b'\n\n.. py:method:: method(foo=None)\n\n \n\n', + ) + + def test_sphinx_py_attr(self): + style = ReSTStyle(ReSTDocument()) + style.start_sphinx_py_attr('Foo') + style.end_sphinx_py_attr() + self.assertEqual( + style.doc.getvalue(), b'\n\n.. py:attribute:: Foo\n\n \n\n' + ) + + def test_write_py_doc_string(self): + style = ReSTStyle(ReSTDocument()) + docstring = ( + 'This describes a function\n' + ':param foo: Describes foo\n' + 'returns: None' + ) + style.write_py_doc_string(docstring) + self.assertEqual( + style.doc.getvalue(), (docstring + '\n').encode('latin-1') + ) + + def test_new_line(self): + style = ReSTStyle(ReSTDocument()) + style.new_line() + self.assertEqual(style.doc.getvalue(), b'\n') + + style.do_p = False + style.new_line() + self.assertEqual(style.doc.getvalue(), b'\n\n') + + def test_list(self): + style = ReSTStyle(ReSTDocument()) + style.li('foo') + self.assertEqual(style.doc.getvalue(), b'\n* foo\n\n') + + def test_non_top_level_lists_are_indented(self): + style = ReSTStyle(ReSTDocument()) + + # Start the top level list + style.start_ul() + + # Write one list element + style.start_li() + style.doc.handle_data('foo') + style.end_li() + + self.assertEqual(style.doc.getvalue(), b"\n\n\n* foo\n") + + # Start the nested list + style.start_ul() + + # Write an element to the nested list + style.start_li() + style.doc.handle_data('bar') + style.end_li() + + self.assertEqual( + style.doc.getvalue(), b"\n\n\n* foo\n\n\n \n * bar\n " + ) + + def test_external_link(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'html' + style.external_link('MyLink', 'http://example.com/foo') + self.assertEqual( + style.doc.getvalue(), b'`MyLink `_' + ) + + def test_external_link_in_man_page(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'man' + style.external_link('MyLink', 'http://example.com/foo') + self.assertEqual(style.doc.getvalue(), b'MyLink') + + def test_internal_link(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'html' + style.internal_link('MyLink', '/index') + self.assertEqual(style.doc.getvalue(), b':doc:`MyLink `') + + def test_internal_link_in_man_page(self): + style = ReSTStyle(ReSTDocument()) + style.doc.target = 'man' + style.internal_link('MyLink', '/index') + self.assertEqual(style.doc.getvalue(), b'MyLink') diff --git a/testbed/boto__botocore/tests/unit/docs/test_client.py b/testbed/boto__botocore/tests/unit/docs/test_client.py new file mode 100644 index 0000000000000000000000000000000000000000..7785b7c806c27fc6351df93099a386f9657409d2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_client.py @@ -0,0 +1,209 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.client import ( + ClientContextParamsDocumenter, + ClientDocumenter, + ClientExceptionsDocumenter, +) +from tests.unit.docs import BaseDocsTest + + +class TestClientDocumenter(BaseDocsTest): + def setUp(self): + super().setUp() + exception_shape = { + 'SomeException': { + 'exception': True, + 'type': 'structure', + 'members': {'Message': {'shape': 'String'}}, + } + } + self.add_shape(exception_shape) + self.add_shape_to_params('Biz', 'String') + self.add_shape_to_errors('SomeException') + self.setup_client() + self.client_documenter = ClientDocumenter( + self.client, self.root_services_path + ) + + def test_document_client(self): + self.client_documenter.document_client(self.doc_structure) + self.assert_contains_lines_in_order( + [ + '======', + 'Client', + '======', + '.. py:class:: MyService.Client', + ' A low-level client representing AWS MyService', + ' AWS MyService Description', + ' client = session.create_client(\'myservice\')', + 'These are the available methods:', + ' myservice/client/can_paginate', + ' myservice/client/get_paginator', + ' myservice/client/get_waiter', + ' myservice/client/sample_operation', + ] + ) + self.assert_contains_lines_in_order( + ['.. py:method:: MyService.Client.can_paginate(operation_name)'], + self.get_nested_service_contents( + 'myservice', 'client', 'can_paginate' + ), + ) + self.assert_contains_lines_in_order( + ['.. py:method:: MyService.Client.get_paginator(operation_name)'], + self.get_nested_service_contents( + 'myservice', 'client', 'get_paginator' + ), + ) + self.assert_contains_lines_in_order( + ['.. py:method:: MyService.Client.get_waiter(waiter_name)'], + self.get_nested_service_contents( + 'myservice', 'client', 'get_waiter' + ), + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: MyService.Client.sample_operation(**kwargs)', + ' **Request Syntax**', + ' ::', + ' response = client.sample_operation(', + ' Biz=\'string\'', + ' )', + ' :type Biz: string', + ' :param Biz:', + ' :rtype: dict', + ' :returns:', + ' **Response Syntax**', + ' ::', + ' {', + ' \'Biz\': \'string\'', + ' }', + ' **Response Structure**', + ' - *(dict) --*', + ' - **Biz** *(string) --*', + '**Exceptions**', + '* :py:class:`MyService.Client.exceptions.SomeException`', + ], + self.get_nested_service_contents( + 'myservice', 'client', 'sample_operation' + ), + ) + + +class TestClientExceptionsDocumenter(BaseDocsTest): + def setup_documenter(self): + self.setup_client() + self.exceptions_documenter = ClientExceptionsDocumenter( + self.client, self.root_services_path + ) + + def test_no_modeled_exceptions(self): + self.setup_documenter() + self.exceptions_documenter.document_exceptions(self.doc_structure) + self.assert_contains_lines_in_order( + [ + '=================', + 'Client Exceptions', + '=================', + 'Client exceptions are available', + 'This client has no modeled exception classes.', + ] + ) + + def test_modeled_exceptions(self): + exception_shape = { + 'SomeException': { + 'exception': True, + 'type': 'structure', + 'members': {'Message': {'shape': 'String'}}, + } + } + self.add_shape(exception_shape) + self.setup_documenter() + self.exceptions_documenter.document_exceptions(self.doc_structure) + self.assert_contains_lines_in_order( + [ + '=================', + 'Client Exceptions', + '=================', + 'Client exceptions are available', + 'The available client exceptions are:', + '.. toctree::', + ':maxdepth: 1', + ':titlesonly:', + ' myservice/client/exceptions/SomeException', + ] + ) + self.assert_contains_lines_in_order( + [ + '.. py:class:: MyService.Client.exceptions.SomeException', + '**Example**', + '::', + 'except client.exceptions.SomeException as e:', + '.. py:attribute:: response', + '**Syntax**', + '{', + "'Message': 'string',", + "'Error': {", + "'Code': 'string',", + "'Message': 'string'", + '}', + '}', + '**Structure**', + '- *(dict) --*', + '- **Message** *(string) --* ', + '- **Error** *(dict) --* ', + '- **Code** *(string) --* ', + '- **Message** *(string) --* ', + ], + self.get_nested_service_contents( + 'myservice', 'client/exceptions', 'SomeException' + ), + ) + + +class TestClientContextParamsDocumenter(BaseDocsTest): + def setUp(self): + super().setUp() + self.json_model['clientContextParams'] = { + 'ClientContextParam1': { + 'type': 'string', + 'documentation': 'A client context param', + }, + 'ClientContextParam2': { + 'type': 'boolean', + 'documentation': 'A second client context param', + }, + } + self.setup_client() + service_model = self.client.meta.service_model + self.context_params_documenter = ClientContextParamsDocumenter( + service_model.service_name, service_model.client_context_parameters + ) + + def test_client_context_params(self): + self.context_params_documenter.document_context_params( + self.doc_structure + ) + self.assert_contains_lines_in_order( + [ + '========================', + 'Client Context Parameters', + '========================', + 'Client context parameters are configurable', + 'The available ``myservice`` client context params are:', + '* ``client_context_param1`` (string) - A client context param', + '* ``client_context_param2`` (boolean) - A second client context param', + ] + ) diff --git a/testbed/boto__botocore/tests/unit/docs/test_docs.py b/testbed/boto__botocore/tests/unit/docs/test_docs.py new file mode 100644 index 0000000000000000000000000000000000000000..2f45055dce91ed9d1deb1dc506cb94bff11ec841 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_docs.py @@ -0,0 +1,55 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import os + +from botocore.docs import generate_docs +from botocore.session import get_session +from tests import mock +from tests.unit.docs import BaseDocsTest + + +class TestGenerateDocs(BaseDocsTest): + def setUp(self): + super().setUp() + self.loader_patch = mock.patch( + 'botocore.session.create_loader', return_value=self.loader + ) + self.available_service_patch = mock.patch( + 'botocore.session.Session.get_available_services', + return_value=['myservice'], + ) + self.loader_patch.start() + self.available_service_patch.start() + + def tearDown(self): + super().tearDown() + self.loader_patch.stop() + self.available_service_patch.stop() + + def test_generate_docs(self): + session = get_session() + # Have the rst files get written to the temporary directory + generate_docs(self.docs_root_dir, session) + + reference_service_path = os.path.join( + self.root_services_path, 'myservice.rst' + ) + self.assertTrue(os.path.exists(reference_service_path)) + + # Make sure the rst file has some the expected contents. + with open(reference_service_path) as f: + contents = f.read() + self.assertIn('AWS MyService', contents) + self.assertIn('Client', contents) + self.assertIn('Paginators', contents) + self.assertIn('Waiters', contents) diff --git a/testbed/boto__botocore/tests/unit/docs/test_docstring.py b/testbed/boto__botocore/tests/unit/docs/test_docstring.py new file mode 100644 index 0000000000000000000000000000000000000000..cef05ddd81f5b2441964c07af0b68cbf74299abb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_docstring.py @@ -0,0 +1,102 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.docstring import ( + ClientMethodDocstring, + LazyLoadedDocstring, + PaginatorDocstring, + WaiterDocstring, +) +from tests import mock, unittest + + +class MockedLazyLoadedDocstring(LazyLoadedDocstring): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.mocked_writer_method = mock.Mock() + + def _write_docstring(self, *args, **kwargs): + self.mocked_writer_method(*args, **kwargs) + + +class TestLazyLoadedDocstring(unittest.TestCase): + def test_raises_not_implemented(self): + with self.assertRaises(NotImplementedError): + str(LazyLoadedDocstring()) + + def test_expandtabs(self): + docstring = MockedLazyLoadedDocstring() + docstring.mocked_writer_method.side_effect = ( + lambda section: section.write('foo\t') + ) + self.assertEqual('foo ', docstring.expandtabs(1)) + + def test_str(self): + docstring = MockedLazyLoadedDocstring() + docstring.mocked_writer_method.side_effect = ( + lambda section: section.write('foo') + ) + self.assertEqual('foo', str(docstring)) + + def test_repr(self): + docstring = MockedLazyLoadedDocstring() + docstring.mocked_writer_method.side_effect = ( + lambda section: section.write('foo') + ) + self.assertEqual('foo', repr(docstring)) + + def test_is_lazy_loaded(self): + docstring = MockedLazyLoadedDocstring() + str(docstring) + str(docstring) + # The mock.ANY represents the DocumentStructure that is filled out. + docstring.mocked_writer_method.assert_called_once_with(mock.ANY) + + def test_args_kwargs_passed(self): + args = ['foo', 'bar'] + kwargs = {'biz': 'baz'} + docstring = MockedLazyLoadedDocstring(*args, **kwargs) + str(docstring) + # The mock.ANY represents the DocumentStructure that is filled out. + docstring.mocked_writer_method.assert_called_with( + mock.ANY, *args, **kwargs + ) + + +class TestClientMethodDocstring(unittest.TestCase): + def test_use_correct_docstring_writer(self): + with mock.patch( + 'botocore.docs.docstring' '.document_model_driven_method' + ) as mock_writer: + docstring = ClientMethodDocstring() + str(docstring) + self.assertTrue(mock_writer.called) + + +class TestWaiterDocstring(unittest.TestCase): + def test_use_correct_docstring_writer(self): + with mock.patch( + 'botocore.docs.docstring' '.document_wait_method' + ) as mock_writer: + docstring = WaiterDocstring() + str(docstring) + self.assertTrue(mock_writer.called) + + +class TestPaginatorDocstring(unittest.TestCase): + def test_use_correct_docstring_writer(self): + with mock.patch( + 'botocore.docs.docstring' '.document_paginate_method' + ) as mock_writer: + docstring = PaginatorDocstring() + str(docstring) + self.assertTrue(mock_writer.called) diff --git a/testbed/boto__botocore/tests/unit/docs/test_example.py b/testbed/boto__botocore/tests/unit/docs/test_example.py new file mode 100644 index 0000000000000000000000000000000000000000..b7b651abf22598e5e7e1f78f1ab8fce8696dbbca --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_example.py @@ -0,0 +1,517 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.example import ( + RequestExampleDocumenter, + ResponseExampleDocumenter, +) +from botocore.docs.utils import DocumentedShape +from botocore.hooks import HierarchicalEmitter +from tests import mock +from tests.unit.docs import BaseDocsTest + + +class BaseExampleDocumenterTest(BaseDocsTest): + def setUp(self): + super().setUp() + self.event_emitter = HierarchicalEmitter() + self.request_example = RequestExampleDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + self.response_example = ResponseExampleDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + + +class TestDocumentDefaultValue(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo=\'string\'', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + ) + self.assert_contains_lines_in_order( + ['::', ' {', ' \'Foo\': \'string\'', ' }'] + ) + + +class TestDocumentNoMembers(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + ['::', ' response = myclient.call()'] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + ) + self.assert_contains_lines_in_order(['::', ' {}']) + + +class TestTraverseAndDocumentShape(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.event_emitter = mock.Mock() + self.request_example = RequestExampleDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + self.response_example = ResponseExampleDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + + def test_events_emitted_response_example(self): + self.response_example.traverse_and_document_shape( + section=self.doc_structure, + shape=self.operation_model.input_shape, + history=[], + ) + structure_section = self.doc_structure.get_section('structure-value') + print(self.event_emitter.emit.call_args_list[0][1]['section'].name) + self.assertEqual( + self.event_emitter.emit.call_args_list, + [ + mock.call( + 'docs.response-example.myservice.SampleOperation.Foo', + section=structure_section.get_section('Foo').get_section( + 'member-value' + ), + ), + mock.call( + ( + 'docs.response-example.myservice.SampleOperation' + '.complete-section' + ), + section=self.doc_structure, + ), + ], + ) + + def test_events_emitted_request_example(self): + self.request_example.traverse_and_document_shape( + section=self.doc_structure, + shape=self.operation_model.input_shape, + history=[], + ) + structure_section = self.doc_structure.get_section('structure-value') + self.assertEqual( + self.event_emitter.emit.call_args_list, + [ + mock.call( + 'docs.request-example.myservice.SampleOperation.Foo', + section=structure_section.get_section('Foo').get_section( + 'member-value' + ), + ), + mock.call( + ( + 'docs.request-example.myservice.SampleOperation' + '.complete-section' + ), + section=self.doc_structure, + ), + ], + ) + + +class TestDocumentEnumValue(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + {'EnumString': {'type': 'string', 'enum': ['foo', 'bar']}} + ) + self.add_shape_to_params('Foo', 'EnumString', 'This describes foo.') + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo=\'foo\'|\'bar\'', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + ) + self.assert_contains_lines_in_order( + ['::', ' {', ' \'Foo\': \'foo\'|\'bar\'', ' }'] + ) + + +class TestDocumentMultipleDefaultValues(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.add_shape_to_params( + 'Bar', 'String', 'This describes bar.', is_required=True + ) + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo=\'string\',', + ' Bar=\'string\'', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + ) + self.assert_contains_lines_in_order( + [ + '::', + ' {', + ' \'Foo\': \'string\',', + ' \'Bar\': \'string\'', + ' }', + ] + ) + + +class TestDocumentInclude(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.include_params = [ + DocumentedShape( + name='Baz', + type_name='integer', + documentation='This describes baz.', + ) + ] + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + include=self.include_params, + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo=\'string\',', + ' Baz=123', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + include=self.include_params, + ) + self.assert_contains_lines_in_order( + [ + '::', + ' {', + ' \'Foo\': \'string\',', + ' \'Baz\': 123', + ' }', + ] + ) + + +class TestDocumentExclude(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.add_shape_to_params( + 'Bar', 'String', 'This describes bar.', is_required=True + ) + self.exclude_params = ['Foo'] + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + exclude=self.exclude_params, + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Bar=\'string\'', + ' )', + ] + ) + self.assert_not_contains_line(' Foo=\'string\'') + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + exclude=self.exclude_params, + ) + self.assert_contains_lines_in_order( + ['::', ' {', ' \'Bar\': \'string\'', ' }'] + ) + self.assert_not_contains_line('\'Foo\': \'string\',') + + +class TestDocumentList(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'List': { + 'type': 'list', + 'member': { + 'shape': 'String', + 'documentation': 'A string element', + }, + } + } + ) + self.add_shape_to_params('Foo', 'List', 'This describes the list.') + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo=[', + ' \'string\',', + ' ]', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '::', + ' {', + ' \'Foo\': [', + ' \'string\',', + ' ]', + ' }', + ] + ) + + +class TestDocumentMap(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'Map': { + 'type': 'map', + 'key': {'shape': 'String'}, + 'value': {'shape': 'String'}, + } + } + ) + self.add_shape_to_params('Foo', 'Map', 'This describes the map.') + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo={', + ' \'string\': \'string\'', + ' }', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '::', + ' {', + ' \'Foo\': {', + ' \'string\': \'string\'', + ' }', + ' }', + ] + ) + + +class TestDocumentStructure(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'Structure': { + 'type': 'structure', + 'members': { + 'Member': { + 'shape': 'String', + 'documentation': 'This is its member.', + } + }, + } + } + ) + self.add_shape_to_params( + 'Foo', 'Structure', 'This describes the structure.' + ) + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo={', + ' \'Member\': \'string\'', + ' }', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '::', + ' {', + ' \'Foo\': {', + ' \'Member\': \'string\'', + ' }', + ' }', + ] + ) + + +class TestDocumentRecursiveShape(BaseExampleDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'Structure': { + 'type': 'structure', + 'members': { + 'Foo': { + 'shape': 'Structure', + 'documentation': 'This is a recursive structure.', + } + }, + } + } + ) + self.add_shape_to_params( + 'Foo', 'Structure', 'This describes the structure.' + ) + + def test_request_example(self): + self.request_example.document_example( + self.doc_structure, + self.operation_model.input_shape, + prefix='response = myclient.call', + ) + self.assert_contains_lines_in_order( + [ + '::', + ' response = myclient.call(', + ' Foo={', + ' \'Foo\': {\'... recursive ...\'}', + ' }', + ' )', + ] + ) + + def test_response_example(self): + self.response_example.document_example( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '::', + ' {', + ' \'Foo\': {', + ' \'Foo\': {\'... recursive ...\'}', + ' }', + ' }', + ] + ) diff --git a/testbed/boto__botocore/tests/unit/docs/test_method.py b/testbed/boto__botocore/tests/unit/docs/test_method.py new file mode 100644 index 0000000000000000000000000000000000000000..0c08d11738fa61ec35361eb5ff873789f32e5872 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_method.py @@ -0,0 +1,455 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.method import ( + document_custom_method, + document_custom_signature, + document_model_driven_method, + document_model_driven_signature, + get_instance_public_methods, +) +from botocore.docs.utils import DocumentedShape +from botocore.hooks import HierarchicalEmitter +from tests import unittest +from tests.unit.docs import BaseDocsTest + + +class TestGetInstanceMethods(unittest.TestCase): + class MySampleClass: + def _internal_method(self): + pass + + def public_method(self): + pass + + def test_get_instance_methods(self): + instance = self.MySampleClass() + instance_methods = get_instance_public_methods(instance) + self.assertEqual(len(instance_methods), 1) + self.assertIn('public_method', instance_methods) + self.assertEqual( + instance.public_method, instance_methods['public_method'] + ) + + +class TestDocumentModelDrivenSignature(BaseDocsTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String') + self.add_shape_to_params('Bar', 'String', is_required=True) + self.add_shape_to_params('Baz', 'String') + + def test_document_signature(self): + document_model_driven_signature( + self.doc_structure, 'my_method', self.operation_model + ) + self.assert_contains_line('.. py:method:: my_method(**kwargs)') + + def test_document_signature_exclude_all_kwargs(self): + exclude_params = ['Foo', 'Bar', 'Baz'] + document_model_driven_signature( + self.doc_structure, + 'my_method', + self.operation_model, + exclude=exclude_params, + ) + self.assert_contains_line('.. py:method:: my_method()') + + def test_document_signature_exclude_and_include(self): + exclude_params = ['Foo', 'Bar', 'Baz'] + include_params = [ + DocumentedShape( + name='Biz', type_name='integer', documentation='biz docs' + ) + ] + document_model_driven_signature( + self.doc_structure, + 'my_method', + self.operation_model, + include=include_params, + exclude=exclude_params, + ) + self.assert_contains_line('.. py:method:: my_method(**kwargs)') + + +class TestDocumentCustomSignature(BaseDocsTest): + def sample_method(self, foo, bar='bar', baz=None): + pass + + def test_document_signature(self): + document_custom_signature( + self.doc_structure, 'my_method', self.sample_method + ) + self.assert_contains_line( + '.. py:method:: my_method(foo, bar=\'bar\', baz=None)' + ) + + +class TestDocumentCustomMethod(BaseDocsTest): + def custom_method(self, foo): + """This is a custom method + + :type foo: string + :param foo: The foo parameter + """ + pass + + def test_document_custom_signature(self): + document_custom_method( + self.doc_structure, 'my_method', self.custom_method + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: my_method(foo)', + ' This is a custom method', + ' :type foo: string', + ' :param foo: The foo parameter', + ] + ) + + +class TestDocumentModelDrivenMethod(BaseDocsTest): + def setUp(self): + super().setUp() + self.event_emitter = HierarchicalEmitter() + self.add_shape_to_params('Bar', 'String') + + def test_default(self): + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + ) + cross_ref_link = ( + 'See also: `AWS API Documentation ' + '' + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: foo(**kwargs)', + ' This describes the foo method.', + cross_ref_link, + ' **Request Syntax**', + ' ::', + ' response = client.foo(', + ' Bar=\'string\'', + ' )', + ' :type Bar: string', + ' :param Bar:', + ' :rtype: dict', + ' :returns:', + ' **Response Syntax**', + ' ::', + ' {', + ' \'Bar\': \'string\'', + ' }', + ' **Response Structure**', + ' - *(dict) --*', + ' - **Bar** *(string) --*', + ] + ) + + def test_no_input_output_shape(self): + del self.json_model['operations']['SampleOperation']['input'] + del self.json_model['operations']['SampleOperation']['output'] + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: foo()', + ' This describes the foo method.', + ' **Request Syntax**', + ' ::', + ' response = client.foo()', + ' :returns: None', + ] + ) + + def test_include_input(self): + include_params = [ + DocumentedShape( + name='Biz', type_name='string', documentation='biz docs' + ) + ] + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + include_input=include_params, + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: foo(**kwargs)', + ' This describes the foo method.', + ' **Request Syntax**', + ' ::', + ' response = client.foo(', + ' Bar=\'string\',', + ' Biz=\'string\'', + ' )', + ' :type Bar: string', + ' :param Bar:', + ' :type Biz: string', + ' :param Biz: biz docs', + ' :rtype: dict', + ' :returns:', + ' **Response Syntax**', + ' ::', + ' {', + ' \'Bar\': \'string\'', + ' }', + ' **Response Structure**', + ' - *(dict) --*', + ' - **Bar** *(string) --*', + ] + ) + + def test_include_output(self): + include_params = [ + DocumentedShape( + name='Biz', type_name='string', documentation='biz docs' + ) + ] + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + include_output=include_params, + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: foo(**kwargs)', + ' This describes the foo method.', + ' **Request Syntax**', + ' ::', + ' response = client.foo(', + ' Bar=\'string\'', + ' )', + ' :type Bar: string', + ' :param Bar:', + ' :rtype: dict', + ' :returns:', + ' **Response Syntax**', + ' ::', + ' {', + ' \'Bar\': \'string\'', + ' \'Biz\': \'string\'', + ' }', + ' **Response Structure**', + ' - *(dict) --*', + ' - **Bar** *(string) --*', + ' - **Biz** *(string) --*', + ] + ) + + def test_exclude_input(self): + self.add_shape_to_params('Biz', 'String') + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + exclude_input=['Bar'], + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: foo(**kwargs)', + ' This describes the foo method.', + ' **Request Syntax**', + ' ::', + ' response = client.foo(', + ' Biz=\'string\'', + ' )', + ' :type Biz: string', + ' :param Biz:', + ' :rtype: dict', + ' :returns:', + ' **Response Syntax**', + ' ::', + ' {', + ' \'Bar\': \'string\'', + ' \'Biz\': \'string\'', + ' }', + ' **Response Structure**', + ' - *(dict) --*', + ' - **Bar** *(string) --*', + ' - **Biz** *(string) --*', + ] + ) + self.assert_not_contains_lines( + [':param Bar: string', 'Bar=\'string\''] + ) + + def test_exclude_output(self): + self.add_shape_to_params('Biz', 'String') + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + exclude_output=['Bar'], + ) + self.assert_contains_lines_in_order( + [ + '.. py:method:: foo(**kwargs)', + ' This describes the foo method.', + ' **Request Syntax**', + ' ::', + ' response = client.foo(', + ' Bar=\'string\'', + ' Biz=\'string\'', + ' )', + ' :type Biz: string', + ' :param Biz:', + ' :rtype: dict', + ' :returns:', + ' **Response Syntax**', + ' ::', + ' {', + ' \'Biz\': \'string\'', + ' }', + ' **Response Structure**', + ' - *(dict) --*', + ' - **Biz** *(string) --*', + ] + ) + self.assert_not_contains_lines( + [ + '\'Bar\': \'string\'', + '- **Bar** *(string) --*', + ] + ) + + def test_streaming_body_in_output(self): + self.add_shape_to_params('Body', 'Blob') + self.json_model['shapes']['Blob'] = {'type': 'blob'} + self.json_model['shapes']['SampleOperationInputOutput']['payload'] = ( + 'Body' + ) + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + ) + self.assert_contains_line('**Body** (:class:`.StreamingBody`)') + + def test_event_stream_body_in_output(self): + self.add_shape_to_params('Payload', 'EventStream') + self.json_model['shapes']['SampleOperationInputOutput']['payload'] = ( + 'Payload' + ) + self.json_model['shapes']['EventStream'] = { + 'type': 'structure', + 'eventstream': True, + 'members': {'Event': {'shape': 'Event'}}, + } + self.json_model['shapes']['Event'] = { + 'type': 'structure', + 'event': True, + 'members': { + 'Fields': { + 'shape': 'EventFields', + 'eventpayload': True, + } + }, + } + self.json_model['shapes']['EventFields'] = { + 'type': 'structure', + 'members': {'Field': {'shape': 'EventField'}}, + } + self.json_model['shapes']['EventField'] = {'type': 'blob'} + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + ) + self.assert_contains_lines_in_order( + [ + "this operation contains an :class:`.EventStream`", + "'Payload': EventStream({", + "'Event': {", + "'Fields': {", + "'Field': b'bytes'", + "**Payload** (:class:`.EventStream`)", + "**Event** *(dict)", + "**Fields** *(dict)", + "**Field** *(bytes)", + ] + ) + + def test_streaming_body_in_input(self): + del self.json_model['operations']['SampleOperation']['output'] + self.add_shape_to_params('Body', 'Blob') + self.json_model['shapes']['Blob'] = {'type': 'blob'} + self.json_model['shapes']['SampleOperationInputOutput']['payload'] = ( + 'Body' + ) + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + ) + # The line in the example + self.assert_contains_line('Body=b\'bytes\'|file') + # The line in the parameter description + self.assert_contains_line( + ':type Body: bytes or seekable file-like object' + ) + + def test_deprecated(self): + self.json_model['operations']['SampleOperation']['deprecated'] = True + document_model_driven_method( + self.doc_structure, + 'foo', + self.operation_model, + event_emitter=self.event_emitter, + method_description='This describes the foo method.', + example_prefix='response = client.foo', + ) + # The line in the example + self.assert_contains_lines_in_order( + [ + ' .. danger::', + ' This operation is deprecated and may not function as ' + 'expected. This operation should not be used going forward and is ' + 'only kept for the purpose of backwards compatiblity.', + ] + ) diff --git a/testbed/boto__botocore/tests/unit/docs/test_paginator.py b/testbed/boto__botocore/tests/unit/docs/test_paginator.py new file mode 100644 index 0000000000000000000000000000000000000000..ec420577be15eb47ef1ad51a653dbe3fadace1ce --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_paginator.py @@ -0,0 +1,104 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.paginator import PaginatorDocumenter +from botocore.paginate import PaginatorModel +from tests.unit.docs import BaseDocsTest + + +class TestPaginatorDocumenter(BaseDocsTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Biz', 'String') + self.extra_setup() + + def extra_setup(self): + self.setup_client() + paginator_model = PaginatorModel(self.paginator_json_model) + self.paginator_documenter = PaginatorDocumenter( + client=self.client, + service_paginator_model=paginator_model, + root_docs_path=self.root_services_path, + ) + + def test_document_paginators(self): + self.paginator_documenter.document_paginators(self.doc_structure) + self.assert_contains_lines_in_order( + [ + '==========', + 'Paginators', + '==========', + 'The available paginators are:', + 'paginator/SampleOperation', + ] + ) + self.assert_contains_lines_in_order( + [ + '.. py:class:: MyService.Paginator.SampleOperation', + ' ::', + ' paginator = client.get_paginator(\'sample_operation\')', + ' .. py:method:: paginate(**kwargs)', + ( + ' Creates an iterator that will paginate through responses' + ' from :py:meth:`MyService.Client.sample_operation`.' + ), + ' **Request Syntax**', + ' ::', + ' response_iterator = paginator.paginate(', + ' Biz=\'string\',', + ' PaginationConfig={', + ' \'MaxItems\': 123,', + ' \'PageSize\': 123,', + ' \'StartingToken\': \'string\'', + ' }', + ' )', + ' :type Biz: string', + ' :param Biz:', + ' :type PaginationConfig: dict', + ' :param PaginationConfig:', + ( + ' A dictionary that provides parameters to ' + 'control pagination.' + ), + ' - **MaxItems** *(integer) --*', + ' - **PageSize** *(integer) --*', + ' - **StartingToken** *(string) --*', + ' :rtype: dict', + ' :returns:', + ' **Response Syntax**', + ' ::', + ' {', + ' \'Biz\': \'string\',', + ' \'NextToken\': \'string\'', + ' }', + ' **Response Structure**', + ' - *(dict) --*', + ' - **Biz** *(string) --*', + ' - **NextToken** *(string) --*', + ], + self.get_nested_service_contents( + 'myservice', 'paginator', 'SampleOperation' + ), + ) + + def test_no_page_size_if_no_limit_key(self): + paginator = self.paginator_json_model["pagination"] + operation = paginator["SampleOperation"] + del operation["limit_key"] + + self.paginator_documenter.document_paginators(self.doc_structure) + self.assert_not_contains_lines( + [ + ' \'PageSize\': 123,', + ' - **PageSize** *(integer) --*', + ] + ) diff --git a/testbed/boto__botocore/tests/unit/docs/test_params.py b/testbed/boto__botocore/tests/unit/docs/test_params.py new file mode 100644 index 0000000000000000000000000000000000000000..817632f816493f01ef515d51ef3ec8e4cab60558 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_params.py @@ -0,0 +1,414 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.params import ( + RequestParamsDocumenter, + ResponseParamsDocumenter, +) +from botocore.docs.utils import DocumentedShape +from botocore.hooks import HierarchicalEmitter +from tests import mock +from tests.unit.docs import BaseDocsTest + + +class BaseParamsDocumenterTest(BaseDocsTest): + def setUp(self): + super().setUp() + self.event_emitter = HierarchicalEmitter() + self.request_params = RequestParamsDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + self.response_params = ResponseParamsDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + + +class TestDocumentDefaultValue(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [':type Foo: string', ':param Foo: This describes foo.'] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + ['- *(dict) --*', ' - **Foo** *(string) --* This describes foo.'] + ) + + +class TestTraverseAndDocumentShape(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.event_emitter = mock.Mock() + self.request_params = RequestParamsDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + self.response_params = ResponseParamsDocumenter( + service_name='myservice', + operation_name='SampleOperation', + event_emitter=self.event_emitter, + ) + + def test_events_emitted_response_params(self): + self.response_params.traverse_and_document_shape( + section=self.doc_structure, + shape=self.operation_model.input_shape, + history=[], + ) + self.assertEqual( + self.event_emitter.emit.call_args_list, + [ + mock.call( + 'docs.response-params.myservice.SampleOperation.Foo', + section=self.doc_structure.get_section('Foo'), + ), + mock.call( + ( + 'docs.response-params.myservice.SampleOperation' + '.complete-section' + ), + section=self.doc_structure, + ), + ], + ) + + def test_events_emitted_request_params(self): + self.request_params.traverse_and_document_shape( + section=self.doc_structure, + shape=self.operation_model.input_shape, + history=[], + ) + self.assertEqual( + self.event_emitter.emit.call_args_list, + [ + mock.call( + 'docs.request-params.myservice.SampleOperation.Foo', + section=self.doc_structure.get_section('Foo'), + ), + mock.call( + ( + 'docs.request-params.myservice.SampleOperation' + '.complete-section' + ), + section=self.doc_structure, + ), + ], + ) + + +class TestDocumentMultipleDefaultValues(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.add_shape_to_params( + 'Bar', 'String', 'This describes bar.', is_required=True + ) + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + ':type Foo: string', + ':param Foo: This describes foo.', + ':type Bar: string', + ':param Bar: **[REQUIRED]** This describes bar.', + ] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '- *(dict) --*', + ' - **Foo** *(string) --* This describes foo.', + ' - **Bar** *(string) --* This describes bar.', + ] + ) + + +class TestDocumentInclude(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.include_params = [ + DocumentedShape( + name='Baz', + type_name='integer', + documentation='This describes baz.', + ) + ] + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, + self.operation_model.input_shape, + include=self.include_params, + ) + self.assert_contains_lines_in_order( + [ + ':type Foo: string', + ':param Foo: This describes foo.', + ':type Baz: int', + ':param Baz: This describes baz.', + ] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, + self.operation_model.input_shape, + include=self.include_params, + ) + self.assert_contains_lines_in_order( + [ + '- *(dict) --*', + ' - **Foo** *(string) --* This describes foo.', + ' - **Baz** *(integer) --* This describes baz.', + ] + ) + + +class TestDocumentExclude(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Foo', 'String', 'This describes foo.') + self.add_shape_to_params( + 'Bar', 'String', 'This describes bar.', is_required=True + ) + self.exclude_params = ['Foo'] + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, + self.operation_model.input_shape, + exclude=self.exclude_params, + ) + self.assert_contains_lines_in_order( + [ + ':type Bar: string', + ':param Bar: **[REQUIRED]** This describes bar.', + ] + ) + self.assert_not_contains_lines( + [':type Foo: string', ':param Foo: This describes foo.'] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, + self.operation_model.input_shape, + exclude=self.exclude_params, + ) + self.assert_contains_lines_in_order( + ['- *(dict) --*', ' - **Bar** *(string) --* This describes bar.'] + ) + self.assert_not_contains_line( + ' - **Foo** *(string) --* This describes foo.' + ) + + +class TestDocumentList(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'List': { + 'type': 'list', + 'member': { + 'shape': 'String', + 'documentation': 'A string element', + }, + } + } + ) + self.add_shape_to_params( + 'Foo', + 'List', + 'This describes the list. Each element of this list is a string.', + ) + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + ':type Foo: list', + ':param Foo: This describes the list.', + ' - *(string) --* A string element', + ] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '- *(dict) --*', + ( + ' - **Foo** *(list) --* This describes the list. ' + 'Each element of this list is a string.' + ), + ' - *(string) --* A string element', + ] + ) + + +class TestDocumentMap(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'Map': { + 'type': 'map', + 'key': {'shape': 'String'}, + 'value': {'shape': 'String'}, + } + } + ) + self.add_shape_to_params('Foo', 'Map', 'This describes the map.') + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + ':type Foo: dict', + ':param Foo: This describes the map.', + ' - *(string) --*', + ' - *(string) --*', + ] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '- *(dict) --*', + ' - **Foo** *(dict) --* This describes the map.', + ' - *(string) --*', + ' - *(string) --*', + ] + ) + + +class TestDocumentStructure(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'Structure': { + 'type': 'structure', + 'members': { + 'Member': { + 'shape': 'String', + 'documentation': 'This is its member.', + } + }, + } + } + ) + self.add_shape_to_params( + 'Foo', 'Structure', 'This describes the structure.' + ) + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + ':type Foo: dict', + ':param Foo: This describes the structure.', + ' - **Member** *(string) --* This is its member.', + ] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '- *(dict) --*', + ' - **Foo** *(dict) --* This describes the structure.', + ' - **Member** *(string) --* This is its member.', + ] + ) + + +class TestDocumentRecursiveShape(BaseParamsDocumenterTest): + def setUp(self): + super().setUp() + self.add_shape( + { + 'Structure': { + 'type': 'structure', + 'members': { + 'Foo': { + 'shape': 'Structure', + 'documentation': 'This is a recursive structure.', + } + }, + } + } + ) + self.add_shape_to_params( + 'Foo', 'Structure', 'This describes the structure.' + ) + + def test_request_params(self): + self.request_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + ':type Foo: dict', + ':param Foo: This describes the structure.', + ' - **Foo** *(dict) --* This is a recursive structure.', + ] + ) + + def test_response_params(self): + self.response_params.document_params( + self.doc_structure, self.operation_model.input_shape + ) + self.assert_contains_lines_in_order( + [ + '- *(dict) --*', + ' - **Foo** *(dict) --* This is a recursive structure.', + ] + ) diff --git a/testbed/boto__botocore/tests/unit/docs/test_service.py b/testbed/boto__botocore/tests/unit/docs/test_service.py new file mode 100644 index 0000000000000000000000000000000000000000..01040ae2fee89a13464a76651e9d10df74d8e76b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_service.py @@ -0,0 +1,121 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import os + +from botocore.docs.service import ServiceDocumenter +from botocore.session import get_session +from tests import mock +from tests.unit.docs import BaseDocsTest + + +class TestServiceDocumenter(BaseDocsTest): + def setUp(self): + super().setUp() + self.setup_documenter() + + def setup_documenter(self): + self.add_shape_to_params('Biz', 'String') + self.setup_client() + with mock.patch( + 'botocore.session.create_loader', return_value=self.loader + ): + session = get_session() + self.service_documenter = ServiceDocumenter( + 'myservice', session, self.root_services_path + ) + + def test_document_service(self): + # Note that not everything will be included as it is just + # a smoke test to make sure all of the main parts are inluded. + contents = self.service_documenter.document_service().decode('utf-8') + lines = [ + '*********', + 'MyService', + '*********', + '======', + 'Client', + '======', + '.. py:class:: MyService.Client', + ' A low-level client representing AWS MyService', + ' AWS MyService Description', + ' client = session.create_client(\'myservice\')', + 'These are the available methods:', + ' myservice/client/sample_operation', + '=================', + 'Client Exceptions', + '=================', + 'Client exceptions are available on a client instance ', + 'via the ``exceptions`` property. For more detailed instructions ', + 'and examples on the exact usage of client exceptions, see the ', + 'error handling ', + 'Client exceptions are available', + '==========', + 'Paginators', + '==========', + 'Paginators are available on a client instance', + 'via the ``get_paginator`` method. For more detailed instructions ', + 'and examples on the usage of paginators, see the paginators', + 'The available paginators are:', + ' myservice/paginator/SampleOperation', + '=======', + 'Waiters', + '=======', + 'Waiters are available on a client instance ', + 'via the ``get_waiter`` method. For more detailed instructions ', + 'and examples on the usage or waiters, see the waiters', + ' myservice/waiter/SampleOperationComplete', + ] + for line in lines: + self.assertIn(line, contents) + + self.assert_contains_lines_in_order( + [ + '.. py:method:: MyService.Client.sample_operation(**kwargs)', + ' **Examples**', + ' Sample Description.', + ' ::', + ' response = client.sample_operation(', + ], + self.get_nested_service_contents( + 'myservice', 'client', 'sample_operation' + ), + ) + + def test_document_service_no_paginator(self): + os.remove(self.paginator_model_file) + contents = self.service_documenter.document_service().decode('utf-8') + self.assertNotIn('Paginators', contents) + + def test_document_service_no_waiter(self): + os.remove(self.waiter_model_file) + contents = self.service_documenter.document_service().decode('utf-8') + self.assertNotIn('Waiters', contents) + + def test_document_service_no_context_params(self): + contents = self.service_documenter.document_service().decode('utf-8') + self.assertNotIn('Client Context Parameters', contents) + + def test_document_service_context_params(self): + self.json_model['clientContextParams'] = { + 'ClientContextParam1': { + 'type': 'string', + 'documentation': 'A client context param', + }, + 'ClientContextParam2': { + 'type': 'boolean', + 'documentation': 'A second client context param', + }, + } + self.setup_documenter() + contents = self.service_documenter.document_service().decode('utf-8') + self.assertIn('Client Context Parameters', contents) diff --git a/testbed/boto__botocore/tests/unit/docs/test_sharedexample.py b/testbed/boto__botocore/tests/unit/docs/test_sharedexample.py new file mode 100644 index 0000000000000000000000000000000000000000..0fe6a773f2ce9017d472de93b4a300537d4c60e4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_sharedexample.py @@ -0,0 +1,249 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.compat import OrderedDict +from botocore.docs.sharedexample import ( + SharedExampleDocumenter, + document_shared_examples, +) +from tests.unit.docs import BaseDocsTest + + +class TestDocumentSharedExamples(BaseDocsTest): + def setUp(self): + super().setUp() + self.add_shape({"foo": {"type": "string"}}) + self.add_shape({"nested": {"type": "string"}}) + self.add_shape( + { + "other": { + "type": "structure", + "members": {"nested": {"shape": "nested"}}, + } + } + ) + self.add_shape( + {"aloha": {"type": "list", "member": {"shape": "other"}}} + ) + self.add_shape_to_params('foo', 'foo') + self.add_shape_to_params('aloha', 'aloha') + self._examples = [ + { + "id": "sample-id", + "title": "sample-title", + "description": "Sample Description.", + "input": OrderedDict( + [ + ("aloha", ["other", {"nested": "fun!"}]), + ("foo", "bar"), + ] + ), + "output": OrderedDict( + [ + ("foo", "baz"), + ] + ), + "comments": { + "input": {"aloha": "mahalo"}, + "output": {"foo": "Sample Comment"}, + }, + } + ] + + def test_default(self): + document_shared_examples( + self.doc_structure, + self.operation_model, + 'response = client.foo', + self._examples, + ) + self.assert_contains_lines_in_order( + [ + "**Examples**", + "Sample Description.", + "::", + " response = client.foo(", + " # mahalo", + " aloha=[", + " 'other',", + " {", + " 'nested': 'fun!',", + " },", + " ],", + " foo='bar',", + " )", + " print(response)", + "Expected Output:", + "::", + " {", + " # Sample Comment", + " 'foo': 'baz',", + " 'ResponseMetadata': {", + " '...': '...',", + " },", + " }", + ] + ) + + +class TestSharedExampleDocumenter(BaseDocsTest): + def setUp(self): + super().setUp() + self.documenter = SharedExampleDocumenter() + + def test_is_input(self): + self.add_shape_to_params('foo', 'String') + self.documenter.document_shared_example( + example={'input': {'foo': 'bar'}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order(["foo.bar(", " foo='bar'", ")"]) + + def test_dict_example(self): + self.add_shape( + { + 'bar': { + "type": "structure", + "members": {"bar": {"shape": "String"}}, + } + } + ) + self.add_shape_to_params('foo', 'bar') + self.documenter.document_shared_example( + example={'input': {'foo': {'bar': 'baz'}}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order( + ["foo.bar(", " foo={", " 'bar': 'baz',", " },", ")"] + ) + + def test_list_example(self): + self.add_shape( + {"foo": {"type": "list", "member": {"shape": "String"}}} + ) + self.add_shape_to_params('foo', 'foo') + self.documenter.document_shared_example( + example={'input': {'foo': ['bar']}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order( + ["foo.bar(", " foo=[", " 'bar',", " ],", ")"] + ) + + def test_can_handle_no_input_key(self): + self.add_shape_to_params('foo', 'String') + self.documenter.document_shared_example( + example={}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order(["foo.bar(", ")"]) + + def test_unicode_string_example(self): + self.add_shape_to_params('foo', 'String') + self.documenter.document_shared_example( + example={'input': {'foo': 'bar'}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order(["foo.bar(", " foo='bar'", ")"]) + + def test_timestamp_example(self): + self.add_shape({'foo': {'type': 'timestamp'}}) + self.add_shape_to_params('foo', 'foo') + self.documenter.document_shared_example( + example={'input': {'foo': 'Fri, 20 Nov 2015 21:13:12 GMT'}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order( + [ + "foo.bar(", + " foo=datetime(2015, 11, 20, 21, 13, 12, 4, 324, 0)", + ")", + ] + ) + + def test_map_example(self): + self.add_shape({"baz": {"type": "string"}}) + self.add_shape( + { + 'bar': { + "type": "map", + "key": {"shape": "baz"}, + "value": {"shape": "baz"}, + } + } + ) + self.add_shape_to_params('foo', 'bar') + self.documenter.document_shared_example( + example={'input': {'foo': {'bar': 'baz'}}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order( + ["foo.bar(", " foo={", " 'bar': 'baz',", " },", ")"] + ) + + def test_add_comment(self): + self.add_shape_to_params('foo', 'String') + self.documenter.document_shared_example( + example={ + 'input': {'foo': 'bar'}, + 'comments': {'input': {'foo': 'baz'}}, + }, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order( + ["foo.bar(", " # baz", " foo='bar',", ")"] + ) + + def test_unicode_exammple(self): + self.add_shape_to_params('foo', 'String') + self.documenter.document_shared_example( + example={'input': {'foo': '\u2713'}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order( + ["foo.bar(", " foo='\u2713'", ")"] + ) + + def test_escape_character_example(self): + self.add_shape_to_params('foo', 'String') + self.documenter.document_shared_example( + example={'output': {'foo': 'good\n\rintentions!\n\r'}}, + prefix='foo.bar', + section=self.doc_structure, + operation_model=self.operation_model, + ) + self.assert_contains_lines_in_order( + [ + "Expected Output:", + " {", + " 'foo': 'good\\n\\rintentions!\\n\\r',", + " }", + ] + ) diff --git a/testbed/boto__botocore/tests/unit/docs/test_utils.py b/testbed/boto__botocore/tests/unit/docs/test_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..fd8cdb37aaefdcc929eb56bebb6f56fb002914a5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_utils.py @@ -0,0 +1,241 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.utils import ( + AppendParamDocumentation, + AutoPopulatedParam, + HideParamFromOperations, + escape_controls, + get_official_service_name, + py_default, + py_type_name, +) +from tests import unittest +from tests.unit.docs import BaseDocsTest + + +class TestPythonTypeName(unittest.TestCase): + def test_structure(self): + self.assertEqual('dict', py_type_name('structure')) + + def test_list(self): + self.assertEqual('list', py_type_name('list')) + + def test_map(self): + self.assertEqual('dict', py_type_name('map')) + + def test_string(self): + self.assertEqual('string', py_type_name('string')) + + def test_character(self): + self.assertEqual('string', py_type_name('character')) + + def test_blob(self): + self.assertEqual('bytes', py_type_name('blob')) + + def test_timestamp(self): + self.assertEqual('datetime', py_type_name('timestamp')) + + def test_integer(self): + self.assertEqual('integer', py_type_name('integer')) + + def test_long(self): + self.assertEqual('integer', py_type_name('long')) + + def test_float(self): + self.assertEqual('float', py_type_name('float')) + + def test_double(self): + self.assertEqual('float', py_type_name('double')) + + +class TestPythonDefault(unittest.TestCase): + def test_structure(self): + self.assertEqual('{...}', py_default('structure')) + + def test_list(self): + self.assertEqual('[...]', py_default('list')) + + def test_map(self): + self.assertEqual('{...}', py_default('map')) + + def test_string(self): + self.assertEqual('\'string\'', py_default('string')) + + def test_blob(self): + self.assertEqual('b\'bytes\'', py_default('blob')) + + def test_timestamp(self): + self.assertEqual('datetime(2015, 1, 1)', py_default('timestamp')) + + def test_integer(self): + self.assertEqual('123', py_default('integer')) + + def test_long(self): + self.assertEqual('123', py_default('long')) + + def test_double(self): + self.assertEqual('123.0', py_default('double')) + + +class TestGetOfficialServiceName(BaseDocsTest): + def setUp(self): + super().setUp() + self.service_model.metadata = {'serviceFullName': 'Official Name'} + + def test_no_short_name(self): + self.assertEqual( + 'Official Name', get_official_service_name(self.service_model) + ) + + def test_aws_short_name(self): + self.service_model.metadata['serviceAbbreviation'] = 'AWS Foo' + self.assertEqual( + 'Official Name (Foo)', + get_official_service_name(self.service_model), + ) + + def test_amazon_short_name(self): + self.service_model.metadata['serviceAbbreviation'] = 'Amazon Foo' + self.assertEqual( + 'Official Name (Foo)', + get_official_service_name(self.service_model), + ) + + def test_short_name_in_official_name(self): + self.service_model.metadata['serviceFullName'] = 'The Foo Service' + self.service_model.metadata['serviceAbbreviation'] = 'Amazon Foo' + self.assertEqual( + 'The Foo Service', get_official_service_name(self.service_model) + ) + + +class TestAutopopulatedParam(BaseDocsTest): + def setUp(self): + super().setUp() + self.name = 'MyMember' + self.param = AutoPopulatedParam(self.name) + + def test_request_param_not_required(self): + section = self.doc_structure.add_new_section(self.name) + section.add_new_section('param-documentation') + self.param.document_auto_populated_param( + 'docs.request-params', self.doc_structure + ) + self.assert_contains_line('this parameter is automatically populated') + + def test_request_param_required(self): + section = self.doc_structure.add_new_section(self.name) + is_required_section = section.add_new_section('is-required') + section.add_new_section('param-documentation') + is_required_section.write('**[REQUIRED]**') + self.param.document_auto_populated_param( + 'docs.request-params', self.doc_structure + ) + self.assert_not_contains_line('**[REQUIRED]**') + self.assert_contains_line('this parameter is automatically populated') + + def test_non_default_param_description(self): + description = 'This is a custom description' + self.param = AutoPopulatedParam(self.name, description) + section = self.doc_structure.add_new_section(self.name) + section.add_new_section('param-documentation') + self.param.document_auto_populated_param( + 'docs.request-params', self.doc_structure + ) + self.assert_contains_line(description) + + def test_request_example(self): + top_section = self.doc_structure.add_new_section('structure-value') + section = top_section.add_new_section(self.name) + example = 'MyMember: \'string\'' + section.write(example) + self.assert_contains_line(example) + self.param.document_auto_populated_param( + 'docs.request-example', self.doc_structure + ) + self.assert_not_contains_line(example) + + def test_param_not_in_section_request_param(self): + self.doc_structure.add_new_section('Foo') + self.param.document_auto_populated_param( + 'docs.request-params', self.doc_structure + ) + self.assertEqual( + '', self.doc_structure.flush_structure().decode('utf-8') + ) + + def test_param_not_in_section_request_example(self): + top_section = self.doc_structure.add_new_section('structure-value') + section = top_section.add_new_section('Foo') + example = 'Foo: \'string\'' + section.write(example) + self.assert_contains_line(example) + self.param.document_auto_populated_param( + 'docs.request-example', self.doc_structure + ) + self.assert_contains_line(example) + + +class TestHideParamFromOperations(BaseDocsTest): + def setUp(self): + super().setUp() + self.name = 'MyMember' + self.param = HideParamFromOperations( + 's3', self.name, ['SampleOperation'] + ) + + def test_hides_params_from_doc_string(self): + section = self.doc_structure.add_new_section(self.name) + param_signature = f':param {self.name}: ' + section.write(param_signature) + self.assert_contains_line(param_signature) + self.param.hide_param( + 'docs.request-params.s3.SampleOperation.complete-section', + self.doc_structure, + ) + self.assert_not_contains_line(param_signature) + + def test_hides_param_from_example(self): + structure = self.doc_structure.add_new_section('structure-value') + section = structure.add_new_section(self.name) + example = f'{self.name}: \'string\'' + section.write(example) + self.assert_contains_line(example) + self.param.hide_param( + 'docs.request-example.s3.SampleOperation.complete-section', + self.doc_structure, + ) + self.assert_not_contains_line(example) + + +class TestAppendParamDocumentation(BaseDocsTest): + def setUp(self): + super().setUp() + self.name = 'MyMember' + self.param = AppendParamDocumentation(self.name, 'hello!') + + def test_appends_documentation(self): + section = self.doc_structure.add_new_section(self.name) + param_section = section.add_new_section('param-documentation') + param_section.writeln('foo') + self.param.append_documentation( + 'docs.request-params', self.doc_structure + ) + self.assert_contains_line('foo\n') + self.assert_contains_line('hello!') + + +class TestEscapeControls(unittest.TestCase): + def test_escapes_controls(self): + escaped = escape_controls('\na\rb\tc\fd\be') + self.assertEqual(escaped, '\\na\\rb\\tc\\fd\\be') diff --git a/testbed/boto__botocore/tests/unit/docs/test_waiter.py b/testbed/boto__botocore/tests/unit/docs/test_waiter.py new file mode 100644 index 0000000000000000000000000000000000000000..556045dfca770bc25965a2c53b1e4f94a590d3ee --- /dev/null +++ b/testbed/boto__botocore/tests/unit/docs/test_waiter.py @@ -0,0 +1,77 @@ +# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +from botocore.docs.waiter import WaiterDocumenter +from botocore.waiter import WaiterModel +from tests.unit.docs import BaseDocsTest + + +class TestWaiterDocumenter(BaseDocsTest): + def setUp(self): + super().setUp() + self.add_shape_to_params('Biz', 'String') + self.setup_client() + waiter_model = WaiterModel(self.waiter_json_model) + self.waiter_documenter = WaiterDocumenter( + client=self.client, + service_waiter_model=waiter_model, + root_docs_path=self.root_services_path, + ) + + def test_document_waiters(self): + self.waiter_documenter.document_waiters(self.doc_structure) + self.assert_contains_lines_in_order( + [ + '=======', + 'Waiters', + '=======', + 'The available waiters are:', + 'waiter/SampleOperationComplete', + ] + ) + self.assert_contains_lines_in_order( + [ + '.. py:class:: MyService.Waiter.SampleOperationComplete', + ' ::', + ' waiter = client.get_waiter(\'sample_operation_complete\')', + ' .. py:method:: wait(**kwargs)', + ( + ' Polls :py:meth:`MyService.Client.sample_operation` ' + 'every 15 seconds until a successful state is reached. An error ' + 'is raised after 40 failed checks.' + ), + ' **Request Syntax**', + ' ::', + ' waiter.wait(', + ' Biz=\'string\'', + ' )', + ' :type Biz: string', + ' :param Biz:', + ' :type WaiterConfig: dict', + ' :param WaiterConfig:', + ( + 'A dictionary that provides parameters to control waiting ' + 'behavior.' + ), + ' - **Delay** *(integer) --*', + ( + ' The amount of time in seconds to wait between attempts. ' + 'Default: 15' + ), + ' - **MaxAttempts** *(integer) --*', + ' The maximum number of attempts to be made. Default: 40', + ' :returns: None', + ], + self.get_nested_service_contents( + 'myservice', 'waiter', 'SampleOperationComplete' + ), + ) diff --git a/testbed/boto__botocore/tests/unit/protocols/input/ec2.json b/testbed/boto__botocore/tests/unit/protocols/input/ec2.json new file mode 100644 index 0000000000000000000000000000000000000000..486766a9b480c1bd2b4b582bb522b0ab922fbd3d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/input/ec2.json @@ -0,0 +1,531 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + }, + "Bar": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Foo": "val1", + "Bar": "val2" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2" + } + } + ] + }, + { + "description": "Structure with locationName and queryName applied to members", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + }, + "Bar": { + "shape": "StringType", + "locationName": "barLocationName" + }, + "Yuck": { + "shape": "StringType", + "locationName": "yuckLocationName", + "queryName": "yuckQueryName" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Foo": "val1", + "Bar": "val2", + "Yuck": "val3" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Foo=val1&BarLocationName=val2&yuckQueryName=val3" + } + } + ] + }, + { + "description": "Nested structure members", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "StructArg": { + "shape": "StructType", + "locationName": "Struct" + } + } + }, + "StructType": { + "type": "structure", + "members": { + "ScalarArg": { + "shape": "StringType", + "locationName": "Scalar" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "StructArg": { + "ScalarArg": "foo" + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Struct.Scalar=foo" + } + } + ] + }, + { + "description": "List types", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListArg": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "Strings" + } + }, + "Strings": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ListArg": [ + "foo", + "bar", + "baz" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz" + } + } + ] + }, + { + "description": "List with location name applied to member", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListArg": { + "shape": "ListType", + "locationName": "ListMemberName" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType", + "LocationName": "item" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ListArg": [ + "a", + "b", + "c" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c" + } + } + ] + }, + { + "description": "List with locationName and queryName", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListArg": { + "shape": "ListType", + "locationName": "ListMemberName", + "queryName": "ListQueryName" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType", + "LocationName": "item" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ListArg": [ + "a", + "b", + "c" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c" + } + } + ] + }, + { + "description": "Base64 encoded Blobs", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "BlobArg": { + "shape": "BlobType" + } + } + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BlobArg": "foo" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&BlobArg=Zm9v" + } + } + ] + }, + { + "description": "Timestamp values", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeCustom": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "unixTimestamp", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "TimeArg": 1422172800, + "TimeCustom": 1422172800, + "TimeFormat": 1422172800 + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z&TimeCustom=1422172800&TimeFormat=1422172800" + } + } + ] + }, + { + "description": "Idempotency token auto fill", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Token": { + "shape": "StringType", + "idempotencyToken": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Token": "abc123" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Token=abc123" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Token=00000000-0000-4000-8000-000000000000" + } + } + ] + }, + { + "description": "Endpoint host trait", + "metadata": { + "protocol": "ec2", + "apiVersion": "2014-01-01" + }, + "clientEndpoint": "https://service.region.amazonaws.com", + "shapes": { + "StaticInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType" + } + } + }, + "MemberRefInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType", + "hostLabel": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "name": "StaticOp", + "input": { + "shape": "StaticInputShape" + }, + "endpoint":{ + "hostPrefix": "data-" + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=StaticOp&Version=2014-01-01&Name=myname", + "host": "data-service.region.amazonaws.com" + } + }, + { + "given": { + "name": "MemberRefOp", + "input": { + "shape": "MemberRefInputShape" + }, + "endpoint":{ + "hostPrefix": "foo-{Name}." + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=MemberRefOp&Version=2014-01-01&Name=myname", + "host": "foo-myname.service.region.amazonaws.com" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/input/json.json b/testbed/boto__botocore/tests/unit/protocols/input/json.json new file mode 100644 index 0000000000000000000000000000000000000000..5672848a9038d9482f2b9627b5309c2c7783429a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/input/json.json @@ -0,0 +1,906 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "body": "{\"Name\": \"myname\"}", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/" + } + } + ] + }, + { + "description": "Timestamp values", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeCustom": { + "timestampFormat": "rfc822", + "shape": "TimestampType" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "rfc822", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "TimeArg": 1422172800, + "TimeCustom": 1422172800, + "TimeFormat": 1422172800 + }, + "serialized": { + "body": "{\"TimeArg\": 1422172800, \"TimeCustom\": \"Sun, 25 Jan 2015 08:00:00 GMT\", \"TimeFormat\": \"Sun, 25 Jan 2015 08:00:00 GMT\"}", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/" + } + } + ] + }, + { + "description": "Base64 encoded Blobs", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "BlobArg": { + "shape": "BlobType" + }, + "BlobMap": { + "shape": "BlobMapType" + } + } + }, + "BlobType": { + "type": "blob" + }, + "BlobMapType": { + "type": "map", + "key": {"shape": "StringType"}, + "value": {"shape": "BlobType"} + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BlobArg": "foo" + }, + "serialized": { + "body": "{\"BlobArg\": \"Zm9v\"}", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BlobMap": { + "key1": "foo", + "key2": "bar" + } + }, + "serialized": { + "body": "{\"BlobMap\": {\"key1\": \"Zm9v\", \"key2\": \"YmFy\"}}", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/" + } + } + ] + }, + { + "description": "Nested blobs", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListOfStructures" + } + } + }, + "ListOfStructures": { + "type": "list", + "member": { + "shape": "BlobType" + } + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ListParam": ["foo", "bar"] + }, + "serialized": { + "body": "{\"ListParam\": [\"Zm9v\", \"YmFy\"]}", + "uri": "/", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + } + } + } + ] + }, + { + "description": "Recursive shapes", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "RecursiveStruct": { + "shape": "RecursiveStructType" + } + } + }, + "RecursiveStructType": { + "type": "structure", + "members": { + "NoRecurse": { + "shape": "StringType" + }, + "RecursiveStruct": { + "shape": "RecursiveStructType" + }, + "RecursiveList": { + "shape": "RecursiveListType" + }, + "RecursiveMap": { + "shape": "RecursiveMapType" + } + } + }, + "RecursiveListType": { + "type": "list", + "member": { + "shape": "RecursiveStructType" + } + }, + "RecursiveMapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "RecursiveStructType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + }, + "serialized": { + "uri": "/", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + }, + "serialized": { + "uri": "/", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + } + } + }, + "serialized": { + "uri": "/", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "NoRecurse": "bar" + } + ] + } + }, + "serialized": { + "uri": "/", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"NoRecurse\": \"bar\"}]}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "RecursiveStruct": { + "NoRecurse": "bar" + } + } + ] + } + }, + "serialized": { + "uri": "/", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"RecursiveStruct\": {\"NoRecurse\": \"bar\"}}]}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveMap": { + "foo": { + "NoRecurse": "foo" + }, + "bar": { + "NoRecurse": "bar" + } + } + } + }, + "serialized": { + "uri": "/", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\"RecursiveStruct\": {\"RecursiveMap\": {\"foo\": {\"NoRecurse\": \"foo\"}, \"bar\": {\"NoRecurse\": \"bar\"}}}}" + } + } + ] + }, + { + "description": "Empty maps", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "MapType" + } + } + }, + "MapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "Map": {} + }, + "serialized": { + "body": "{\"Map\": {}}", + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/" + } + } + ] + }, + { + "description": "Idempotency token auto fill", + "metadata": { + "protocol": "json", + "apiVersion": "2014-01-01", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Token": { + "shape": "StringType", + "idempotencyToken": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST" + }, + "name": "OperationName" + }, + "params": { + "Token": "abc123" + }, + "serialized": { + "uri": "/", + "headers": {}, + "body": "{\"Token\": \"abc123\"}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "uri": "/", + "headers": {}, + "body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}" + } + } + ] + }, + { + "description": "Endpoint host trait static prefix", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "clientEndpoint": "https://service.region.amazonaws.com", + "shapes": { + "StaticInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType" + } + } + }, + "MemberRefInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType", + "hostLabel": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "name": "StaticOp", + "input": { + "shape": "StaticInputShape" + }, + "http": { + "method": "POST" + }, + "endpoint":{ + "hostPrefix": "data-" + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.StaticOp", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"Name\": \"myname\"}", + "host": "data-service.region.amazonaws.com" + } + }, + { + "given": { + "name": "MemberRefOp", + "input": { + "shape": "MemberRefInputShape" + }, + "http": { + "method": "POST" + }, + "endpoint":{ + "hostPrefix": "foo-{Name}." + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.MemberRefOp", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"Name\": \"myname\"}", + "host": "foo-myname.service.region.amazonaws.com" + } + } + ] + }, + { + "description": "Serializes document with standalone primitive type in a JSON request.", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "inlineDocument": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "inlineDocument": "foo" + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"inlineDocument\": \"foo\"}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "inlineDocument": 123 + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"inlineDocument\": 123}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "inlineDocument": 1.2 + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"inlineDocument\": 1.2}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "inlineDocument": true + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"inlineDocument\": true}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "inlineDocument": "" + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"inlineDocument\": \"\"}" + } + } + ] + }, + { + "description": "Serializes inline document in a JSON request.", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "inlineDocument": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "inlineDocument": {"foo": "bar"} + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"inlineDocument\": {\"foo\": \"bar\"}}" + } + } + ] + }, + { + "description": "Serializes aggregate documents in a JSON request.", + "metadata": { + "protocol": "json", + "jsonVersion": "1.1", + "targetPrefix": "com.amazonaws.foo" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "parentDocument": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "parentDocument": { + "str": "test", + "num": 123, + "float": 1.2, + "bool": true, + "null": "", + "document": {"foo": false}, + "list": ["myname", 321, 1.3, true, "", {"nested": true}, [200, ""]] + } + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"parentDocument\": {\"str\": \"test\", \"num\": 123, \"float\": 1.2, \"bool\": true, \"null\": \"\", \"document\": {\"foo\": false}, \"list\": [\"myname\", 321, 1.3, true, \"\", {\"nested\": true}, [200, \"\"]]}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName", + "http": { + "method": "POST" + } + }, + "params": { + "parentDocument": [ + "test", + 123, + 1.2, + true, + "", + {"str": "myname", "num": 321, "float": 1.3, "bool": true, "null": "", "document": {"nested": true}, "list": [200, ""]}, + ["foo", false] + ] + }, + "serialized": { + "headers": { + "X-Amz-Target": "com.amazonaws.foo.OperationName", + "Content-Type": "application/x-amz-json-1.1" + }, + "uri": "/", + "body": "{\"parentDocument\": [\"test\", 123, 1.2, true, \"\", {\"str\": \"myname\", \"num\": 321, \"float\": 1.3, \"bool\": true, \"null\": \"\", \"document\": {\"nested\": true}, \"list\": [200, \"\"]}, [\"foo\", false]]}" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/input/query.json b/testbed/boto__botocore/tests/unit/protocols/input/query.json new file mode 100644 index 0000000000000000000000000000000000000000..ac93e9eef6d83db0c2551c6d587b4355764d6690 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/input/query.json @@ -0,0 +1,1002 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + }, + "Bar": { + "shape": "StringType" + }, + "Baz": { + "shape": "BooleanType" + } + } + }, + "StringType": { + "type": "string" + }, + "BooleanType": { + "type": "boolean" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Foo": "val1", + "Bar": "val2" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Baz": true + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Baz=true" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Baz": false + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Baz=false" + } + } + ] + }, + { + "description": "Nested structure members", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "StructArg": { + "shape": "StructType" + } + } + }, + "StructType": { + "type": "structure", + "members": { + "ScalarArg": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "StructArg": { + "ScalarArg": "foo" + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&StructArg.ScalarArg=foo" + } + } + ] + }, + { + "description": "List types", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListArg": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "Strings" + } + }, + "Strings": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ListArg": [ + "foo", + "bar", + "baz" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ListArg": [] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ListArg=" + } + } + ] + }, + { + "description": "Flattened list", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ScalarArg": { + "shape": "StringType" + }, + "ListArg": { + "shape": "ListType" + }, + "NamedListArg": { + "shape": "NamedListType" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType" + }, + "flattened": true + }, + "NamedListType": { + "type": "list", + "member": { + "shape": "StringType", + "locationName": "Foo" + }, + "flattened": true + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ScalarArg": "foo", + "ListArg": [ + "a", + "b", + "c" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ScalarArg=foo&ListArg.1=a&ListArg.2=b&ListArg.3=c" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "NamedListArg": [ + "a" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Foo.1=a" + } + } + ] + }, + { + "description": "Serialize flattened map type", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "MapArg": { + "shape": "StringMap" + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + }, + "flattened": true + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "MapArg": { + "key1": "val1", + "key2": "val2" + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&MapArg.1.key=key1&MapArg.1.value=val1&MapArg.2.key=key2&MapArg.2.value=val2" + } + } + ] + }, + { + "description": "Non flattened list with LocationName", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListArg": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType", + "locationName": "item" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ListArg": [ + "a", + "b", + "c" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ListArg.item.1=a&ListArg.item.2=b&ListArg.item.3=c" + } + } + ] + }, + { + "description": "Flattened list with LocationName", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ScalarArg": { + "shape": "StringType" + }, + "ListArg": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType", + "locationName": "ListArgLocation" + }, + "flattened": true + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "ScalarArg": "foo", + "ListArg": [ + "a", + "b", + "c" + ] + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&ScalarArg=foo&ListArgLocation.1=a&ListArgLocation.2=b&ListArgLocation.3=c" + } + } + ] + }, + { + "description": "Serialize map type", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "MapArg": { + "shape": "StringMap" + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "MapArg": { + "key1": "val1", + "key2": "val2" + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&MapArg.entry.1.key=key1&MapArg.entry.1.value=val1&MapArg.entry.2.key=key2&MapArg.entry.2.value=val2" + } + } + ] + }, + { + "description": "Serialize map type with locationName", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "MapArg": { + "shape": "StringMap" + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType", + "locationName": "TheKey" + }, + "value": { + "shape": "StringType", + "locationName": "TheValue" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "MapArg": { + "key1": "val1", + "key2": "val2" + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&MapArg.entry.1.TheKey=key1&MapArg.entry.1.TheValue=val1&MapArg.entry.2.TheKey=key2&MapArg.entry.2.TheValue=val2" + } + } + ] + }, + { + "description": "Base64 encoded Blobs", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "BlobArg": { + "shape": "BlobType" + } + } + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BlobArg": "foo" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&BlobArg=Zm9v" + } + } + ] + }, + { + "description": "Timestamp values", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeCustom": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "unixTimestamp", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "TimeArg": 1422172800, + "TimeCustom": 1422172800, + "TimeFormat": 1422172800 + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z&TimeCustom=1422172800&TimeFormat=1422172800" + } + } + ] + }, + { + "description": "Recursive shapes", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "RecursiveStruct": { + "shape": "RecursiveStructType" + } + } + }, + "RecursiveStructType": { + "type": "structure", + "members": { + "NoRecurse": { + "shape": "StringType" + }, + "RecursiveStruct": { + "shape": "RecursiveStructType" + }, + "RecursiveList": { + "shape": "RecursiveListType" + }, + "RecursiveMap": { + "shape": "RecursiveMapType" + } + } + }, + "RecursiveListType": { + "type": "list", + "member": { + "shape": "RecursiveStructType" + } + }, + "RecursiveMapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "RecursiveStructType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.NoRecurse=foo" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveStruct.NoRecurse=foo" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + } + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveStruct.RecursiveStruct.RecursiveStruct.NoRecurse=foo" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "NoRecurse": "bar" + } + ] + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.NoRecurse=bar" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "RecursiveStruct": { + "NoRecurse": "bar" + } + } + ] + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.RecursiveStruct.NoRecurse=bar" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveMap": { + "foo": { + "NoRecurse": "foo" + }, + "bar": { + "NoRecurse": "bar" + } + } + } + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveMap.entry.1.key=foo&RecursiveStruct.RecursiveMap.entry.1.value.NoRecurse=foo&RecursiveStruct.RecursiveMap.entry.2.key=bar&RecursiveStruct.RecursiveMap.entry.2.value.NoRecurse=bar" + } + } + ] + }, + { + "description": "Idempotency token auto fill", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Token": { + "shape": "StringType", + "idempotencyToken": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST" + }, + "name": "OperationName" + }, + "params": { + "Token": "abc123" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Token=abc123" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=OperationName&Version=2014-01-01&Token=00000000-0000-4000-8000-000000000000" + } + } + ] + }, + { + "description": "Endpoint host trait", + "metadata": { + "protocol": "query", + "apiVersion": "2014-01-01" + }, + "clientEndpoint": "https://service.region.amazonaws.com", + "shapes": { + "StaticInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType" + } + } + }, + "MemberRefInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType", + "hostLabel": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "name": "StaticOp", + "input": { + "shape": "StaticInputShape" + }, + "http": { + "method": "POST" + }, + "endpoint":{ + "hostPrefix": "data-" + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=StaticOp&Version=2014-01-01&Name=myname", + "host": "data-service.region.amazonaws.com" + } + }, + { + "given": { + "name": "MemberRefOp", + "input": { + "shape": "MemberRefInputShape" + }, + "http": { + "method": "POST" + }, + "endpoint":{ + "hostPrefix": "foo-{Name}." + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/", + "headers": { + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" + }, + "body": "Action=MemberRefOp&Version=2014-01-01&Name=myname", + "host": "foo-myname.service.region.amazonaws.com" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/input/rest-json.json b/testbed/boto__botocore/tests/unit/protocols/input/rest-json.json new file mode 100644 index 0000000000000000000000000000000000000000..54f327dbd8d79b419b2dfd884bb80230b98ddff8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/input/rest-json.json @@ -0,0 +1,2194 @@ +[ + { + "description": "No parameters", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": {}, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobs" + }, + "name": "OperationName" + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobs", + "headers": {} + } + } + ] + }, + { + "description": "URI parameter only with no location name", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "foo" + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobsByPipeline/foo", + "headers": {} + } + } + ] + }, + { + "description": "URI parameter only with location name", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType", + "location": "uri", + "locationName": "PipelineId" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Foo": "bar" + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobsByPipeline/bar", + "headers": {} + } + } + ] + }, + { + "description": "Querystring list of strings", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Items": { + "shape": "StringList", + "location": "querystring", + "locationName": "item" + } + } + }, + "StringList": { + "type": "list", + "member": { + "shape": "String" + } + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/path" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Items": ["value1", "value2"] + }, + "serialized": { + "body": "", + "uri": "/path?item=value1&item=value2", + "headers": {} + } + } + ] + }, + { + "description": "String to string maps in querystring", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri" + }, + "QueryDoc": { + "shape": "MapStringStringType", + "location": "querystring" + } + } + }, + "MapStringStringType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "foo", + "QueryDoc": { + "bar": "baz", + "fizz": "buzz" + } + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobsByPipeline/foo?bar=baz&fizz=buzz", + "headers": {} + } + } + ] + }, + { + "description": "String to string list maps in querystring", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri" + }, + "QueryDoc": { + "shape": "MapStringStringListType", + "location": "querystring" + } + } + }, + "MapStringStringListType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringListType" + } + }, + "StringListType": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "id", + "QueryDoc": { + "foo": ["bar", "baz"], + "fizz": ["buzz", "pop"] + } + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobsByPipeline/id?foo=bar&foo=baz&fizz=buzz&fizz=pop", + "headers": {} + } + } + ] + }, + { + "description": "Boolean in querystring", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "BoolQuery": { + "shape": "BoolType", + "location": "querystring", + "locationName": "bool-query" + } + } + }, + "BoolType": { + "type": "boolean" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/path" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BoolQuery": true + }, + "serialized": { + "body": "", + "uri": "/path?bool-query=true", + "headers": {} + } + }, + { + "given": { + "http": { + "method": "GET", + "requestUri": "/path" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BoolQuery": false + }, + "serialized": { + "body": "", + "uri": "/path?bool-query=false", + "headers": {} + } + } + ] + }, + { + "description": "URI parameter and querystring params", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri", + "locationName": "PipelineId" + }, + "Ascending": { + "shape": "StringType", + "location": "querystring", + "locationName": "Ascending" + }, + "PageToken": { + "shape": "StringType", + "location": "querystring", + "locationName": "PageToken" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "foo", + "Ascending": "true", + "PageToken": "bar" + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar", + "headers": {} + } + } + ] + }, + { + "description": "URI parameter, querystring params and JSON body", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri", + "locationName": "PipelineId" + }, + "Ascending": { + "shape": "StringType", + "location": "querystring", + "locationName": "Ascending" + }, + "PageToken": { + "shape": "StringType", + "location": "querystring", + "locationName": "PageToken" + }, + "Config": { + "shape": "StructType" + } + } + }, + "StringType": { + "type": "string" + }, + "StructType": { + "type": "structure", + "members": { + "A": { + "shape": "StringType" + }, + "B": { + "shape": "StringType" + } + } + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "foo", + "Ascending": "true", + "PageToken": "bar", + "Config": { + "A": "one", + "B": "two" + } + }, + "serialized": { + "body": "{\"Config\": {\"A\": \"one\", \"B\": \"two\"}}", + "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar", + "headers": {} + } + } + ] + }, + { + "description": "URI parameter, querystring params, headers and JSON body", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri", + "locationName": "PipelineId" + }, + "Ascending": { + "shape": "StringType", + "location": "querystring", + "locationName": "Ascending" + }, + "Checksum": { + "shape": "StringType", + "location": "header", + "locationName": "x-amz-checksum" + }, + "PageToken": { + "shape": "StringType", + "location": "querystring", + "locationName": "PageToken" + }, + "Config": { + "shape": "StructType" + } + } + }, + "StringType": { + "type": "string" + }, + "StructType": { + "type": "structure", + "members": { + "A": { + "shape": "StringType" + }, + "B": { + "shape": "StringType" + } + } + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "foo", + "Ascending": "true", + "Checksum": "12345", + "PageToken": "bar", + "Config": { + "A": "one", + "B": "two" + } + }, + "serialized": { + "body": "{\"Config\": {\"A\": \"one\", \"B\": \"two\"}}", + "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar", + "headers": { + "x-amz-checksum": "12345" + } + } + } + ] + }, + { + "description": "Streaming payload", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "vaultName": { + "shape": "StringType", + "location": "uri", + "locationName": "vaultName" + }, + "checksum": { + "shape": "StringType", + "location": "header", + "locationName": "x-amz-sha256-tree-hash" + }, + "body": { + "shape": "Stream" + } + }, + "required": [ + "vaultName" + ], + "payload": "body" + }, + "StringType": { + "type": "string" + }, + "Stream": { + "type": "blob", + "streaming": true + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/vaults/{vaultName}/archives" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "vaultName": "name", + "checksum": "foo", + "body": "contents" + }, + "serialized": { + "body": "contents", + "uri": "/2014-01-01/vaults/name/archives", + "headers": { + "x-amz-sha256-tree-hash": "foo" + } + } + } + ] + }, + { + "description": "Serialize blobs in body", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType", + "location": "uri", + "locationName": "Foo" + }, + "Bar": {"shape": "BlobType"} + }, + "required": [ + "Foo" + ] + }, + "StringType": { + "type": "string" + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/{Foo}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Foo": "foo_name", + "Bar": "Blob param" + }, + "serialized": { + "body": "{\"Bar\": \"QmxvYiBwYXJhbQ==\"}", + "uri": "/2014-01-01/foo_name" + } + } + ] + }, + { + "description": "Blob payload", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "shape": "FooShape" + } + } + }, + "FooShape": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape", + "payload": "foo" + }, + "name": "OperationName" + }, + "params": { + "foo": "bar" + }, + "serialized": { + "method": "POST", + "body": "bar", + "uri": "/" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape", + "payload": "foo" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/" + } + } + ] + }, + { + "description": "Structure payload", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "shape": "FooShape" + } + } + }, + "FooShape": { + "locationName": "foo", + "type": "structure", + "members": { + "baz": { + "shape": "BazShape" + } + } + }, + "BazShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape", + "payload": "foo" + }, + "name": "OperationName" + }, + "params": { + "foo": { + "baz": "bar" + } + }, + "serialized": { + "method": "POST", + "body": "{\"baz\": \"bar\"}", + "uri": "/" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape", + "payload": "foo" + }, + "name": "OperationName" + }, + "params": {}, + "serialized": { + "method": "POST", + "body": "{}", + "uri": "/" + } + } + ] + }, + { + "description": "Omits null query params, but serializes empty strings", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "location":"querystring", + "locationName":"param-name", + "shape": "Foo" + } + } + }, + "Foo": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "name": "OperationName", + "http": { + "method": "POST", + "requestUri": "/path" + }, + "input": { "shape": "InputShape" } + }, + "params": { "foo": null }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/path" + } + }, + { + "given": { + "name": "OperationName", + "http": { + "method": "POST", + "requestUri": "/path?abc=mno" + }, + "input": { "shape": "InputShape" } + }, + "params": { "foo": "" }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/path?abc=mno¶m-name=" + } + } + ] + }, + { + "description": "Recursive shapes", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "RecursiveStruct": { + "shape": "RecursiveStructType" + } + } + }, + "RecursiveStructType": { + "type": "structure", + "members": { + "NoRecurse": { + "shape": "StringType" + }, + "RecursiveStruct": { + "shape": "RecursiveStructType" + }, + "RecursiveList": { + "shape": "RecursiveListType" + }, + "RecursiveMap": { + "shape": "RecursiveMapType" + } + } + }, + "RecursiveListType": { + "type": "list", + "member": { + "shape": "RecursiveStructType" + } + }, + "RecursiveMapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "RecursiveStructType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + }, + "serialized": { + "uri": "/path" , + "headers": {}, + "body": "{\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + } + } + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "NoRecurse": "bar" + } + ] + } + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"NoRecurse\": \"bar\"}]}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "RecursiveStruct": { + "NoRecurse": "bar" + } + } + ] + } + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"RecursiveStruct\": {\"NoRecurse\": \"bar\"}}]}}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveMap": { + "foo": { + "NoRecurse": "foo" + }, + "bar": { + "NoRecurse": "bar" + } + } + } + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"RecursiveStruct\": {\"RecursiveMap\": {\"foo\": {\"NoRecurse\": \"foo\"}, \"bar\": {\"NoRecurse\": \"bar\"}}}}" + } + } + ] + }, + { + "description": "Timestamp values", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeArgInHeader": { + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timearg" + }, + "TimeArgInQuery": { + "shape": "TimestampType", + "location": "querystring", + "locationName": "TimeQuery" + }, + "TimeCustom": { + "timestampFormat": "iso8601", + "shape": "TimestampType" + }, + "TimeCustomInHeader": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timecustom-header" + }, + "TimeCustomInQuery": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType", + "location": "querystring", + "locationName": "TimeCustomQuery" + }, + "TimeFormat": { + "shape": "TimestampFormatRfcType" + }, + "TimeFormatInHeader": { + "shape": "TimestampFormatUnixType", + "location": "header", + "locationName": "x-amz-timeformat-header" + }, + "TimeFormatInQuery": { + "shape": "TimestampFormatUnixType", + "location": "querystring", + "locationName": "TimeFormatQuery" + } + } + }, + "TimestampFormatRfcType": { + "timestampFormat": "rfc822", + "type": "timestamp" + }, + "TimestampFormatUnixType": { + "timestampFormat": "unixTimestamp", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "TimeArg": 1422172800, + "TimeArgInQuery": 1422172800, + "TimeArgInHeader": 1422172800, + "TimeCustom": 1422172800, + "TimeCustomInQuery": 1422172800, + "TimeCustomInHeader": 1422172800, + "TimeFormat": 1422172800, + "TimeFormatInQuery": 1422172800, + "TimeFormatInHeader": 1422172800 + }, + "serialized": { + "uri": "/path?TimeQuery=2015-01-25T08%3A00%3A00Z&TimeCustomQuery=1422172800&TimeFormatQuery=1422172800", + "headers": { + "x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT", + "x-amz-timecustom-header": "1422172800", + "x-amz-timeformat-header": "1422172800" + }, + "body": "{\"TimeArg\": 1422172800, \"TimeCustom\": \"2015-01-25T08:00:00Z\", \"TimeFormat\": \"Sun, 25 Jan 2015 08:00:00 GMT\"}" + } + } + ] + }, + { + "description": "Named locations in JSON body", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType", + "locationName": "timestamp_location" + } + } + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "TimeArg": 1422172800 + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"timestamp_location\": 1422172800}" + } + } + ] + }, + { + "description": "String payload", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "shape": "FooShape" + } + } + }, + "FooShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape", + "payload": "foo" + }, + "name": "OperationName" + }, + "params": { + "foo": "bar" + }, + "serialized": { + "method": "POST", + "body": "bar", + "uri": "/" + } + } + ] + }, + { + "description": "Idempotency token auto fill", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Token": { + "shape": "StringType", + "idempotencyToken": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "Token": "abc123" + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"Token\": \"abc123\"}" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}" + } + } + ] + }, + { + "description": "JSON value trait", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Attr": { + "shape": "StringType", + "jsonvalue": true, + "location": "header", + "locationName": "X-Amz-Foo" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "Attr": {"Foo":"Bar"} + }, + "serialized": { + "uri": "/path", + "headers": {"X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="}, + "body": "" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "" + } + } + ] + }, + { + "description": "Endpoint host trait", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "clientEndpoint": "https://service.region.amazonaws.com", + "shapes": { + "StaticInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType" + } + } + }, + "MemberRefInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType", + "hostLabel": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "name": "StaticOp", + "input": { + "shape": "StaticInputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "endpoint":{ + "hostPrefix": "data-" + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/path", + "body": "{\"Name\": \"myname\"}", + "host": "data-service.region.amazonaws.com" + } + }, + { + "given": { + "name": "MemberRefOp", + "input": { + "shape": "MemberRefInputShape" + }, + "http": { + "method": "GET", + "requestUri": "/path" + }, + "endpoint":{ + "hostPrefix": "foo-{Name}." + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/path", + "body": "{\"Name\": \"myname\"}", + "host": "foo-myname.service.region.amazonaws.com" + } + } + ] + }, + { + "description": "Serializes document with standalone primitive as part of the JSON request payload with no escaping.", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "documentValue": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": "foo" + }, + "serialized": { + "body": "{\"documentValue\": \"foo\"}", + "uri": "/InlineDocument" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": 123 + }, + "serialized": { + "body": "{\"documentValue\": 123}", + "uri": "/InlineDocument" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": 1.2 + }, + "serialized": { + "body": "{\"documentValue\": 1.2}", + "uri": "/InlineDocument" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": true + }, + "serialized": { + "body": "{\"documentValue\": true}", + "uri": "/InlineDocument" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": "" + }, + "serialized": { + "body": "{\"documentValue\": \"\"}", + "uri": "/InlineDocument" + } + } + ] + }, + { + "description": "Serializes inline documents as part of the JSON request payload with no escaping.", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "documentValue": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": {"foo": "bar"} + }, + "serialized": { + "body": "{\"documentValue\": {\"foo\": \"bar\"}}", + "uri": "/InlineDocument" + } + } + ] + }, + { + "description": "Serializes aggregate documents as part of the JSON request payload with no escaping.", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "documentValue": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": { + "str": "test", + "num": 123, + "float": 1.2, + "bool": true, + "null": "", + "document": {"foo": false}, + "list": ["myname", 321, 1.3, true, "", {"nested": true}, [200, ""]] + } + }, + "serialized": { + "body": "{\"documentValue\": {\"str\": \"test\", \"num\": 123, \"float\": 1.2, \"bool\": true, \"null\": \"\", \"document\": {\"foo\": false}, \"list\": [\"myname\", 321, 1.3, true, \"\", {\"nested\": true}, [200, \"\"]]}}", + "uri": "/InlineDocument" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/InlineDocument" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "documentValue": [ + "test", + 123, + 1.2, + true, + "", + {"str": "myname", "num": 321, "float": 1.3, "bool": true, "null": "", "document": {"nested": true}, "list": [200, ""]}, + ["foo", false] + ] + }, + "serialized": { + "body": "{\"documentValue\": [\"test\", 123, 1.2, true, \"\", {\"str\": \"myname\", \"num\": 321, \"float\": 1.3, \"bool\": true, \"null\": \"\", \"document\": {\"nested\": true}, \"list\": [200, \"\"]}, [\"foo\", false]]}", + "uri": "/InlineDocument" + } + } + ] + }, + { + "description": "Content-Type and JSON body", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "clientEndpoint": "https://rest-json-test.amazonaws.com", + "shapes":{ + "Integer":{ + "type":"integer" + }, + "String":{"type":"string"}, + "Blob":{"type":"blob"}, + "NoPayloadRequest":{ + "type":"structure", + "required":[], + "members":{ + "testId":{ + "shape":"TestId", + "documentation":"

    The unique ID for a test.

    ", + "location":"header", + "locationName":"x-amz-test-id" + } + }, + "documentation":"

    The request structure for a no payload request.

    " + }, + "TestId":{ + "type":"string", + "max":8, + "min":3, + "pattern":"t-[a-z0-9-]+" + }, + "TestConfig":{ + "type":"structure", + "required":[], + "members":{ + "timeout":{ + "shape":"Integer", + "documentation":"

    Timeout in seconds

    " + } + } + }, + "PayloadConfig":{ + "type":"structure", + "required":[], + "members":{ + "data":{ + "shape":"Integer", + "documentation":"

    Numerical data

    " + } + } + }, + "TestBodyRequest":{ + "type":"structure", + "required":[], + "members":{ + "testConfig":{ + "shape":"TestConfig", + "documentation":"

    Content to post

    " + }, + "testId":{ + "shape":"TestId", + "documentation":"

    Optional test identifier

    ", + "location":"header", + "locationName":"x-amz-test-id" + } + }, + "documentation":"

    The request structure for a test body request.

    " + }, + "TestPayloadRequest":{ + "type":"structure", + "required":[], + "members":{ + "payloadConfig":{ + "shape":"PayloadConfig", + "documentation":"

    Payload to post

    " + }, + "testId":{ + "shape":"TestId", + "documentation":"

    Optional test identifier

    ", + "location":"header", + "locationName":"x-amz-test-id" + } + }, + "documentation":"

    The request structure for a payload request.

    ", + "payload":"payloadConfig" + }, + "TestBlobPayloadRequest":{ + "type":"structure", + "required":[], + "members":{ + "data":{ + "shape":"Blob", + "documentation":"

    Blob payload to post

    " + }, + "contentType":{ + "shape":"String", + "documentation":"

    Optional content-type header

    ", + "location":"header", + "locationName":"Content-Type" + } + }, + "documentation":"

    The request structure for a blob payload request.

    ", + "payload":"data" + } + }, + "cases": [ + { + "given": { + "name": "TestBody", + "input": { + "shape": "TestBodyRequest" + }, + "http": { + "method": "POST", + "requestUri": "/body" + } + }, + "params": { + "testConfig": { + "timeout": 10 + }, + "testId": "t-12345" + }, + "serialized": { + "uri": "/body", + "body": "{\"testConfig\": {\"timeout\": 10}}", + "headers": { + "x-amz-test-id": "t-12345", + "Content-Type": "application/json" + }, + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "TestBodyNoParams", + "input": { + "shape": "TestBodyRequest" + }, + "http": { + "method": "POST", + "requestUri": "/body" + } + }, + "params": {}, + "serialized": { + "uri": "/body", + "body": "{}", + "headers": { + "Content-Type": "application/json" + }, + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "TestPayloadNoParams", + "input": { + "shape": "TestPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/payload" + } + }, + "params": {}, + "serialized": { + "uri": "/payload", + "body": "{}", + "headers": { + "Content-Type": "application/json" + }, + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "TestPayload", + "input": { + "shape": "TestPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/payload" + } + }, + "params": { + "payloadConfig": { + "data": 25 + }, + "testId": "t-12345" + }, + "serialized": { + "uri": "/payload", + "body": "{\"data\": 25}", + "headers": { + "x-amz-test-id": "t-12345", + "Content-Type": "application/json" + }, + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "TestPayloadNoBody", + "input": { + "shape": "TestPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/payload" + } + }, + "params": { + "testId": "t-12345" + }, + "serialized": { + "uri": "/payload", + "body": "{}", + "headers": { + "x-amz-test-id": "t-12345", + "Content-Type": "application/json" + }, + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "TestBlobPayload", + "input": { + "shape": "TestBlobPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/blob-payload" + } + }, + "params": { + "data": "1234", + "contentType": "image/jpg" + }, + "serialized": { + "uri": "/blob-payload", + "body": "1234", + "headers": { + "Content-Type": "image/jpg" + }, + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "TestBlobPayloadNoContentType", + "input": { + "shape": "TestBlobPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/blob-payload" + } + }, + "params": { + "data": "1234" + }, + "serialized": { + "uri": "/blob-payload", + "body": "1234", + "forbidHeaders": ["Content-Length"], + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "TestBlobPayloadNoParams", + "input": { + "shape": "TestBlobPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/blob-payload" + } + }, + "params": {}, + "serialized": { + "uri": "/blob-payload", + "body": "", + "headers": {}, + "forbidHeaders": [ + "Content-Type" + ], + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "NoPayload", + "input": { + "shape": "NoPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/no-payload" + } + }, + "params": {}, + "serialized": { + "uri": "/no-payload", + "body": "", + "forbidHeaders": [ + "Content-Type", + "Content-Length" + ], + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "NoPayloadWithHeader", + "input": { + "shape": "NoPayloadRequest" + }, + "http": { + "method": "POST", + "requestUri": "/no-payload" + } + }, + "params": { + "testId": "t-12345" + }, + "serialized": { + "uri": "/no-payload", + "body": "", + "headers": { + "x-amz-test-id": "t-12345" + }, + "forbidHeaders": [ + "Content-Type", + "Content-Length" + ], + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "NoPayloadGET", + "input": { + "shape": "NoPayloadRequest" + }, + "http": { + "method": "GET", + "requestUri": "/no-payload" + } + }, + "params": {}, + "serialized": { + "uri": "/no-payload", + "body": "", + "forbidHeaders": [ + "Content-Type", + "Content-Length" + ], + "host": "rest-json-test.amazonaws.com" + } + }, + { + "given": { + "name": "NoPayloadWithHeaderGET", + "input": { + "shape": "NoPayloadRequest" + }, + "http": { + "method": "GET", + "requestUri": "/no-payload" + } + }, + "params": { + "testId": "t-12345" + }, + "serialized": { + "uri": "/no-payload", + "body": "", + "headers": { + "x-amz-test-id": "t-12345" + }, + "forbidHeaders": [ + "Content-Type", + "Content-Length" + ], + "host": "rest-json-test.amazonaws.com" + } + } + ] + }, + { + "description": "List in header", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "clientEndpoint": "https://rest-json-test.amazonaws.com", + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListShape", + "location": "header", + "locationName": "x-amz-list-param" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "EnumType" + } + }, + "EnumType": { + "type": "string", + "enum": ["one", "two", "three"] + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/example" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest" + }, + "name": "OperationName" + }, + "params": { + "ListParam": [ + "one", + "two", + "three" + ] + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/2014-01-01/example", + "headers": { + "x-amz-list-param": "one,two,three" + } + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/example" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest" + }, + "name": "OperationName" + }, + "params": { + "ListParam": [] + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/2014-01-01/example", + "headers": {}, + "forbidHeaders": ["x-amz-list-param"] + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/input/rest-xml.json b/testbed/boto__botocore/tests/unit/protocols/input/rest-xml.json new file mode 100644 index 0000000000000000000000000000000000000000..cd5b98418e0064e53fb023733e1132cad89c1252 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/input/rest-xml.json @@ -0,0 +1,1976 @@ +[ + { + "description": "Basic XML serialization", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType" + }, + "Description": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "Name": "foo", + "Description": "bar" + }, + "serialized": { + "method": "POST", + "body": "foobar", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + }, + { + "given": { + "http": { + "method": "PUT", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "Name": "foo", + "Description": "bar" + }, + "serialized": { + "method": "PUT", + "body": "foobar", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + }, + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/hostedzone" + }, + "name": "OperationName" + }, + "params": {}, + "serialized": { + "method": "GET", + "body": "", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Serialize other scalar types", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "First": { + "shape": "BoolType" + }, + "Second": { + "shape": "BoolType" + }, + "Third": { + "shape": "FloatType" + }, + "Fourth": { + "shape": "IntegerType" + } + } + }, + "BoolType": { + "type": "boolean" + }, + "FloatType": { + "type": "float" + }, + "IntegerType": { + "type": "integer" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "First": true, + "Second": false, + "Third": 1.2, + "Fourth": 3 + }, + "serialized": { + "method": "POST", + "body": "truefalse1.23", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Nested structures", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "SubStructure": { + "shape": "SubStructure" + }, + "Description": { + "shape": "StringType" + } + } + }, + "SubStructure": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + }, + "Bar": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "SubStructure": { + "Foo": "a", + "Bar": "b" + }, + "Description": "baz" + }, + "serialized": { + "method": "POST", + "body": "abbaz", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "SubStructure": { + "Foo": "a", + "Bar": null + }, + "Description": "baz" + }, + "serialized": { + "method": "POST", + "body": "abaz", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Nested structures", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "SubStructure": { + "shape": "SubStructure" + }, + "Description": { + "shape": "StringType" + } + } + }, + "SubStructure": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + }, + "Bar": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "SubStructure": {}, + "Description": "baz" + }, + "serialized": { + "method": "POST", + "body": "baz", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Non flattened lists", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "ListParam": [ + "one", + "two", + "three" + ] + }, + "serialized": { + "method": "POST", + "body": "onetwothree", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Non flattened lists with locationName", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListShape", + "locationName": "AlternateName" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType", + "locationName": "NotMember" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "ListParam": [ + "one", + "two", + "three" + ] + }, + "serialized": { + "method": "POST", + "body": "onetwothree", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Flattened lists", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType" + }, + "flattened": true + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "ListParam": [ + "one", + "two", + "three" + ] + }, + "serialized": { + "method": "POST", + "body": "onetwothree", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Flattened lists with locationName", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListShape", + "locationName": "item" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType" + }, + "flattened": true + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "ListParam": [ + "one", + "two", + "three" + ] + }, + "serialized": { + "method": "POST", + "body": "onetwothree", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "List of structures", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListShape", + "locationName": "item" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "SingleFieldStruct" + }, + "flattened": true + }, + "StringType": { + "type": "string" + }, + "SingleFieldStruct": { + "type": "structure", + "members": { + "Element": { + "shape": "StringType", + "locationName": "value" + } + } + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "ListParam": [ + { + "Element": "one" + }, + { + "Element": "two" + }, + { + "Element": "three" + } + ] + }, + "serialized": { + "method": "POST", + "body": "onetwothree", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Blob shapes", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "StructureParam": { + "shape": "StructureShape" + } + } + }, + "StructureShape": { + "type": "structure", + "members": { + "b": { + "shape": "BShape" + } + } + }, + "BShape": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "StructureParam": { + "b": "foo" + } + }, + "serialized": { + "method": "POST", + "body": "Zm9v", + "uri": "/2014-01-01/hostedzone", + "headers": {} + } + } + ] + }, + { + "description": "Timestamp shapes", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeArgInHeader": { + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timearg" + }, + "TimeArgInQuery": { + "shape": "TimestampType", + "location": "querystring", + "locationName": "TimeQuery" + }, + "TimeCustom": { + "timestampFormat": "rfc822", + "shape": "TimestampType" + }, + "TimeCustomInHeader": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timecustom-header" + }, + "TimeCustomInQuery": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType", + "location": "querystring", + "locationName": "TimeCustomQuery" + }, + "TimeFormat": { + "shape": "TimestampFormatRfcType" + }, + "TimeFormatInHeader": { + "shape": "TimestampFormatUnixType", + "location": "header", + "locationName": "x-amz-timeformat-header" + }, + "TimeFormatInQuery": { + "shape": "TimestampFormatUnixType", + "location": "querystring", + "locationName": "TimeFormatQuery" + } + } + }, + "TimestampFormatRfcType": { + "timestampFormat": "rfc822", + "type": "timestamp" + }, + "TimestampFormatUnixType": { + "timestampFormat": "unixTimestamp", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/hostedzone" + }, + "input": { + "shape": "InputShape", + "locationName": "TimestampStructure", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "TimeArg": 1422172800, + "TimeArgInQuery": 1422172800, + "TimeArgInHeader": 1422172800, + "TimeCustom": 1422172800, + "TimeCustomInQuery": 1422172800, + "TimeCustomInHeader": 1422172800, + "TimeFormat": 1422172800, + "TimeFormatInQuery": 1422172800, + "TimeFormatInHeader": 1422172800 + }, + "serialized": { + "method": "POST", + "body": "2015-01-25T08:00:00ZSun, 25 Jan 2015 08:00:00 GMTSun, 25 Jan 2015 08:00:00 GMT", + "uri": "/2014-01-01/hostedzone?TimeQuery=2015-01-25T08%3A00%3A00Z&TimeCustomQuery=1422172800&TimeFormatQuery=1422172800", + "headers": { + "x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT", + "x-amz-timecustom-header": "1422172800", + "x-amz-timeformat-header": "1422172800" + } + } + } + ] + }, + { + "description": "Header maps", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "shape": "FooShape" + } + } + }, + "FooShape": { + "type": "map", + "location": "headers", + "locationName": "x-foo-", + "key": { + "shape": "FooKeyValue" + }, + "value": { + "shape": "FooKeyValue" + } + }, + "FooKeyValue": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "foo": { + "a": "b", + "c": "d" + } + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/", + "headers": { + "x-foo-a": "b", + "x-foo-c": "d" + } + } + } + ] + }, + { + "description": "Querystring list of strings", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Items": { + "shape": "StringList", + "location": "querystring", + "locationName": "item" + } + } + }, + "StringList": { + "type": "list", + "member": { + "shape": "String" + } + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/path" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Items": ["value1", "value2"] + }, + "serialized": { + "body": "", + "uri": "/path?item=value1&item=value2", + "headers": {} + } + } + ] + }, + { + "description": "String to string maps in querystring", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri" + }, + "QueryDoc": { + "shape": "MapStringStringType", + "location": "querystring" + } + } + }, + "MapStringStringType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "foo", + "QueryDoc": { + "bar": "baz", + "fizz": "buzz" + } + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobsByPipeline/foo?bar=baz&fizz=buzz", + "headers": {} + } + } + ] + }, + { + "description": "String to string list maps in querystring", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "PipelineId": { + "shape": "StringType", + "location": "uri" + }, + "QueryDoc": { + "shape": "MapStringStringListType", + "location": "querystring" + } + } + }, + "MapStringStringListType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringListType" + } + }, + "StringListType": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "PipelineId": "id", + "QueryDoc": { + "foo": ["bar", "baz"], + "fizz": ["buzz", "pop"] + } + }, + "serialized": { + "body": "", + "uri": "/2014-01-01/jobsByPipeline/id?foo=bar&foo=baz&fizz=buzz&fizz=pop", + "headers": {} + } + } + ] + }, + { + "description": "Boolean in querystring", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "BoolQuery": { + "shape": "BoolType", + "location": "querystring", + "locationName": "bool-query" + } + } + }, + "BoolType": { + "type": "boolean" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/path" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BoolQuery": true + }, + "serialized": { + "body": "", + "uri": "/path?bool-query=true", + "headers": {} + } + }, + { + "given": { + "http": { + "method": "GET", + "requestUri": "/path" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "BoolQuery": false + }, + "serialized": { + "body": "", + "uri": "/path?bool-query=false", + "headers": {} + } + } + ] + }, + { + "description": "String payload", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "shape": "FooShape" + } + }, + "payload": "foo" + }, + "FooShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "foo": "bar" + }, + "serialized": { + "method": "POST", + "body": "bar", + "uri": "/" + } + } + ] + }, + { + "description": "Blob payload", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "shape": "FooShape" + } + }, + "payload": "foo" + }, + "FooShape": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "foo": "bar" + }, + "serialized": { + "method": "POST", + "body": "bar", + "uri": "/" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/" + } + } + ] + }, + { + "description": "Structure payload", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "shape": "FooShape" + } + }, + "payload": "foo" + }, + "FooShape": { + "locationName": "foo", + "type": "structure", + "members": { + "baz": { + "shape": "BazShape" + } + } + }, + "BazShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "foo": { + "baz": "bar" + } + }, + "serialized": { + "method": "POST", + "body": "bar", + "uri": "/" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": {}, + "serialized": { + "method": "POST", + "body": "", + "uri": "/" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "foo": {} + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/" + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "foo": null + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/" + } + } + ] + }, + { + "description": "XML Attribute", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Grant": { + "shape": "Grant" + } + }, + "payload": "Grant" + }, + "Grant": { + "type": "structure", + "locationName": "Grant", + "members": { + "Grantee": { + "shape": "Grantee" + } + } + }, + "Grantee": { + "type": "structure", + "members": { + "Type": { + "shape": "Type", + "locationName": "xsi:type", + "xmlAttribute": true + }, + "EmailAddress": { + "shape": "StringType" + } + }, + "xmlNamespace": { + "prefix": "xsi", + "uri":"http://www.w3.org/2001/XMLSchema-instance" + } + }, + "Type": { + "type": "string" + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Grant": { + "Grantee": { + "EmailAddress": "foo@example.com", + "Type": "CanonicalUser" + } + } + }, + "serialized": { + "method": "POST", + "body": "foo@example.com", + "uri": "/" + } + } + ] + }, + { + "description": "Greedy keys", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Bucket": { + "shape": "BucketShape", + "location": "uri" + }, + "Key": { + "shape": "KeyShape", + "location": "uri" + } + } + }, + "BucketShape": { + "type": "string" + }, + "KeyShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "http": { + "method": "GET", + "requestUri": "/{Bucket}/{Key+}" + }, + "input": { + "shape": "InputShape" + }, + "name": "OperationName" + }, + "params": { + "Key": "testing /123", + "Bucket": "my/bucket" + }, + "serialized": { + "method": "GET", + "body": "", + "uri": "/my%2Fbucket/testing%20/123" + } + } + ] + }, + { + "description": "Omits null query params, but serializes empty strings", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "foo": { + "location":"querystring", + "locationName":"param-name", + "shape": "Foo" + } + } + }, + "Foo": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "name": "OperationName", + "http": { + "method": "POST", + "requestUri": "/path" + }, + "input": { "shape": "InputShape" } + }, + "params": { "foo": null }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/path" + } + }, + { + "given": { + "name": "OperationName", + "http": { + "method": "POST", + "requestUri": "/path?abc=mno" + }, + "input": { "shape": "InputShape" } + }, + "params": { "foo": "" }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/path?abc=mno¶m-name=" + } + } + ] + }, + { + "description": "Recursive shapes", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "RecursiveStruct": { + "shape": "RecursiveStructType" + } + } + }, + "RecursiveStructType": { + "type": "structure", + "members": { + "NoRecurse": { + "shape": "StringType" + }, + "RecursiveStruct": { + "shape": "RecursiveStructType" + }, + "RecursiveList": { + "shape": "RecursiveListType" + }, + "RecursiveMap": { + "shape": "RecursiveMapType" + } + } + }, + "RecursiveListType": { + "type": "list", + "member": { + "shape": "RecursiveStructType" + } + }, + "RecursiveMapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "RecursiveStructType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + }, + "serialized": { + "uri": "/path", + "body": "foo" + } + }, + { + "given": { + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + }, + "serialized": { + "uri": "/path", + "body": "foo" + } + }, + { + "given": { + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "RecursiveStruct": { + "NoRecurse": "foo" + } + } + } + } + }, + "serialized": { + "uri": "/path", + "body": "foo" + } + }, + { + "given": { + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "NoRecurse": "bar" + } + ] + } + }, + "serialized": { + "uri": "/path", + "body": "foobar" + } + }, + { + "given": { + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveList": [ + { + "NoRecurse": "foo" + }, + { + "RecursiveStruct": { + "NoRecurse": "bar" + } + } + ] + } + }, + "serialized": { + "uri": "/path", + "body": "foobar" + } + }, + { + "given": { + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "RecursiveStruct": { + "RecursiveMap": { + "foo": { + "NoRecurse": "foo" + }, + "bar": { + "NoRecurse": "bar" + } + } + } + }, + "serialized": { + "uri": "/path", + "body": "foofoobarbar" + } + } + ] + }, + { + "description": "Idempotency token auto fill", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Token": { + "shape": "StringType", + "idempotencyToken": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "Token": "abc123" + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "abc123" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "00000000-0000-4000-8000-000000000000" + } + } + ] + }, + { + "description": "JSON value trait", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "Attr": { + "shape": "StringType", + "jsonvalue": true, + "location": "header", + "locationName": "X-Amz-Foo" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + "Attr": {"Foo":"Bar"} + }, + "serialized": { + "uri": "/path", + "headers": {"X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="}, + "body": "" + } + }, + { + "given": { + "input": { + "shape": "InputShape" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "name": "OperationName" + }, + "params": { + }, + "serialized": { + "uri": "/path", + "headers": {}, + "body": "" + } + } + ] + }, + { + "description": "Endpoint host trait", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "clientEndpoint": "https://service.region.amazonaws.com", + "shapes": { + "StaticInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType" + } + } + }, + "MemberRefInputShape": { + "type": "structure", + "members": { + "Name": { + "shape": "StringType", + "hostLabel": true + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "name": "StaticOp", + "input": { + "shape": "StaticInputShape", + "locationName": "StaticOpRequest" + }, + "http": { + "method": "POST", + "requestUri": "/path" + }, + "endpoint":{ + "hostPrefix": "data-" + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/path", + "body": "myname", + "host": "data-service.region.amazonaws.com" + } + }, + { + "given": { + "name": "MemberRefOp", + "input": { + "shape": "MemberRefInputShape", + "locationName": "MemberRefOpRequest" + }, + "http": { + "method": "GET", + "requestUri": "/path" + }, + "endpoint":{ + "hostPrefix": "foo-{Name}." + } + }, + "params": { + "Name": "myname" + }, + "serialized": { + "uri": "/path", + "body": "myname", + "host": "foo-myname.service.region.amazonaws.com" + } + } + ] + }, + { + "description": "List in header", + "metadata": { + "protocol": "rest-xml", + "apiVersion": "2014-01-01" + }, + "shapes": { + "InputShape": { + "type": "structure", + "members": { + "ListParam": { + "shape": "ListShape", + "location": "header", + "locationName": "x-amz-list-param" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "EnumType" + } + }, + "EnumType": { + "type": "string", + "enum": ["one", "two", "three"] + } + }, + "cases": [ + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/example" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "ListParam": [ + "one", + "two", + "three" + ] + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/2014-01-01/example", + "headers": { + "x-amz-list-param": "one,two,three" + } + } + }, + { + "given": { + "http": { + "method": "POST", + "requestUri": "/2014-01-01/example" + }, + "input": { + "shape": "InputShape", + "locationName": "OperationRequest", + "xmlNamespace": {"uri": "https://foo/"} + }, + "name": "OperationName" + }, + "params": { + "ListParam": [] + }, + "serialized": { + "method": "POST", + "body": "", + "uri": "/2014-01-01/example", + "headers": {}, + "forbidHeaders": ["x-amz-list-param"] + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/output/ec2.json b/testbed/boto__botocore/tests/unit/protocols/output/ec2.json new file mode 100644 index 0000000000000000000000000000000000000000..fa21de0acec818a37685b4cc251843ecef629683 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/output/ec2.json @@ -0,0 +1,612 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Str": { + "shape": "StringType" + }, + "Num": { + "shape": "IntegerType", + "locationName": "FooNum" + }, + "FalseBool": { + "shape": "BooleanType" + }, + "TrueBool": { + "shape": "BooleanType" + }, + "Float": { + "shape": "FloatType" + }, + "Double": { + "shape": "DoubleType" + }, + "Long": { + "shape": "LongType" + }, + "Char": { + "shape": "CharType" + } + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + }, + "BooleanType": { + "type": "boolean" + }, + "FloatType": { + "type": "float" + }, + "DoubleType": { + "type": "double" + }, + "LongType": { + "type": "long" + }, + "CharType": { + "type": "character" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Str": "myname", + "Num": 123, + "FalseBool": false, + "TrueBool": true, + "Float": 1.2, + "Double": 1.3, + "Long": 200, + "Char": "a" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "myname123falsetrue1.21.3200arequest-id" + } + } + ] + }, + { + "description": "Blob", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Blob": { + "shape": "BlobType" + } + } + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Blob": "value" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "dmFsdWU=requestid" + } + } + ] + }, + { + "description": "Lists", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123requestid" + } + } + ] + }, + { + "description": "List with custom member name", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType", + "locationName": "item" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123requestid" + } + } + ] + }, + { + "description": "Flattened List", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListType", + "flattened": true + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123requestid" + } + } + ] + }, + { + "description": "Normal map", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "MapType" + } + } + }, + "MapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StructureType" + } + }, + "StructureType": { + "type": "structure", + "members": { + "foo": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": { + "foo": "bar" + }, + "baz": { + "foo": "bam" + } + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbamrequestid" + } + } + ] + }, + { + "description": "Flattened map", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "MapType", + "flattened": true + } + } + }, + "MapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": "bar", + "baz": "bam" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbamrequestid" + } + } + ] + }, + { + "description": "Named map", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "MapType", + "flattened": true + } + } + }, + "MapType": { + "type": "map", + "key": { + "shape": "StringType", + "locationName": "foo" + }, + "value": { + "shape": "StringType", + "locationName": "bar" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": "bar", + "baz": "bam" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbamrequestid" + } + } + ] + }, + { + "description": "Empty string", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Foo": "" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "requestid" + } + } + ] + }, + { + "description": "Timestamp members", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeCustom": { + "timestampFormat": "rfc822", + "shape": "TimestampType" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + }, + "StructMember": { + "shape": "TimeContainer" + } + } + }, + "TimeContainer": { + "type": "structure", + "members": { + "foo": { + "shape": "TimestampType" + }, + "bar": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "unixTimestamp", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "TimeArg": 1398796238, + "TimeCustom": 1398796238, + "TimeFormat": 1398796238, + "StructMember": { + "foo": 1398796238, + "bar": 1398796238 + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "2014-04-29T18:30:38+00:0013987962382014-04-29T18:30:38+00:00Tue, 29 Apr 2014 18:30:38 GMT1398796238requestid" + } + } + ] + }, + { + "description": "Modeled exceptions", + "metadata": { + "protocol": "ec2" + }, + "shapes": { + "ExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + }, + "Message": { + "shape": "StringType" + } + } + }, + "OtherExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + } + } + }, + "StatusShape": { + "type": "integer" + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "ExceptionShapemymessagemybody" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody" + }, + "errorCode": "OtherExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "OtherExceptionShapemymessagemybody" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": {}, + "errorCode": "UndefinedShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "UndefinedShapemymessagemybody" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/output/json.json b/testbed/boto__botocore/tests/unit/protocols/output/json.json new file mode 100644 index 0000000000000000000000000000000000000000..c463aac2bc90e82fac6437037c7b07cacf17b378 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/output/json.json @@ -0,0 +1,824 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Str": { + "shape": "StringType" + }, + "Num": { + "shape": "IntegerType" + }, + "FalseBool": { + "shape": "BooleanType" + }, + "TrueBool": { + "shape": "BooleanType" + }, + "Float": { + "shape": "FloatType" + }, + "Double": { + "shape": "DoubleType" + }, + "Long": { + "shape": "LongType" + }, + "Char": { + "shape": "CharType" + } + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + }, + "BooleanType": { + "type": "boolean" + }, + "FloatType": { + "type": "float" + }, + "DoubleType": { + "type": "double" + }, + "LongType": { + "type": "long" + }, + "CharType": { + "type": "character" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Str": "myname", + "Num": 123, + "FalseBool": false, + "TrueBool": true, + "Float": 1.2, + "Double": 1.3, + "Long": 200, + "Char": "a" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}" + } + } + ] + }, + { + "description": "Blob members", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "BlobMember": { + "shape": "BlobType" + }, + "StructMember": { + "shape": "BlobContainer" + } + } + }, + "BlobType": { + "type": "blob" + }, + "BlobContainer": { + "type": "structure", + "members": { + "foo": { + "shape": "BlobType" + } + } + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "BlobMember": "hi!", + "StructMember": { + "foo": "there!" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}" + } + } + ] + }, + { + "description": "Timestamp members", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeCustom": { + "timestampFormat": "rfc822", + "shape": "TimestampType" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + }, + "StructMember": { + "shape": "TimeContainer" + } + } + }, + "TimeContainer": { + "type": "structure", + "members": { + "foo": { + "shape": "TimestampType" + }, + "bar": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "iso8601", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "TimeArg": 1398796238, + "TimeCustom": 1398796238, + "TimeFormat": 1398796238, + "StructMember": { + "foo": 1398796238, + "bar": 1398796238 + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"TimeArg\": 1398796238, \"TimeCustom\": \"Tue, 29 Apr 2014 18:30:38 GMT\", \"TimeFormat\": \"2014-04-29T18:30:38+00:00\", \"StructMember\": {\"foo\": 1398796238, \"bar\": \"2014-04-29T18:30:38+00:00\"}}" + } + } + ] + }, + { + "description": "Lists", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListType" + }, + "ListMemberMap": { + "shape": "ListTypeMap" + }, + "ListMemberStruct": { + "shape": "ListTypeStruct" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "ListTypeMap": { + "type": "list", + "member": { + "shape": "MapType" + } + }, + "ListTypeStruct": { + "type": "list", + "member": { + "shape": "StructType" + } + }, + "StringType": { + "type": "string" + }, + "StructType": { + "type": "structure", + "members": { + } + }, + "MapType": { + "type": "string", + "key": { "shape": "StringType" }, + "value": { "shape": "StringType" } + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["a", "b"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"ListMember\": [\"a\", \"b\"]}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["a", null], + "ListMemberMap": [{}, null, null, {}], + "ListMemberStruct": [{}, null, null, {}] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"ListMember\": [\"a\", null], \"ListMemberMap\": [{}, null, null, {}], \"ListMemberStruct\": [{}, null, null, {}]}" + } + } + ] + }, + { + "description": "Maps", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "MapMember": { + "shape": "MapType" + } + } + }, + "MapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "NumberList" + } + }, + "StringType": { + "type": "string" + }, + "NumberList": { + "type": "list", + "member": { + "shape": "IntegerType" + } + }, + "IntegerType": { + "type": "integer" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "MapMember": { + "a": [1, 2], + "b": [3, 4] + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}" + } + } + ] + }, + { + "description": "Ignores extra data", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "StrType": { + "shape": "StrType" + } + } + }, + "StrType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": {}, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"foo\": \"bar\"}" + } + } + ] + }, + { + "description": "RPC JSON Event Stream", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Payload": {"shape": "EventStream"}, + "InitialResponse": {"shape": "StringType"} + } + }, + "EventStream": { + "type": "structure", + "eventstream": true, + "members": { + "TypeA": {"shape": "TypeAEvent"}, + "TypeB": {"shape": "TypeBEvent"} + } + }, + "TypeAEvent": { + "type": "structure", + "event": true, + "members": { + "Payload": { + "shape": "BlobType", + "eventpayload": true + } + } + }, + "TypeBEvent": { + "type": "structure", + "event": true, + "members": { + "Details": { + "shape": "Details", + "eventpayload": true + } + } + }, + "Details": { + "type": "structure", + "members": { + "StringField": {"shape": "StringType"}, + "IntegerField": {"shape": "IntegerType"} + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "InitialResponse": "sometext", + "Payload": [ + { + "TypeA": {"Payload": "somebytes"} + }, + { + "TypeB": { + "Details": { + "StringField": "somestring", + "IntegerField": 123 + } + } + } + ] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "AAAAfgAAAE/Fo93GDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAEGluaXRpYWwtcmVzcG9uc2UNOmNvbnRlbnQtdHlwZQcACXRleHQvanNvbnsiSW5pdGlhbFJlc3BvbnNlIjogInNvbWV0ZXh0In32mCSDAAAAbAAAAFPLgkVrDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcABVR5cGVBDTpjb250ZW50LXR5cGUHABhhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1zb21lYnl0ZXMesj2HAAAAhgAAAEQqNR/SDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcABVR5cGVCDTpjb250ZW50LXR5cGUHAAl0ZXh0L2pzb257IlN0cmluZ0ZpZWxkIjogInNvbWVzdHJpbmciLCAiSW50ZWdlckZpZWxkIjogMTIzfffGN30=" + } + } + ] + }, + { + "description": "Modeled exceptions", + "metadata": { + "protocol": "json" + }, + "shapes": { + "ExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + }, + "Code": { + "shape": "StringType" + }, + "Message": { + "shape": "StringType" + } + } + }, + "OtherExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody", + "Code": "OtherExceptionShape", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "{ \"__type\": \"ExceptionShape\", \"Code\": \"OtherExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody" + }, + "errorCode": "OtherExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "{ \"__type\": \"OtherExceptionShape\", \"Code\": \"ExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": {}, + "errorCode": "UndefinedShape", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc" + }, + "body": "{ \"__type\": \"UndefinedShape\", \"Code\": \"ExceptionShape\", \"BodyMember\": \"mybody\"}" + } + } + ] + }, + { + "description": "Modeled exceptions with jsonVersion 1.0", + "metadata": { + "protocol": "json", + "jsonVersion": "1.0" + }, + "shapes": { + "ExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + }, + "Message": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "{ \"__type\": \"FooPrefix#ExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + } + ] + }, + { + "description": "Serialize document with standalone primitive type in a JSON response", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "inlineDocument": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "inlineDocument": "foo" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"inlineDocument\": \"foo\"}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "inlineDocument": 123 + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"inlineDocument\": 123}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "inlineDocument": 1.2 + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"inlineDocument\": 1.2}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "inlineDocument": true + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"inlineDocument\": true}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "inlineDocument": "" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"inlineDocument\": \"\"}" + } + } + ] + }, + { + "description": "Serialize inline document in a JSON response", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "inlineDocument": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "inlineDocument": {"foo": "bar"} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"inlineDocument\": {\"foo\": \"bar\"}}" + } + } + ] + }, + { + "description": "Serialize aggregate documents in a JSON response", + "metadata": { + "protocol": "json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "parentDocument": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "parentDocument": { + "str": "test", + "num": 123, + "float": 1.2, + "bool": true, + "null": "", + "document": {"foo": false}, + "list": ["myname", 321, 1.3, true, "", {"nested": true}, [200, ""]] + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"parentDocument\": {\"str\": \"test\", \"num\": 123, \"float\": 1.2, \"bool\": true, \"null\": \"\", \"document\": {\"foo\": false}, \"list\": [\"myname\", 321, 1.3, true, \"\", {\"nested\": true}, [200, \"\"]]}}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "parentDocument": [ + "test", + 123, + 1.2, + true, + "", + {"str": "myname", "num": 321, "float": 1.3, "bool": true, "null": "", "document": {"nested": true}, "list": [200, ""]}, + ["foo", false] + ] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"parentDocument\": [\"test\", 123, 1.2, true, \"\", {\"str\": \"myname\", \"num\": 321, \"float\": 1.3, \"bool\": true, \"null\": \"\", \"document\": {\"nested\": true}, \"list\": [200, \"\"]}, [\"foo\", false]]}" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/output/query.json b/testbed/boto__botocore/tests/unit/protocols/output/query.json new file mode 100644 index 0000000000000000000000000000000000000000..3faf5eb041a5472d8518fd8b1d85dddd91fcb352 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/output/query.json @@ -0,0 +1,931 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Str": { + "shape": "StringType" + }, + "Num": { + "shape": "IntegerType", + "locationName": "FooNum" + }, + "FalseBool": { + "shape": "BooleanType" + }, + "TrueBool": { + "shape": "BooleanType" + }, + "Float": { + "shape": "FloatType" + }, + "Double": { + "shape": "DoubleType" + }, + "Long": { + "shape": "LongType" + }, + "Char": { + "shape": "CharType" + }, + "Timestamp": { + "shape": "TimestampType" + } + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + }, + "BooleanType": { + "type": "boolean" + }, + "FloatType": { + "type": "float" + }, + "DoubleType": { + "type": "double" + }, + "LongType": { + "type": "long" + }, + "CharType": { + "type": "character" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Str": "myname", + "Num": 123, + "FalseBool": false, + "TrueBool": true, + "Float": 1.2, + "Double": 1.3, + "Long": 200, + "Char": "a", + "Timestamp": 1422172800 + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "myname123falsetrue1.21.3200a2015-01-25T08:00:00Zrequest-id" + } + } + ] + }, + { + "description": "Not all members in response", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Str": { + "shape": "StringType" + }, + "Num": { + "shape": "IntegerType" + } + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Str": "myname" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "mynamerequest-id" + } + } + ] + }, + { + "description": "Blob", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Blob": { + "shape": "BlobType" + } + } + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Blob": "value" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "dmFsdWU=requestid" + } + } + ] + }, + { + "description": "Lists", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123requestid" + } + } + ] + }, + { + "description": "List with custom member name", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType", + "locationName": "item" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123requestid" + } + } + ] + }, + { + "description": "Flattened List", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "flattened": true, + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123requestid" + } + } + ] + }, + { + "description": "Flattened single element list", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "flattened": true, + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abcrequestid" + } + } + ] + }, + { + "description": "List of structures", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "List": { + "shape": "ListOfStructs" + } + } + }, + "ListOfStructs": { + "type": "list", + "member": { + "shape": "StructureShape" + } + }, + "StructureShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringShape" + }, + "Bar": { + "shape": "StringShape" + }, + "Baz": { + "shape": "StringShape" + } + } + }, + "StringShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "List": [{"Foo": "firstfoo", "Bar": "firstbar", "Baz": "firstbaz"}, {"Foo": "secondfoo", "Bar": "secondbar", "Baz": "secondbaz"}] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "firstfoofirstbarfirstbazsecondfoosecondbarsecondbazrequestid" + } + } + ] + }, + { + "description": "Flattened list of structures", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "resultWrapper": "OperationNameResult", + "members": { + "List": { + "shape": "ListOfStructs" + } + } + }, + "ListOfStructs": { + "type": "list", + "flattened": true, + "member": { + "shape": "StructureShape" + } + }, + "StructureShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringShape" + }, + "Bar": { + "shape": "StringShape" + }, + "Baz": { + "shape": "StringShape" + } + } + }, + "StringShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "List": [{"Foo": "firstfoo", "Bar": "firstbar", "Baz": "firstbaz"}, {"Foo": "secondfoo", "Bar": "secondbar", "Baz": "secondbaz"}] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "firstfoofirstbarfirstbazsecondfoosecondbarsecondbazrequestid" + } + } + ] + }, + { + "description": "Flattened list with location name", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "List": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "flattened": true, + "member": { + "shape": "StringShape", + "locationName": "NamedList" + } + }, + "StringShape": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "List": ["a", "b"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abrequestid" + } + } + ] + }, + { + "description": "Normal map", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "StringMap" + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StructType" + } + }, + "StringType": { + "type": "string" + }, + "StructType": { + "type": "structure", + "members": { + "foo": { + "shape": "StringType" + } + } + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": { + "foo": "bar" + }, + "baz": { + "foo": "bam" + } + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbamrequestid" + } + } + ] + }, + { + "description": "Flattened map", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "StringMap", + "flattened": true + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": "bar", + "baz": "bam" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbamrequestid" + } + } + ] + }, + { + "description": "Flattened map in shape definition", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "StringMap", + "locationName": "Attribute" + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType", + "locationName": "Name" + }, + "value": { + "shape": "StringType", + "locationName": "Value" + }, + "flattened": true, + "locationName": "Attribute" + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": "bar" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarrequestid" + } + } + ] + }, + { + "description": "Named map", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "MapType" + } + } + }, + "MapType": { + "type": "map", + "flattened": true, + "key": { + "locationName": "foo", + "shape": "StringType" + }, + "value": { + "locationName": "bar", + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": "bar", + "baz": "bam" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbamrequestid" + } + } + ] + }, + { + "description": "Empty string", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "resultWrapper": "OperationNameResult", + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Foo": "" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "requestid" + } + } + ] + }, + { + "description": "Timestamp members", + "metadata": { + "protocol": "query" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeCustom": { + "timestampFormat": "rfc822", + "shape": "TimestampType" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + }, + "StructMember": { + "shape": "TimeContainer" + } + } + }, + "TimeContainer": { + "type": "structure", + "members": { + "foo": { + "shape": "TimestampType" + }, + "bar": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "unixTimestamp", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "TimeArg": 1398796238, + "TimeCustom": 1398796238, + "TimeFormat": 1398796238, + "StructMember": { + "foo": 1398796238, + "bar": 1398796238 + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "2014-04-29T18:30:38+00:0013987962382014-04-29T18:30:38+00:00Tue, 29 Apr 2014 18:30:38 GMT1398796238requestid" + } + } + ] + }, + { + "description": "Modeled exceptions", + "metadata": { + "protocol": "query" + }, + "shapes": { + "ExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + }, + "Message": { + "shape": "StringType" + } + } + }, + "OtherExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "SomeTypeExceptionShapemymessagemybody" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody" + }, + "errorCode": "OtherExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "SomeTypeOtherExceptionShapemymessagemybody" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": {}, + "errorCode": "UndefinedShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": {}, + "body": "SomeTypeUndefinedShapemymessagemybody" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/output/rest-json.json b/testbed/boto__botocore/tests/unit/protocols/output/rest-json.json new file mode 100644 index 0000000000000000000000000000000000000000..c6bd958b92171fd217910cffa531970d74b6b3d2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/output/rest-json.json @@ -0,0 +1,1312 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ImaHeader": { + "shape": "HeaderShape" + }, + "ImaHeaderLocation": { + "shape": "HeaderShape", + "locationName": "X-Foo" + }, + "Status": { + "shape": "StatusShape", + "location": "statusCode" + }, + "Str": { + "shape": "StringType" + }, + "Num": { + "shape": "IntegerType" + }, + "FalseBool": { + "shape": "BooleanType" + }, + "TrueBool": { + "shape": "BooleanType" + }, + "Float": { + "shape": "FloatType" + }, + "Double": { + "shape": "DoubleType" + }, + "Long": { + "shape": "LongType" + }, + "Char": { + "shape": "CharType" + } + } + }, + "HeaderShape": { + "type": "string", + "location": "header" + }, + "StatusShape": { + "type": "integer" + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + }, + "BooleanType": { + "type": "boolean" + }, + "FloatType": { + "type": "float" + }, + "DoubleType": { + "type": "double" + }, + "LongType": { + "type": "long" + }, + "CharType": { + "type": "character" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ImaHeader": "test", + "ImaHeaderLocation": "abc", + "Status": 200, + "Str": "myname", + "Num": 123, + "FalseBool": false, + "TrueBool": true, + "Float": 1.2, + "Double": 1.3, + "Long": 200, + "Char": "a" + }, + "response": { + "status_code": 200, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc" + }, + "body": "{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}" + } + } + ] + }, + { + "description": "Blob members", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "BlobMember": { + "shape": "BlobType" + }, + "StructMember": { + "shape": "BlobContainer" + } + } + }, + "BlobType": { + "type": "blob" + }, + "BlobContainer": { + "type": "structure", + "members": { + "foo": { + "shape": "BlobType" + } + } + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "BlobMember": "hi!", + "StructMember": { + "foo": "there!" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}" + } + } + ] + }, + { + "description": "Timestamp members", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeArgInHeader": { + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timearg" + }, + "TimeCustom": { + "timestampFormat": "rfc822", + "shape": "TimestampType" + }, + "TimeCustomInHeader": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timecustom" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + }, + "TimeFormatInHeader": { + "shape": "TimestampFormatType", + "location": "header", + "locationName": "x-amz-timeformat" + }, + "StructMember": { + "shape": "TimeContainer" + } + } + }, + "TimeContainer": { + "type": "structure", + "members": { + "foo": { + "shape": "TimestampType" + }, + "bar": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "iso8601", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "TimeArg": 1398796238, + "TimeArgInHeader": 1398796238, + "TimeCustom": 1398796238, + "TimeCustomInHeader": 1398796238, + "TimeFormat": 1398796238, + "TimeFormatInHeader": 1398796238, + "StructMember": { + "foo": 1398796238, + "bar": 1398796238 + } + }, + "response": { + "status_code": 200, + "headers": { + "x-amz-timearg": "Tue, 29 Apr 2014 18:30:38 GMT", + "x-amz-timecustom": "1398796238", + "x-amz-timeformat": "2014-04-29T18:30:38+00:00" + }, + "body": "{\"TimeArg\": 1398796238, \"TimeCustom\": \"Tue, 29 Apr 2014 18:30:38 GMT\", \"TimeFormat\": \"2014-04-29T18:30:38+00:00\", \"StructMember\": {\"foo\": 1398796238, \"bar\": \"2014-04-29T18:30:38+00:00\"}}" + } + } + ] + }, + { + "description": "Lists", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["a", "b"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"ListMember\": [\"a\", \"b\"]}" + } + } + ] + }, + { + "description": "Lists with structure member", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListType" + } + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "SingleStruct" + } + }, + "StringType": { + "type": "string" + }, + "SingleStruct": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + } + } + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": [{"Foo": "a"}, {"Foo": "b"}] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"ListMember\": [{\"Foo\": \"a\"}, {\"Foo\": \"b\"}]}" + } + } + ] + }, + { + "description": "Maps", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "MapMember": { + "shape": "MapType" + } + } + }, + "MapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "ListType" + } + }, + "ListType": { + "type": "list", + "member": { + "shape": "IntegerType" + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "MapMember": { + "a": [1, 2], + "b": [3, 4] + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}" + } + } + ] + }, + { + "description": "Complex Map Values", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "MapMember": { + "shape": "MapType" + } + } + }, + "MapType": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "TimeType" + } + }, + "TimeType": { + "type": "timestamp" + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "MapMember": { + "a": 1398796238, + "b": 1398796238 + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"MapMember\": {\"a\": 1398796238, \"b\": 1398796238}}" + } + } + ] + }, + { + "description": "Ignores extra data", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "StrType": { + "shape": "StrType" + } + } + }, + "StrType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": {}, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"foo\": \"bar\"}" + } + } + ] + }, + { + "description": "Ignores undefined output", + "metadata": { + "protocol": "rest-json" + }, + "shapes": {}, + "cases": [ + { + "given": { + "name": "OperationName" + }, + "result": {}, + "response": { + "status_code": 200, + "headers": {}, + "body": "OK" + } + } + ] + }, + { + "description": "Supports header maps", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "AllHeaders": { + "shape": "HeaderMap", + "location": "headers" + }, + "PrefixedHeaders": { + "shape": "HeaderMap", + "location": "headers", + "locationName": "X-" + } + } + }, + "HeaderMap": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "AllHeaders": { + "Content-Length": "10", + "x-Foo": "bar", + "X-bam": "boo" + }, + "PrefixedHeaders": { + "Foo": "bar", + "bam": "boo" + } + }, + "response": { + "status_code": 200, + "headers": { + "Content-Length": "10", + "x-Foo": "bar", + "X-bam": "boo" + }, + "body": "{}" + } + } + ] + }, + { + "description": "JSON payload", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "payload": "Data", + "members": { + "Header": { + "shape": "StringType", + "location": "header", + "locationName": "X-Foo" + }, + "Data": { + "shape": "BodyStructure" + } + } + }, + "BodyStructure": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Header": "baz", + "Data": { + "Foo": "abc" + } + }, + "response": { + "status_code": 200, + "headers": { + "X-Foo": "baz" + }, + "body": "{\"Foo\": \"abc\"}" + } + } + ] + }, + { + "description": "Streaming payload", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "payload": "Stream", + "members": { + "Stream": { + "shape": "Stream" + } + } + }, + "Stream": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Stream": "abc" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc" + } + } + ] + }, + { + "description": "JSON value trait", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Attr": { + "shape": "StringType", + "jsonvalue": true, + "location": "header", + "locationName": "X-Amz-Foo" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Attr": {"Foo":"Bar"} + }, + "response": { + "status_code": 200, + "headers": {"X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="}, + "body": "" + } + } + ] + }, + { + "description": "Modeled exceptions", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "ExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "ImaHeader": { + "shape": "HeaderShape" + }, + "ImaHeaderLocation": { + "shape": "HeaderShape", + "locationName": "X-Foo" + }, + "Status": { + "shape": "StatusShape", + "location": "statusCode" + }, + "BodyMember": { + "shape": "StringType" + }, + "Message": { + "shape": "StringType" + } + } + }, + "OtherExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + } + } + }, + "HeaderShape": { + "type": "string", + "location": "header" + }, + "StatusShape": { + "type": "integer" + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "ImaHeader": "test", + "ImaHeaderLocation": "abc", + "Status": 400, + "BodyMember": "mybody", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc", + "X-Amzn-Errortype": "ExceptionShape" + }, + "body": "{\"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "ImaHeader": "test", + "ImaHeaderLocation": "abc", + "Status": 400, + "BodyMember": "mybody", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc" + }, + "body": "{ \"code\": \"ExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "ImaHeader": "test", + "ImaHeaderLocation": "abc", + "Status": 400, + "BodyMember": "mybody", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc", + "X-Amzn-Errortype": "ExceptionShape" + }, + "body": "{ \"code\": \"OtherExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody" + }, + "errorCode": "OtherExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc", + "X-Amzn-Errortype": "OtherExceptionShape" + }, + "body": "{ \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody" + }, + "errorCode": "OtherExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc" + }, + "body": "{ \"code\": \"OtherExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": {}, + "errorCode": "UndefinedShape", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc", + "X-Amzn-Errortype": "UndefinedShape" + }, + "body": "{ \"BodyMember\": \"mybody\"}" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": {}, + "errorCode": "UndefinedShape", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc" + }, + "body": "{ \"code\": \"UndefinedShape\", \"BodyMember\": \"mybody\"}" + } + } + ] + }, + { + "description": "Serializes document with standalone primitive as part of the JSON response payload with no escaping.", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "documentValue": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": "foo" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": \"foo\"}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": 123 + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": 123}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": 1.2 + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": 1.2}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": true + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": true}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": "" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": \"\"}" + } + } + ] + }, + { + "description": "Serializes inline documents as part of the JSON response payload with no escaping.", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "documentValue": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": {"foo": "bar"} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": {\"foo\": \"bar\"}}" + } + } + ] + }, + { + "description": "Serializes aggregate documents as part of the JSON response payload with no escaping.", + "metadata": { + "protocol": "rest-json", + "apiVersion": "2014-01-01" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "documentValue": { + "shape": "DocumentType" + } + } + }, + "DocumentType": { + "type": "structure", + "document": true + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": { + "str": "test", + "num": 123, + "float": 1.2, + "bool": true, + "null": "", + "document": {"foo": false}, + "list": ["myname", 321, 1.3, true, "", {"nested": true}, [200, ""]] + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": {\"str\": \"test\", \"num\": 123, \"float\": 1.2, \"bool\": true, \"null\": \"\", \"document\": {\"foo\": false}, \"list\": [\"myname\", 321, 1.3, true, \"\", {\"nested\": true}, [200, \"\"]]}}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "documentValue": [ + "test", + 123, + 1.2, + true, + "", + {"str": "myname", "num": 321, "float": 1.3, "bool": true, "null": "", "document": {"nested": true}, "list": [200, ""]}, + ["foo", false] + ] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"documentValue\": [\"test\", 123, 1.2, true, \"\", {\"str\": \"myname\", \"num\": 321, \"float\": 1.3, \"bool\": true, \"null\": \"\", \"document\": {\"nested\": true}, \"list\": [200, \"\"]}, [\"foo\", false]]}" + } + } + ] + }, + { + "description": "Tagged Unions", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "UnionMember": { + "shape": "UnionType" + } + } + }, + "UnionType": { + "type": "structure", + "members": { + "S":{"shape":"StringType"}, + "L": {"shape": "ListType"} + }, + "union": true + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "UnionMember": {"S": "mystring"} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"UnionMember\": {\"S\": \"mystring\"}}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "UnionMember": {"L": ["a", "b"]} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"UnionMember\": {\"L\": [\"a\", \"b\"]}}" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "UnionMember": {"SDK_UNKNOWN_MEMBER": {"name": "SomeUnknownMember"}} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "{\"UnionMember\": {\"SomeUnknownMember\": \"foo\"}}" + } + } + ] + }, + { + "description": "List in header", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape", + "location": "header", + "locationName": "x-amz-list-member" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "EnumType" + } + }, + "EnumType": { + "type": "string", + "enum": ["one", "two", "three"] + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["one", "two", "three"] + }, + "response": { + "status_code": 200, + "headers": { + "x-amz-list-member": " one,two , three " + }, + "body": "" + } + } + ] + }, + { + "description": "Number in header", + "metadata": { + "protocol": "rest-json" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "IntegerMember": { + "shape": "IntegerShape", + "location": "header", + "locationName": "x-amz-integer-member" + }, + "LongMember": { + "shape": "LongShape", + "location": "header", + "locationName": "x-amz-long-member" + } + } + }, + "IntegerShape": { + "type": "integer" + }, + "LongShape": { + "type": "long" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "IntegerMember": 123, + "LongMember": 200 + }, + "response": { + "status_code": 200, + "headers": { + "x-amz-integer-member": "123", + "x-amz-long-member": "200" + }, + "body": "" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/protocols/output/rest-xml.json b/testbed/boto__botocore/tests/unit/protocols/output/rest-xml.json new file mode 100644 index 0000000000000000000000000000000000000000..8da46809609e7b0963769657dd6912f17ccbd9d7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/protocols/output/rest-xml.json @@ -0,0 +1,1273 @@ +[ + { + "description": "Scalar members", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ImaHeader": { + "shape": "HeaderShape" + }, + "ImaHeaderLocation": { + "shape": "HeaderShape", + "locationName": "X-Foo" + }, + "Str": { + "shape": "StringType" + }, + "Num": { + "shape": "IntegerType", + "locationName": "FooNum" + }, + "FalseBool": { + "shape": "BooleanType" + }, + "TrueBool": { + "shape": "BooleanType" + }, + "Float": { + "shape": "FloatType" + }, + "Double": { + "shape": "DoubleType" + }, + "Long": { + "shape": "LongType" + }, + "Char": { + "shape": "CharType" + }, + "Timestamp": { + "shape": "TimestampType" + } + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + }, + "BooleanType": { + "type": "boolean" + }, + "FloatType": { + "type": "float" + }, + "DoubleType": { + "type": "double" + }, + "LongType": { + "type": "long" + }, + "CharType": { + "type": "character" + }, + "HeaderShape": { + "type": "string", + "location": "header" + }, + "StatusShape": { + "type": "integer", + "location": "statusCode" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ImaHeader": "test", + "ImaHeaderLocation": "abc", + "Str": "myname", + "Num": 123, + "FalseBool": false, + "TrueBool": true, + "Float": 1.2, + "Double": 1.3, + "Long": 200, + "Char": "a", + "Timestamp": 1422172800 + }, + "response": { + "status_code": 200, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc" + }, + "body": "myname123falsetrue1.21.3200a2015-01-25T08:00:00Z" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ImaHeader": "test", + "ImaHeaderLocation": "abc", + "Str": "", + "Num": 123, + "FalseBool": false, + "TrueBool": true, + "Float": 1.2, + "Double": 1.3, + "Long": 200, + "Char": "a", + "Timestamp": 1422172800 + }, + "response": { + "status_code": 200, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc" + }, + "body": "123falsetrue1.21.3200a2015-01-25T08:00:00Z" + } + } + ] + }, + { + "description": "Blob", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Blob": { + "shape": "BlobType" + } + } + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Blob": "value" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "dmFsdWU=" + } + } + ] + }, + { + "description": "Lists", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123" + } + } + ] + }, + { + "description": "List with custom member name", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "StringType", + "locationName": "item" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123" + } + } + ] + }, + { + "description": "Flattened List", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "StringList", + "flattened": true + } + } + }, + "StringList": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["abc", "123"] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc123" + } + } + ] + }, + { + "description": "Normal map", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "StringMap" + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "SingleStructure" + } + }, + "SingleStructure": { + "type": "structure", + "members": { + "foo": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": { + "foo": "bar" + }, + "baz": { + "foo": "bam" + } + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbam" + } + } + ] + }, + { + "description": "Flattened map", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "StringMap", + "flattened": true + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType" + }, + "value": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": "bar", + "baz": "bam" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbam" + } + } + ] + }, + { + "description": "Named map", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Map": { + "shape": "StringMap" + } + } + }, + "StringMap": { + "type": "map", + "key": { + "shape": "StringType", + "locationName": "foo" + }, + "value": { + "shape": "StringType", + "locationName": "bar" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Map": { + "qux": "bar", + "baz": "bam" + } + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "quxbarbazbam" + } + } + ] + }, + { + "description": "XML payload", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "payload": "Data", + "members": { + "Header": { + "shape": "StringType", + "location": "header", + "locationName": "X-Foo" + }, + "Data": { + "shape": "SingleStructure" + } + } + }, + "StringType": { + "type": "string" + }, + "SingleStructure": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + } + } + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Header": "baz", + "Data": { + "Foo": "abc" + } + }, + "response": { + "status_code": 200, + "headers": { + "X-Foo": "baz" + }, + "body": "abc" + } + } + ] + }, + { + "description": "Streaming payload", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "payload": "Stream", + "members": { + "Stream": { + "shape": "BlobStream" + } + } + }, + "BlobStream": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Stream": "abc" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "abc" + } + } + ] + }, + { + "description": "Scalar members in headers", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Str": { + "locationName": "x-str", + "shape": "StringHeaderType" + }, + "Integer": { + "locationName": "x-int", + "shape": "IntegerHeaderType" + }, + "TrueBool": { + "locationName": "x-true-bool", + "shape": "BooleanHeaderType" + }, + "FalseBool": { + "locationName": "x-false-bool", + "shape": "BooleanHeaderType" + }, + "Float": { + "locationName": "x-float", + "shape": "FloatHeaderType" + }, + "Double": { + "locationName": "x-double", + "shape": "DoubleHeaderType" + }, + "Long": { + "locationName": "x-long", + "shape": "LongHeaderType" + }, + "Char": { + "locationName": "x-char", + "shape": "CharHeaderType" + }, + "Timestamp": { + "locationName": "x-timestamp", + "shape": "TimestampHeaderType" + } + } + }, + "StringHeaderType": { + "location": "header", + "type": "string" + }, + "IntegerHeaderType": { + "location": "header", + "type": "integer" + }, + "BooleanHeaderType": { + "location": "header", + "type": "boolean" + }, + "FloatHeaderType": { + "location": "header", + "type": "float" + }, + "DoubleHeaderType": { + "location": "header", + "type": "double" + }, + "LongHeaderType": { + "location": "header", + "type": "long" + }, + "CharHeaderType": { + "location": "header", + "type": "character" + }, + "TimestampHeaderType": { + "location": "header", + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Str": "string", + "Integer": 1, + "TrueBool": true, + "FalseBool": false, + "Float": 1.5, + "Double": 1.5, + "Long": 100, + "Char": "a", + "Timestamp": 1422172800 + }, + "response": { + "status_code": 200, + "headers": { + "x-str": "string", + "x-int": "1", + "x-true-bool": "true", + "x-false-bool": "false", + "x-float": "1.5", + "x-double": "1.5", + "x-long": "100", + "x-char": "a", + "x-timestamp": "Sun, 25 Jan 2015 08:00:00 GMT" + }, + "body": "" + } + } + ] + }, + { + "description": "Empty string", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Foo": { + "shape": "StringType" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Foo": "" + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "requestid" + } + } + ] + }, + { + "description": "JSON value trait", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Attr": { + "shape": "StringType", + "jsonvalue": true, + "location": "header", + "locationName": "X-Amz-Foo" + } + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Attr": {"Foo":"Bar"} + }, + "response": { + "status_code": 200, + "headers": {"X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="}, + "body": "" + } + } + ] + }, + { + "description": "Timestamp members", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "TimeArg": { + "shape": "TimestampType" + }, + "TimeArgInHeader": { + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timearg" + }, + "TimeCustom": { + "timestampFormat": "rfc822", + "shape": "TimestampType" + }, + "TimeCustomInHeader": { + "timestampFormat": "unixTimestamp", + "shape": "TimestampType", + "location": "header", + "locationName": "x-amz-timecustom" + }, + "TimeFormat": { + "shape": "TimestampFormatType" + }, + "TimeFormatInHeader": { + "shape": "TimestampFormatType", + "location": "header", + "locationName": "x-amz-timeformat" + }, + "StructMember": { + "shape": "TimeContainer" + } + } + }, + "TimeContainer": { + "type": "structure", + "members": { + "foo": { + "shape": "TimestampType" + }, + "bar": { + "shape": "TimestampFormatType" + } + } + }, + "TimestampFormatType": { + "timestampFormat": "unixTimestamp", + "type": "timestamp" + }, + "TimestampType": { + "type": "timestamp" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "TimeArg": 1398796238, + "TimeArgInHeader": 1398796238, + "TimeCustom": 1398796238, + "TimeCustomInHeader": 1398796238, + "TimeFormat": 1398796238, + "TimeFormatInHeader": 1398796238, + "StructMember": { + "foo": 1398796238, + "bar": 1398796238 + } + }, + "response": { + "status_code": 200, + "headers": { + "x-amz-timearg": "Tue, 29 Apr 2014 18:30:38 GMT", + "x-amz-timecustom": "1398796238", + "x-amz-timeformat": "1398796238" + }, + "body": "2014-04-29T18:30:38+00:0013987962382014-04-29T18:30:38+00:00Tue, 29 Apr 2014 18:30:38 GMT1398796238requestid" + } + } + ] + }, + { + "description": "REST XML Event Stream", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "Payload": {"shape": "EventStream"} + }, + "payload": "Payload" + }, + "EventStream": { + "type": "structure", + "eventstream": true, + "members": { + "TypeA": {"shape": "TypeAEvent"}, + "TypeB": {"shape": "TypeBEvent"}, + "TypeC": {"shape": "TypeCEvent"} + } + }, + "TypeAEvent": { + "type": "structure", + "event": true, + "members": { + "Payload": { + "shape": "BlobType", + "eventpayload": true + } + } + }, + "TypeBEvent": { + "type": "structure", + "event": true, + "members": { + "Details": { + "shape": "Details", + "eventpayload": true + } + } + }, + "TypeCEvent": { + "type": "structure", + "event": true, + "members": { + "Details": { + "shape": "Details", + "eventpayload": true + }, + "Boolean": { + "shape": "BooleanType", + "eventheader": true + }, + "Integer": { + "shape": "IntegerType", + "eventheader": true + }, + "Blob": { + "shape": "BlobType", + "eventheader": true + }, + "String": { + "shape": "StringType", + "eventheader": true + }, + "Timestamp": { + "shape": "TimestampType", + "eventheader": true + } + } + }, + "Details": { + "type": "structure", + "members": { + "StringField": {"shape": "StringType"}, + "IntegerField": {"shape": "IntegerType"} + } + }, + "StringType": { + "type": "string" + }, + "IntegerType": { + "type": "integer" + }, + "BooleanType": { + "type": "boolean" + }, + "TimestampType": { + "type": "timestamp" + }, + "BlobType": { + "type": "blob" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Payload": [ + { + "TypeA": {"Payload": "somebytes"} + }, + { + "TypeB": { + "Details": { + "StringField": "somestring", + "IntegerField": 123 + } + } + } + ] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "AAAAbAAAAFPLgkVrDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcABVR5cGVBDTpjb250ZW50LXR5cGUHABhhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1zb21lYnl0ZXMesj2HAAAAsAAAAEOaMMdXDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcABVR5cGVCDTpjb250ZW50LXR5cGUHAAh0ZXh0L3htbDxUeXBlQiB4bWxucz0iIj48U3RyaW5nRmllbGQ+c29tZXN0cmluZzwvU3RyaW5nRmllbGQ+PEludGVnZXJGaWVsZD4xMjM8L0ludGVnZXJGaWVsZD48L1R5cGVCPiwthPo=" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Payload": [ + { + "TypeC": { + "Boolean": true, + "Integer": 123, + "Blob": "someblob", + "String": "somestring", + "Timestamp": 1422172800, + "Details": { + "StringField": "somestring", + "IntegerField": 123 + } + } + } + ] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "AAABAQAAAJBjEbY4DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcABVR5cGVDDTpjb250ZW50LXR5cGUHAAh0ZXh0L3htbAdCb29sZWFuAAdJbnRlZ2VyBAAAAHsEQmxvYgYACHNvbWVibG9iBlN0cmluZwcACnNvbWVzdHJpbmcJVGltZXN0YW1wCAAAAUsgGsQAPERldGFpbHMgeG1sbnM9IiI+PFN0cmluZ0ZpZWxkPnNvbWVzdHJpbmc8L1N0cmluZ0ZpZWxkPjxJbnRlZ2VyRmllbGQ+MTIzPC9JbnRlZ2VyRmllbGQ+PC9EZXRhaWxzPhGUvKo=" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "Payload": [] + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "" + } + } + ] + }, + { + "description": "Modeled exceptions", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "ExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "ImaHeader": { + "shape": "HeaderShape" + }, + "ImaHeaderLocation": { + "shape": "HeaderShape", + "locationName": "X-Foo" + }, + "Status": { + "shape": "StatusShape", + "location": "statusCode" + }, + "BodyMember": { + "shape": "StringType" + }, + "Message": { + "shape": "StringType" + } + } + }, + "OtherExceptionShape": { + "exception": true, + "type": "structure", + "members": { + "BodyMember": { + "shape": "StringType" + } + } + }, + "HeaderShape": { + "type": "string", + "location": "header" + }, + "StatusShape": { + "type": "integer" + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "ImaHeader": "test", + "ImaHeaderLocation": "abc", + "Status": 400, + "BodyMember": "mybody", + "Message": "mymessage" + }, + "errorCode": "ExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc", + "X-Amzn-Requestid": "foo-id" + }, + "body": "SomeTypeExceptionShapemymessagemybody" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": { + "BodyMember": "mybody" + }, + "errorCode": "OtherExceptionShape", + "errorMessage": "mymessage", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc", + "X-Amzn-Requestid": "foo-id" + }, + "body": "SomeTypeOtherExceptionShapemymessagemybody" + } + }, + { + "given": { + "errors": [ + {"shape": "ExceptionShape"} + ], + "name": "OperationName" + }, + "error": {}, + "errorCode": "UndefinedShape", + "response": { + "status_code": 400, + "headers": { + "ImaHeader": "test", + "X-Foo": "abc", + "X-Amzn-Requestid": "foo-id" + }, + "body": "SomeTypeUndefinedShapemybody" + } + } + ] + }, + { + "description": "Unions", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "UnionMember": { + "shape": "UnionType" + } + } + }, + "UnionType": { + "type": "structure", + "members": { + "S":{"shape":"StringType"}, + "L": {"shape": "ListType"} + }, + "union": true + }, + "ListType": { + "type": "list", + "member": { + "shape": "StringType" + } + }, + "StringType": { + "type": "string" + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "UnionMember": {"S": "string value"} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "string value" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "UnionMember": {"L": ["a", "b"]} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "ab" + } + }, + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "UnionMember": {"SDK_UNKNOWN_MEMBER": {"name": "SomeUnknownMember"}} + }, + "response": { + "status_code": 200, + "headers": {}, + "body": "foo" + } + } + ] + }, + { + "description": "List in header", + "metadata": { + "protocol": "rest-xml" + }, + "shapes": { + "OutputShape": { + "type": "structure", + "members": { + "ListMember": { + "shape": "ListShape", + "location": "header", + "locationName": "x-amz-list-member" + } + } + }, + "ListShape": { + "type": "list", + "member": { + "shape": "EnumType" + } + }, + "EnumType": { + "type": "string", + "enum": ["one", "two", "three"] + } + }, + "cases": [ + { + "given": { + "output": { + "shape": "OutputShape" + }, + "name": "OperationName" + }, + "result": { + "ListMember": ["one", "two", "three"] + }, + "response": { + "status_code": 200, + "headers": { + "x-amz-list-member": " one,two , three " + }, + "body": "" + } + } + ] + } +] diff --git a/testbed/boto__botocore/tests/unit/response_parsing/__init__.py b/testbed/boto__botocore/tests/unit/response_parsing/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..537b6cd51a0b00328dfe53f9836bdd3a1204f2a1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ +# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/errors/datapipeline-create-pipeline.json b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/datapipeline-create-pipeline.json new file mode 100644 index 0000000000000000000000000000000000000000..0c7e9a0cc9ac4bfd863ef32a7918a0ac17f188b2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/datapipeline-create-pipeline.json @@ -0,0 +1 @@ +{"__type":"AccessDeniedException","Message":"Operation createPipeline is not allowed to be performed with role identity"} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/errors/directconnect-delete-connection.json b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/directconnect-delete-connection.json new file mode 100644 index 0000000000000000000000000000000000000000..f90f0e85227f071a7a7c20d617de515dd7ab0ea7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/directconnect-delete-connection.json @@ -0,0 +1 @@ +{"__type":"DirectConnectClientException","message":"Connection ID foobar has an invalid format."} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/errors/dynamodb-put-item.json b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/dynamodb-put-item.json new file mode 100644 index 0000000000000000000000000000000000000000..05085bc80bc96d656019b3cdac58d825ac4089b0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/dynamodb-put-item.json @@ -0,0 +1,2 @@ +{"__type":"com.amazonaws.dynamodb.v20111205#ProvisionedThroughputExceededException", + "message":"The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API"} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/errors/elastictranscoder-delete-pipeline.json b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/elastictranscoder-delete-pipeline.json new file mode 100644 index 0000000000000000000000000000000000000000..d28b03002d187bd0d8757106ccf83c0ec77a6a21 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/elastictranscoder-delete-pipeline.json @@ -0,0 +1,11 @@ +{ + "message": "1 validation error detected: Value 'foobar' at 'id' failed to satisfy constraint: Member must satisfy regular expression pattern: ^\\d{13}-\\w{6}$", + "__headers__": { + "x-amzn-requestid": "1234", + "content-length": "120", + "date": "Wed, 19 Feb 2014 22:13:13 GMT", + "nncoection": "close", + "content-type": "application/json", + "x-amzn-errortype": "ValidationException:" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/errors/opsworks-delete-stack.json b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/opsworks-delete-stack.json new file mode 100644 index 0000000000000000000000000000000000000000..c4d323acc589cdeefe8a5d50df80c6aba7444a1b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/opsworks-delete-stack.json @@ -0,0 +1 @@ +{"__type":"ResourceNotFoundException","message":"Unable to find stack with ID foobar"} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/errors/storagegateway-delete-gateway.json b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/storagegateway-delete-gateway.json new file mode 100644 index 0000000000000000000000000000000000000000..421bc48fc68593bc10c3988903fb9f81099784df --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/storagegateway-delete-gateway.json @@ -0,0 +1 @@ +{"__type":"ValidationException","message":"1 validation error detected: Value 'foobar' at 'gatewayARN' failed to satisfy constraint: Member must have length greater than or equal to 50"} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/errors/swf-deprecate-domain.json b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/swf-deprecate-domain.json new file mode 100644 index 0000000000000000000000000000000000000000..0511da33a6f47240b175d28d941c4b8d142f66ae --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/errors/swf-deprecate-domain.json @@ -0,0 +1 @@ +{"__type":"com.amazonaws.swf.base.model#UnknownResourceFault","message":"Unknown domain: foobar"} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/datapipeline-create-pipeline.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/datapipeline-create-pipeline.json new file mode 100644 index 0000000000000000000000000000000000000000..3ce65f661f1e463e18f961be1b29da514f72bd6f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/datapipeline-create-pipeline.json @@ -0,0 +1,7 @@ +{ + "Error": { + "Message": "Operation createPipeline is not allowed to be performed with role identity", + "Code": "AccessDeniedException" + }, + "ResponseMetadata": {} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/directconnect-delete-connection.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/directconnect-delete-connection.json new file mode 100644 index 0000000000000000000000000000000000000000..23dfd3d4030425ccc8881dcaa0a778aca4ac018d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/directconnect-delete-connection.json @@ -0,0 +1,7 @@ +{ + "ResponseMetadata": {}, + "Error": { + "Message": "Connection ID foobar has an invalid format.", + "Code": "DirectConnectClientException" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/dynamodb-put-item.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/dynamodb-put-item.json new file mode 100644 index 0000000000000000000000000000000000000000..3b01264b8f940debff0076483c6b9805148be71b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/dynamodb-put-item.json @@ -0,0 +1,7 @@ +{ + "ResponseMetadata": {}, + "Error": { + "Message": "The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API", + "Code": "ProvisionedThroughputExceededException" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/elastictranscoder-delete-pipeline.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/elastictranscoder-delete-pipeline.json new file mode 100644 index 0000000000000000000000000000000000000000..5249d826deb8a1a69c336ee06777c0b80492c5a0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/elastictranscoder-delete-pipeline.json @@ -0,0 +1,7 @@ +{ + "ResponseMetadata": {"RequestId": "1234"}, + "Error": { + "Message": "1 validation error detected: Value 'foobar' at 'id' failed to satisfy constraint: Member must satisfy regular expression pattern: ^\\d{13}-\\w{6}$", + "Code": "ValidationException" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/elastictranscoder-list-pipelines.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/elastictranscoder-list-pipelines.json new file mode 100644 index 0000000000000000000000000000000000000000..60c1ee05b568697f86a32d033c05938e186323fc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/elastictranscoder-list-pipelines.json @@ -0,0 +1,31 @@ +{ + "ResponseMetadata": {}, + "NextPageToken": null, + "Pipelines": [ + { + "ContentConfig": { + "Bucket": "pipeline-12345", + "StorageClass": "Standard", + "Permissions": [] + }, + "Status": "Active", + "Name": "test-pipeline", + "ThumbnailConfig": { + "Bucket": "12345", + "StorageClass": "Standard", + "Permissions": [] + }, + "Notifications": { + "Completed": "", + "Warning": "", + "Progressing": "", + "Error": "" + }, + "Role": "arn:aws:iam::12345:role/Elastic_Transcoder_Default_Role", + "InputBucket": "12345", + "OutputBucket": null, + "Id": "12345", + "Arn": "arn:aws:elastictranscoder:us-west-2:12345:pipeline/12345" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/opsworks-delete-stack.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/opsworks-delete-stack.json new file mode 100644 index 0000000000000000000000000000000000000000..69d7a0f51e0b418606c3cbd3a06057047d093a2f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/opsworks-delete-stack.json @@ -0,0 +1,7 @@ +{ + "ResponseMetadata": {}, + "Error": { + "Message": "Unable to find stack with ID foobar", + "Code": "ResourceNotFoundException" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/storagegateway-delete-gateway.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/storagegateway-delete-gateway.json new file mode 100644 index 0000000000000000000000000000000000000000..b88b1788ff85b624cfe2ee241994ff550ad990d9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/storagegateway-delete-gateway.json @@ -0,0 +1,7 @@ +{ + "ResponseMetadata": {}, + "Error": { + "Message": "1 validation error detected: Value 'foobar' at 'gatewayARN' failed to satisfy constraint: Member must have length greater than or equal to 50", + "Code": "ValidationException" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/json/expected/swf-deprecate-domain.json b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/swf-deprecate-domain.json new file mode 100644 index 0000000000000000000000000000000000000000..a5850aae19a07d4ed70eeb5f07a46eb407c0cd74 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/json/expected/swf-deprecate-domain.json @@ -0,0 +1,7 @@ +{ + "ResponseMetadata": {}, + "Error": { + "Message": "Unknown domain: foobar", + "Code": "UnknownResourceFault" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/autoscaling-delete-policy.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/autoscaling-delete-policy.json new file mode 100644 index 0000000000000000000000000000000000000000..a4cc0f2793f3d3495dd44a87bb3ef1adc4ba4644 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/autoscaling-delete-policy.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "ValidationError", + "Message": "The AutoScaling Group name is required when specifying a policy by its name", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "9e27be2f-b7e3-11e2-a0e4-f9780ed1763e" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/autoscaling-delete-policy.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/autoscaling-delete-policy.xml new file mode 100644 index 0000000000000000000000000000000000000000..063c6236dca44658cbe9f56c74570331efe6ed13 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/autoscaling-delete-policy.xml @@ -0,0 +1,8 @@ + + + Sender + ValidationError + The AutoScaling Group name is required when specifying a policy by its name + + 9e27be2f-b7e3-11e2-a0e4-f9780ed1763e + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudformation-cancel-update-stack.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudformation-cancel-update-stack.json new file mode 100644 index 0000000000000000000000000000000000000000..50c3e8c46ae3023928d6f7b3657c7ed402a131b2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudformation-cancel-update-stack.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "ValidationError", + "Message": "Stack: foobar does not exist", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "21113b58-b7e4-11e2-91fa-05ec834fa451" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudformation-cancel-update-stack.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudformation-cancel-update-stack.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b68519d83b01ca0835e3bbe7192005c43ee4406 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudformation-cancel-update-stack.xml @@ -0,0 +1,8 @@ + + + Sender + ValidationError + Stack: foobar does not exist + + 21113b58-b7e4-11e2-91fa-05ec834fa451 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudwatch-describe-alarm-history.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudwatch-describe-alarm-history.json new file mode 100644 index 0000000000000000000000000000000000000000..40418da09b3a74a75e3a285a8f19fa0c27599de7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudwatch-describe-alarm-history.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "InvalidNextToken", + "Message": "The token 'fiebaz' was invalid", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "0cbee924-b7f3-11e2-9844-5359a37be512" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudwatch-describe-alarm-history.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudwatch-describe-alarm-history.xml new file mode 100644 index 0000000000000000000000000000000000000000..e2236cb06b76eb70451b8910111c5fc7c385289a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/cloudwatch-describe-alarm-history.xml @@ -0,0 +1,8 @@ + + + Sender + InvalidNextToken + The token 'fiebaz' was invalid + + 0cbee924-b7f3-11e2-9844-5359a37be512 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ec2-describe-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ec2-describe-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..00fbe92049af99a775215c6ce0b8732e8d4a69ab --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ec2-describe-instances.json @@ -0,0 +1,9 @@ +{ + "Error": { + "Code": "InvalidInstanceID.Malformed", + "Message": "Invalid id: \"foobar\"" + }, + "ResponseMetadata": { + "RequestId": "dfb14b43-9a55-4d8e-b676-e8034d12bbeb" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ec2-describe-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ec2-describe-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..556a1dbeb8f04e72b0fa2abed93938ae3f309643 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ec2-describe-instances.xml @@ -0,0 +1,10 @@ + + + + + InvalidInstanceID.Malformed + Invalid id: "foobar" + + + dfb14b43-9a55-4d8e-b676-e8034d12bbeb + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/elb-describe-load-balancers.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/elb-describe-load-balancers.json new file mode 100644 index 0000000000000000000000000000000000000000..99a8a6dd8e3eafd82a974d5a6c33780b336dd40b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/elb-describe-load-balancers.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "LoadBalancerNotFound", + "Message": "Cannot find Load Balancer foobar", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "88e880c0-b7f7-11e2-ac25-87bc0c2182b8" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/elb-describe-load-balancers.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/elb-describe-load-balancers.xml new file mode 100644 index 0000000000000000000000000000000000000000..bf543d235e46c721bf83a2407848527938ae21c8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/elb-describe-load-balancers.xml @@ -0,0 +1,8 @@ + + + Sender + LoadBalancerNotFound + Cannot find Load Balancer foobar + + 88e880c0-b7f7-11e2-ac25-87bc0c2182b8 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/iam-get-user.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/iam-get-user.json new file mode 100644 index 0000000000000000000000000000000000000000..6a1d222b4b67ea52e342b2815a83d6cb7132f534 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/iam-get-user.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "NoSuchEntity", + "Message": "The user with name foobar cannot be found.", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "358299bb-b7f8-11e2-8d39-e3a125f625ee" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/iam-get-user.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/iam-get-user.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f12a99c8bea47c4cd2c2da713277dae2bac6350 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/iam-get-user.xml @@ -0,0 +1,8 @@ + + + Sender + NoSuchEntity + The user with name foobar cannot be found. + + 358299bb-b7f8-11e2-8d39-e3a125f625ee + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/importexport-get-status.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/importexport-get-status.json new file mode 100644 index 0000000000000000000000000000000000000000..3432bc744e19cc6b24c1590f900fa8cfa6f7721f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/importexport-get-status.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "InvalidJobIdException", + "Message": "No such job foobar for your account", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "83281264-b7f8-11e2-a9e1-3f6477e78873" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/importexport-get-status.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/importexport-get-status.xml new file mode 100644 index 0000000000000000000000000000000000000000..c31e7e3c7d0615669bf4b591c024588808d79e20 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/importexport-get-status.xml @@ -0,0 +1,8 @@ + + + Sender + InvalidJobIdException + No such job foobar for your account + + 83281264-b7f8-11e2-a9e1-3f6477e78873 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/rds-describe-db-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/rds-describe-db-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..79d71c9a80be82a3488820fe56ed66fee174044d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/rds-describe-db-instances.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "DBInstanceNotFound", + "Message": "DBInstance foobar not found.", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "b41f03f1-b7f8-11e2-9b07-955bffd33505" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/rds-describe-db-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/rds-describe-db-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..547ee18de8b884239e712b4e46c69ba19915ae0c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/rds-describe-db-instances.xml @@ -0,0 +1,8 @@ + + + Sender + DBInstanceNotFound + DBInstance foobar not found. + + b41f03f1-b7f8-11e2-9b07-955bffd33505 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/route53-get-hosted-zone.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/route53-get-hosted-zone.json new file mode 100644 index 0000000000000000000000000000000000000000..e405d32db75ef36f0a8d9e5fb3918df21ed5e06e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/route53-get-hosted-zone.json @@ -0,0 +1,11 @@ +{ + "Error": { + "Code": "InvalidInput", + "Message": "Invalid resource type: foo", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "request_id" + } +} + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/route53-get-hosted-zone.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/route53-get-hosted-zone.xml new file mode 100644 index 0000000000000000000000000000000000000000..40991e7a5ca34a0ec42b0a6ba32cac9e6bdd33a2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/route53-get-hosted-zone.xml @@ -0,0 +1,8 @@ + + + Sender + InvalidInput + Invalid resource type: foo + + request_id + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-create-bucket.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-create-bucket.json new file mode 100644 index 0000000000000000000000000000000000000000..b0b404ae1e453aa794a7ec3863dbfc101d198bfc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-create-bucket.json @@ -0,0 +1,8 @@ +{ + "Error": { + "BucketName": "garnaat-pdx", + "Code": "BucketAlreadyOwnedByYou", + "Message": "Your previous request to create the named bucket succeeded and you already own it." + }, + "ResponseMetadata": {} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-create-bucket.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-create-bucket.xml new file mode 100644 index 0000000000000000000000000000000000000000..a85371ec782d957bc78f4ed2cb6a5ac6facb5453 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-create-bucket.xml @@ -0,0 +1,7 @@ + + BucketAlreadyOwnedByYou + Your previous request to create the named bucket succeeded and you already own it. + garnaat-pdx + 96380E1CB938DDF7 + uCyKZYcyp+7qYdvAcvwQueBs6VdfDURJZTrhTjc3gTfsqaWjC2n532mPb0P+ZQ4Q + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-list-objects.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-list-objects.json new file mode 100644 index 0000000000000000000000000000000000000000..baade91b9d09db6a3a106002c98c575ccde2d8b8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-list-objects.json @@ -0,0 +1,7 @@ +{ + "Error": { + "Code": "AccessDenied", + "Message": "Access Denied" + }, + "ResponseMetadata": {} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-list-objects.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-list-objects.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7ebc31f6cd8a067cfa4207940c0fa1f4530d411 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/s3-list-objects.xml @@ -0,0 +1,7 @@ + + + AccessDenied + Access Denied + 9C7D5181867045BB + XNe9pgGHhc+EBMJajTIuknWns46Dd3psDfbWyo1pbc0dULg/tkidZSeWG5VNitPJ + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ses-delete-identity.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ses-delete-identity.json new file mode 100644 index 0000000000000000000000000000000000000000..aa8ddba52a1d15752e09d55dc0932c3ca69a3a74 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ses-delete-identity.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "InvalidParameterValue", + "Message": "Identity foobar is invalid. Must be a verified email address or domain.", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "332db868-b7f9-11e2-b4a6-337840b53735" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ses-delete-identity.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ses-delete-identity.xml new file mode 100644 index 0000000000000000000000000000000000000000..1459b8d0dbfe018dbcfcf107ba52c3518555072e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/ses-delete-identity.xml @@ -0,0 +1,8 @@ + + + Sender + InvalidParameterValue + Identity foobar is invalid. Must be a verified email address or domain. + + 332db868-b7f9-11e2-b4a6-337840b53735 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sns-delete-topic.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sns-delete-topic.json new file mode 100644 index 0000000000000000000000000000000000000000..b9dcbfef4e9b8bc8051ba0c8975fa75241eaab84 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sns-delete-topic.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "InvalidParameter", + "Message": "TopicArn", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "8c4c8aa7-436b-5b46-91d5-c0a339158557" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sns-delete-topic.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sns-delete-topic.xml new file mode 100644 index 0000000000000000000000000000000000000000..ce70ec2a53e4133e6de276168c012f7b7e5058c0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sns-delete-topic.xml @@ -0,0 +1,8 @@ + + + Sender + InvalidParameter + TopicArn + + 8c4c8aa7-436b-5b46-91d5-c0a339158557 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sqs-delete-queue.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sqs-delete-queue.json new file mode 100644 index 0000000000000000000000000000000000000000..3a3d262dd1b6d7f20e2d5b1b1f27e6507a4c8a82 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sqs-delete-queue.json @@ -0,0 +1,11 @@ +{ + "Error": { + "Code": "InvalidAddress", + "Detail": null, + "Message": "The address foobar is not valid for this endpoint.", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "9b06cd2c-b433-550f-bde2-8728ce9b1a93" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sts-get-session-token.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sts-get-session-token.json new file mode 100644 index 0000000000000000000000000000000000000000..aaaffdee79dd5f517cef5541f0971e922715a4ba --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sts-get-session-token.json @@ -0,0 +1,10 @@ +{ + "Error": { + "Code": "AccessDenied", + "Message": "GetSessionToken call failed, unable to validate MFA code. Please verify your MFA serial number is valid and associated with this user.", + "Type": "Sender" + }, + "ResponseMetadata": { + "RequestId": "8088f6eb-b7fb-11e2-8d25-4b9f3b52b80f" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sts-get-session-token.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sts-get-session-token.xml new file mode 100644 index 0000000000000000000000000000000000000000..bebff15066bca937191b536fe2d649f5fd11dc68 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/errors/sts-get-session-token.xml @@ -0,0 +1,8 @@ + + + Sender + AccessDenied + GetSessionToken call failed, unable to validate MFA code. Please verify your MFA serial number is valid and associated with this user. + + 8088f6eb-b7fb-11e2-8d25-4b9f3b52b80f + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-adjustment-types.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-adjustment-types.json new file mode 100644 index 0000000000000000000000000000000000000000..153c9f0aa6f19e89434e0d619a81e7e5f734aa4d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-adjustment-types.json @@ -0,0 +1,10 @@ +{ + "ResponseMetadata": { + "RequestId": "6782caf9-9167-11e2-9223-abe83dfc0567" + }, + "AdjustmentTypes": [ + {"AdjustmentType": "ChangeInCapacity"}, + {"AdjustmentType": "ExactCapacity"}, + {"AdjustmentType": "PercentChangeInCapacity"} + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-adjustment-types.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-adjustment-types.xml new file mode 100644 index 0000000000000000000000000000000000000000..bbd00de7c44397f3038f5b48a34720d4d8dd1119 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-adjustment-types.xml @@ -0,0 +1,18 @@ + + + + + ChangeInCapacity + + + ExactCapacity + + + PercentChangeInCapacity + + + + + 6782caf9-9167-11e2-9223-abe83dfc0567 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..633bc9e4130d0b6237028ca361b5d940034de84c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-groups.json @@ -0,0 +1,6 @@ +{ + "AutoScalingGroups": [], + "ResponseMetadata": { + "RequestId": "681e6e72-9167-11e2-ba50-d18200895d59" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..2f0320ec6f3dc759697ec514df59f932652189d1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-groups.xml @@ -0,0 +1,8 @@ + + + + + + 681e6e72-9167-11e2-ba50-d18200895d59 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..92ad46f8643e2c48da2f1c018fdc4bea4abe07cd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-instances.json @@ -0,0 +1,6 @@ +{ + "AutoScalingInstances": [], + "ResponseMetadata": { + "RequestId": "67af58ee-9167-11e2-ba50-d18200895d59" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..e2a57e44bab9e3c7fc5800c032c38fee9589fc5e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-instances.xml @@ -0,0 +1,8 @@ + + + + + + 67af58ee-9167-11e2-ba50-d18200895d59 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-notification-types.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-notification-types.json new file mode 100644 index 0000000000000000000000000000000000000000..897275a79075b140064326097e756acdde9e9fe2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-notification-types.json @@ -0,0 +1,12 @@ +{ + "AutoScalingNotificationTypes": [ + "autoscaling:EC2_INSTANCE_LAUNCH", + "autoscaling:EC2_INSTANCE_LAUNCH_ERROR", + "autoscaling:EC2_INSTANCE_TERMINATE", + "autoscaling:EC2_INSTANCE_TERMINATE_ERROR", + "autoscaling:TEST_NOTIFICATION" + ], + "ResponseMetadata": { + "RequestId": "68cc13f5-9167-11e2-9863-c1fc2ead119c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-notification-types.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-notification-types.xml new file mode 100644 index 0000000000000000000000000000000000000000..5c509475c59e7542e7cc717e1d6e94af955bc41e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-auto-scaling-notification-types.xml @@ -0,0 +1,14 @@ + + + + autoscaling:EC2_INSTANCE_LAUNCH + autoscaling:EC2_INSTANCE_LAUNCH_ERROR + autoscaling:EC2_INSTANCE_TERMINATE + autoscaling:EC2_INSTANCE_TERMINATE_ERROR + autoscaling:TEST_NOTIFICATION + + + + 68cc13f5-9167-11e2-9863-c1fc2ead119c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-launch-configurations.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-launch-configurations.json new file mode 100644 index 0000000000000000000000000000000000000000..974614955077b0d67b0ba7a636f44057f03c683d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-launch-configurations.json @@ -0,0 +1,6 @@ +{ + "LaunchConfigurations": [], + "ResponseMetadata": { + "RequestId": "67f31907-9167-11e2-9223-abe83dfc0567" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-launch-configurations.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-launch-configurations.xml new file mode 100644 index 0000000000000000000000000000000000000000..7094006980c8cc1d95bf372ca0d8dc4aa914fca1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-launch-configurations.xml @@ -0,0 +1,8 @@ + + + + + + 67f31907-9167-11e2-9223-abe83dfc0567 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-metric-collection-types.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-metric-collection-types.json new file mode 100644 index 0000000000000000000000000000000000000000..7e2d889b4aac9a089e8407a9c5e66c4a4c5634ee --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-metric-collection-types.json @@ -0,0 +1,19 @@ +{ + "Metrics": [ + {"Metric": "GroupMinSize"}, + {"Metric": "GroupMaxSize"}, + {"Metric": "GroupDesiredCapacity"}, + {"Metric": "GroupInServiceInstances"}, + {"Metric": "GroupPendingInstances"}, + {"Metric": "GroupTerminatingInstances"}, + {"Metric": "GroupTotalInstances"} + ], + "Granularities": [ + { + "Granularity": "1Minute" + } + ], + "ResponseMetadata": { + "RequestId": "6794a54b-9167-11e2-9223-abe83dfc0567" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-metric-collection-types.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-metric-collection-types.xml new file mode 100644 index 0000000000000000000000000000000000000000..6661a23f90c90ec2ec8295bb99f4964c675d625a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-metric-collection-types.xml @@ -0,0 +1,35 @@ + + + + + GroupMinSize + + + GroupMaxSize + + + GroupDesiredCapacity + + + GroupInServiceInstances + + + GroupPendingInstances + + + GroupTerminatingInstances + + + GroupTotalInstances + + + + + 1Minute + + + + + 6794a54b-9167-11e2-9223-abe83dfc0567 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-notification-configurations.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-notification-configurations.json new file mode 100644 index 0000000000000000000000000000000000000000..ef410d1c537bb93e498feea1756970893518a12e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-notification-configurations.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "680a7204-9167-11e2-b1be-9d56e7e138d4" + }, + "NotificationConfigurations": [] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-notification-configurations.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-notification-configurations.xml new file mode 100644 index 0000000000000000000000000000000000000000..74c8d403444742fc811096f2db5b500e8039da9f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-notification-configurations.xml @@ -0,0 +1,8 @@ + + + + + + 680a7204-9167-11e2-b1be-9d56e7e138d4 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-policies.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-policies.json new file mode 100644 index 0000000000000000000000000000000000000000..835c94fa0d351de8982fa57ea93338df049695e2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-policies.json @@ -0,0 +1,6 @@ +{ + "ScalingPolicies": [], + "ResponseMetadata": { + "RequestId": "675a0dbe-9167-11e2-b1be-9d56e7e138d4" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-policies.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-policies.xml new file mode 100644 index 0000000000000000000000000000000000000000..d4ad1b36e995d4e18dff432d28c910cb57aa29df --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-policies.xml @@ -0,0 +1,8 @@ + + + + + + 675a0dbe-9167-11e2-b1be-9d56e7e138d4 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-activities.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-activities.json new file mode 100644 index 0000000000000000000000000000000000000000..262ee37d7085746ad25387d72dab7591f2c72cf3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-activities.json @@ -0,0 +1,6 @@ +{ + "Activities": [], + "ResponseMetadata": { + "RequestId": "67459b5a-9167-11e2-b1be-9d56e7e138d4" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-activities.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-activities.xml new file mode 100644 index 0000000000000000000000000000000000000000..b226729fe73b71c513032ad0177fed6d2efd6b36 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-activities.xml @@ -0,0 +1,8 @@ + + + + + + 67459b5a-9167-11e2-b1be-9d56e7e138d4 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-process-types.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-process-types.json new file mode 100644 index 0000000000000000000000000000000000000000..8293eaf78a2e18200b0dbff262cb5308387c8423 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-process-types.json @@ -0,0 +1,15 @@ +{ + "Processes": [ + {"ProcessName": "AZRebalance"}, + {"ProcessName": "AddToLoadBalancer"}, + {"ProcessName": "AlarmNotification"}, + {"ProcessName": "HealthCheck"}, + {"ProcessName": "Launch"}, + {"ProcessName": "ReplaceUnhealthy"}, + {"ProcessName": "ScheduledActions"}, + {"ProcessName": "Terminate"} + ], + "ResponseMetadata": { + "RequestId": "67705466-9167-11e2-9223-abe83dfc0567" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-process-types.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-process-types.xml new file mode 100644 index 0000000000000000000000000000000000000000..991d702c752528290f168e4a43b8efa4fe502b16 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scaling-process-types.xml @@ -0,0 +1,33 @@ + + + + + AZRebalance + + + AddToLoadBalancer + + + AlarmNotification + + + HealthCheck + + + Launch + + + ReplaceUnhealthy + + + ScheduledActions + + + Terminate + + + + + 67705466-9167-11e2-9223-abe83dfc0567 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scheduled-actions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scheduled-actions.json new file mode 100644 index 0000000000000000000000000000000000000000..fb18abcc82753708d9788f97f57cf82038633155 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scheduled-actions.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "68de155d-9167-11e2-9223-abe83dfc0567" + }, + "ScheduledUpdateGroupActions": [] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scheduled-actions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scheduled-actions.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b364b33c01fd48fead3d03bd8c1a9d942f9a774 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-scheduled-actions.xml @@ -0,0 +1,8 @@ + + + + + + 68de155d-9167-11e2-9223-abe83dfc0567 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-tags.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-tags.json new file mode 100644 index 0000000000000000000000000000000000000000..f3786312825f1f28895fb4cca15756d8fa8c31db --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-tags.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "67c5c76d-9167-11e2-9863-c1fc2ead119c" + }, + "Tags": [] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-tags.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-tags.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a85a4c49123925336f14d0eb9fa7a69ea7c307b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-tags.xml @@ -0,0 +1,8 @@ + + + + + + 67c5c76d-9167-11e2-9863-c1fc2ead119c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-termination-policy-types.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-termination-policy-types.json new file mode 100644 index 0000000000000000000000000000000000000000..9294ddaafe04e60fbf14f1b5c68312c2345d4bcf --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-termination-policy-types.json @@ -0,0 +1,12 @@ +{ + "TerminationPolicyTypes": [ + "ClosestToNextInstanceHour", + "Default", + "NewestInstance", + "OldestInstance", + "OldestLaunchConfiguration" + ], + "ResponseMetadata": { + "RequestId": "67e117a5-9167-11e2-9223-abe83dfc0567" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-termination-policy-types.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-termination-policy-types.xml new file mode 100644 index 0000000000000000000000000000000000000000..8cb9d9b41dd1193ef6052e30ac43260fbe5e860a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/autoscaling-describe-termination-policy-types.xml @@ -0,0 +1,14 @@ + + + + ClosestToNextInstanceHour + Default + NewestInstance + OldestInstance + OldestLaunchConfiguration + + + + 67e117a5-9167-11e2-9223-abe83dfc0567 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-describe-stacks.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-describe-stacks.json new file mode 100644 index 0000000000000000000000000000000000000000..5f8abd60f08b7c3e5b22fdb4aed41216107afb63 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-describe-stacks.json @@ -0,0 +1,6 @@ +{ + "Stacks": [], + "ResponseMetadata": { + "RequestId": "ad4c8bf2-9167-11e2-991c-f387408da2bf" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-describe-stacks.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-describe-stacks.xml new file mode 100644 index 0000000000000000000000000000000000000000..6f6594c2eb48d6fbc8660f30cb0d8b8f65a0dcb7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-describe-stacks.xml @@ -0,0 +1,8 @@ + + + + + + ad4c8bf2-9167-11e2-991c-f387408da2bf + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-get-template.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-get-template.json new file mode 100644 index 0000000000000000000000000000000000000000..e9d0abba1bdece719260bd11fda5c33a7470ed24 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-get-template.json @@ -0,0 +1,158 @@ +{ + "ResponseMetadata": { + "RequestId": "4ca8b6a8-bc40-11e2-95ee-bd3eac9f6692" + }, + "TemplateBody": { + "Description": "AWS CloudFormation Sample Template EC2WithEBSSample: Create an Amazon EC2 instance running the Amazon Linux AMI with a new EBS volume attached. The instance and the volume are pinned to the same availability zone. We recommend that you do untargeted launches rather than pinning instances this way.The AMI is chosen based on the region in which the stack is run. **WARNING** This template creates an Amazon EC2 instance and an EBS Volume. You will be billed for the AWS resources used if you create a stack from this template.", + "Parameters": { + "SSHLocation": { + "ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x.", + "Description": "The IP address range that can be used to SSH to the EC2 instances", + "Default": "0.0.0.0/0", + "MinLength": "9", + "AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})", + "MaxLength": "18", + "Type": "String" + }, + "KeyName": { + "Type": "String", + "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance" + } + }, + "AWSTemplateFormatVersion": "2010-09-09", + "Outputs": { + "InstanceId": { + "Description": "InstanceId of the newly created EC2 instance", + "Value": { + "Ref": "Ec2Instance" + } + }, + "PublicIP": { + "Description": "Public IP address of the newly created EC2 instance", + "Value": { + "Fn::GetAtt": [ + "Ec2Instance", + "PublicIp" + ] + } + }, + "PublicDNS": { + "Description": "Public DNSName of the newly created EC2 instance", + "Value": { + "Fn::GetAtt": [ + "Ec2Instance", + "PublicDnsName" + ] + } + } + }, + "Resources": { + "InstanceSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "SecurityGroupIngress": [ + { + "ToPort": "22", + "IpProtocol": "tcp", + "CidrIp": { + "Ref": "SSHLocation" + }, + "FromPort": "22" + } + ], + "GroupDescription": "Enable SSH access via port 22" + } + }, + "Ec2Instance": { + "Type": "AWS::EC2::Instance", + "Properties": { + "KeyName": { + "Ref": "KeyName" + }, + "AvailabilityZone": { + "Fn::FindInMap": [ + "RegionMap", + { + "Ref": "AWS::Region" + }, + "TestAz" + ] + }, + "SecurityGroups": [ + { + "Ref": "InstanceSecurityGroup" + } + ], + "Volumes": [ + { + "Device": "/dev/sdk", + "VolumeId": { + "Ref": "NewVolume" + } + } + ], + "ImageId": { + "Fn::FindInMap": [ + "RegionMap", + { + "Ref": "AWS::Region" + }, + "AMI" + ] + } + } + }, + "NewVolume": { + "Type": "AWS::EC2::Volume", + "Properties": { + "AvailabilityZone": { + "Fn::FindInMap": [ + "RegionMap", + { + "Ref": "AWS::Region" + }, + "TestAz" + ] + }, + "Size": "100" + } + } + }, + "Mappings": { + "RegionMap": { + "us-east-1": { + "AMI": "ami-7f418316", + "TestAz": "us-east-1a" + }, + "ap-northeast-1": { + "AMI": "ami-dcfa4edd", + "TestAz": "ap-northeast-1a" + }, + "sa-east-1": { + "AMI": "ami-3e3be423", + "TestAz": "sa-east-1a" + }, + "ap-southeast-1": { + "AMI": "ami-74dda626", + "TestAz": "ap-southeast-1a" + }, + "ap-southeast-2": { + "AMI": "ami-b3990e89", + "TestAz": "ap-southeast-2a" + }, + "us-west-2": { + "AMI": "ami-16fd7026", + "TestAz": "us-west-2a" + }, + "us-west-1": { + "AMI": "ami-951945d0", + "TestAz": "us-west-1a" + }, + "eu-west-1": { + "AMI": "ami-24506250", + "TestAz": "eu-west-1a" + } + } + } + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-get-template.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-get-template.xml new file mode 100644 index 0000000000000000000000000000000000000000..ce091343a6e34b2045dc5b608726cd5a23217d23 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-get-template.xml @@ -0,0 +1,95 @@ + + + { + "AWSTemplateFormatVersion" : "2010-09-09", + + "Description" : "AWS CloudFormation Sample Template EC2WithEBSSample: Create an Amazon EC2 instance running the Amazon Linux AMI with a new EBS volume attached. The instance and the volume are pinned to the same availability zone. We recommend that you do untargeted launches rather than pinning instances this way.The AMI is chosen based on the region in which the stack is run. **WARNING** This template creates an Amazon EC2 instance and an EBS Volume. You will be billed for the AWS resources used if you create a stack from this template.", + + "Parameters" : { + "KeyName" : { + "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", + "Type" : "String" + }, + "SSHLocation" : { + "Description" : "The IP address range that can be used to SSH to the EC2 instances", + "Type": "String", + "MinLength": "9", + "MaxLength": "18", + "Default": "0.0.0.0/0", + "AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})", + "ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x." + } + }, + + "Mappings" : { + "RegionMap" : { + "us-east-1" : { "AMI" : "ami-7f418316", "TestAz" : "us-east-1a" }, + "us-west-1" : { "AMI" : "ami-951945d0", "TestAz" : "us-west-1a" }, + "us-west-2" : { "AMI" : "ami-16fd7026", "TestAz" : "us-west-2a" }, + "eu-west-1" : { "AMI" : "ami-24506250", "TestAz" : "eu-west-1a" }, + "sa-east-1" : { "AMI" : "ami-3e3be423", "TestAz" : "sa-east-1a" }, + "ap-southeast-1" : { "AMI" : "ami-74dda626", "TestAz" : "ap-southeast-1a" }, + "ap-southeast-2" : { "AMI" : "ami-b3990e89", "TestAz" : "ap-southeast-2a" }, + "ap-northeast-1" : { "AMI" : "ami-dcfa4edd", "TestAz" : "ap-northeast-1a" } + } + }, + + "Resources" : { + "Ec2Instance" : { + "Type" : "AWS::EC2::Instance", + "Properties" : { + "AvailabilityZone" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "TestAz" ]}, + "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], + "KeyName" : { "Ref" : "KeyName" }, + "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, + "Volumes" : [ + { "VolumeId" : { "Ref" : "NewVolume" }, + "Device" : "/dev/sdk" + } + ] + } + }, + + "InstanceSecurityGroup" : { + "Type" : "AWS::EC2::SecurityGroup", + "Properties" : { + "GroupDescription" : "Enable SSH access via port 22", + "SecurityGroupIngress" : [ { + "IpProtocol" : "tcp", + "FromPort" : "22", + "ToPort" : "22", + "CidrIp" : { "Ref" : "SSHLocation"} + } ] + } + }, + + "NewVolume" : { + "Type" : "AWS::EC2::Volume", + "Properties" : { + "Size" : "100", + "AvailabilityZone" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "TestAz" ]} + } + } + }, + + "Outputs" : { + "InstanceId" : { + "Description" : "InstanceId of the newly created EC2 instance", + "Value" : { "Ref" : "Ec2Instance" } + }, + "PublicIP" : { + "Description" : "Public IP address of the newly created EC2 instance", + "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "PublicIp" ] } + }, + "PublicDNS" : { + "Description" : "Public DNSName of the newly created EC2 instance", + "Value" : { "Fn::GetAtt" : [ "Ec2Instance", "PublicDnsName" ] } + } + } +} + + + + 4ca8b6a8-bc40-11e2-95ee-bd3eac9f6692 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-list-stacks.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-list-stacks.json new file mode 100644 index 0000000000000000000000000000000000000000..52c75769093a2c2df6f653b19092ec54f5c99056 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-list-stacks.json @@ -0,0 +1,6 @@ +{ + "StackSummaries": [], + "ResponseMetadata": { + "RequestId": "ad1ddb34-9167-11e2-a04d-8b5bb98870c1" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-list-stacks.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-list-stacks.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fa12151a043f7e60074f0424ae223ee276a4c26 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudformation-list-stacks.xml @@ -0,0 +1,8 @@ + + + + + + ad1ddb34-9167-11e2-a04d-8b5bb98870c1 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-cloud-front-origin-access-identity.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-cloud-front-origin-access-identity.json new file mode 100644 index 0000000000000000000000000000000000000000..9ddb8051d344766f1999e182aa31b0be86d97afe --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-cloud-front-origin-access-identity.json @@ -0,0 +1,11 @@ +{ + "CloudFrontOriginAccessIdentity": { + "CloudFrontOriginAccessIdentityConfig": { + "Comment": "My comments", + "CallerReference": "20120229090000" + }, + "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE", + "Id": "E74FTE3AEXAMPLE" + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-cloud-front-origin-access-identity.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-cloud-front-origin-access-identity.xml new file mode 100644 index 0000000000000000000000000000000000000000..32602b297019af05b19d57d6948630e9d21caef1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-cloud-front-origin-access-identity.xml @@ -0,0 +1,10 @@ + + + E74FTE3AEXAMPLE + cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE + + 20120229090000 + My comments + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-distribution.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-distribution.json new file mode 100644 index 0000000000000000000000000000000000000000..f70f07608073abc39a3145df88530d8f6133ead5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-distribution.json @@ -0,0 +1,130 @@ +{ + "Distribution": { + "Status": "Deployed", + "DomainName": "d111111abcdef8.cloudfront.net", + "InProgressInvalidationBatches": 1, + "DistributionConfig": { + "Comment": "example comment", + "CacheBehaviors": { + "Items": [ + { + "TrustedSigners": { + "Items": [ + "self", + "111122223333" + ], + "Enabled": true, + "Quantity": 2 + }, + "TargetOriginId": "example-custom-origin", + "ViewerProtocolPolicy": "allow-all", + "ForwardedValues": { + "Cookies": { + "Forward": "all" + }, + "QueryString": false + }, + "PathPattern": "*.jpg", + "MinTTL": 86400 + } + ], + "Quantity": 1 + }, + "Logging": { + "Bucket": "myawslogbucket.s3.amazonaws.com", + "Prefix": "example.com.", + "Enabled": true, + "IncludeCookies": true + }, + "Origins": { + "Items": [ + { + "S3OriginConfig": { + "OriginAccessIdentity": "origin-access-identity/cloudfront/E74FTE3AEXAMPLE" + }, + "Id": "example-Amazon S3-origin", + "DomainName": "myawsbucket.s3.amazonaws.com" + }, + { + "CustomOriginConfig": { + "OriginProtocolPolicy": "match-viewer", + "HTTPPort": 80, + "HTTPSPort": 443 + }, + "Id": "example-custom-origin", + "DomainName": "example.com" + } + ], + "Quantity": 2 + }, + "DefaultRootObject": "index.html", + "PriceClass": "PriceClass_All", + "Enabled": true, + "DefaultCacheBehavior": { + "ViewerProtocolPolicy": "https-only", + "ForwardedValues": { + "Cookies": { + "Forward": "whitelist", + "WhitelistedNames": { + "Items": [ + "example-cookie" + ], + "Quantity": 1 + } + }, + "QueryString": true + }, + "TargetOriginId": "example-Amazon S3-origin", + "TrustedSigners": { + "Items": [ + "self", + "111122223333", + "444455556666" + ], + "Enabled": true, + "Quantity": 3 + }, + "MinTTL": 0 + }, + "CallerReference": "example.com2012-04-11-5:09pm", + "ViewerCertificate": { + "IAMCertificateId": "AS1A2M3P4L5E67SIIXR3J" + }, + "Aliases": { + "Items": [ + "www.example.com" + ], + "Quantity": 1 + } + }, + "ActiveTrustedSigners": { + "Items": [ + { + "KeyPairIds": { + "Items": [ + "APKA9ONS7QCOWEXAMPLE" + ], + "Quantity": 1 + }, + "AwsAccountNumber": "self" + }, + { + "KeyPairIds": { + "Quantity": 2 + }, + "AwsAccountNumber": "111122223333" + }, + { + "KeyPairIds": { + "Quantity": 0 + }, + "AwsAccountNumber": "444455556666" + } + ], + "Quantity": 3 + }, + "LastModifiedTime": "2012-05-19T19:37:58Z", + "Id": "EDFDVBD6EXAMPLE" + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-distribution.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-distribution.xml new file mode 100644 index 0000000000000000000000000000000000000000..788b44c53b2137d6d4d57f83db60374496e1df73 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-distribution.xml @@ -0,0 +1,131 @@ + + + EDFDVBD6EXAMPLE + Deployed + 2012-05-19T19:37:58Z + 1 + d111111abcdef8.cloudfront.net + + 3 + + + self + + 1 + + APKA9ONS7QCOWEXAMPLE + + + + + 111122223333 + + 2 + APKAI72T5DYBXEXAMPLE + APKAU72D8DYNXEXAMPLE + + + + 444455556666 + + 0 + + + + + + example.com2012-04-11-5:09pm + + 1 + + www.example.com + + + index.html + + 2 + + + example-Amazon S3-origin + myawsbucket.s3.amazonaws.com + + origin-access-identity/cloudfront/E74FTE3AEXAMPLE + + + + example-custom-origin + example.com + + 80 + 443 + match-viewer + + + + + + example-Amazon S3-origin + + true + + whitelist + + 1 + + example-cookie + + + + + + true + 3 + + self + 111122223333 + 444455556666 + + + https-only + 0 + + + 1 + + + *.jpg + example-custom-origin + + false + + all + + + + true + 2 + + self + 111122223333 + + + allow-all + 86400 + + + + example comment + + true + true + myawslogbucket.s3.amazonaws.com + example.com. + + + AS1A2M3P4L5E67SIIXR3J + + PriceClass_All + true + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-invalidation.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-invalidation.json new file mode 100644 index 0000000000000000000000000000000000000000..c948504e70706316ee8acaaa3a7de43ccd4e5f3d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-invalidation.json @@ -0,0 +1,19 @@ +{ + "Invalidation": { + "Status": "InProgress", + "InvalidationBatch": { + "Paths": { + "Items": [ + "/image1.jpg", + "/image2.jpg", + "/videos/movie.flv" + ], + "Quantity": 3 + }, + "CallerReference": "20120301090001" + }, + "Id": "IDFDVBD632BHDS5", + "CreateTime": "2009-11-19T19:37:58Z" + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-invalidation.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-invalidation.xml new file mode 100644 index 0000000000000000000000000000000000000000..ab0c81ade74be1fbd1cba0548a8c6230c41689bb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-invalidation.xml @@ -0,0 +1,18 @@ + + + IDFDVBD632BHDS5 + InProgress + 2009-11-19T19:37:58Z + + + 3 + + /image1.jpg + /image2.jpg + /videos/movie.flv + + + 20120301090001 + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-streaming-distribution.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-streaming-distribution.json new file mode 100644 index 0000000000000000000000000000000000000000..ec9ef562832f17e3e507a694190e04f8a6cd9b31 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-streaming-distribution.json @@ -0,0 +1,63 @@ +{ + "StreamingDistribution": { + "Status": "Deployed", + "StreamingDistributionConfig": { + "S3Origin": { + "OriginAccessIdentity": "origin-access-identity/cloudfront/E74FTE3AEXAMPLE" + }, + "Comment": "example comment", + "Logging": { + "Bucket": "myawslogbucket.s3.amazonaws.com", + "Prefix": "myprefix/", + "Enabled": true + }, + "PriceClass": "PriceClass_All", + "Enabled": true, + "TrustedSigners": { + "Items": [ + "self", + "111122223333", + "444455556666" + ], + "Quantity": 3 + }, + "CallerReference": "20120229090000", + "Aliases": { + "Items": [ + "www.example.com" + ], + "Quantity": 1 + } + }, + "DomainName": "s5c39gqb8ow64r.cloudfront.net", + "ActiveTrustedSigners": { + "Items": [ + { + "KeyPairIds": { + "Items": [ + "APKA9ONS7QCOWEXAMPLE" + ], + "Quantity": 1 + }, + "AwsAccountNumber": "self" + }, + { + "KeyPairIds": { + "Quantity": 2 + }, + "AwsAccountNumber": "111122223333" + }, + { + "KeyPairIds": { + "Quantity": 0 + }, + "AwsAccountNumber": "444455556666" + } + ], + "Quantity": 3 + }, + "LastModifiedTime": "2012-05-19T19:37:58Z", + "Id": "EGTXBD79EXAMPLE" + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-streaming-distribution.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-streaming-distribution.xml new file mode 100644 index 0000000000000000000000000000000000000000..3af3e14f956734da823064d4bb3eecd864268b2f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-get-streaming-distribution.xml @@ -0,0 +1,65 @@ + + + EGTXBD79EXAMPLE + Deployed + 2012-05-19T19:37:58Z + s5c39gqb8ow64r.cloudfront.net + + 3 + + + self + + 1 + + APKA9ONS7QCOWEXAMPLE + + + + + 111122223333 + + 2 + APKAI72T5DYBXEXAMPLE + APKAU72D8DYNXEXAMPLE + + + + 444455556666 + + 0 + + + + + + 20120229090000 + + mystreamingbucket.s3.amazonaws.com + origin-access-identity/cloudfront/E74FTE3AEXAMPLE + + + 1 + + www.example.com + + + example comment + + true + myawslogbucket.s3.amazonaws.com + myprefix/ + + + 3 + + self + 111122223333 + 444455556666 + + + PriceClass_All + true + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-cloud-front-origin-access-identities.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-cloud-front-origin-access-identities.json new file mode 100644 index 0000000000000000000000000000000000000000..b71ea1505681007e54361f4f9d41e5572bd24bac --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-cloud-front-origin-access-identities.json @@ -0,0 +1,22 @@ +{ + "CloudFrontOriginAccessIdentityList": { + "Items": [ + { + "Comment": "First origin access identity", + "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE", + "Id": "E74FTE3AEXAMPLE" + }, + { + "Comment": "Another origin access identity", + "S3CanonicalUserId": "7d843ae7f1792436e72691ab96a9c1414b7c3fbe2ab739a1cf21b0fe2EXAMPLE", + "Id": "E58SRM2XEXAMPLE" + } + ], + "NextMarker": "EMLARXS9EXAMPLE", + "MaxItems": 2, + "Marker": "EDFDVBD6EXAMPLE", + "IsTruncated": true, + "Quantity": 4 + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-cloud-front-origin-access-identities.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-cloud-front-origin-access-identities.xml new file mode 100644 index 0000000000000000000000000000000000000000..64ffb2fe6bfdae5846756d32ff9ea292f306a18f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-cloud-front-origin-access-identities.xml @@ -0,0 +1,21 @@ + + + EDFDVBD6EXAMPLE + EMLARXS9EXAMPLE + 2 + true + 4 + + + E74FTE3AEXAMPLE + cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE + First origin access identity + + + E58SRM2XEXAMPLE + 7d843ae7f1792436e72691ab96a9c1414b7c3fbe2ab739a1cf21b0fe2EXAMPLE + Another origin access identity + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-distributions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-distributions.json new file mode 100644 index 0000000000000000000000000000000000000000..8458991c3422fe813abe3c5a17fd50a2d45b9a50 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-distributions.json @@ -0,0 +1,102 @@ +{ + "DistributionList": { + "Items": [ + { + "Status": "Deployed", + "CacheBehaviors": { + "Items": [ + { + "TrustedSigners": { + "Items": [ + "self", + "111122223333" + ], + "Enabled": true, + "Quantity": 2 + }, + "TargetOriginId": "example-custom-origin", + "ViewerProtocolPolicy": "allow-all", + "ForwardedValues": { + "Cookies": { + "Forward": "all" + }, + "QueryString": false + }, + "PathPattern": "*.jpg", + "MinTTL": 86400 + } + ], + "Quantity": 1 + }, + "Origins": { + "Items": [ + { + "S3OriginConfig": { + "OriginAccessIdentity": "origin-access-identity/cloudfront/E74FTE3AEXAMPLE" + }, + "Id": "example-Amazon S3-origin", + "DomainName": "myawsbucket.s3.amazonaws.com" + }, + { + "CustomOriginConfig": { + "OriginProtocolPolicy": "match-viewer", + "HTTPPort": 80, + "HTTPSPort": 443 + }, + "Id": "example-custom-origin", + "DomainName": "example.com" + } + ], + "Quantity": 2 + }, + "DomainName": "d111111abcdef8.cloudfront.net", + "PriceClass": "PriceClass_All", + "Enabled": true, + "DefaultCacheBehavior": { + "ViewerProtocolPolicy": "https-only", + "ForwardedValues": { + "Cookies": { + "Forward": "whitelist", + "WhitelistedNames": { + "Items": [ + "example-cookie" + ], + "Quantity": 1 + } + }, + "QueryString": true + }, + "TargetOriginId": "example-Amazon S3-origin", + "TrustedSigners": { + "Items": [ + "self", + "111122223333", + "444455556666" + ], + "Enabled": true, + "Quantity": 3 + }, + "MinTTL": 0 + }, + "Comment": "example comment", + "ViewerCertificate": { + "IAMCertificateId": "AS1A2M3P4L5E67SIIXR3J" + }, + "LastModifiedTime": "2012-05-19T19:37:58Z", + "Id": "EDFDVBD6EXAMPLE", + "Aliases": { + "Items": [ + "www.example.com" + ], + "Quantity": 1 + } + } + ], + "NextMarker": "EMLARXS9EXAMPLE", + "MaxItems": 2, + "Marker": "RMPARXS293KSTG7", + "IsTruncated": true, + "Quantity": 1 + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-distributions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-distributions.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f0ebc64365a7220fd5d2076e4d6fe784c4f0db9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-distributions.xml @@ -0,0 +1,107 @@ + + + RMPARXS293KSTG7 + EMLARXS9EXAMPLE + 2 + true + 1 + + + EDFDVBD6EXAMPLE + Deployed + 2012-05-19T19:37:58Z + d111111abcdef8.cloudfront.net + + 1 + + www.example.com + + + + 2 + + + example-Amazon S3-origin + myawsbucket.s3.amazonaws.com + + origin-access-identity/cloudfront/E74FTE3AEXAMPLE + + + + example-custom-origin + example.com + + 80 + 443 + match-viewer + + + + + + example-Amazon S3-origin + + true + + whitelist + + 1 + + example-cookie + + + + + + true + 3 + + self + 111122223333 + 444455556666 + + + https-only + 0 + + + 1 + + + *.jpg + example-custom-origin + + false + + all + + + + true + 2 + + self + 111122223333 + + + allow-all + 86400 + + + + example comment + + true + true + myawslogbucket.s3.amazonaws.com + example.com. + + + AS1A2M3P4L5E67SIIXR3J + + PriceClass_All + true + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-invalidations.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-invalidations.json new file mode 100644 index 0000000000000000000000000000000000000000..0fbd9eaa3cfbe325ca06976e8bc504b91efdbe24 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-invalidations.json @@ -0,0 +1,20 @@ +{ + "InvalidationList": { + "Items": [ + { + "Status": "Completed", + "Id": "Second Invalidation ID" + }, + { + "Status": "Completed", + "Id": "First Invalidation ID" + } + ], + "NextMarker": "Invalidation ID", + "MaxItems": 2, + "Marker": "EGTXBD79EXAMPLE", + "IsTruncated": true, + "Quantity": 10 + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-invalidations.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-invalidations.xml new file mode 100644 index 0000000000000000000000000000000000000000..2c3fc5a079561200e728a3f94c212efaece5cfab --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-invalidations.xml @@ -0,0 +1,19 @@ + + + EGTXBD79EXAMPLE + Invalidation ID + 2 + true + 10 + + + Second Invalidation ID + Completed + + + First Invalidation ID + Completed + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-streaming-distributions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-streaming-distributions.json new file mode 100644 index 0000000000000000000000000000000000000000..6fe2e502b9fb13aa3a623f9b20fde93bef9b44c0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-streaming-distributions.json @@ -0,0 +1,22 @@ +{ + "StreamingDistributionList": { + "Items": [ + { + "Status": "Deployed", + "S3Origin": {}, + "DomainName": "s5c39gqb8ow64r.cloudfront.net", + "PriceClass": "PriceClass_All", + "Enabled": true, + "Id": "EGTXBD79EXAMPLE", + "LastModifiedTime": "2012-05-19T19:37:58Z", + "Comment": "First distribution" + } + ], + "NextMarker": "ED4L98SBEXAMPLE", + "MaxItems": 1, + "Marker": "EGTXBD79EXAMPLE", + "IsTruncated": true, + "Quantity": 4 + }, + "ResponseMetadata": {} +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-streaming-distributions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-streaming-distributions.xml new file mode 100644 index 0000000000000000000000000000000000000000..5264d3aa998689796a3d1a04c612fc3dfd3ab380 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudfront-list-streaming-distributions.xml @@ -0,0 +1,25 @@ + + + EGTXBD79EXAMPLE + ED4L98SBEXAMPLE + 1 + true + 4 + + + EGTXBD79EXAMPLE + Deployed + 2012-05-19T19:37:58Z + s5c39gqb8ow64r.cloudfront.net + + mystreamingbucket.s3.amazonaws.com + + www.example.com + product.example.com + First distribution + PriceClass_All + true + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-describe-alarms.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-describe-alarms.json new file mode 100644 index 0000000000000000000000000000000000000000..d7eb97be25ac6974610df16be0797b3568b1e5e6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-describe-alarms.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "ac11e96c-9167-11e2-bb93-654a565d340b" + }, + "MetricAlarms": [] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-describe-alarms.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-describe-alarms.xml new file mode 100644 index 0000000000000000000000000000000000000000..2c5f1d75e21be51c16277140a3b3f744f9a33a49 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-describe-alarms.xml @@ -0,0 +1,8 @@ + + + + + + ac11e96c-9167-11e2-bb93-654a565d340b + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-list-metrics.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-list-metrics.json new file mode 100644 index 0000000000000000000000000000000000000000..09ff7c212624f34cc6688f2c141f63a0fad811a7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/cloudwatch-list-metrics.json @@ -0,0 +1,817 @@ +{ + "Metrics": [ + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeIdleTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeReadBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "DiskReadBytes" + }, + { + "Namespace": "AWS/SQS", + "Dimensions": [ + { + "Name": "QueueName", + "Value": "foobar" + } + ], + "MetricName": "NumberOfEmptyReceives" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "NetworkOut" + }, + { + "Namespace": "AWS/SQS", + "Dimensions": [ + { + "Name": "QueueName", + "Value": "foobar" + } + ], + "MetricName": "ApproximateNumberOfMessagesNotVisible" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeTotalReadTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeWriteOps" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeWriteOps" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeWriteBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "StatusCheckFailed_Instance" + }, + { + "Namespace": "AWS/SQS", + "Dimensions": [ + { + "Name": "QueueName", + "Value": "foobar" + } + ], + "MetricName": "ApproximateNumberOfMessagesDelayed" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeReadOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "CPUUtilization" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeTotalWriteTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeWriteOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "CPUUtilization" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeQueueLength" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "DiskWriteBytes" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeTotalReadTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeWriteOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "CPUUtilization" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "StatusCheckFailed_Instance" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "CPUUtilization" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "DiskReadBytes" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeIdleTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeQueueLength" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "DiskReadOps" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeIdleTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeWriteBytes" + }, + { + "Namespace": "AWS/SQS", + "Dimensions": [ + { + "Name": "QueueName", + "Value": "foobar" + } + ], + "MetricName": "ApproximateNumberOfMessagesVisible" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "DiskReadBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "StatusCheckFailed_Instance" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeReadOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "DiskReadOps" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeTotalWriteTime" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "StatusCheckFailed_System" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "NetworkOut" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "StatusCheckFailed" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeReadOps" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeTotalWriteTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeReadBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "DiskWriteOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "DiskWriteOps" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeQueueLength" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeIdleTime" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "StatusCheckFailed" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "StatusCheckFailed" + }, + { + "Namespace": "AWS/SQS", + "Dimensions": [ + { + "Name": "QueueName", + "Value": "foobar" + } + ], + "MetricName": "NumberOfMessagesSent" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeQueueLength" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-267b761f" + } + ], + "MetricName": "VolumeReadBytes" + }, + { + "Namespace": "AWS/DynamoDB", + "Dimensions": [ + { + "Name": "TableName", + "Value": "fromcli" + } + ], + "MetricName": "ProvisionedReadCapacityUnits" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "StatusCheckFailed_System" + }, + { + "Namespace": "AWS/SQS", + "Dimensions": [ + { + "Name": "QueueName", + "Value": "foobar" + } + ], + "MetricName": "NumberOfMessagesDeleted" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeReadBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "DiskWriteOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "NetworkOut" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "DiskReadOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "StatusCheckFailed_System" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "NetworkOut" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "NetworkIn" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeWriteBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "DiskWriteBytes" + }, + { + "Namespace": "AWS/SQS", + "Dimensions": [ + { + "Name": "QueueName", + "Value": "foobar" + } + ], + "MetricName": "NumberOfMessagesReceived" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeReadOps" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-203b3919" + } + ], + "MetricName": "VolumeTotalReadTime" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "DiskWriteOps" + }, + { + "Namespace": "AWS/DynamoDB", + "Dimensions": [ + { + "Name": "TableName", + "Value": "fromcli" + } + ], + "MetricName": "ProvisionedWriteCapacityUnits" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeTotalWriteTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-a8d2e991" + } + ], + "MetricName": "VolumeTotalReadTime" + }, + { + "Namespace": "AWS/EBS", + "Dimensions": [ + { + "Name": "VolumeId", + "Value": "vol-04c7c53d" + } + ], + "MetricName": "VolumeWriteBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "DiskReadBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "DiskWriteBytes" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-20277712" + } + ], + "MetricName": "StatusCheckFailed" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "StatusCheckFailed_Instance" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "NetworkIn" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "NetworkIn" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-70d08042" + } + ], + "MetricName": "DiskReadOps" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-d63c6ce4" + } + ], + "MetricName": "NetworkIn" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "StatusCheckFailed_System" + }, + { + "Namespace": "AWS/EC2", + "Dimensions": [ + { + "Name": "InstanceId", + "Value": "i-78f1b94a" + } + ], + "MetricName": "DiskWriteBytes" + } + ], + "ResponseMetadata": { + "RequestId": "abea8add-9167-11e2-91d1-9b4c7751b290" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-allocate-address.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-allocate-address.json new file mode 100644 index 0000000000000000000000000000000000000000..182786ed2994aa1ad9c58ac05ce2851b3af6b4b9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-allocate-address.json @@ -0,0 +1,4 @@ +{"AllocationId": "eipalloc-5723d13e", + "Domain": "vpc", + "PublicIp": "198.51.100.1", + "ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-allocate-address.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-allocate-address.xml new file mode 100644 index 0000000000000000000000000000000000000000..f1b2fef381bda5c73aa16c3b0472216bf41d3a93 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-allocate-address.xml @@ -0,0 +1,6 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + 198.51.100.1 + vpc + eipalloc-5723d13e + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-assign-private-ip-addresses.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-assign-private-ip-addresses.json new file mode 100644 index 0000000000000000000000000000000000000000..37f5748072b2ce7a22bedfb4fc8d76faa6a4e577 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-assign-private-ip-addresses.json @@ -0,0 +1 @@ +{"ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-assign-private-ip-addresses.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-assign-private-ip-addresses.xml new file mode 100644 index 0000000000000000000000000000000000000000..2d66f719c30f2f74ada9728fbbbacd8703a682a4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-assign-private-ip-addresses.xml @@ -0,0 +1,4 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + true + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-address.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-address.json new file mode 100644 index 0000000000000000000000000000000000000000..9a2abdb2690bace47270b3168e49efdf2cae82da --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-address.json @@ -0,0 +1,2 @@ +{"AssociationId": "eipassoc-fc5ca095", + "ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-address.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-address.xml new file mode 100644 index 0000000000000000000000000000000000000000..ed2ce6ca4a9554852f2d1257853c18308ff4772b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-address.xml @@ -0,0 +1,5 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + true + eipassoc-fc5ca095 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-route-table.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-route-table.json new file mode 100644 index 0000000000000000000000000000000000000000..8ccbf6dfa9945024a7c61f7474a6b976f9c2413a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-route-table.json @@ -0,0 +1,2 @@ +{"AssociationId": "rtbassoc-f8ad4891", + "ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-route-table.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-route-table.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb285214582b411a63c418d651ba77f37e392894 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-associate-route-table.xml @@ -0,0 +1,4 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + rtbassoc-f8ad4891 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-volume.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-volume.json new file mode 100644 index 0000000000000000000000000000000000000000..82c83075a1fde821e3ae5c16552140cebff25e35 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-volume.json @@ -0,0 +1,10 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "AttachTime": "YYYY-MM-DDTHH:MM:SS.000Z", + "InstanceId": "i-1a2b3c4d", + "VolumeId": "vol-1a2b3c4d", + "State": "attaching", + "Device": "/dev/sdh" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-volume.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-volume.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7bdd4f4104fe93f0fd8611e12c2bc668611c5af --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-volume.xml @@ -0,0 +1,8 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + vol-1a2b3c4d + i-1a2b3c4d + /dev/sdh + attaching + YYYY-MM-DDTHH:MM:SS.000Z + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-vpn-gateway.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-vpn-gateway.json new file mode 100644 index 0000000000000000000000000000000000000000..8999857cbbda1a37b03d1c2da2594e166417199c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-vpn-gateway.json @@ -0,0 +1,9 @@ +{ + "VpcAttachment": { + "State": "attaching", + "VpcId": "vpc-1a2b3c4d" + }, + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-vpn-gateway.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-vpn-gateway.xml new file mode 100644 index 0000000000000000000000000000000000000000..7830cf31a273c327b8b63ce7fa34b79cd82a019b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-attach-vpn-gateway.xml @@ -0,0 +1,7 @@ + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + vpc-1a2b3c4d + attaching + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-bundle-instance.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-bundle-instance.json new file mode 100644 index 0000000000000000000000000000000000000000..b9288dbee5a168e4c357dd4e4c09eeaba13beb81 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-bundle-instance.json @@ -0,0 +1,19 @@ +{ + "BundleTask": { + "UpdateTime": "2008-10-07T11:51:50.000Z", + "InstanceId": "i-12345678", + "Storage": { + "S3": { + "Prefix": "winami", + "Bucket": "myawsbucket" + } + }, + "State": "bundling", + "StartTime": "2008-10-07T11:41:50.000Z", + "Progress": "70%", + "BundleId": "bun-c1a540a8" + }, + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-bundle-instance.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-bundle-instance.xml new file mode 100644 index 0000000000000000000000000000000000000000..19450ac4a8109b9faeb3a0fe607b527683909b2f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-bundle-instance.xml @@ -0,0 +1,17 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + i-12345678 + bun-c1a540a8 + bundling + 2008-10-07T11:41:50.000Z + 2008-10-07T11:51:50.000Z + 70% + + + myawsbucket + winami + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-bundle-task.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-bundle-task.json new file mode 100644 index 0000000000000000000000000000000000000000..ae44fcc3b147c29b0efb9c3d3834b724042c44a9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-bundle-task.json @@ -0,0 +1,19 @@ +{ + "BundleTask": { + "UpdateTime": "2008-10-07T11:51:50.000Z", + "InstanceId": "i-12345678", + "Storage": { + "S3": { + "Prefix": "my-new-image", + "Bucket": "myawsbucket" + } + }, + "State": "canceling", + "StartTime": "2008-10-07T11:41:50.000Z", + "Progress": "20%", + "BundleId": "bun-cla322b9" + }, + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-bundle-task.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-bundle-task.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf0a0dca186ed38193f644d9a35aa15f809a9146 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-bundle-task.xml @@ -0,0 +1,17 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + i-12345678 + bun-cla322b9 + canceling + 2008-10-07T11:41:50.000Z + 2008-10-07T11:51:50.000Z + 20% + + + myawsbucket + my-new-image + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-reserved-instances-listing.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-reserved-instances-listing.json new file mode 100644 index 0000000000000000000000000000000000000000..da347a56e411831d335471946cecd0d38676b76c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-reserved-instances-listing.json @@ -0,0 +1,67 @@ +{ + "ResponseMetadata": { + "RequestId": "bec2cf62-98ef-434a-8a15-886fcexample" + }, + "ReservedInstancesListings": [ + { + "ReservedInstancesId": "af9f760e-9b3f-417a-ad5e-93f0cexample", + "Status": "cancelled", + "Tags": [], + "PriceSchedules": [ + { + "Active": false, + "Term": 5, + "CurrencyCode": "USD", + "Price": 166.64 + }, + { + "Active": false, + "Term": 4, + "CurrencyCode": "USD", + "Price": 133.32 + }, + { + "Active": false, + "Term": 3, + "CurrencyCode": "USD", + "Price": 99.99 + }, + { + "Active": false, + "Term": 2, + "CurrencyCode": "USD", + "Price": 66.66 + }, + { + "Active": false, + "Term": 1, + "CurrencyCode": "USD", + "Price": 33.33 + } + ], + "CreateDate": "2012-07-12T16:55:28.000Z", + "ClientToken": "XqJIt1342112125076", + "ReservedInstancesListingId": "3ebe97b5-f273-43b6-a204-7a18cexample", + "UpdateDate": "2012-07-12T16:55:28.000Z", + "InstanceCounts": [ + { + "State": "Available", + "InstanceCount": 0 + }, + { + "State": "Sold", + "InstanceCount": 0 + }, + { + "State": "Cancelled", + "InstanceCount": 1 + }, + { + "State": "Pending", + "InstanceCount": 0 + } + ], + "StatusMessage": "CANCELLED" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-reserved-instances-listing.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-reserved-instances-listing.xml new file mode 100644 index 0000000000000000000000000000000000000000..8dda40009c42af6905af3dab5b4857179e82f7fb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-reserved-instances-listing.xml @@ -0,0 +1,65 @@ + + bec2cf62-98ef-434a-8a15-886fcexample + + + 3ebe97b5-f273-43b6-a204-7a18cexample + af9f760e-9b3f-417a-ad5e-93f0cexample + 2012-07-12T16:55:28.000Z + 2012-07-12T16:55:28.000Z + cancelled + CANCELLED + + + Available + 0 + + + Sold + 0 + + + Cancelled + 1 + + + Pending + 0 + + + + + 5 + 166.64 + USD + false + + + 4 + 133.32 + USD + false + + + 3 + 99.99 + USD + false + + + 2 + 66.66 + USD + false + + + 1 + 33.33 + USD + false + + + + XqJIt1342112125076 + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-spot-instance-requests.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-spot-instance-requests.json new file mode 100644 index 0000000000000000000000000000000000000000..90f1abfe92c65829208e80b4565b9f76837aeab3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-spot-instance-requests.json @@ -0,0 +1,11 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "CancelledSpotInstanceRequests": [ + { + "State": "cancelled", + "SpotInstanceRequestId": "sir-1a2b3c4d" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-spot-instance-requests.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-spot-instance-requests.xml new file mode 100644 index 0000000000000000000000000000000000000000..c387d2a48530f96b6216a9fefe4cac2bb5e77bee --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-cancel-spot-instance-requests.xml @@ -0,0 +1,8 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + sir-1a2b3c4d + cancelled + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-confirm-product-instance.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-confirm-product-instance.json new file mode 100644 index 0000000000000000000000000000000000000000..dabb11fdb125b5b219f80b960d3788c86defbd83 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-confirm-product-instance.json @@ -0,0 +1,7 @@ +{ + "OwnerId": "111122223333", + "Return": true, + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-confirm-product-instance.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-confirm-product-instance.xml new file mode 100644 index 0000000000000000000000000000000000000000..395639ec2023f247cbae43416ca8fe2f6925b757 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-confirm-product-instance.xml @@ -0,0 +1,5 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + true + 111122223333 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-copy-snapshot.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-copy-snapshot.json new file mode 100644 index 0000000000000000000000000000000000000000..56bc2813218cbaaa2061e1fa7852d6e5736fc8bf --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-copy-snapshot.json @@ -0,0 +1,6 @@ +{ + "SnapshotId": "snap-2a2b3c4d", + "ResponseMetadata": { + "RequestId": "60bc441d-fa2c-494d-b155-5d6a3EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-copy-snapshot.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-copy-snapshot.xml new file mode 100644 index 0000000000000000000000000000000000000000..65e7a83bc8de6862bf6f53f4faae0a3f6b960c4b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-copy-snapshot.xml @@ -0,0 +1,4 @@ + + 60bc441d-fa2c-494d-b155-5d6a3EXAMPLE + snap-2a2b3c4d + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-customer-gateway.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-customer-gateway.json new file mode 100644 index 0000000000000000000000000000000000000000..9f67cb28aa94b1707265093fcc5f87fe4716fb9b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-customer-gateway.json @@ -0,0 +1,13 @@ +{ + "CustomerGateway": { + "Tags": [], + "Type": "ipsec.1", + "State": "pending", + "CustomerGatewayId": "cgw-b4dc3961", + "BgpAsn": "65534", + "IpAddress": "12.1.2.3" + }, + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-customer-gateway.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-customer-gateway.xml new file mode 100644 index 0000000000000000000000000000000000000000..6f47666abb199ae017a95f79ee166f0071bd3d1a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-customer-gateway.xml @@ -0,0 +1,11 @@ + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + cgw-b4dc3961 + pending + ipsec.1 + 12.1.2.3 + 65534 + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-dhcp-options.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-dhcp-options.json new file mode 100644 index 0000000000000000000000000000000000000000..1ecb8cfcbb787e95e2c926615bf69c2c1a42fd6a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-dhcp-options.json @@ -0,0 +1,24 @@ +{ + "DhcpOptions": { + "DhcpOptionsId": "dopt-7a8b9c2d", + "DhcpConfigurations": [ + { + "Values": [ + {"Value": "example.com"} + ], + "Key": "domain-name" + }, + { + "Values": [ + {"Value": "10.2.5.1"}, + {"Value": "10.2.5.2"} + ], + "Key": "domain-name-servers" + } + ], + "Tags": [] + }, + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-dhcp-options.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-dhcp-options.xml new file mode 100644 index 0000000000000000000000000000000000000000..1215e662f75e02a5a0de4395c576316ed29daf5d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-dhcp-options.xml @@ -0,0 +1,28 @@ + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + dopt-7a8b9c2d + + + domain-name + + + example.com + + + + + domain-name-servers + + + 10.2.5.1 + + + 10.2.5.2 + + + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-instance-export-task.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-instance-export-task.json new file mode 100644 index 0000000000000000000000000000000000000000..6564380899fa783d78286d2e67dac5009bb5d88e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-instance-export-task.json @@ -0,0 +1,21 @@ +{ + "ExportTask": { + "Description": "Example for docs", + "InstanceExportDetails": { + "InstanceId": "i-12345678", + "TargetEnvironment": "VMWare" + }, + "ExportTaskId": "export-i-1234wxyz", + "State": "active", + "StatusMessage": "Running", + "ExportToS3Task": { + "S3Bucket": "my-bucket-for-exported-vm", + "S3Key": "my-exports/ export-i-1234wxyz .ova", + "DiskImageFormat": "VMDK", + "ContainerFormat": "OVA" + } + }, + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-instance-export-task.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-instance-export-task.xml new file mode 100644 index 0000000000000000000000000000000000000000..74ed2c010516d0adc8d65c9217b23b15303a0dba --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-instance-export-task.xml @@ -0,0 +1,19 @@ + +59dbff89-35bd-4eac-99ed-be587EXAMPLE + + export-i-1234wxyz + Example for docs + active + Running + + i-12345678 + VMWare + + + VMDK + OVA + my-bucket-for-exported-vm + my-exports/ export-i-1234wxyz .ova + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-key-pair.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-key-pair.json new file mode 100644 index 0000000000000000000000000000000000000000..0b2387ac994beb8fb156cb8f733430658cc2c2b3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-key-pair.json @@ -0,0 +1,8 @@ +{ + "KeyMaterial": "---- BEGIN RSA PRIVATE KEY ----\nMIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6\nb24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAd\nBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcN\nMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYD\nVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25z\nb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFt\nYXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ\n21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9T\nrDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpE\nIbb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4\nnUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0Fkb\nFFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTb\nNYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE=\n-----END RSA PRIVATE KEY-----", + "KeyName": "gsg-keypair", + "KeyFingerprint": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-key-pair.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-key-pair.xml new file mode 100644 index 0000000000000000000000000000000000000000..64f17d26ff8bcbab4fc11fec893b36515348f3b6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-key-pair.xml @@ -0,0 +1,21 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + gsg-keypair + 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 + ---- BEGIN RSA PRIVATE KEY ---- +MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMC +VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6 +b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAd +BgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcN +MTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYD +VQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25z +b2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFt +YXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ +21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9T +rDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpE +Ibb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4 +nUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0Fkb +FFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTb +NYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE= +-----END RSA PRIVATE KEY----- + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-acl.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-acl.json new file mode 100644 index 0000000000000000000000000000000000000000..8197d38e23cdd1fd92d45ffb6d225c7f14a69027 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-acl.json @@ -0,0 +1,28 @@ +{ + "NetworkAcl": { + "Associations": [], + "NetworkAclId": "acl-5fb85d36", + "VpcId": "vpc-11ad4878", + "Tags": [], + "Entries": [ + { + "CidrBlock": "0.0.0.0/0", + "RuleNumber": 32767, + "Protocol": "all", + "Egress": true, + "RuleAction": "deny" + }, + { + "CidrBlock": "0.0.0.0/0", + "RuleNumber": 32767, + "Protocol": "all", + "Egress": false, + "RuleAction": "deny" + } + ], + "IsDefault": false + }, + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-acl.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-acl.xml new file mode 100644 index 0000000000000000000000000000000000000000..b1ebdee73f08f7208ce86b2db2c10f040bf81e73 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-acl.xml @@ -0,0 +1,26 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + acl-5fb85d36 + vpc-11ad4878 + false + + + 32767 + all + deny + true + 0.0.0.0/0 + + + 32767 + all + deny + false + 0.0.0.0/0 + + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-interface.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-interface.json new file mode 100644 index 0000000000000000000000000000000000000000..84658dd3da724873104e4465aeaf2344ed901af3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-interface.json @@ -0,0 +1,47 @@ +{ + "ResponseMetadata": { + "RequestId": "bd78c839-0895-4fac-a17f-98b559b6b630" + }, + "NetworkInterface": { + "Status": "pending", + "MacAddress": "02:74:b0:70:7f:1a", + "SourceDestCheck": true, + "VpcId": "vpc-c31dafaa", + "Description": "", + "NetworkInterfaceId": "eni-1bcb7772", + "PrivateIpAddresses": [ + { + "Primary": true, + "PrivateIpAddress": "10.0.2.140" + }, + { + "Primary": false, + "PrivateIpAddress": "10.0.2.172" + }, + { + "Primary": false, + "PrivateIpAddress": "10.0.2.169" + }, + { + "Primary": false, + "PrivateIpAddress": "10.0.2.170" + }, + { + "Primary": false, + "PrivateIpAddress": "10.0.2.171" + } + ], + "RequesterManaged": false, + "AvailabilityZone": "ap-southeast-1b", + "Groups": [ + { + "GroupName": "default", + "GroupId": "sg-1a2b3c4d" + } + ], + "SubnetId": "subnet-a61dafcf", + "OwnerId": "251839141158", + "TagSet": [], + "PrivateIpAddress": "10.0.2.140" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-interface.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-interface.xml new file mode 100644 index 0000000000000000000000000000000000000000..31c5f9bb4393c9e512e7325fbd9b4c79a0bf9f14 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-network-interface.xml @@ -0,0 +1,45 @@ + + bd78c839-0895-4fac-a17f-98b559b6b630 + + eni-1bcb7772 + subnet-a61dafcf + vpc-c31dafaa + ap-southeast-1b + + 251839141158 + false + pending + 02:74:b0:70:7f:1a + 10.0.2.140 + true + + + sg-1a2b3c4d + default + + + + + + 10.0.2.140 + true + + + 10.0.2.172 + false + + + 10.0.2.169 + false + + + 10.0.2.170 + false + + + 10.0.2.171 + false + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-reserved-instances-listing.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-reserved-instances-listing.json new file mode 100644 index 0000000000000000000000000000000000000000..9a7026b78ae231ad96c16551fadcbe2834adfb47 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-reserved-instances-listing.json @@ -0,0 +1,103 @@ +{ + "ResponseMetadata": { + "RequestId": "a42481af-335a-4e9e-b291-bd18dexample" + }, + "ReservedInstancesListings": [ + { + "ReservedInstancesId": "f127bd27-a218-43a4-926d-870e8example", + "Status": "active", + "Tags": [], + "PriceSchedules": [ + { + "Active": true, + "Term": 11, + "CurrencyCode": "USD", + "Price": 2.5 + }, + { + "Active": false, + "Term": 10, + "CurrencyCode": "USD", + "Price": 2.5 + }, + { + "Active": false, + "Term": 9, + "CurrencyCode": "USD", + "Price": 2.5 + }, + { + "Active": false, + "Term": 8, + "CurrencyCode": "USD", + "Price": 2.0 + }, + { + "Active": false, + "Term": 7, + "CurrencyCode": "USD", + "Price": 2.0 + }, + { + "Active": false, + "Term": 6, + "CurrencyCode": "USD", + "Price": 2.0 + }, + { + "Active": false, + "Term": 5, + "CurrencyCode": "USD", + "Price": 1.5 + }, + { + "Active": false, + "Term": 4, + "CurrencyCode": "USD", + "Price": 1.5 + }, + { + "Active": false, + "Term": 3, + "CurrencyCode": "USD", + "Price": 0.7 + }, + { + "Active": false, + "Term": 2, + "CurrencyCode": "USD", + "Price": 0.7 + }, + { + "Active": false, + "Term": 1, + "CurrencyCode": "USD", + "Price": 0.1 + } + ], + "CreateDate": "2012-07-17T17:11:09.449Z", + "ClientToken": "myIdempToken1", + "ReservedInstancesListingId": "5ec28771-05ff-4b9b-aa31-9e57dexample", + "UpdateDate": "2012-07-17T17:11:09.468Z", + "InstanceCounts": [ + { + "State": "Available", + "InstanceCount": 1 + }, + { + "State": "Sold", + "InstanceCount": 0 + }, + { + "State": "Cancelled", + "InstanceCount": 0 + }, + { + "State": "Pending", + "InstanceCount": 0 + } + ], + "StatusMessage": "ACTIVE" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-reserved-instances-listing.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-reserved-instances-listing.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f2c8959a455f9d95909c042029b0c7352157f28 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-reserved-instances-listing.xml @@ -0,0 +1,101 @@ + + a42481af-335a-4e9e-b291-bd18dexample + + + 5ec28771-05ff-4b9b-aa31-9e57dexample + f127bd27-a218-43a4-926d-870e8example + 2012-07-17T17:11:09.449Z + 2012-07-17T17:11:09.468Z + active + ACTIVE + + + Available + 1 + + + Sold + 0 + + + Cancelled + 0 + + + Pending + 0 + + + + + 11 + 2.5 + USD + true + + + 10 + 2.5 + USD + false + + + 9 + 2.5 + USD + false + + + 8 + 2.0 + USD + false + + + 7 + 2.0 + USD + false + + + 6 + 2.0 + USD + false + + + 5 + 1.5 + USD + false + + + 4 + 1.5 + USD + false + + + 3 + 0.7 + USD + false + + + 2 + 0.7 + USD + false + + + 1 + 0.1 + USD + false + + + + myIdempToken1 + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-route-table.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-route-table.json new file mode 100644 index 0000000000000000000000000000000000000000..a02754d99f31dbd63865bef8144066d95ac6f1b7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-route-table.json @@ -0,0 +1,18 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "RouteTable": { + "Associations": [], + "Routes": [ + { + "GatewayId": "local", + "DestinationCidrBlock": "10.0.0.0/22", + "State": "active" + } + ], + "RouteTableId": "rtb-f9ad4890", + "VpcId": "vpc-11ad4878", + "Tags": [] + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-route-table.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-route-table.xml new file mode 100644 index 0000000000000000000000000000000000000000..cc01a46018d79bbda023edc6564cfe479ab1832a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-route-table.xml @@ -0,0 +1,16 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + rtb-f9ad4890 + vpc-11ad4878 + + + 10.0.0.0/22 + local + active + + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-snapshot.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-snapshot.json new file mode 100644 index 0000000000000000000000000000000000000000..fb3986a833b83cf8a5d7930728feaafe86cab6cb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-snapshot.json @@ -0,0 +1,13 @@ +{ + "Description": "Daily Backup", + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "VolumeId": "vol-1a2b3c4d", + "State": "pending", + "VolumeSize": 30, + "StartTime": "YYYY-MM-DDTHH:MM:SS.000Z", + "SnapshotId": "snap-1a2b3c4d", + "OwnerId": "111122223333", + "Progress": "60%" +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-snapshot.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-snapshot.xml new file mode 100644 index 0000000000000000000000000000000000000000..69d2c7d53fec7dc7f86b9eda1f746590d5ae0066 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-snapshot.xml @@ -0,0 +1,11 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + snap-1a2b3c4d + vol-1a2b3c4d + pending + YYYY-MM-DDTHH:MM:SS.000Z + 60% + 111122223333 + 30 + Daily Backup + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-spot-datafeed-subscription.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-spot-datafeed-subscription.json new file mode 100644 index 0000000000000000000000000000000000000000..5b15f3cb7943804533e80a331ad4f284b5d2ab1f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-spot-datafeed-subscription.json @@ -0,0 +1,11 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "SpotDatafeedSubscription": { + "OwnerId": "111122223333", + "Prefix": "spotdata_", + "Bucket": "myawsbucket", + "State": "Active" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-spot-datafeed-subscription.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-spot-datafeed-subscription.xml new file mode 100644 index 0000000000000000000000000000000000000000..6881cc064e138ce76728982885243cbb5d2c7225 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-spot-datafeed-subscription.xml @@ -0,0 +1,9 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + 111122223333 + myawsbucket + spotdata_ + Active + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-subnet.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-subnet.json new file mode 100644 index 0000000000000000000000000000000000000000..975d4d98b8122b1e3b75fae3152a2df2a8d5a87e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-subnet.json @@ -0,0 +1,14 @@ +{ + "Subnet": { + "VpcId": "vpc-1a2b3c4d", + "Tags": [], + "CidrBlock": "10.0.1.0/24", + "State": "pending", + "AvailabilityZone": "us-east-1a", + "SubnetId": "subnet-9d4a7b6c", + "AvailableIpAddressCount": 251 + }, + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-subnet.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-subnet.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f80849d6d40f61b47ceaa57f8f254e2c17c0d30 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-subnet.xml @@ -0,0 +1,12 @@ + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + subnet-9d4a7b6c + pending + vpc-1a2b3c4d + 10.0.1.0/24 + 251 + us-east-1a + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-volume.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-volume.json new file mode 100644 index 0000000000000000000000000000000000000000..e089b1edf130ad999651526005a79b289d82922e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-volume.json @@ -0,0 +1,12 @@ +{ + "AvailabilityZone": "us-east-1a", + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "VolumeType": "standard", + "VolumeId": "vol-1a2b3c4d", + "State": "creating", + "SnapshotId": "", + "CreateTime": "YYYY-MM-DDTHH:MM:SS.000Z", + "Size": 80 +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-volume.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-volume.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f5cabac4b54a90154d29050714f72aec3d214d7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-volume.xml @@ -0,0 +1,10 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + vol-1a2b3c4d + 80 + + us-east-1a + creating + YYYY-MM-DDTHH:MM:SS.000Z + standard + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpc.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpc.json new file mode 100644 index 0000000000000000000000000000000000000000..e7ba1026f75362e5e6619c102970cce3447a6d5e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpc.json @@ -0,0 +1,13 @@ +{ + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE" + }, + "Vpc": { + "VpcId": "vpc-1a2b3c4d", + "InstanceTenancy": "default", + "Tags": [], + "State": "pending", + "DhcpOptionsId": "dopt-1a2b3c4d2", + "CidrBlock": "10.0.0.0/16" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpc.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpc.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c2c89cb05b22a07668739b6952d0dcf340ce409 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpc.xml @@ -0,0 +1,11 @@ + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + vpc-1a2b3c4d + pending + 10.0.0.0/16 + dopt-1a2b3c4d2 + default + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpn-gateway.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpn-gateway.json new file mode 100644 index 0000000000000000000000000000000000000000..01391db9d656fbc4d1d2b46dd858b4118bf93bf6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpn-gateway.json @@ -0,0 +1,13 @@ +{ + "VpnGateway": { + "AvailabilityZone": "us-east-1a", + "Tags": [], + "VpcAttachments": [], + "State": "pending", + "VpnGatewayId": "vgw-8db04f81", + "Type": "ipsec.1" + }, + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpn-gateway.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpn-gateway.xml new file mode 100644 index 0000000000000000000000000000000000000000..2650b2af2f9a0a960bbb6c3e6be821da734c7a2c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-create-vpn-gateway.xml @@ -0,0 +1,11 @@ + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + vgw-8db04f81 + pending + ipsec.1 + us-east-1a + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-delete-internet-gateway.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-delete-internet-gateway.json new file mode 100644 index 0000000000000000000000000000000000000000..57ab0c34f788728a4b2a23e3cc3cf183c9e69326 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-delete-internet-gateway.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-delete-internet-gateway.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-delete-internet-gateway.xml new file mode 100644 index 0000000000000000000000000000000000000000..87f1171440a277de445df0eb5e7f22a25cfc321a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-delete-internet-gateway.xml @@ -0,0 +1,4 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + true + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-account-attributes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-account-attributes.json new file mode 100644 index 0000000000000000000000000000000000000000..b4393a737963d92f6b5171e50e0618d22366ca99 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-account-attributes.json @@ -0,0 +1,42 @@ +{ + "ResponseMetadata": { + "RequestId": "14b4e6b1-ad06-4bdc-8dc0-e83bcd376f0c" + }, + "AccountAttributes": [ + { + "AttributeName": "vpc-max-security-groups-per-interface", + "AttributeValues": [ + { + "AttributeValue": "5" + } + ] + }, + { + "AttributeName": "max-instances", + "AttributeValues": [ + { + "AttributeValue": "20" + } + ] + }, + { + "AttributeName": "supported-platforms", + "AttributeValues": [ + { + "AttributeValue": "EC2" + }, + { + "AttributeValue": "VPC" + } + ] + }, + { + "AttributeName": "default-vpc", + "AttributeValues": [ + { + "AttributeValue": "none" + } + ] + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-account-attributes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-account-attributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..2af20a66ab55f915656aecd8b46b1d91994416d1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-account-attributes.xml @@ -0,0 +1,41 @@ + + + 14b4e6b1-ad06-4bdc-8dc0-e83bcd376f0c + + + vpc-max-security-groups-per-interface + + + 5 + + + + + max-instances + + + 20 + + + + + supported-platforms + + + EC2 + + + VPC + + + + + default-vpc + + + none + + + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-addresses.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-addresses.json new file mode 100644 index 0000000000000000000000000000000000000000..1f8a28b591d2132cf13b570dd912e8f09183558f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-addresses.json @@ -0,0 +1,22 @@ +{ + "ResponseMetadata": { + "RequestId": "b4cfd51c-a092-494f-8ee0-59912bef0ccc" + }, + "Addresses": [ + { + "PublicIp": "54.245.81.77", + "InstanceId": "", + "Domain": "standard" + }, + { + "PublicIp": "54.245.99.8", + "InstanceId": "", + "Domain": "standard" + }, + { + "PublicIp": "50.112.139.73", + "Domain": "vpc", + "AllocationId": "eipalloc-312e1758" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-addresses.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-addresses.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5a110880786cbfabf58d5e1f7a694dd23ca718d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-addresses.xml @@ -0,0 +1,21 @@ + + + b4cfd51c-a092-494f-8ee0-59912bef0ccc + + + 54.245.81.77 + standard + + + + 54.245.99.8 + standard + + + + 50.112.139.73 + eipalloc-312e1758 + vpc + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-availability-zones.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-availability-zones.json new file mode 100644 index 0000000000000000000000000000000000000000..11c6ce8ccb95c93e7df43199c878c78d87c64fc1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-availability-zones.json @@ -0,0 +1,25 @@ +{ + "AvailabilityZones": [ + { + "State": "available", + "RegionName": "us-west-2", + "Messages": [], + "ZoneName": "us-west-2a" + }, + { + "State": "available", + "RegionName": "us-west-2", + "Messages": [], + "ZoneName": "us-west-2b" + }, + { + "State": "available", + "RegionName": "us-west-2", + "Messages": [], + "ZoneName": "us-west-2c" + } + ], + "ResponseMetadata": { + "RequestId": "134223fa-6e75-437d-8235-5e7ad2482839" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-availability-zones.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-availability-zones.xml new file mode 100644 index 0000000000000000000000000000000000000000..61cc0790eaf29030536849447ba724cb3367caa1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-availability-zones.xml @@ -0,0 +1,24 @@ + + + 134223fa-6e75-437d-8235-5e7ad2482839 + + + us-west-2a + available + us-west-2 + + + + us-west-2b + available + us-west-2 + + + + us-west-2c + available + us-west-2 + + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-bundle-tasks.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-bundle-tasks.json new file mode 100644 index 0000000000000000000000000000000000000000..1c33af40236d53d3c99a34f762f443e120d8a13b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-bundle-tasks.json @@ -0,0 +1,9 @@ +{"BundleTasks": [{"BundleId": "bun-c1a540a8", + "InstanceId": "i-12345678", + "Progress": "20%", + "StartTime": "2008-10-07T11:41:50.000Z", + "State": "cancelling", + "Storage": {"S3": {"Bucket": "myawsbucket", + "Prefix": "winami"}}, + "UpdateTime": "2008-10-07T11:51:50.000Z"}], + "ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-bundle-tasks.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-bundle-tasks.xml new file mode 100644 index 0000000000000000000000000000000000000000..9e3aa3df7f06add57b1473df8a1fcbd65debb465 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-bundle-tasks.xml @@ -0,0 +1,20 @@ + + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + i-12345678 + bun-c1a540a8 + cancelling + 2008-10-07T11:41:50.000Z + 2008-10-07T11:51:50.000Z + + + myawsbucket + winami + + + 20% + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-customer-gateways.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-customer-gateways.json new file mode 100644 index 0000000000000000000000000000000000000000..8d8f59341d56c8b1466d8d65e9a997be3ed61750 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-customer-gateways.json @@ -0,0 +1,7 @@ +{"CustomerGateways": [{"BgpAsn": "65534", + "CustomerGatewayId": "cgw-b4dc3961", + "IpAddress": "12.1.2.3", + "State": "available", + "Tags": [], + "Type": "ipsec.1"}], + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-customer-gateways.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-customer-gateways.xml new file mode 100644 index 0000000000000000000000000000000000000000..5f6bc1006e5e28813fa3cd674a24d354e75aa11f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-customer-gateways.xml @@ -0,0 +1,14 @@ + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + + cgw-b4dc3961 + available + ipsec.1 + 12.1.2.3 + 65534 + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-dhcp-options.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-dhcp-options.json new file mode 100644 index 0000000000000000000000000000000000000000..1e1e517af79a97e36e761ef3fe4c06b2c0e6de08 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-dhcp-options.json @@ -0,0 +1,24 @@ +{ + "DhcpOptions": [ + { + "DhcpConfigurations": [ + { + "Values": [ + {"Value": "us-west-2.compute.internal"} + ], + "Key": "domain-name" + }, + { + "Values": [ + {"Value": "AmazonProvidedDNS"} + ], + "Key": "domain-name-servers" + } + ], + "DhcpOptionsId": "dopt-eb291082" + } + ], + "ResponseMetadata": { + "RequestId": "684ba87f-78a1-4c29-a70b-f6103a15c162" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-dhcp-options.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-dhcp-options.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a77b3044d2f3add7c5c4d242ee7b6b4f59a1c34 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-dhcp-options.xml @@ -0,0 +1,27 @@ + + + 684ba87f-78a1-4c29-a70b-f6103a15c162 + + + dopt-eb291082 + + + domain-name + + + us-west-2.compute.internal + + + + + domain-name-servers + + + AmazonProvidedDNS + + + + + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-export-tasks.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-export-tasks.json new file mode 100644 index 0000000000000000000000000000000000000000..5bad93c2a93cebacaeac42acefa915e059c6a4cb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-export-tasks.json @@ -0,0 +1,11 @@ +{"ExportTasks": [{"Description": "Example for docs", + "ExportTaskId": "export-i-1234wxyz", + "ExportToS3Task": {"ContainerFormat": "OVA", + "DiskImageFormat": "VMDK", + "S3Bucket": "my-bucket-for-exported-vm", + "S3Key": "my-exports/ export-i-1234wxyz .ova"}, + "InstanceExportDetails": {"InstanceId": "i-12345678", + "TargetEnvironment": "VMWare"}, + "State": "active", + "StatusMessage": "Running"}], + "ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-export-tasks.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-export-tasks.xml new file mode 100644 index 0000000000000000000000000000000000000000..40323ddb37408d27909fbacab670d65fbce3b227 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-export-tasks.xml @@ -0,0 +1,22 @@ + + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + export-i-1234wxyz + Example for docs + active + Running + + i-12345678 + VMWare + + + VMDK + OVA + my-bucket-for-exported-vm + my-exports/ export-i-1234wxyz .ova + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-attribute.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-attribute.json new file mode 100644 index 0000000000000000000000000000000000000000..b3c96eb75accbef4b6b61e046e07a11defa0e93f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-attribute.json @@ -0,0 +1,9 @@ +{ + "ResponseMetadata": { + "RequestId": "4c94c806-ef28-4f4c-b1c7-3e601fe39497" + }, + "InstanceId": "i-12345678", + "RootDeviceName": { + "Value": "/dev/sda1" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-attribute.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-attribute.xml new file mode 100644 index 0000000000000000000000000000000000000000..f9269555b0a38fcb73d5f0ab8f9294306c751439 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-attribute.xml @@ -0,0 +1,9 @@ + + + 4c94c806-ef28-4f4c-b1c7-3e601fe39497 + i-12345678 + + /dev/sda1 + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-status.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-status.json new file mode 100644 index 0000000000000000000000000000000000000000..432285912492c0c25f754ead830e4fe5c7ee906b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-status.json @@ -0,0 +1,33 @@ +{ + "InstanceStatuses": [ + { + "InstanceId": "i-78f1b94a", + "InstanceState": { + "Code": 16, + "Name": "running" + }, + "AvailabilityZone": "us-west-2b", + "SystemStatus": { + "Status": "ok", + "Details": [ + { + "Status": "passed", + "Name": "reachability" + } + ] + }, + "InstanceStatus": { + "Status": "ok", + "Details": [ + { + "Status": "passed", + "Name": "reachability" + } + ] + } + } + ], + "ResponseMetadata": { + "RequestId": "8be1454b-ea0f-4037-9911-b48eda6d79c8" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-status.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-status.xml new file mode 100644 index 0000000000000000000000000000000000000000..897e06d1f381c7dd7d37af5b433adb9518ce3902 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instance-status.xml @@ -0,0 +1,32 @@ + + + 8be1454b-ea0f-4037-9911-b48eda6d79c8 + + + i-78f1b94a + us-west-2b + + 16 + running + + + ok +
    + + reachability + passed + +
    +
    + + ok +
    + + reachability + passed + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..63b51d57ae0047ca21aa909263eb0ecf0a1f2880 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instances.json @@ -0,0 +1,143 @@ +{ + "Reservations": [ + { + "OwnerId": "123456789012", + "ReservationId": "r-9b4f3ca8", + "Groups": [ + { + "GroupName": "notebook", + "GroupId": "sg-4e970e7e" + } + ], + "Instances": [ + { + "Monitoring": { + "State": "disabled" + }, + "PublicDnsName": "", + "KernelId": "aki-98e26fa8", + "State": { + "Code": 80, + "Name": "stopped" + }, + "EbsOptimized": false, + "LaunchTime": "2012-10-16T20:00:13.000Z", + "ProductCodes": [], + "StateTransitionReason": "User initiated (2013-03-01 17:24:16 GMT)", + "InstanceId": "i-fde9cece", + "ImageId": "ami-30fe7300", + "PrivateDnsName": "", + "KeyName": "aws", + "SecurityGroups": [ + { + "GroupName": "notebook", + "GroupId": "sg-4e970e7e" + } + ], + "ClientToken": "", + "InstanceType": "m1.small", + "NetworkInterfaces": [], + "Placement": { + "Tenancy": "default", + "GroupName": "", + "AvailabilityZone": "us-west-2a" + }, + "Hypervisor": "xen", + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/sda1", + "Ebs": { + "Status": "attached", + "DeleteOnTermination": true, + "VolumeId": "vol-bc71579a", + "AttachTime": "2012-10-16T20:00:21.000Z" + } + } + ], + "Architecture": "x86_64", + "StateReason": { + "Message": "Client.UserInitiatedShutdown: User initiated shutdown", + "Code": "Client.UserInitiatedShutdown" + }, + "RootDeviceName": "/dev/sda1", + "VirtualizationType": "paravirtual", + "RootDeviceType": "ebs", + "Tags": [ + { + "Value": "", + "Key": "notebook" + } + ], + "AmiLaunchIndex": 0 + } + ] + }, + { + "OwnerId": "123456789012", + "ReservationId": "r-6670ce54", + "Groups": [ + { + "GroupName": "quicklaunch-1", + "GroupId": "sg-72334242" + } + ], + "Instances": [ + { + "Monitoring": { + "State": "disabled" + }, + "PublicDnsName": "ec2-54-245-16-142.us-west-2.compute.amazonaws.com", + "Platform": "windows", + "State": { + "Code": 16, + "Name": "running" + }, + "EbsOptimized": false, + "LaunchTime": "2013-03-12T01:55:59.000Z", + "PublicIpAddress": "54.245.16.142", + "PrivateIpAddress": "10.253.17.74", + "ProductCodes": [], + "StateTransitionReason": "", + "InstanceId": "i-78f1b94a", + "ImageId": "ami-c4d643f4", + "PrivateDnsName": "ip-10-253-17-74.us-west-2.compute.internal", + "KeyName": "aws", + "SecurityGroups": [ + { + "GroupName": "quicklaunch-1", + "GroupId": "sg-72334242" + } + ], + "ClientToken": "aOJaC1362847444140", + "InstanceType": "m1.medium", + "NetworkInterfaces": [], + "Placement": { + "Tenancy": "default", + "GroupName": "", + "AvailabilityZone": "us-west-2b" + }, + "Hypervisor": "xen", + "BlockDeviceMappings": [ + { + "DeviceName": "/dev/sda1", + "Ebs": { + "Status": "attached", + "DeleteOnTermination": true, + "VolumeId": "vol-a8d2e991", + "AttachTime": "2013-03-09T16:44:07.000Z" + } + } + ], + "Architecture": "x86_64", + "RootDeviceType": "ebs", + "RootDeviceName": "/dev/sda1", + "VirtualizationType": "hvm", + "AmiLaunchIndex": 0 + } + ] + } + ], + "ResponseMetadata": { + "RequestId": "d15d204f-fc31-4600-85d3-5c86e5483b92" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..1cdc621db0a25ce331cec479641a5e83b1765579 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-instances.xml @@ -0,0 +1,142 @@ + + + d15d204f-fc31-4600-85d3-5c86e5483b92 + + + r-9b4f3ca8 + 123456789012 + + + sg-4e970e7e + notebook + + + + + i-fde9cece + ami-30fe7300 + + 80 + stopped + + + + User initiated (2013-03-01 17:24:16 GMT) + aws + 0 + + m1.small + 2012-10-16T20:00:13.000Z + + us-west-2a + + default + + aki-98e26fa8 + + disabled + + + + sg-4e970e7e + notebook + + + + Client.UserInitiatedShutdown + Client.UserInitiatedShutdown: User initiated shutdown + + x86_64 + ebs + /dev/sda1 + + + /dev/sda1 + + vol-bc71579a + attached + 2012-10-16T20:00:21.000Z + true + + + + paravirtual + + + + notebook + + + + xen + + false + + + + + r-6670ce54 + 123456789012 + + + sg-72334242 + quicklaunch-1 + + + + + i-78f1b94a + ami-c4d643f4 + + 16 + running + + ip-10-253-17-74.us-west-2.compute.internal + ec2-54-245-16-142.us-west-2.compute.amazonaws.com + + aws + 0 + + m1.medium + 2013-03-12T01:55:59.000Z + + us-west-2b + + default + + windows + + disabled + + 10.253.17.74 + 54.245.16.142 + + + sg-72334242 + quicklaunch-1 + + + x86_64 + ebs + /dev/sda1 + + + /dev/sda1 + + vol-a8d2e991 + attached + 2013-03-09T16:44:07.000Z + true + + + + hvm + aOJaC1362847444140 + xen + + false + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-internet-gateways.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-internet-gateways.json new file mode 100644 index 0000000000000000000000000000000000000000..f138613b13c1d87e657af40c91d7a061c2786ae3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-internet-gateways.json @@ -0,0 +1,22 @@ +{ + "InternetGateways": [ + { + "Tags": [], + "InternetGatewayId": "igw-6228110b", + "Attachments": [ + { + "State": "available", + "VpcId": "vpc-8d2910e4" + } + ] + }, + { + "Tags": [], + "InternetGatewayId": "igw-f36c6a9a", + "Attachments": [] + } + ], + "ResponseMetadata": { + "RequestId": "dbdc612b-2fa3-4ba8-b96d-3a92a7a742b2" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-internet-gateways.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-internet-gateways.xml new file mode 100644 index 0000000000000000000000000000000000000000..d0f6d7f6d522f0978c5d04efc864439e23c36def --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-internet-gateways.xml @@ -0,0 +1,21 @@ + + + dbdc612b-2fa3-4ba8-b96d-3a92a7a742b2 + + + igw-6228110b + + + vpc-8d2910e4 + available + + + + + + igw-f36c6a9a + + + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-key-pairs.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-key-pairs.json new file mode 100644 index 0000000000000000000000000000000000000000..fac22726c6bbf2621f83a97c105643623baccd7b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-key-pairs.json @@ -0,0 +1,11 @@ +{ + "KeyPairs": [ + { + "KeyName": "aws", + "KeyFingerprint": "d1:15:f0:ce:7f:ee:94:b5:f2:76:d0:9a:bd:b2:30:18" + } + ], + "ResponseMetadata": { + "RequestId": "f01984fe-0227-46e0-bd34-86fadf256477" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-key-pairs.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-key-pairs.xml new file mode 100644 index 0000000000000000000000000000000000000000..f9a408558d3cb65100203f61c38b5e9c7fd8d4e3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-key-pairs.xml @@ -0,0 +1,10 @@ + + + f01984fe-0227-46e0-bd34-86fadf256477 + + + aws + d1:15:f0:ce:7f:ee:94:b5:f2:76:d0:9a:bd:b2:30:18 + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-acls.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-acls.json new file mode 100644 index 0000000000000000000000000000000000000000..7cc3a2f018c8f348930efb7825278e72bf8b93e1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-acls.json @@ -0,0 +1,50 @@ +{ + "NetworkAcls": [ + { + "Associations": [ + { + "SubnetId": "subnet-812910e8", + "NetworkAclId": "acl-8c2910e5", + "NetworkAclAssociationId": "aclassoc-832910ea" + } + ], + "NetworkAclId": "acl-8c2910e5", + "VpcId": "vpc-8d2910e4", + "Tags": [], + "Entries": [ + { + "CidrBlock": "0.0.0.0/0", + "RuleNumber": 100, + "Protocol": "-1", + "Egress": true, + "RuleAction": "allow" + }, + { + "CidrBlock": "0.0.0.0/0", + "RuleNumber": 32767, + "Protocol": "-1", + "Egress": true, + "RuleAction": "deny" + }, + { + "CidrBlock": "0.0.0.0/0", + "RuleNumber": 100, + "Protocol": "-1", + "Egress": false, + "RuleAction": "allow" + }, + { + "CidrBlock": "0.0.0.0/0", + "RuleNumber": 32767, + "Protocol": "-1", + "Egress": false, + "RuleAction": "deny" + } + ], + "IsDefault": true + } + ], + "ResponseMetadata": { + "RequestId": "44c81884-4c88-40ef-b6e9-b04d207189c9" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-acls.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-acls.xml new file mode 100644 index 0000000000000000000000000000000000000000..eeb60cc58f20eaaf026266f038cb75b200fb6096 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-acls.xml @@ -0,0 +1,49 @@ + + + 44c81884-4c88-40ef-b6e9-b04d207189c9 + + + acl-8c2910e5 + vpc-8d2910e4 + true + + + 100 + -1 + allow + true + 0.0.0.0/0 + + + 32767 + -1 + deny + true + 0.0.0.0/0 + + + 100 + -1 + allow + false + 0.0.0.0/0 + + + 32767 + -1 + deny + false + 0.0.0.0/0 + + + + + aclassoc-832910ea + acl-8c2910e5 + subnet-812910e8 + + + + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-interfaces.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-interfaces.json new file mode 100644 index 0000000000000000000000000000000000000000..9b654f8128ca0fe0c6d2ce7ce7660a77a6c54cbd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-interfaces.json @@ -0,0 +1,53 @@ +{"NetworkInterfaces": [{"Attachment": {"AttachTime": "2012-07-01T21:45:27.000Z", + "AttachmentId": "eni-attach-6537fc0c", + "DeleteOnTermination": true, + "DeviceIndex": 0, + "InstanceId": "i-22197876", + "InstanceOwnerId": "123456789012", + "Status": "attached"}, + "AvailabilityZone": "ap-southeast-1b", + "Description": "", + "Groups": [{"GroupId": "sg-3f4b5653", + "GroupName": "default"}], + "MacAddress": "02:81:60:cb:27:37", + "NetworkInterfaceId": "eni-0f62d866", + "OwnerId": "123456789012", + "PrivateIpAddress": "10.0.0.146", + "PrivateIpAddresses": [{"Primary": true, + "PrivateIpAddress": "10.0.0.146"}, + {"Primary": false, + "PrivateIpAddress": "10.0.0.148"}, + {"Primary": false, + "PrivateIpAddress": "10.0.0.150"}], + "RequesterManaged": false, + "SourceDestCheck": true, + "Status": "in-use", + "SubnetId": "subnet-c53c87ac", + "TagSet": [], + "VpcId": "vpc-cc3c87a5"}, + {"Attachment": {"AttachTime": "2012-06-27T20:08:44.000Z", + "AttachmentId": "eni-attach-a99c57c0", + "DeleteOnTermination": true, + "DeviceIndex": 0, + "InstanceId": "i-886401dc", + "InstanceOwnerId": "123456789012", + "Status": "attached"}, + "AvailabilityZone": "ap-southeast-1b", + "Description": "Primary network interface", + "Groups": [{"GroupId": "sg-a2a0b2ce", + "GroupName": "quick-start-1"}], + "MacAddress": "02:78:d7:00:8a:1e", + "NetworkInterfaceId": "eni-a66ed5cf", + "OwnerId": "123456789012", + "PrivateIpAddress": "10.0.1.233", + "PrivateIpAddresses": [{"Primary": true, + "PrivateIpAddress": "10.0.1.233"}, + {"Primary": false, + "PrivateIpAddress": "10.0.1.20"}], + "RequesterManaged": false, + "SourceDestCheck": true, + "Status": "in-use", + "SubnetId": "subnet-cd8a35a4", + "TagSet": [], + "VpcId": "vpc-f28a359b"}], + "ResponseMetadata": {"RequestId": "fc45294c-006b-457b-bab9-012f5b3b0e40"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-interfaces.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-interfaces.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ec9103b0c935b5e5ba6013a704f0cc9f3b2b24e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-network-interfaces.xml @@ -0,0 +1,88 @@ + + + fc45294c-006b-457b-bab9-012f5b3b0e40 + + + eni-0f62d866 + subnet-c53c87ac + vpc-cc3c87a5 + ap-southeast-1b + + 123456789012 + false + in-use + 02:81:60:cb:27:37 + 10.0.0.146 + true + + + sg-3f4b5653 + default + + + + eni-attach-6537fc0c + i-22197876 + 123456789012 + 0 + attached + 2012-07-01T21:45:27.000Z + true + + + + + 10.0.0.146 + true + + + 10.0.0.148 + false + + + 10.0.0.150 + false + + + + + eni-a66ed5cf + subnet-cd8a35a4 + vpc-f28a359b + ap-southeast-1b + Primary network interface + 123456789012 + false + in-use + 02:78:d7:00:8a:1e + 10.0.1.233 + true + + + sg-a2a0b2ce + quick-start-1 + + + + eni-attach-a99c57c0 + i-886401dc + 123456789012 + 0 + attached + 2012-06-27T20:08:44.000Z + true + + + + + 10.0.1.233 + true + + + 10.0.1.20 + false + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-placement-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-placement-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..81d9c49c50a30396354efc3a83b6a9ab5b411b4a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-placement-groups.json @@ -0,0 +1,7 @@ +{"PlacementGroups": [{"GroupName": "Project-cluster", + "State": "available", + "Strategy": "cluster"}], + "ResponseMetadata": { + "RequestId": "d4904fd9-82c2-4ea5-adfe-a9cc3EXAMPLE" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-placement-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-placement-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7ad7bd622c89c92dbc25d85203c29b1bc8a4c34 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-placement-groups.xml @@ -0,0 +1,11 @@ + + + d4904fd9-82c2-4ea5-adfe-a9cc3EXAMPLE + + + Project-cluster + cluster + available + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-regions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-regions.json new file mode 100644 index 0000000000000000000000000000000000000000..da6f5a73faf789811059eca3cd7c941d607c25e0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-regions.json @@ -0,0 +1,39 @@ +{ + "Regions": [ + { + "Endpoint": "ec2.eu-west-1.amazonaws.com", + "RegionName": "eu-west-1" + }, + { + "Endpoint": "ec2.sa-east-1.amazonaws.com", + "RegionName": "sa-east-1" + }, + { + "Endpoint": "ec2.us-east-1.amazonaws.com", + "RegionName": "us-east-1" + }, + { + "Endpoint": "ec2.ap-northeast-1.amazonaws.com", + "RegionName": "ap-northeast-1" + }, + { + "Endpoint": "ec2.us-west-2.amazonaws.com", + "RegionName": "us-west-2" + }, + { + "Endpoint": "ec2.us-west-1.amazonaws.com", + "RegionName": "us-west-1" + }, + { + "Endpoint": "ec2.ap-southeast-1.amazonaws.com", + "RegionName": "ap-southeast-1" + }, + { + "Endpoint": "ec2.ap-southeast-2.amazonaws.com", + "RegionName": "ap-southeast-2" + } + ], + "ResponseMetadata": { + "RequestId": "b5ad0cf6-846e-41be-a10d-767e2c519a71" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-regions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-regions.xml new file mode 100644 index 0000000000000000000000000000000000000000..608617970583314797cd4d3db4fcf51ef9b84661 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-regions.xml @@ -0,0 +1,38 @@ + + + b5ad0cf6-846e-41be-a10d-767e2c519a71 + + + eu-west-1 + ec2.eu-west-1.amazonaws.com + + + sa-east-1 + ec2.sa-east-1.amazonaws.com + + + us-east-1 + ec2.us-east-1.amazonaws.com + + + ap-northeast-1 + ec2.ap-northeast-1.amazonaws.com + + + us-west-2 + ec2.us-west-2.amazonaws.com + + + us-west-1 + ec2.us-west-1.amazonaws.com + + + ap-southeast-1 + ec2.ap-southeast-1.amazonaws.com + + + ap-southeast-2 + ec2.ap-southeast-2.amazonaws.com + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances-offerings.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances-offerings.json new file mode 100644 index 0000000000000000000000000000000000000000..ab4eb3acfc51815b84fb2829124d3db60f837a15 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances-offerings.json @@ -0,0 +1,48 @@ +{ + "ResponseMetadata": { + "RequestId": "404d7db3-3ec5-4400-8d72-74b1553f176e" + }, + "NextToken": "JqBdtVdGsvMjUysyEgwy/jVBCGAjj9G4/ivkfsXHt9A=", + "ReservedInstancesOfferings": [ + { + "OfferingType": "Heavy Utilization", + "AvailabilityZone": "us-west-2c", + "InstanceTenancy": "default", + "PricingDetails": [], + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "Amount": 0.031, + "Frequency": "Hourly" + } + ], + "Marketplace": false, + "CurrencyCode": "USD", + "FixedPrice": 701.0, + "Duration": 94608000, + "ReservedInstancesOfferingId": "2628c27b-7c1c-4ad6-9f50-a09393f36ecf", + "InstanceType": "c1.medium" + }, + { + "OfferingType": "Heavy Utilization", + "AvailabilityZone": "us-west-2c", + "InstanceTenancy": "default", + "PricingDetails": [], + "ProductDescription": "Red Hat Enterprise Linux", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "Amount": 0.091, + "Frequency": "Hourly" + } + ], + "Marketplace": false, + "CurrencyCode": "USD", + "FixedPrice": 701.0, + "Duration": 94608000, + "ReservedInstancesOfferingId": "371f1882-2df3-43b0-8f62-f73956fcfabc", + "InstanceType": "c1.medium" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances-offerings.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances-offerings.xml new file mode 100644 index 0000000000000000000000000000000000000000..50a446fc24292e405bb78c51b9c0adbe58991228 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances-offerings.xml @@ -0,0 +1,47 @@ + + + 404d7db3-3ec5-4400-8d72-74b1553f176e + + + 2628c27b-7c1c-4ad6-9f50-a09393f36ecf + c1.medium + us-west-2c + 94608000 + 701.0 + 0.0 + Linux/UNIX (Amazon VPC) + default + USD + Heavy Utilization + + + Hourly + 0.031 + + + false + + + + 371f1882-2df3-43b0-8f62-f73956fcfabc + c1.medium + us-west-2c + 94608000 + 701.0 + 0.0 + Red Hat Enterprise Linux + default + USD + Heavy Utilization + + + Hourly + 0.091 + + + false + + + + JqBdtVdGsvMjUysyEgwy/jVBCGAjj9G4/ivkfsXHt9A= + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..d4bf9ed5fe90975a113796436f63c28bc0ffefe6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances.json @@ -0,0 +1,14 @@ +{"ReservedInstances": [{"AvailabilityZone": "us-east-1a", + "CurrencyCode": "USD", + "Duration": 31536000, + "FixedPrice": 1820.0, + "InstanceCount": 3, + "InstanceTenancy": "default", + "InstanceType": "m1.xlarge", + "OfferingType": "Light Utilization", + "ProductDescription": "Linux/UNIX", + "RecurringCharges": [], + "ReservedInstancesId": "4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8EXAMPLE", + "State": "active", + "UsagePrice": 0.24}], + "ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..3fc1c3b53ad282ff6dc8c28773b834f0a93391e2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-reserved-instances.xml @@ -0,0 +1,21 @@ + + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + 4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8EXAMPLE + m1.xlarge + us-east-1a + 31536000 + 1820.0 + 0.24 + 3 + Linux/UNIX + active + default + USD + Light Utilization + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-route-tables.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-route-tables.json new file mode 100644 index 0000000000000000000000000000000000000000..63647cc0ac947e9899f0b56ad377f1b43e2b9520 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-route-tables.json @@ -0,0 +1,55 @@ +{ + "ResponseMetadata": { + "RequestId": "0a0c3fc4-1246-463b-b276-2823b5bc38e6" + }, + "RouteTables": [ + { + "Associations": [ + { + "SubnetId": "subnet-812910e8", + "RouteTableAssociationId": "rtbassoc-822019eb", + "RouteTableId": "rtb-2728114e" + } + ], + "RouteTableId": "rtb-2728114e", + "VpcId": "vpc-8d2910e4", + "PropagatingVgws": [], + "Tags": [], + "Routes": [ + { + "GatewayId": "local", + "DestinationCidrBlock": "10.0.0.0/16", + "Origin": "CreateRouteTable", + "State": "active" + }, + { + "GatewayId": "igw-6228110b", + "DestinationCidrBlock": "0.0.0.0/0", + "Origin": "CreateRoute", + "State": "active" + } + ] + }, + { + "Associations": [ + { + "RouteTableAssociationId": "rtbassoc-8e2910e7", + "Main": true, + "RouteTableId": "rtb-8f2910e6" + } + ], + "RouteTableId": "rtb-8f2910e6", + "VpcId": "vpc-8d2910e4", + "PropagatingVgws": [], + "Tags": [], + "Routes": [ + { + "GatewayId": "local", + "DestinationCidrBlock": "10.0.0.0/16", + "Origin": "CreateRouteTable", + "State": "active" + } + ] + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-route-tables.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-route-tables.xml new file mode 100644 index 0000000000000000000000000000000000000000..312a2ca4b59e8b1963b58ad1d9efbe295868c4c8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-route-tables.xml @@ -0,0 +1,54 @@ + + + 0a0c3fc4-1246-463b-b276-2823b5bc38e6 + + + rtb-2728114e + vpc-8d2910e4 + + + 10.0.0.0/16 + local + active + CreateRouteTable + + + 0.0.0.0/0 + igw-6228110b + active + CreateRoute + + + + + rtbassoc-822019eb + rtb-2728114e + subnet-812910e8 + + + + + + + rtb-8f2910e6 + vpc-8d2910e4 + + + 10.0.0.0/16 + local + active + CreateRouteTable + + + + + rtbassoc-8e2910e7 + rtb-8f2910e6 +
    true
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-security-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-security-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..bdc37c2d44360e1bba833b01be0cd7e6b2e40a1c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-security-groups.json @@ -0,0 +1,167 @@ +{ + "SecurityGroups": [ + { + "IpPermissionsEgress": [], + "Description": "quicklaunch-0", + "IpPermissions": [ + { + "ToPort": 22, + "IpProtocol": "tcp", + "IpRanges": [ + { + "CidrIp": "0.0.0.0/0" + } + ], + "UserIdGroupPairs": [], + "FromPort": 22 + } + ], + "GroupName": "quicklaunch-0", + "OwnerId": "123456789012", + "GroupId": "sg-68d8a958" + }, + { + "IpPermissionsEgress": [], + "Description": "quicklaunch-1", + "IpPermissions": [ + { + "ToPort": 3389, + "IpProtocol": "tcp", + "IpRanges": [ + { + "CidrIp": "0.0.0.0/0" + } + ], + "UserIdGroupPairs": [], + "FromPort": 3389 + } + ], + "GroupName": "quicklaunch-1", + "OwnerId": "123456789012", + "GroupId": "sg-72334242" + }, + { + "IpPermissionsEgress": [], + "Description": "For iPython notebook.", + "IpPermissions": [ + { + "ToPort": 22, + "IpProtocol": "tcp", + "IpRanges": [ + { + "CidrIp": "0.0.0.0/0" + } + ], + "UserIdGroupPairs": [], + "FromPort": 22 + }, + { + "ToPort": 443, + "IpProtocol": "tcp", + "IpRanges": [ + { + "CidrIp": "0.0.0.0/0" + } + ], + "UserIdGroupPairs": [], + "FromPort": 443 + }, + { + "ToPort": 8888, + "IpProtocol": "tcp", + "IpRanges": [ + { + "CidrIp": "0.0.0.0/0" + } + ], + "UserIdGroupPairs": [], + "FromPort": 8888 + } + ], + "GroupName": "notebook", + "OwnerId": "123456789012", + "GroupId": "sg-4e970e7e" + }, + { + "IpPermissionsEgress": [], + "Description": "default group", + "IpPermissions": [ + { + "ToPort": 65535, + "IpProtocol": "tcp", + "IpRanges": [], + "UserIdGroupPairs": [ + { + "GroupName": "default", + "UserId": "123456789012", + "GroupId": "sg-eab831da" + } + ], + "FromPort": 0 + }, + { + "ToPort": 65535, + "IpProtocol": "udp", + "IpRanges": [], + "UserIdGroupPairs": [ + { + "GroupName": "default", + "UserId": "123456789012", + "GroupId": "sg-eab831da" + } + ], + "FromPort": 0 + }, + { + "ToPort": -1, + "IpProtocol": "icmp", + "IpRanges": [], + "UserIdGroupPairs": [ + { + "GroupName": "default", + "UserId": "123456789012", + "GroupId": "sg-eab831da" + } + ], + "FromPort": -1 + } + ], + "GroupName": "default", + "OwnerId": "123456789012", + "GroupId": "sg-eab831da" + }, + { + "VpcId": "vpc-8d2910e4", + "Description": "default VPC security group", + "IpPermissions": [ + { + "IpProtocol": "-1", + "IpRanges": [], + "UserIdGroupPairs": [ + { + "UserId": "123456789012", + "GroupId": "sg-97b1aefb" + } + ] + } + ], + "GroupName": "default", + "IpPermissionsEgress": [ + { + "IpProtocol": "-1", + "IpRanges": [ + { + "CidrIp": "0.0.0.0/0" + } + ], + "UserIdGroupPairs": [] + } + ], + "OwnerId": "123456789012", + "GroupId": "sg-97b1aefb" + } + ], + "ResponseMetadata": { + "RequestId": "4296401f-8b78-4f99-b1fb-71def4fc3701" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-security-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-security-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..0898a0fefaa892d7159312ae5c60579ad2570f52 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-security-groups.xml @@ -0,0 +1,166 @@ + + + 4296401f-8b78-4f99-b1fb-71def4fc3701 + + + 123456789012 + sg-68d8a958 + quicklaunch-0 + quicklaunch-0 + + + tcp + 22 + 22 + + + + 0.0.0.0/0 + + + + + + + + 123456789012 + sg-72334242 + quicklaunch-1 + quicklaunch-1 + + + tcp + 3389 + 3389 + + + + 0.0.0.0/0 + + + + + + + + 123456789012 + sg-4e970e7e + notebook + For iPython notebook. + + + tcp + 22 + 22 + + + + 0.0.0.0/0 + + + + + tcp + 443 + 443 + + + + 0.0.0.0/0 + + + + + tcp + 8888 + 8888 + + + + 0.0.0.0/0 + + + + + + + + 123456789012 + sg-eab831da + default + default group + + + tcp + 0 + 65535 + + + 123456789012 + sg-eab831da + default + + + + + + udp + 0 + 65535 + + + 123456789012 + sg-eab831da + default + + + + + + icmp + -1 + -1 + + + 123456789012 + sg-eab831da + default + + + + + + + + + 123456789012 + sg-97b1aefb + default + default VPC security group + vpc-8d2910e4 + + + -1 + + + 123456789012 + sg-97b1aefb + + + + + + + + -1 + + + + 0.0.0.0/0 + + + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-snapshots.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-snapshots.json new file mode 100644 index 0000000000000000000000000000000000000000..f446174a14a3e938fd6b50f50b8691cfcf6ad4a3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-snapshots.json @@ -0,0 +1,47 @@ +{ + "ResponseMetadata": { + "RequestId": "928b3baf-8729-4285-a244-1c47c8114916" + }, + "Snapshots": [ + { + "Description": "Proxy Sniffer Data Disk NTFS 10 GB", + "VolumeId": "vol-ee102886", + "State": "completed", + "VolumeSize": 10, + "Progress": "100%", + "StartTime": "2011-12-27T17:20:21.000Z", + "SnapshotId": "snap-b253e6da", + "OwnerId": "123456789012" + }, + { + "Description": "", + "VolumeId": "vol-213dd14a", + "State": "completed", + "VolumeSize": 90, + "Progress": "100%", + "StartTime": "2012-01-08T00:41:31.000Z", + "SnapshotId": "snap-b6bf0cde", + "OwnerId": "123456789012" + }, + { + "Description": "", + "VolumeId": "vol-4ab8dc22", + "State": "completed", + "VolumeSize": 8, + "Progress": "100%", + "StartTime": "2012-02-22T17:25:10.000Z", + "SnapshotId": "snap-1e099276", + "OwnerId": "123456789012" + }, + { + "Description": "pvlinux-debian-6.0-x86_0.7.0.62_120223_172028", + "VolumeId": "vol-4d1b5c26", + "State": "completed", + "VolumeSize": 1, + "Progress": "100%", + "StartTime": "2012-02-23T22:26:43.000Z", + "SnapshotId": "snap-d63550be", + "OwnerId": "123456789012" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-snapshots.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-snapshots.xml new file mode 100644 index 0000000000000000000000000000000000000000..3551eeef1514a8fc84ea405eeffa0be8d9ff97fc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-snapshots.xml @@ -0,0 +1,46 @@ + + + 928b3baf-8729-4285-a244-1c47c8114916 + + + snap-b253e6da + vol-ee102886 + completed + 2011-12-27T17:20:21.000Z + 100% + 123456789012 + 10 + Proxy Sniffer Data Disk NTFS 10 GB + + + snap-b6bf0cde + vol-213dd14a + completed + 2012-01-08T00:41:31.000Z + 100% + 123456789012 + 90 + + + + snap-1e099276 + vol-4ab8dc22 + completed + 2012-02-22T17:25:10.000Z + 100% + 123456789012 + 8 + + + + snap-d63550be + vol-4d1b5c26 + completed + 2012-02-23T22:26:43.000Z + 100% + 123456789012 + 1 + pvlinux-debian-6.0-x86_0.7.0.62_120223_172028 + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-instance-requests.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-instance-requests.json new file mode 100644 index 0000000000000000000000000000000000000000..8e87ef6fe2cfe6c0f9d9a6ee63bd871abd9bc304 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-instance-requests.json @@ -0,0 +1,22 @@ +{"ResponseMetadata": {"RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE"}, + "SpotInstanceRequests": [ + {"CreateTime": "YYYY-MM-DDTHH:MM:SS.000Z", + "InstanceId": "i-1a2b3c4d", + "LaunchSpecification": {"EbsOptimized": false, + "ImageId": "ami-1a2b3c4d", + "InstanceType": "m1.small", + "KeyName": "gsg-keypair", + "Monitoring": {"Enabled": false}, + "SecurityGroups": [{"GroupId": "sg-1a2b3c4d", + "GroupName": "default"}]}, + "LaunchedAvailabilityZone": "us-east-1c", + "ProductDescription": "Linux/UNIX", + "SpotInstanceRequestId": "sir-1a2b3c4d", + "SpotPrice": "0.09", + "State": "active", + "Status": {"Code": "fulfilled", + "Message": "Your Spot request is fulfilled.", + "UpdateTime": "YYYY-MM-DDTHH:MM:SS.000Z"}, + "Type": "one-time"} + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-instance-requests.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-instance-requests.xml new file mode 100644 index 0000000000000000000000000000000000000000..f98c4dc4ac118caddcafd8bffc26300ce6409e04 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-instance-requests.xml @@ -0,0 +1,36 @@ + + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + sir-1a2b3c4d + 0.09 + one-time + active + + fulfilled + YYYY-MM-DDTHH:MM:SS.000Z + Your Spot request is fulfilled. + + + ami-1a2b3c4d + gsg-keypair + + + sg-1a2b3c4d + default + + + m1.small + + false + + false + + i-1a2b3c4d + YYYY-MM-DDTHH:MM:SS.000Z + Linux/UNIX + us-east-1c + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-price-history.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-price-history.json new file mode 100644 index 0000000000000000000000000000000000000000..c7f2a6468edb2bd4ca27f31790cd439bd6bccc7e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-price-history.json @@ -0,0 +1,7008 @@ +{ + "ResponseMetadata": { + "RequestId": "a71a795c-276d-4c9b-8212-b9302ccce158" + }, + "NextToken": "Qj9iZzP9N1Vh5jjNyad6X73sizWaPtVQ6328oKe9/GbmNSbOFX1TIhQaz5vok0nu", + "SpotPriceHistory": [ + { + "Timestamp": "2013-03-20T13:35:55.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T13:31:56.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T13:30:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T13:24:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T13:15:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T13:09:34.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T13:04:02.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T12:51:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T12:43:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T12:35:46.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T12:34:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T12:30:33.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T12:28:20.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T12:24:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T12:19:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T12:11:33.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T12:02:13.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T11:56:27.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T11:50:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T11:47:00.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T11:43:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T11:22:57.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T11:04:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T10:58:24.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T10:50:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T10:41:38.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T10:36:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T10:15:32.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T10:11:47.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T10:02:26.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T10:00:46.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T09:56:51.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T09:39:59.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T09:09:46.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T09:05:57.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T09:00:34.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T09:00:26.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T08:38:19.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T07:51:46.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T07:47:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T07:38:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T07:33:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.017000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T07:18:13.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T07:16:43.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:42:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:42:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:42:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:42:44.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:33:48.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:30:00.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:24:45.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:24:45.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:24:45.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:24:32.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:23:00.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:23:00.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:23:00.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:22:56.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:22:56.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:22:56.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:20:34.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:20:34.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:20:34.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:18:59.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:18:54.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:18:54.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:18:54.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:18:45.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:18:45.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:18:45.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:15:26.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:14:57.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:11:32.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:07:35.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:07:35.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:07:35.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:06:16.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T06:06:16.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T06:06:16.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T06:04:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:58:27.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:58:11.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T05:56:57.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:56:57.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T05:56:57.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T05:56:56.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:56:56.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T05:56:56.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T05:51:10.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:51:10.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T05:51:10.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T05:51:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:51:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T05:51:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T05:36:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:36:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T05:34:26.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:34:15.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:32:22.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:32:22.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T05:32:22.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T05:28:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T05:14:00.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T04:51:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T04:42:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T04:38:27.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T04:35:00.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T04:27:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T04:12:49.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "1.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T04:10:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.019000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T04:07:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T04:03:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.016000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T04:01:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "1.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T03:56:00.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T03:50:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T03:50:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T03:50:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "1.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T03:44:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T03:40:54.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T03:40:53.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T03:40:53.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T03:37:27.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T03:33:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T03:31:57.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T03:30:01.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:49:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:47:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:47:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:44:13.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:44:13.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:44:13.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:42:15.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:42:15.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:42:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:40:08.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:39:59.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:39:59.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:39:59.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:36:24.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.016000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:32:45.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:31:12.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:30:45.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:30:41.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:30:41.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:30:41.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:29:14.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:29:14.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:29:14.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:29:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:29:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:29:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:29:08.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:29:08.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:29:04.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:29:04.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:29:04.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:29:01.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:29:01.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:29:01.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:28:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:28:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:28:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:28:42.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:28:42.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:28:42.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:27:31.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:27:31.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:27:31.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:27:26.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:27:26.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:27:26.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:26:51.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:26:51.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:26:51.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:25:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:25:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:25:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:25:21.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:25:21.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:25:21.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:23:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:23:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:23:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:23:21.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:23:21.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:23:21.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:53.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:53.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:50.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:50.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:50.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:46.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:46.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:46.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:42.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:39.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:39.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:39.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:38.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:38.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:38.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:34.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:34.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:34.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:22.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:22.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:22.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:20.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:20.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:19.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:19.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:19.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:18.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:18.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:18.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:21:18.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:21:18.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:21:18.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:20:03.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:20:03.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:20:03.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:20:01.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:19:59.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:19:59.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:19:58.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:19:58.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:19:58.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:19:56.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:19:56.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:19:56.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:19:47.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T02:19:47.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T02:19:47.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T02:16:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T01:53:55.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T01:44:42.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T01:39:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T01:35:40.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T01:35:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T01:35:18.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T01:33:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T01:18:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T01:12:59.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T00:43:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T00:41:11.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T00:34:11.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-20T00:27:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T00:24:56.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T00:23:19.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-20T00:17:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T00:12:04.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T00:06:26.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-20T00:00:33.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T23:47:57.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T23:46:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T23:40:40.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T23:35:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T23:29:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.015000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T23:24:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T23:20:29.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T23:13:11.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T23:09:50.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T23:07:41.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T23:04:17.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T23:02:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.162000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T23:00:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T22:47:19.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:45:35.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:41:46.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T22:37:57.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:32:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:32:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T22:32:29.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.820000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:30:49.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T22:27:04.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:27:04.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T22:21:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:14:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T22:05:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:59:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:57:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:56:06.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:55:57.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:52:11.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:46:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:39:24.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T21:37:31.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:35:48.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T21:31:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:24:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:24:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T21:17:27.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:17:27.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:17:27.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T21:17:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:17:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:17:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T21:17:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:17:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:17:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T21:12:01.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:12:01.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:11:58.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:09:58.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T21:01:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T21:01:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.162000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T20:55:41.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T20:50:29.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T20:46:46.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T20:39:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T20:35:50.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.240000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T20:28:21.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T20:24:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.990000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T20:19:33.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T20:19:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T20:13:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.100000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T20:08:26.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.240000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:58:59.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T19:58:57.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T19:58:57.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T19:41:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:38:50.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:35:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.240000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:35:07.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T19:22:39.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T19:20:55.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:13:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.240000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:08:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.100000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:06:04.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T19:04:42.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:04:34.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:04:17.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:02:41.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.990000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T19:00:35.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T18:57:11.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.900000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T18:51:41.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T18:44:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.900000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T18:38:50.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.240000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T18:33:23.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.900000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T18:27:46.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T18:24:04.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T18:20:16.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T18:11:12.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T17:49:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T17:45:35.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T17:43:58.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T15:43:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T15:38:27.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.018000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T15:33:02.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T15:27:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.018000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T15:03:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T13:56:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T13:54:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T13:49:24.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.015000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T13:42:13.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T13:31:14.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T12:35:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T12:30:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T12:24:11.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T11:46:06.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T11:22:57.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T10:50:06.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T10:10:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T09:59:48.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T09:16:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T09:09:13.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T09:00:12.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T08:54:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T08:49:00.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T08:43:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T08:38:16.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T07:51:13.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T07:47:21.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T07:17:03.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T07:15:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:51:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:46:31.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:42:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:42:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:42:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:42:30.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:39:13.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:32:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:23:10.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:23:10.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:23:10.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:21:28.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:21:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:21:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:21:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:21:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:21:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:19:08.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:19:08.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:19:08.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:17:32.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:17:32.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:17:32.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:17:23.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:17:23.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:17:23.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:14:07.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:14:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:13:41.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:06:38.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:06:38.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:06:38.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:05:20.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T06:05:20.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T06:05:20.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T06:03:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:57:31.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:56:18.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:56:18.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T05:56:18.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:56:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:56:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T05:56:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:50:38.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:50:38.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T05:50:38.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:50:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:50:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T05:50:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:36:09.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:36:09.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:32:29.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:30:38.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:30:38.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T05:30:38.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T05:27:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:21:55.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:12:50.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T05:05:42.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:05:34.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:00:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T05:00:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.015000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T04:47:29.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T04:38:17.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T04:17:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T04:00:44.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T03:49:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T03:40:41.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T03:40:40.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T03:40:40.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T03:35:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T03:35:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T03:33:49.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T03:30:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T03:29:54.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T03:14:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.031000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T03:05:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:59:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:52:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.500000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:52:12.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.100000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:47:03.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.460000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:47:03.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:47:03.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:43:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:43:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:43:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:41:49.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:41:49.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:41:40.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:41:40.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.700000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:41:40.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.071000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:39:47.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:39:37.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:39:37.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:39:37.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:31:04.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:30:36.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:30:36.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:30:36.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:29:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:29:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:29:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:27:22.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:27:22.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:27:22.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:27:17.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:27:17.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:27:15.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:27:15.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:27:15.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:27:14.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:27:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:27:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:27:08.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:27:08.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:27:08.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:26:54.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:26:54.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:26:54.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:25:44.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:25:44.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:25:44.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:25:39.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:25:39.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:25:39.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:25:05.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:25:05.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:25:05.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:23:41.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:23:41.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:23:41.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:23:35.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:23:35.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:23:35.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:23:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:21:42.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:21:42.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:21:42.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:21:41.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:21:41.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:21:41.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:20:14.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:20:14.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:20:13.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:20:13.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:20:13.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:20:12.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:20:12.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:20:12.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:20:07.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:20:07.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:20:07.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:20:01.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:20:00.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:20:00.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:20:00.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:19:58.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:19:58.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:19:58.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:19:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:19:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:19:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:19:45.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:19:45.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:19:45.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:19:42.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:19:42.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:19:42.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:19:42.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:19:42.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:19:40.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:19:40.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:19:40.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:19:39.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:19:39.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:19:39.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:18:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:18:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:18:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:18:26.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:18:24.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:18:24.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:18:22.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:18:22.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:18:22.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:18:19.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:18:19.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:18:19.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:18:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:18:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T02:18:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T02:18:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:11:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T02:05:49.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T01:35:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T01:35:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T01:35:03.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T01:26:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T01:19:03.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T01:13:42.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T01:08:16.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T00:59:14.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T00:52:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T00:50:21.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T00:46:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T00:41:08.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-19T00:25:41.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T00:22:02.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-19T00:16:32.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T00:11:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-19T00:00:11.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T23:55:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:49:46.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:46:14.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T23:40:51.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:40:51.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T23:35:34.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:33:48.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T23:30:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:24:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:23:21.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:17:46.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:09:11.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T23:08:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T23:07:03.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T23:03:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T22:59:58.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T22:58:00.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T22:56:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T22:48:55.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T22:45:31.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T22:43:53.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T22:41:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T22:36:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T22:33:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T22:29:33.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T22:09:56.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T22:04:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:59:18.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:57:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:56:00.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:55:53.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:53:58.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:48:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:43:18.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:41:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:38:00.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:34:27.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:32:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.016000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:27:12.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:21:50.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:16:32.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:16:32.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:16:32.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:16:23.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:16:15.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:16:15.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:16:15.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:16:14.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:16:14.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:16:14.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T21:11:14.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:11:14.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:11:13.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:09:10.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T21:07:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T21:02:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T20:55:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T20:50:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T20:18:34.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T19:58:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T19:58:35.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T19:58:35.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T19:53:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:46:32.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:39:31.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:37:34.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:34:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:33:55.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T19:25:29.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:22:08.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T19:20:13.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:06:00.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T19:04:39.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:02:47.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T19:02:31.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T18:58:59.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T18:23:45.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T18:20:00.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T18:09:23.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T17:44:35.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T17:42:58.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T16:25:12.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T16:12:55.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T16:07:22.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T16:05:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T16:05:51.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T16:00:24.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T16:00:03.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.100000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:58:34.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.500000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:55:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.018000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:53:16.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T15:39:11.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:33:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.018000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:26:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:21:30.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:16:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:10:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:05:40.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T15:00:21.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T14:55:03.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T14:36:42.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T14:36:42.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T14:22:59.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T14:17:44.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T14:12:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T14:07:13.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T14:01:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T13:56:38.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T13:51:24.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T13:46:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T13:37:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T13:30:11.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T12:50:04.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T12:43:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T12:36:08.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T12:34:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T12:29:21.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T12:27:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T12:23:44.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T11:57:38.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T11:48:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T11:45:08.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T11:40:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T11:33:02.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T11:22:31.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T10:49:08.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T10:09:02.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T10:03:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T09:58:49.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T09:58:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T09:15:04.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T09:08:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T08:59:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T08:22:45.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T08:14:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T08:08:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T08:03:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T07:58:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T07:53:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.016000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T07:49:34.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T07:45:47.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T07:40:56.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T07:35:42.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.016000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T07:16:29.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.042000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T07:15:04.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:43:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:41:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:41:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:41:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:41:35.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:38:26.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:29:38.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:21:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:21:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:21:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:21:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:21:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:21:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:21:24.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:21:24.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:21:24.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:17:30.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:17:30.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:17:30.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:15:57.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:15:57.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:15:57.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:15:48.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:15:48.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:15:48.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:12:40.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:12:17.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:05:30.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:05:30.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:05:30.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.439000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T06:04:13.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T06:04:13.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T06:04:13.000Z", + "ProductDescription": "Windows", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.220000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:56:47.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:55:33.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:55:33.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T05:55:33.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.192000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:55:33.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:55:33.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T05:55:33.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.2xlarge", + "SpotPrice": "0.183000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:50:08.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:50:08.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T05:50:08.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.101000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:50:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:50:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T05:50:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m3.xlarge", + "SpotPrice": "0.092000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:34:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:34:27.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:30:54.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:29:08.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:29:08.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T05:29:08.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T05:20:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:15:23.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T05:11:46.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T04:57:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T04:52:41.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T04:36:50.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T03:48:40.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T03:39:45.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T03:39:45.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T03:29:33.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T03:15:47.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T03:05:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T03:00:13.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:43:15.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:43:15.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:43:15.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:41:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:41:25.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:39:33.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:39:25.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:39:25.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:39:25.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:37:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.025000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:29:26.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:29:02.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:29:02.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:29:02.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:27:39.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:27:39.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:27:39.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:25:51.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:25:51.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:25:51.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:25:47.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:25:47.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:25:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:25:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:25:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:25:42.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:25:42.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:25:42.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:25:37.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:25:37.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:25:37.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.050000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:25:25.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:25:25.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:25:25.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:24:15.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:24:15.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:24:15.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:24:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:24:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:24:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:23:39.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:23:39.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:23:39.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.038000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:22:17.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:22:17.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:22:17.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:22:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:22:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:22:13.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:20:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:20:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:20:25.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:20:24.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:20:24.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:20:24.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:59.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:59.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:59.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.030000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:58.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:58.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:55.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:52.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:52.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:52.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.234000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:48.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:46.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:46.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:46.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:45.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:45.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:45.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:43.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:43.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:43.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:35.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:35.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:35.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.122000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:32.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:32.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:32.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:30.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:30.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:30.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:30.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:30.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:30.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.067000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:18:29.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:18:29.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:18:29.000Z", + "ProductDescription": "SUSE Linux (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.090000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:17:17.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:17:17.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:17:17.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:17:16.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:17:13.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:17:13.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:17:13.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:17:13.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:17:13.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:17:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:17:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:17:11.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T02:17:02.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T02:17:02.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T02:17:02.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "m1.small", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T01:35:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T01:35:14.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-18T01:35:01.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T01:28:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T00:40:51.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-18T00:23:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-18T00:20:23.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T23:59:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T23:59:02.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T23:45:21.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T23:23:06.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T23:07:43.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T23:05:41.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T23:02:30.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:58:48.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.211000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T22:49:51.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:48:01.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:44:39.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:44:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:43:03.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:39:28.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:34:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:32:32.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T22:29:07.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T22:28:58.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:27:17.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T22:23:49.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:15:09.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T22:09:55.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.020000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:56:05.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.xlarge", + "SpotPrice": "0.083000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:54:37.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:54:29.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:50:54.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:45:44.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:37:09.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T21:33:44.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T21:33:38.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:28:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:16:27.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:16:27.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:16:27.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T21:16:18.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T21:16:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:16:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:16:11.000Z", + "ProductDescription": "SUSE Linux", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.351000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T21:16:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:16:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:16:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "cr1.8xlarge", + "SpotPrice": "0.343000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T21:09:40.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T21:09:40.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.253000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:09:38.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:07:41.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T21:00:58.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T20:54:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T20:54:10.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.medium", + "SpotPrice": "0.021000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T20:49:16.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "c1.medium", + "SpotPrice": "0.028000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T20:35:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T20:28:22.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T20:18:16.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.xlarge", + "SpotPrice": "0.320000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T20:02:36.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:57:27.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:57:21.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.2xlarge", + "SpotPrice": "0.112000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T19:57:19.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T19:57:19.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T19:48:52.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:43:45.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.013000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:36:42.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.medium", + "SpotPrice": "0.053000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:33:09.000Z", + "ProductDescription": "Windows", + "InstanceType": "c1.medium", + "SpotPrice": "0.080000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T19:31:45.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:26:35.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:21:35.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.224000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T19:05:52.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "t1.micro", + "SpotPrice": "0.004000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T19:04:33.000Z", + "ProductDescription": "Windows (Amazon VPC)", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:02:39.000Z", + "ProductDescription": "Windows", + "InstanceType": "cc2.8xlarge", + "SpotPrice": "0.456000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:02:33.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T19:02:23.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.small", + "SpotPrice": "0.026000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T18:57:23.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T18:57:18.000Z", + "ProductDescription": "Linux/UNIX (Amazon VPC)", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T18:50:37.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T18:43:49.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T18:23:08.000Z", + "ProductDescription": "Windows", + "InstanceType": "m2.4xlarge", + "SpotPrice": "0.448000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T18:19:34.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2c" + }, + { + "Timestamp": "2013-03-17T18:18:00.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T18:12:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.014000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T18:09:17.000Z", + "ProductDescription": "Windows", + "InstanceType": "m1.large", + "SpotPrice": "0.106000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T17:43:27.000Z", + "ProductDescription": "Windows", + "InstanceType": "t1.micro", + "SpotPrice": "0.009000", + "AvailabilityZone": "us-west-2a" + }, + { + "Timestamp": "2013-03-17T16:53:53.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T16:45:25.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T16:40:15.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T16:35:11.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T15:23:38.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T15:18:34.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T15:13:27.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.010000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T15:03:14.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m1.small", + "SpotPrice": "0.012000", + "AvailabilityZone": "us-west-2b" + }, + { + "Timestamp": "2013-03-17T14:35:51.000Z", + "ProductDescription": "Linux/UNIX", + "InstanceType": "m2.xlarge", + "SpotPrice": "0.056000", + "AvailabilityZone": "us-west-2a" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-price-history.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-price-history.xml new file mode 100644 index 0000000000000000000000000000000000000000..eb393fc6cc5119d22e1f621ea237453b789b01ee --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-spot-price-history.xml @@ -0,0 +1,7007 @@ + + + a71a795c-276d-4c9b-8212-b9302ccce158 + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T13:35:55.000Z + us-west-2b + + + m1.large + Windows + 0.106000 + 2013-03-20T13:31:56.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T13:30:15.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T13:24:28.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T13:15:08.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T13:09:34.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T13:04:02.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T12:51:01.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T12:43:25.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-20T12:35:46.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T12:34:01.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-20T12:30:33.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T12:28:20.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-20T12:24:30.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T12:19:08.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T12:11:33.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T12:02:13.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T11:56:27.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T11:50:52.000Z + us-west-2b + + + t1.micro + Windows + 0.009000 + 2013-03-20T11:47:00.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T11:43:28.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-20T11:22:57.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T11:04:09.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T10:58:24.000Z + us-west-2b + + + m1.large + Windows + 0.106000 + 2013-03-20T10:50:44.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T10:41:38.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T10:36:05.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T10:15:32.000Z + us-west-2c + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-20T10:11:47.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T10:02:26.000Z + us-west-2b + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-20T10:00:46.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T09:56:51.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-20T09:39:59.000Z + us-west-2c + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-20T09:09:46.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T09:05:57.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-20T09:00:34.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T09:00:26.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T08:38:19.000Z + us-west-2c + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-20T07:51:46.000Z + us-west-2a + + + c1.medium + Windows + 0.080000 + 2013-03-20T07:47:44.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T07:38:53.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.017000 + 2013-03-20T07:33:17.000Z + us-west-2b + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-20T07:18:13.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-20T07:16:43.000Z + us-west-2a + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-20T06:42:47.000Z + us-west-2b + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-20T06:42:47.000Z + us-west-2a + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-20T06:42:47.000Z + us-west-2c + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-20T06:42:44.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-20T06:33:48.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T06:30:00.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-20T06:24:45.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-20T06:24:45.000Z + us-west-2a + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-20T06:24:45.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-20T06:24:32.000Z + us-west-2b + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-20T06:23:00.000Z + us-west-2b + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-20T06:23:00.000Z + us-west-2a + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-20T06:23:00.000Z + us-west-2c + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-20T06:22:56.000Z + us-west-2b + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-20T06:22:56.000Z + us-west-2a + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-20T06:22:56.000Z + us-west-2c + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-20T06:20:34.000Z + us-west-2b + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-20T06:20:34.000Z + us-west-2a + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-20T06:20:34.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T06:18:59.000Z + us-west-2b + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-20T06:18:54.000Z + us-west-2b + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-20T06:18:54.000Z + us-west-2a + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-20T06:18:54.000Z + us-west-2c + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-20T06:18:45.000Z + us-west-2b + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-20T06:18:45.000Z + us-west-2a + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-20T06:18:45.000Z + us-west-2c + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-20T06:15:26.000Z + us-west-2a + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-20T06:14:57.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-20T06:11:32.000Z + us-west-2b + + + m3.2xlarge + Windows + 0.439000 + 2013-03-20T06:07:35.000Z + us-west-2b + + + m3.2xlarge + Windows + 0.439000 + 2013-03-20T06:07:35.000Z + us-west-2a + + + m3.2xlarge + Windows + 0.439000 + 2013-03-20T06:07:35.000Z + us-west-2c + + + m3.xlarge + Windows + 0.220000 + 2013-03-20T06:06:16.000Z + us-west-2b + + + m3.xlarge + Windows + 0.220000 + 2013-03-20T06:06:16.000Z + us-west-2a + + + m3.xlarge + Windows + 0.220000 + 2013-03-20T06:06:16.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T06:04:05.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-20T05:58:27.000Z + us-west-2b + + + m1.medium + Windows + 0.053000 + 2013-03-20T05:58:11.000Z + us-west-2c + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-20T05:56:57.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-20T05:56:57.000Z + us-west-2a + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-20T05:56:57.000Z + us-west-2c + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-20T05:56:56.000Z + us-west-2b + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-20T05:56:56.000Z + us-west-2a + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-20T05:56:56.000Z + us-west-2c + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-20T05:51:10.000Z + us-west-2b + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-20T05:51:10.000Z + us-west-2a + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-20T05:51:10.000Z + us-west-2c + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-20T05:51:08.000Z + us-west-2b + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-20T05:51:08.000Z + us-west-2a + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-20T05:51:08.000Z + us-west-2c + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-20T05:36:11.000Z + us-west-2b + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-20T05:36:11.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T05:34:26.000Z + us-west-2b + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-20T05:34:15.000Z + us-west-2b + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-20T05:32:22.000Z + us-west-2b + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-20T05:32:22.000Z + us-west-2a + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-20T05:32:22.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-20T05:28:52.000Z + us-west-2b + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-20T05:14:00.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T04:51:53.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T04:42:30.000Z + us-west-2b + + + c1.medium + Windows + 0.080000 + 2013-03-20T04:38:27.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T04:35:00.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-20T04:27:25.000Z + us-west-2b + + + m1.small + Linux/UNIX + 1.122000 + 2013-03-20T04:12:49.000Z + us-west-2a + + + t1.micro + Linux/UNIX + 0.019000 + 2013-03-20T04:10:52.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T04:07:17.000Z + us-west-2a + + + t1.micro + Linux/UNIX + 0.016000 + 2013-03-20T04:03:25.000Z + us-west-2b + + + m1.small + Linux/UNIX + 1.122000 + 2013-03-20T04:01:37.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T03:56:00.000Z + us-west-2a + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-20T03:50:28.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T03:50:28.000Z + us-west-2b + + + m1.small + Linux/UNIX + 1.122000 + 2013-03-20T03:50:28.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T03:44:54.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-20T03:40:54.000Z + us-west-2b + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-20T03:40:53.000Z + us-west-2a + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-20T03:40:53.000Z + us-west-2c + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-20T03:37:27.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-20T03:33:53.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.010000 + 2013-03-20T03:31:57.000Z + us-west-2b + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-20T03:30:01.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T02:49:25.000Z + us-west-2c + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-20T02:47:35.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-20T02:47:35.000Z + us-west-2c + + + m1.xlarge + Windows + 0.211000 + 2013-03-20T02:44:13.000Z + us-west-2b + + + m1.xlarge + Windows + 0.211000 + 2013-03-20T02:44:13.000Z + us-west-2a + + + m1.xlarge + Windows + 0.211000 + 2013-03-20T02:44:13.000Z + us-west-2c + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-20T02:42:15.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-20T02:42:15.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-20T02:42:05.000Z + us-west-2c + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-20T02:40:08.000Z + us-west-2a + + + m2.2xlarge + Windows + 0.224000 + 2013-03-20T02:39:59.000Z + us-west-2b + + + m2.2xlarge + Windows + 0.224000 + 2013-03-20T02:39:59.000Z + us-west-2a + + + m2.2xlarge + Windows + 0.224000 + 2013-03-20T02:39:59.000Z + us-west-2c + + + t1.micro + Linux/UNIX + 0.016000 + 2013-03-20T02:36:24.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T02:32:45.000Z + us-west-2c + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-20T02:31:12.000Z + us-west-2c + + + t1.micro + Linux/UNIX + 0.020000 + 2013-03-20T02:30:45.000Z + us-west-2b + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-20T02:30:41.000Z + us-west-2b + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-20T02:30:41.000Z + us-west-2a + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-20T02:30:41.000Z + us-west-2c + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-20T02:29:14.000Z + us-west-2b + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-20T02:29:14.000Z + us-west-2a + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-20T02:29:14.000Z + us-west-2c + + + m1.large + SUSE Linux + 0.050000 + 2013-03-20T02:29:11.000Z + us-west-2b + + + m1.large + SUSE Linux + 0.050000 + 2013-03-20T02:29:11.000Z + us-west-2a + + + m1.large + SUSE Linux + 0.050000 + 2013-03-20T02:29:11.000Z + us-west-2c + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-20T02:29:08.000Z + us-west-2b + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-20T02:29:08.000Z + us-west-2c + + + m2.xlarge + Windows + 0.112000 + 2013-03-20T02:29:04.000Z + us-west-2b + + + m2.xlarge + Windows + 0.112000 + 2013-03-20T02:29:04.000Z + us-west-2a + + + m2.xlarge + Windows + 0.112000 + 2013-03-20T02:29:04.000Z + us-west-2c + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-20T02:29:01.000Z + us-west-2b + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-20T02:29:01.000Z + us-west-2a + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-20T02:29:01.000Z + us-west-2c + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-20T02:28:55.000Z + us-west-2b + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-20T02:28:55.000Z + us-west-2a + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-20T02:28:55.000Z + us-west-2c + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-20T02:28:42.000Z + us-west-2b + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-20T02:28:42.000Z + us-west-2a + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-20T02:28:42.000Z + us-west-2c + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-20T02:27:31.000Z + us-west-2b + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-20T02:27:31.000Z + us-west-2a + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-20T02:27:31.000Z + us-west-2c + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-20T02:27:26.000Z + us-west-2b + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-20T02:27:26.000Z + us-west-2a + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-20T02:27:26.000Z + us-west-2c + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-20T02:26:51.000Z + us-west-2b + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-20T02:26:51.000Z + us-west-2a + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-20T02:26:51.000Z + us-west-2c + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-20T02:25:25.000Z + us-west-2b + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-20T02:25:25.000Z + us-west-2a + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-20T02:25:25.000Z + us-west-2c + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-20T02:25:21.000Z + us-west-2b + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-20T02:25:21.000Z + us-west-2a + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-20T02:25:21.000Z + us-west-2c + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-20T02:23:25.000Z + us-west-2b + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-20T02:23:25.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-20T02:23:25.000Z + us-west-2c + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-20T02:23:21.000Z + us-west-2b + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-20T02:23:21.000Z + us-west-2a + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-20T02:23:21.000Z + us-west-2c + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-20T02:21:55.000Z + us-west-2b + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-20T02:21:55.000Z + us-west-2a + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-20T02:21:55.000Z + us-west-2c + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-20T02:21:53.000Z + us-west-2b + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-20T02:21:53.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-20T02:21:50.000Z + us-west-2b + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-20T02:21:50.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-20T02:21:50.000Z + us-west-2c + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-20T02:21:46.000Z + us-west-2b + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-20T02:21:46.000Z + us-west-2a + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-20T02:21:46.000Z + us-west-2c + + + m2.4xlarge + Windows + 0.448000 + 2013-03-20T02:21:42.000Z + us-west-2b + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-20T02:21:39.000Z + us-west-2b + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-20T02:21:39.000Z + us-west-2a + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-20T02:21:39.000Z + us-west-2c + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-20T02:21:38.000Z + us-west-2b + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-20T02:21:38.000Z + us-west-2a + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-20T02:21:38.000Z + us-west-2c + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-20T02:21:34.000Z + us-west-2b + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-20T02:21:34.000Z + us-west-2a + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-20T02:21:34.000Z + us-west-2c + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-20T02:21:22.000Z + us-west-2b + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-20T02:21:22.000Z + us-west-2a + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-20T02:21:22.000Z + us-west-2c + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-20T02:21:20.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-20T02:21:20.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-20T02:21:19.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-20T02:21:19.000Z + us-west-2c + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-20T02:21:19.000Z + us-west-2c + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-20T02:21:18.000Z + us-west-2b + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-20T02:21:18.000Z + us-west-2a + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-20T02:21:18.000Z + us-west-2c + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-20T02:21:18.000Z + us-west-2b + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-20T02:21:18.000Z + us-west-2a + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-20T02:21:18.000Z + us-west-2c + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-20T02:20:03.000Z + us-west-2b + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-20T02:20:03.000Z + us-west-2a + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-20T02:20:03.000Z + us-west-2c + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-20T02:20:01.000Z + us-west-2b + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-20T02:19:59.000Z + us-west-2b + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-20T02:19:59.000Z + us-west-2a + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-20T02:19:58.000Z + us-west-2c + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-20T02:19:58.000Z + us-west-2a + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-20T02:19:58.000Z + us-west-2c + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-20T02:19:56.000Z + us-west-2b + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-20T02:19:56.000Z + us-west-2a + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-20T02:19:56.000Z + us-west-2c + + + m1.small + SUSE Linux + 0.021000 + 2013-03-20T02:19:47.000Z + us-west-2b + + + m1.small + SUSE Linux + 0.021000 + 2013-03-20T02:19:47.000Z + us-west-2a + + + m1.small + SUSE Linux + 0.021000 + 2013-03-20T02:19:47.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-20T02:16:06.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T01:53:55.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T01:44:42.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T01:39:07.000Z + us-west-2b + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-20T01:35:40.000Z + us-west-2a + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-20T01:35:30.000Z + us-west-2a + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-20T01:35:18.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T01:33:30.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T01:18:37.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T01:12:59.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T00:43:22.000Z + us-west-2c + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-20T00:41:11.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-20T00:34:11.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-20T00:27:06.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T00:24:56.000Z + us-west-2b + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-20T00:23:19.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T00:17:37.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-20T00:12:04.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-20T00:06:26.000Z + us-west-2b + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-20T00:00:33.000Z + us-west-2a + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-19T23:47:57.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T23:46:09.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-19T23:40:40.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T23:35:10.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.015000 + 2013-03-19T23:29:36.000Z + us-west-2b + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-19T23:24:22.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T23:20:29.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T23:13:11.000Z + us-west-2b + + + c1.xlarge + Windows + 0.320000 + 2013-03-19T23:09:50.000Z + us-west-2c + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-19T23:07:41.000Z + us-west-2c + + + c1.xlarge + Windows + 0.320000 + 2013-03-19T23:04:17.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.162000 + 2013-03-19T23:02:07.000Z + us-west-2a + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-19T23:00:27.000Z + us-west-2c + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-19T22:47:19.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-19T22:45:35.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T22:41:46.000Z + us-west-2c + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-19T22:37:57.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T22:32:36.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-19T22:32:36.000Z + us-west-2c + + + m2.2xlarge + Linux/UNIX + 0.820000 + 2013-03-19T22:32:29.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-19T22:30:49.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T22:27:04.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T22:27:04.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T22:21:36.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T22:14:15.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T22:05:05.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T21:59:30.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-19T21:57:39.000Z + us-west-2b + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-19T21:56:06.000Z + us-west-2a + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-19T21:55:57.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T21:52:11.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T21:46:36.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-19T21:39:24.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T21:37:31.000Z + us-west-2b + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-19T21:35:48.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T21:31:54.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T21:24:35.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-19T21:24:28.000Z + us-west-2c + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-19T21:17:27.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-19T21:17:27.000Z + us-west-2a + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-19T21:17:27.000Z + us-west-2c + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-19T21:17:11.000Z + us-west-2b + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-19T21:17:11.000Z + us-west-2a + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-19T21:17:11.000Z + us-west-2c + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-19T21:17:09.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-19T21:17:09.000Z + us-west-2a + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-19T21:17:09.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-19T21:12:01.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-19T21:12:01.000Z + us-west-2a + + + m2.4xlarge + Windows + 0.448000 + 2013-03-19T21:11:58.000Z + us-west-2a + + + m1.medium + Windows + 0.053000 + 2013-03-19T21:09:58.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T21:01:06.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.162000 + 2013-03-19T21:01:06.000Z + us-west-2a + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-19T20:55:41.000Z + us-west-2a + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-19T20:50:29.000Z + us-west-2c + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T20:46:46.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T20:39:22.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.240000 + 2013-03-19T20:35:50.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-19T20:28:21.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.990000 + 2013-03-19T20:24:47.000Z + us-west-2b + + + c1.xlarge + Windows + 0.320000 + 2013-03-19T20:19:33.000Z + us-west-2a + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T20:19:22.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.100000 + 2013-03-19T20:13:53.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.240000 + 2013-03-19T20:08:26.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-19T19:58:59.000Z + us-west-2a + + + m1.small + Windows + 0.026000 + 2013-03-19T19:58:57.000Z + us-west-2a + + + m1.small + Windows + 0.026000 + 2013-03-19T19:58:57.000Z + us-west-2c + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T19:41:01.000Z + us-west-2b + + + m1.medium + Windows + 0.053000 + 2013-03-19T19:38:50.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.240000 + 2013-03-19T19:35:36.000Z + us-west-2b + + + c1.medium + Windows + 0.080000 + 2013-03-19T19:35:07.000Z + us-west-2a + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-19T19:22:39.000Z + us-west-2a + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T19:20:55.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.240000 + 2013-03-19T19:13:36.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.100000 + 2013-03-19T19:08:10.000Z + us-west-2b + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-19T19:06:04.000Z + us-west-2a + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-19T19:04:42.000Z + us-west-2b + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-19T19:04:34.000Z + us-west-2b + + + m1.small + Windows + 0.026000 + 2013-03-19T19:04:17.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.990000 + 2013-03-19T19:02:41.000Z + us-west-2b + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-19T19:00:35.000Z + us-west-2c + + + m1.large + Linux/UNIX + 0.900000 + 2013-03-19T18:57:11.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T18:51:41.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.900000 + 2013-03-19T18:44:17.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.240000 + 2013-03-19T18:38:50.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.900000 + 2013-03-19T18:33:23.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T18:27:46.000Z + us-west-2c + + + m2.4xlarge + Windows + 0.448000 + 2013-03-19T18:24:04.000Z + us-west-2c + + + t1.micro + Windows + 0.009000 + 2013-03-19T18:20:16.000Z + us-west-2c + + + m1.large + Windows + 0.106000 + 2013-03-19T18:11:12.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T17:49:25.000Z + us-west-2b + + + t1.micro + Windows + 0.009000 + 2013-03-19T17:45:35.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-19T17:43:58.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T15:43:52.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.018000 + 2013-03-19T15:38:27.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T15:33:02.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.018000 + 2013-03-19T15:27:36.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-19T15:03:47.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T13:56:36.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T13:54:47.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.015000 + 2013-03-19T13:49:24.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-19T13:42:13.000Z + us-west-2c + + + m1.large + Windows + 0.106000 + 2013-03-19T13:31:14.000Z + us-west-2c + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-19T12:35:09.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-19T12:30:05.000Z + us-west-2c + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-19T12:24:11.000Z + us-west-2a + + + t1.micro + Windows + 0.009000 + 2013-03-19T11:46:06.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-19T11:22:57.000Z + us-west-2b + + + m1.large + Windows + 0.106000 + 2013-03-19T10:50:06.000Z + us-west-2a + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-19T10:10:25.000Z + us-west-2c + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-19T09:59:48.000Z + us-west-2c + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T09:16:25.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T09:09:13.000Z + us-west-2c + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-19T09:00:12.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T08:54:28.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-19T08:49:00.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T08:43:39.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-19T08:38:16.000Z + us-west-2b + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-19T07:51:13.000Z + us-west-2a + + + c1.medium + Windows + 0.080000 + 2013-03-19T07:47:21.000Z + us-west-2b + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-19T07:17:03.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-19T07:15:37.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T06:51:54.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T06:46:31.000Z + us-west-2b + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-19T06:42:35.000Z + us-west-2b + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-19T06:42:35.000Z + us-west-2a + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-19T06:42:35.000Z + us-west-2c + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-19T06:42:30.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T06:39:13.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T06:32:01.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-19T06:23:10.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-19T06:23:10.000Z + us-west-2a + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-19T06:23:10.000Z + us-west-2c + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-19T06:21:28.000Z + us-west-2b + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-19T06:21:27.000Z + us-west-2a + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-19T06:21:27.000Z + us-west-2c + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-19T06:21:25.000Z + us-west-2b + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-19T06:21:25.000Z + us-west-2a + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-19T06:21:25.000Z + us-west-2c + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-19T06:19:08.000Z + us-west-2b + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-19T06:19:08.000Z + us-west-2a + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-19T06:19:08.000Z + us-west-2c + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-19T06:17:32.000Z + us-west-2b + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-19T06:17:32.000Z + us-west-2a + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-19T06:17:32.000Z + us-west-2c + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-19T06:17:23.000Z + us-west-2b + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-19T06:17:23.000Z + us-west-2a + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-19T06:17:23.000Z + us-west-2c + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-19T06:14:07.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T06:14:01.000Z + us-west-2c + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-19T06:13:41.000Z + us-west-2b + + + m3.2xlarge + Windows + 0.439000 + 2013-03-19T06:06:38.000Z + us-west-2b + + + m3.2xlarge + Windows + 0.439000 + 2013-03-19T06:06:38.000Z + us-west-2a + + + m3.2xlarge + Windows + 0.439000 + 2013-03-19T06:06:38.000Z + us-west-2c + + + m3.xlarge + Windows + 0.220000 + 2013-03-19T06:05:20.000Z + us-west-2b + + + m3.xlarge + Windows + 0.220000 + 2013-03-19T06:05:20.000Z + us-west-2a + + + m3.xlarge + Windows + 0.220000 + 2013-03-19T06:05:20.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-19T06:03:15.000Z + us-west-2c + + + m1.medium + Windows + 0.053000 + 2013-03-19T05:57:31.000Z + us-west-2c + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-19T05:56:18.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-19T05:56:18.000Z + us-west-2a + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-19T05:56:18.000Z + us-west-2c + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-19T05:56:17.000Z + us-west-2b + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-19T05:56:17.000Z + us-west-2a + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-19T05:56:17.000Z + us-west-2c + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-19T05:50:38.000Z + us-west-2b + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-19T05:50:38.000Z + us-west-2a + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-19T05:50:38.000Z + us-west-2c + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-19T05:50:37.000Z + us-west-2b + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-19T05:50:37.000Z + us-west-2a + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-19T05:50:37.000Z + us-west-2c + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-19T05:36:09.000Z + us-west-2b + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-19T05:36:09.000Z + us-west-2c + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-19T05:32:29.000Z + us-west-2b + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-19T05:30:38.000Z + us-west-2b + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-19T05:30:38.000Z + us-west-2a + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-19T05:30:38.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T05:27:17.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-19T05:21:55.000Z + us-west-2b + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-19T05:12:50.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T05:05:42.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-19T05:05:34.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-19T05:00:17.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.015000 + 2013-03-19T05:00:08.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-19T04:47:29.000Z + us-west-2b + + + c1.medium + Windows + 0.080000 + 2013-03-19T04:38:17.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T04:17:07.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-19T04:00:44.000Z + us-west-2c + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-19T03:49:54.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-19T03:40:41.000Z + us-west-2b + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-19T03:40:40.000Z + us-west-2a + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-19T03:40:40.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T03:35:36.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T03:35:36.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-19T03:33:49.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-19T03:30:05.000Z + us-west-2b + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-19T03:29:54.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.031000 + 2013-03-19T03:14:01.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T03:05:09.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-19T02:59:39.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.500000 + 2013-03-19T02:52:30.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.100000 + 2013-03-19T02:52:12.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.460000 + 2013-03-19T02:47:03.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-19T02:47:03.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-19T02:47:03.000Z + us-west-2c + + + m1.xlarge + Windows + 0.211000 + 2013-03-19T02:43:44.000Z + us-west-2b + + + m1.xlarge + Windows + 0.211000 + 2013-03-19T02:43:44.000Z + us-west-2a + + + m1.xlarge + Windows + 0.211000 + 2013-03-19T02:43:44.000Z + us-west-2c + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-19T02:41:49.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-19T02:41:49.000Z + us-west-2c + + + m2.xlarge + Linux/UNIX + 0.320000 + 2013-03-19T02:41:40.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.700000 + 2013-03-19T02:41:40.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX + 0.071000 + 2013-03-19T02:41:40.000Z + us-west-2c + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-19T02:39:47.000Z + us-west-2a + + + m2.2xlarge + Windows + 0.224000 + 2013-03-19T02:39:37.000Z + us-west-2b + + + m2.2xlarge + Windows + 0.224000 + 2013-03-19T02:39:37.000Z + us-west-2a + + + m2.2xlarge + Windows + 0.224000 + 2013-03-19T02:39:37.000Z + us-west-2c + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-19T02:31:04.000Z + us-west-2c + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-19T02:30:36.000Z + us-west-2b + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-19T02:30:36.000Z + us-west-2a + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-19T02:30:36.000Z + us-west-2c + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-19T02:29:11.000Z + us-west-2b + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-19T02:29:11.000Z + us-west-2a + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-19T02:29:11.000Z + us-west-2c + + + m1.large + SUSE Linux + 0.050000 + 2013-03-19T02:27:22.000Z + us-west-2b + + + m1.large + SUSE Linux + 0.050000 + 2013-03-19T02:27:22.000Z + us-west-2a + + + m1.large + SUSE Linux + 0.050000 + 2013-03-19T02:27:22.000Z + us-west-2c + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-19T02:27:17.000Z + us-west-2b + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-19T02:27:17.000Z + us-west-2c + + + m2.xlarge + Windows + 0.112000 + 2013-03-19T02:27:15.000Z + us-west-2b + + + m2.xlarge + Windows + 0.112000 + 2013-03-19T02:27:15.000Z + us-west-2a + + + m2.xlarge + Windows + 0.112000 + 2013-03-19T02:27:15.000Z + us-west-2c + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-19T02:27:14.000Z + us-west-2b + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-19T02:27:13.000Z + us-west-2a + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-19T02:27:13.000Z + us-west-2c + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-19T02:27:08.000Z + us-west-2b + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-19T02:27:08.000Z + us-west-2a + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-19T02:27:08.000Z + us-west-2c + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-19T02:26:54.000Z + us-west-2b + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-19T02:26:54.000Z + us-west-2a + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-19T02:26:54.000Z + us-west-2c + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-19T02:25:44.000Z + us-west-2b + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-19T02:25:44.000Z + us-west-2a + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-19T02:25:44.000Z + us-west-2c + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-19T02:25:39.000Z + us-west-2b + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-19T02:25:39.000Z + us-west-2a + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-19T02:25:39.000Z + us-west-2c + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-19T02:25:05.000Z + us-west-2b + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-19T02:25:05.000Z + us-west-2a + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-19T02:25:05.000Z + us-west-2c + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-19T02:23:41.000Z + us-west-2b + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-19T02:23:41.000Z + us-west-2a + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-19T02:23:41.000Z + us-west-2c + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-19T02:23:35.000Z + us-west-2b + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-19T02:23:35.000Z + us-west-2a + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-19T02:23:35.000Z + us-west-2c + + + t1.micro + Linux/UNIX + 0.020000 + 2013-03-19T02:23:28.000Z + us-west-2b + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-19T02:21:42.000Z + us-west-2b + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-19T02:21:42.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-19T02:21:42.000Z + us-west-2c + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-19T02:21:41.000Z + us-west-2b + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-19T02:21:41.000Z + us-west-2a + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-19T02:21:41.000Z + us-west-2c + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-19T02:20:14.000Z + us-west-2b + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-19T02:20:14.000Z + us-west-2a + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-19T02:20:13.000Z + us-west-2b + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-19T02:20:13.000Z + us-west-2a + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-19T02:20:13.000Z + us-west-2c + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-19T02:20:12.000Z + us-west-2b + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-19T02:20:12.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-19T02:20:12.000Z + us-west-2c + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-19T02:20:07.000Z + us-west-2b + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-19T02:20:07.000Z + us-west-2a + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-19T02:20:07.000Z + us-west-2c + + + m2.4xlarge + Windows + 0.448000 + 2013-03-19T02:20:01.000Z + us-west-2b + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-19T02:20:00.000Z + us-west-2b + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-19T02:20:00.000Z + us-west-2a + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-19T02:20:00.000Z + us-west-2c + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-19T02:19:58.000Z + us-west-2b + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-19T02:19:58.000Z + us-west-2a + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-19T02:19:58.000Z + us-west-2c + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-19T02:19:55.000Z + us-west-2b + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-19T02:19:55.000Z + us-west-2a + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-19T02:19:55.000Z + us-west-2c + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-19T02:19:45.000Z + us-west-2b + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-19T02:19:45.000Z + us-west-2a + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-19T02:19:45.000Z + us-west-2c + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-19T02:19:42.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-19T02:19:42.000Z + us-west-2c + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-19T02:19:42.000Z + us-west-2b + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-19T02:19:42.000Z + us-west-2a + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-19T02:19:42.000Z + us-west-2c + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-19T02:19:40.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-19T02:19:40.000Z + us-west-2a + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-19T02:19:40.000Z + us-west-2c + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-19T02:19:39.000Z + us-west-2b + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-19T02:19:39.000Z + us-west-2a + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-19T02:19:39.000Z + us-west-2c + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-19T02:18:27.000Z + us-west-2b + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-19T02:18:27.000Z + us-west-2a + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-19T02:18:27.000Z + us-west-2c + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-19T02:18:26.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-19T02:18:24.000Z + us-west-2a + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-19T02:18:24.000Z + us-west-2c + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-19T02:18:22.000Z + us-west-2b + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-19T02:18:22.000Z + us-west-2a + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-19T02:18:22.000Z + us-west-2c + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-19T02:18:19.000Z + us-west-2b + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-19T02:18:19.000Z + us-west-2a + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-19T02:18:19.000Z + us-west-2c + + + m1.small + SUSE Linux + 0.021000 + 2013-03-19T02:18:13.000Z + us-west-2b + + + m1.small + SUSE Linux + 0.021000 + 2013-03-19T02:18:13.000Z + us-west-2a + + + m1.small + SUSE Linux + 0.021000 + 2013-03-19T02:18:13.000Z + us-west-2c + + + t1.micro + Linux/UNIX + 0.012000 + 2013-03-19T02:18:05.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T02:11:07.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T02:05:49.000Z + us-west-2b + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-19T01:35:25.000Z + us-west-2a + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-19T01:35:17.000Z + us-west-2a + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-19T01:35:03.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T01:26:10.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T01:19:03.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T01:13:42.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T01:08:16.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T00:59:14.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T00:52:06.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-19T00:50:21.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T00:46:47.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-19T00:41:08.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-19T00:25:41.000Z + us-west-2b + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-19T00:22:02.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-19T00:16:32.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-19T00:11:10.000Z + us-west-2b + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-19T00:00:11.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T23:55:08.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T23:49:46.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-18T23:46:14.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T23:40:51.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T23:40:51.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T23:35:34.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-18T23:33:48.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T23:30:15.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T23:24:54.000Z + us-west-2b + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-18T23:23:21.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T23:17:46.000Z + us-west-2b + + + c1.xlarge + Windows + 0.320000 + 2013-03-18T23:09:11.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T23:08:52.000Z + us-west-2b + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-18T23:07:03.000Z + us-west-2c + + + c1.xlarge + Windows + 0.320000 + 2013-03-18T23:03:44.000Z + us-west-2b + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-18T22:59:58.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T22:58:00.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T22:56:15.000Z + us-west-2a + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-18T22:48:55.000Z + us-west-2b + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-18T22:45:31.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-18T22:43:53.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T22:41:54.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-18T22:36:36.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T22:33:05.000Z + us-west-2a + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-18T22:29:33.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T22:09:56.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T22:04:37.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T21:59:18.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-18T21:57:30.000Z + us-west-2b + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-18T21:56:00.000Z + us-west-2a + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-18T21:55:53.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T21:53:58.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T21:48:36.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T21:43:18.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T21:41:30.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-18T21:38:00.000Z + us-west-2c + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-18T21:34:27.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.016000 + 2013-03-18T21:32:30.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T21:27:12.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-18T21:21:50.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-18T21:16:32.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-18T21:16:32.000Z + us-west-2a + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-18T21:16:32.000Z + us-west-2c + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-18T21:16:23.000Z + us-west-2c + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-18T21:16:15.000Z + us-west-2b + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-18T21:16:15.000Z + us-west-2a + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-18T21:16:15.000Z + us-west-2c + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-18T21:16:14.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-18T21:16:14.000Z + us-west-2a + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-18T21:16:14.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-18T21:11:14.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-18T21:11:14.000Z + us-west-2a + + + m2.4xlarge + Windows + 0.448000 + 2013-03-18T21:11:13.000Z + us-west-2a + + + m1.medium + Windows + 0.053000 + 2013-03-18T21:09:10.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T21:07:35.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-18T21:02:15.000Z + us-west-2b + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-18T20:55:10.000Z + us-west-2a + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-18T20:50:08.000Z + us-west-2c + + + c1.xlarge + Windows + 0.320000 + 2013-03-18T20:18:34.000Z + us-west-2a + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-18T19:58:37.000Z + us-west-2a + + + m1.small + Windows + 0.026000 + 2013-03-18T19:58:35.000Z + us-west-2a + + + m1.small + Windows + 0.026000 + 2013-03-18T19:58:35.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T19:53:30.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-18T19:46:32.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T19:39:31.000Z + us-west-2b + + + m1.medium + Windows + 0.053000 + 2013-03-18T19:37:34.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-18T19:34:15.000Z + us-west-2b + + + c1.medium + Windows + 0.080000 + 2013-03-18T19:33:55.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T19:25:29.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-18T19:22:08.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-18T19:20:13.000Z + us-west-2b + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-18T19:06:00.000Z + us-west-2a + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-18T19:04:39.000Z + us-west-2b + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-18T19:02:47.000Z + us-west-2b + + + m1.small + Windows + 0.026000 + 2013-03-18T19:02:31.000Z + us-west-2b + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-18T18:58:59.000Z + us-west-2c + + + m2.4xlarge + Windows + 0.448000 + 2013-03-18T18:23:45.000Z + us-west-2c + + + t1.micro + Windows + 0.009000 + 2013-03-18T18:20:00.000Z + us-west-2c + + + m1.large + Windows + 0.106000 + 2013-03-18T18:09:23.000Z + us-west-2b + + + t1.micro + Windows + 0.009000 + 2013-03-18T17:44:35.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T17:42:58.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T16:25:12.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T16:12:55.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-18T16:07:22.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T16:05:52.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-18T16:05:51.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T16:00:24.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.100000 + 2013-03-18T16:00:03.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.500000 + 2013-03-18T15:58:34.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.018000 + 2013-03-18T15:55:01.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-18T15:53:16.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T15:39:11.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.018000 + 2013-03-18T15:33:54.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T15:26:47.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T15:21:30.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T15:16:08.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T15:10:54.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T15:05:40.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T15:00:21.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T14:55:03.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-18T14:36:42.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-18T14:36:42.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-18T14:22:59.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T14:17:44.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-18T14:12:28.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T14:07:13.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-18T14:01:53.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T13:56:38.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T13:51:24.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T13:46:07.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T13:37:25.000Z + us-west-2b + + + m1.large + Windows + 0.106000 + 2013-03-18T13:30:11.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T12:50:04.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T12:43:06.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T12:36:08.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-18T12:34:15.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-18T12:29:21.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T12:27:22.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-18T12:23:44.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T11:57:38.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T11:48:47.000Z + us-west-2b + + + t1.micro + Windows + 0.009000 + 2013-03-18T11:45:08.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T11:40:01.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T11:33:02.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-18T11:22:31.000Z + us-west-2b + + + m1.large + Windows + 0.106000 + 2013-03-18T10:49:08.000Z + us-west-2a + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-18T10:09:02.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T10:03:53.000Z + us-west-2b + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-18T09:58:49.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T09:58:37.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-18T09:15:04.000Z + us-west-2b + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-18T09:08:06.000Z + us-west-2c + + + m1.large + Linux/UNIX + 0.042000 + 2013-03-18T08:59:25.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T08:22:45.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-18T08:14:05.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T08:08:53.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-18T08:03:39.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T07:58:22.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.016000 + 2013-03-18T07:53:09.000Z + us-west-2b + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-18T07:49:34.000Z + us-west-2a + + + c1.medium + Windows + 0.080000 + 2013-03-18T07:45:47.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T07:40:56.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.016000 + 2013-03-18T07:35:42.000Z + us-west-2b + + + m1.large + Linux/UNIX (Amazon VPC) + 0.042000 + 2013-03-18T07:16:29.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-18T07:15:04.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T06:43:35.000Z + us-west-2b + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-18T06:41:39.000Z + us-west-2b + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-18T06:41:39.000Z + us-west-2a + + + c1.xlarge + Linux/UNIX + 0.112000 + 2013-03-18T06:41:39.000Z + us-west-2c + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-18T06:41:35.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T06:38:26.000Z + us-west-2b + + + t1.micro + Linux/UNIX + 0.004000 + 2013-03-18T06:29:38.000Z + us-west-2b + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-18T06:21:27.000Z + us-west-2b + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-18T06:21:27.000Z + us-west-2a + + + m3.2xlarge + Windows (Amazon VPC) + 0.439000 + 2013-03-18T06:21:27.000Z + us-west-2c + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-18T06:21:25.000Z + us-west-2b + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-18T06:21:25.000Z + us-west-2a + + + m3.2xlarge + Linux/UNIX (Amazon VPC) + 0.183000 + 2013-03-18T06:21:25.000Z + us-west-2c + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-18T06:21:24.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-18T06:21:24.000Z + us-west-2a + + + m3.2xlarge + SUSE Linux (Amazon VPC) + 0.192000 + 2013-03-18T06:21:24.000Z + us-west-2c + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-18T06:17:30.000Z + us-west-2b + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-18T06:17:30.000Z + us-west-2a + + + m3.xlarge + Linux/UNIX (Amazon VPC) + 0.092000 + 2013-03-18T06:17:30.000Z + us-west-2c + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-18T06:15:57.000Z + us-west-2b + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-18T06:15:57.000Z + us-west-2a + + + m3.xlarge + Windows (Amazon VPC) + 0.220000 + 2013-03-18T06:15:57.000Z + us-west-2c + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-18T06:15:48.000Z + us-west-2b + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-18T06:15:48.000Z + us-west-2a + + + m3.xlarge + SUSE Linux (Amazon VPC) + 0.101000 + 2013-03-18T06:15:48.000Z + us-west-2c + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-18T06:12:40.000Z + us-west-2a + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-18T06:12:17.000Z + us-west-2b + + + m3.2xlarge + Windows + 0.439000 + 2013-03-18T06:05:30.000Z + us-west-2b + + + m3.2xlarge + Windows + 0.439000 + 2013-03-18T06:05:30.000Z + us-west-2a + + + m3.2xlarge + Windows + 0.439000 + 2013-03-18T06:05:30.000Z + us-west-2c + + + m3.xlarge + Windows + 0.220000 + 2013-03-18T06:04:13.000Z + us-west-2b + + + m3.xlarge + Windows + 0.220000 + 2013-03-18T06:04:13.000Z + us-west-2a + + + m3.xlarge + Windows + 0.220000 + 2013-03-18T06:04:13.000Z + us-west-2c + + + m1.medium + Windows + 0.053000 + 2013-03-18T05:56:47.000Z + us-west-2c + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-18T05:55:33.000Z + us-west-2b + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-18T05:55:33.000Z + us-west-2a + + + m3.2xlarge + SUSE Linux + 0.192000 + 2013-03-18T05:55:33.000Z + us-west-2c + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-18T05:55:33.000Z + us-west-2b + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-18T05:55:33.000Z + us-west-2a + + + m3.2xlarge + Linux/UNIX + 0.183000 + 2013-03-18T05:55:33.000Z + us-west-2c + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-18T05:50:08.000Z + us-west-2b + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-18T05:50:08.000Z + us-west-2a + + + m3.xlarge + SUSE Linux + 0.101000 + 2013-03-18T05:50:08.000Z + us-west-2c + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-18T05:50:07.000Z + us-west-2b + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-18T05:50:07.000Z + us-west-2a + + + m3.xlarge + Linux/UNIX + 0.092000 + 2013-03-18T05:50:07.000Z + us-west-2c + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-18T05:34:27.000Z + us-west-2b + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-18T05:34:27.000Z + us-west-2c + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-18T05:30:54.000Z + us-west-2b + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-18T05:29:08.000Z + us-west-2b + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-18T05:29:08.000Z + us-west-2a + + + t1.micro + SUSE Linux (Amazon VPC) + 0.009000 + 2013-03-18T05:29:08.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T05:20:39.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-18T05:15:23.000Z + us-west-2b + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-18T05:11:46.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T04:57:53.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-18T04:52:41.000Z + us-west-2c + + + c1.medium + Windows + 0.080000 + 2013-03-18T04:36:50.000Z + us-west-2c + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-18T03:48:40.000Z + us-west-2a + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-18T03:39:45.000Z + us-west-2a + + + c1.medium + Linux/UNIX (Amazon VPC) + 0.028000 + 2013-03-18T03:39:45.000Z + us-west-2c + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-18T03:29:33.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T03:15:47.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-18T03:05:25.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-18T03:00:13.000Z + us-west-2b + + + m1.xlarge + Windows + 0.211000 + 2013-03-18T02:43:15.000Z + us-west-2b + + + m1.xlarge + Windows + 0.211000 + 2013-03-18T02:43:15.000Z + us-west-2a + + + m1.xlarge + Windows + 0.211000 + 2013-03-18T02:43:15.000Z + us-west-2c + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-18T02:41:25.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-18T02:41:25.000Z + us-west-2c + + + t1.micro + Windows (Amazon VPC) + 0.009000 + 2013-03-18T02:39:33.000Z + us-west-2a + + + m2.2xlarge + Windows + 0.224000 + 2013-03-18T02:39:25.000Z + us-west-2b + + + m2.2xlarge + Windows + 0.224000 + 2013-03-18T02:39:25.000Z + us-west-2a + + + m2.2xlarge + Windows + 0.224000 + 2013-03-18T02:39:25.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.025000 + 2013-03-18T02:37:52.000Z + us-west-2c + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-18T02:29:26.000Z + us-west-2c + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-18T02:29:02.000Z + us-west-2b + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-18T02:29:02.000Z + us-west-2a + + + t1.micro + SUSE Linux + 0.009000 + 2013-03-18T02:29:02.000Z + us-west-2c + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-18T02:27:39.000Z + us-west-2b + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-18T02:27:39.000Z + us-west-2a + + + m2.xlarge + Windows (Amazon VPC) + 0.112000 + 2013-03-18T02:27:39.000Z + us-west-2c + + + m1.large + SUSE Linux + 0.050000 + 2013-03-18T02:25:51.000Z + us-west-2b + + + m1.large + SUSE Linux + 0.050000 + 2013-03-18T02:25:51.000Z + us-west-2a + + + m1.large + SUSE Linux + 0.050000 + 2013-03-18T02:25:51.000Z + us-west-2c + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-18T02:25:47.000Z + us-west-2b + + + m1.small + Windows (Amazon VPC) + 0.026000 + 2013-03-18T02:25:47.000Z + us-west-2c + + + m2.xlarge + Windows + 0.112000 + 2013-03-18T02:25:44.000Z + us-west-2b + + + m2.xlarge + Windows + 0.112000 + 2013-03-18T02:25:44.000Z + us-west-2a + + + m2.xlarge + Windows + 0.112000 + 2013-03-18T02:25:44.000Z + us-west-2c + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-18T02:25:42.000Z + us-west-2b + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-18T02:25:42.000Z + us-west-2a + + + m2.xlarge + SUSE Linux + 0.067000 + 2013-03-18T02:25:42.000Z + us-west-2c + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-18T02:25:37.000Z + us-west-2b + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-18T02:25:37.000Z + us-west-2a + + + m1.large + SUSE Linux (Amazon VPC) + 0.050000 + 2013-03-18T02:25:37.000Z + us-west-2c + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-18T02:25:25.000Z + us-west-2b + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-18T02:25:25.000Z + us-west-2a + + + c1.xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-18T02:25:25.000Z + us-west-2c + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-18T02:24:15.000Z + us-west-2b + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-18T02:24:15.000Z + us-west-2a + + + c1.xlarge + Windows (Amazon VPC) + 0.320000 + 2013-03-18T02:24:15.000Z + us-west-2c + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-18T02:24:11.000Z + us-west-2b + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-18T02:24:11.000Z + us-west-2a + + + c1.medium + SUSE Linux + 0.038000 + 2013-03-18T02:24:11.000Z + us-west-2c + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-18T02:23:39.000Z + us-west-2b + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-18T02:23:39.000Z + us-west-2a + + + c1.medium + SUSE Linux (Amazon VPC) + 0.038000 + 2013-03-18T02:23:39.000Z + us-west-2c + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-18T02:22:17.000Z + us-west-2b + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-18T02:22:17.000Z + us-west-2a + + + m2.4xlarge + SUSE Linux + 0.234000 + 2013-03-18T02:22:17.000Z + us-west-2c + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-18T02:22:13.000Z + us-west-2b + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-18T02:22:13.000Z + us-west-2a + + + m1.medium + SUSE Linux + 0.030000 + 2013-03-18T02:22:13.000Z + us-west-2c + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-18T02:20:25.000Z + us-west-2b + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-18T02:20:25.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux + 0.122000 + 2013-03-18T02:20:25.000Z + us-west-2c + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-18T02:20:24.000Z + us-west-2b + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-18T02:20:24.000Z + us-west-2a + + + c1.medium + Windows (Amazon VPC) + 0.080000 + 2013-03-18T02:20:24.000Z + us-west-2c + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-18T02:18:59.000Z + us-west-2b + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-18T02:18:59.000Z + us-west-2a + + + m1.medium + SUSE Linux (Amazon VPC) + 0.030000 + 2013-03-18T02:18:59.000Z + us-west-2c + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-18T02:18:58.000Z + us-west-2b + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-18T02:18:58.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-18T02:18:55.000Z + us-west-2b + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-18T02:18:55.000Z + us-west-2a + + + m2.2xlarge + SUSE Linux (Amazon VPC) + 0.122000 + 2013-03-18T02:18:55.000Z + us-west-2c + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-18T02:18:52.000Z + us-west-2b + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-18T02:18:52.000Z + us-west-2a + + + m2.4xlarge + SUSE Linux (Amazon VPC) + 0.234000 + 2013-03-18T02:18:52.000Z + us-west-2c + + + m2.4xlarge + Windows + 0.448000 + 2013-03-18T02:18:48.000Z + us-west-2b + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-18T02:18:46.000Z + us-west-2b + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-18T02:18:46.000Z + us-west-2a + + + m2.2xlarge + Windows (Amazon VPC) + 0.224000 + 2013-03-18T02:18:46.000Z + us-west-2c + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-18T02:18:45.000Z + us-west-2b + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-18T02:18:45.000Z + us-west-2a + + + m1.xlarge + SUSE Linux + 0.090000 + 2013-03-18T02:18:45.000Z + us-west-2c + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-18T02:18:43.000Z + us-west-2b + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-18T02:18:43.000Z + us-west-2a + + + m1.small + SUSE Linux (Amazon VPC) + 0.021000 + 2013-03-18T02:18:43.000Z + us-west-2c + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-18T02:18:35.000Z + us-west-2b + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-18T02:18:35.000Z + us-west-2a + + + c1.xlarge + SUSE Linux + 0.122000 + 2013-03-18T02:18:35.000Z + us-west-2c + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-18T02:18:32.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-18T02:18:32.000Z + us-west-2a + + + m2.xlarge + Linux/UNIX (Amazon VPC) + 0.056000 + 2013-03-18T02:18:32.000Z + us-west-2c + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-18T02:18:30.000Z + us-west-2c + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-18T02:18:30.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-18T02:18:30.000Z + us-west-2a + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-18T02:18:30.000Z + us-west-2b + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-18T02:18:30.000Z + us-west-2a + + + m2.xlarge + SUSE Linux (Amazon VPC) + 0.067000 + 2013-03-18T02:18:30.000Z + us-west-2c + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-18T02:18:29.000Z + us-west-2b + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-18T02:18:29.000Z + us-west-2a + + + m1.xlarge + SUSE Linux (Amazon VPC) + 0.090000 + 2013-03-18T02:18:29.000Z + us-west-2c + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-18T02:17:17.000Z + us-west-2b + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-18T02:17:17.000Z + us-west-2a + + + m1.medium + Windows (Amazon VPC) + 0.053000 + 2013-03-18T02:17:17.000Z + us-west-2c + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-18T02:17:16.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-18T02:17:13.000Z + us-west-2a + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-18T02:17:13.000Z + us-west-2c + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-18T02:17:13.000Z + us-west-2b + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-18T02:17:13.000Z + us-west-2a + + + m1.large + Windows (Amazon VPC) + 0.106000 + 2013-03-18T02:17:13.000Z + us-west-2c + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-18T02:17:11.000Z + us-west-2b + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-18T02:17:11.000Z + us-west-2a + + + m2.4xlarge + Windows (Amazon VPC) + 0.448000 + 2013-03-18T02:17:11.000Z + us-west-2c + + + m1.small + SUSE Linux + 0.021000 + 2013-03-18T02:17:02.000Z + us-west-2b + + + m1.small + SUSE Linux + 0.021000 + 2013-03-18T02:17:02.000Z + us-west-2a + + + m1.small + SUSE Linux + 0.021000 + 2013-03-18T02:17:02.000Z + us-west-2c + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-18T01:35:22.000Z + us-west-2a + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-18T01:35:14.000Z + us-west-2a + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-18T01:35:01.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-18T01:28:09.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX (Amazon VPC) + 0.083000 + 2013-03-18T00:40:51.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX + 0.253000 + 2013-03-18T00:23:52.000Z + us-west-2b + + + m1.medium + Linux/UNIX (Amazon VPC) + 0.021000 + 2013-03-18T00:20:23.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T23:59:22.000Z + us-west-2c + + + c1.xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-17T23:59:02.000Z + us-west-2a + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-17T23:45:21.000Z + us-west-2c + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-17T23:23:06.000Z + us-west-2b + + + c1.xlarge + Windows + 0.320000 + 2013-03-17T23:07:43.000Z + us-west-2c + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-17T23:05:41.000Z + us-west-2c + + + c1.xlarge + Windows + 0.320000 + 2013-03-17T23:02:30.000Z + us-west-2b + + + m1.xlarge + Windows (Amazon VPC) + 0.211000 + 2013-03-17T22:58:48.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T22:49:51.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-17T22:48:01.000Z + us-west-2b + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-17T22:44:39.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-17T22:44:37.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX (Amazon VPC) + 0.112000 + 2013-03-17T22:43:03.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T22:39:28.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-17T22:34:17.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T22:32:32.000Z + us-west-2a + + + m2.4xlarge + Linux/UNIX + 0.224000 + 2013-03-17T22:29:07.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T22:28:58.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-17T22:27:17.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-17T22:23:49.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T22:15:09.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.020000 + 2013-03-17T22:09:55.000Z + us-west-2b + + + m1.xlarge + Linux/UNIX + 0.083000 + 2013-03-17T21:56:05.000Z + us-west-2b + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-17T21:54:37.000Z + us-west-2a + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-17T21:54:29.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T21:50:54.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T21:45:44.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-17T21:37:09.000Z + us-west-2c + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-17T21:33:44.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T21:33:38.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T21:28:25.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-17T21:16:27.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-17T21:16:27.000Z + us-west-2a + + + cr1.8xlarge + Linux/UNIX (Amazon VPC) + 0.343000 + 2013-03-17T21:16:27.000Z + us-west-2c + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-17T21:16:18.000Z + us-west-2c + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-17T21:16:11.000Z + us-west-2b + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-17T21:16:11.000Z + us-west-2a + + + cr1.8xlarge + SUSE Linux + 0.351000 + 2013-03-17T21:16:11.000Z + us-west-2c + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-17T21:16:10.000Z + us-west-2b + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-17T21:16:10.000Z + us-west-2a + + + cr1.8xlarge + Linux/UNIX + 0.343000 + 2013-03-17T21:16:10.000Z + us-west-2c + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-17T21:09:40.000Z + us-west-2b + + + cc2.8xlarge + Linux/UNIX (Amazon VPC) + 0.253000 + 2013-03-17T21:09:40.000Z + us-west-2a + + + m2.4xlarge + Windows + 0.448000 + 2013-03-17T21:09:38.000Z + us-west-2a + + + m1.medium + Windows + 0.053000 + 2013-03-17T21:07:41.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T21:00:58.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T20:54:10.000Z + us-west-2b + + + m1.medium + Linux/UNIX + 0.021000 + 2013-03-17T20:54:10.000Z + us-west-2a + + + c1.medium + Linux/UNIX + 0.028000 + 2013-03-17T20:49:16.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T20:35:15.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T20:28:22.000Z + us-west-2b + + + c1.xlarge + Windows + 0.320000 + 2013-03-17T20:18:16.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T20:02:36.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T19:57:27.000Z + us-west-2b + + + m2.2xlarge + Linux/UNIX + 0.112000 + 2013-03-17T19:57:21.000Z + us-west-2a + + + m1.small + Windows + 0.026000 + 2013-03-17T19:57:19.000Z + us-west-2a + + + m1.small + Windows + 0.026000 + 2013-03-17T19:57:19.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T19:48:52.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.013000 + 2013-03-17T19:43:45.000Z + us-west-2b + + + m1.medium + Windows + 0.053000 + 2013-03-17T19:36:42.000Z + us-west-2b + + + c1.medium + Windows + 0.080000 + 2013-03-17T19:33:09.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T19:31:45.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T19:26:35.000Z + us-west-2b + + + m2.4xlarge + Linux/UNIX (Amazon VPC) + 0.224000 + 2013-03-17T19:21:35.000Z + us-west-2a + + + t1.micro + Linux/UNIX (Amazon VPC) + 0.004000 + 2013-03-17T19:05:52.000Z + us-west-2a + + + cc2.8xlarge + Windows (Amazon VPC) + 0.456000 + 2013-03-17T19:04:33.000Z + us-west-2b + + + cc2.8xlarge + Windows + 0.456000 + 2013-03-17T19:02:39.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T19:02:33.000Z + us-west-2b + + + m1.small + Windows + 0.026000 + 2013-03-17T19:02:23.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T18:57:23.000Z + us-west-2b + + + m1.small + Linux/UNIX (Amazon VPC) + 0.010000 + 2013-03-17T18:57:18.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T18:50:37.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T18:43:49.000Z + us-west-2b + + + m2.4xlarge + Windows + 0.448000 + 2013-03-17T18:23:08.000Z + us-west-2c + + + t1.micro + Windows + 0.009000 + 2013-03-17T18:19:34.000Z + us-west-2c + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T18:18:00.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.014000 + 2013-03-17T18:12:53.000Z + us-west-2b + + + m1.large + Windows + 0.106000 + 2013-03-17T18:09:17.000Z + us-west-2b + + + t1.micro + Windows + 0.009000 + 2013-03-17T17:43:27.000Z + us-west-2a + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T16:53:53.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T16:45:25.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T16:40:15.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T16:35:11.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T15:23:38.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T15:18:34.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.010000 + 2013-03-17T15:13:27.000Z + us-west-2b + + + m1.small + Linux/UNIX + 0.012000 + 2013-03-17T15:03:14.000Z + us-west-2b + + + m2.xlarge + Linux/UNIX + 0.056000 + 2013-03-17T14:35:51.000Z + us-west-2a + + + Qj9iZzP9N1Vh5jjNyad6X73sizWaPtVQ6328oKe9/GbmNSbOFX1TIhQaz5vok0nu + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-subnets.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-subnets.json new file mode 100644 index 0000000000000000000000000000000000000000..1c775de36a41df1d8bacb44b0d7a21791da9fa8b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-subnets.json @@ -0,0 +1,17 @@ +{ + "Subnets": [ + { + "VpcId": "vpc-8d2910e4", + "CidrBlock": "10.0.0.0/24", + "MapPublicIpOnLaunch": false, + "DefaultForAz": false, + "State": "available", + "AvailabilityZone": "us-west-2a", + "SubnetId": "subnet-812910e8", + "AvailableIpAddressCount": 251 + } + ], + "ResponseMetadata": { + "RequestId": "00759e83-6720-41e3-bb47-7f2cad470782" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-subnets.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-subnets.xml new file mode 100644 index 0000000000000000000000000000000000000000..f068af36e8ba40297af3a8b9a7ed166f2e9744d4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-subnets.xml @@ -0,0 +1,16 @@ + + + 00759e83-6720-41e3-bb47-7f2cad470782 + + + subnet-812910e8 + available + vpc-8d2910e4 + 10.0.0.0/24 + 251 + us-west-2a + false + false + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-tags.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-tags.json new file mode 100644 index 0000000000000000000000000000000000000000..d2f4b9c1b526586df4149172b5c43459a01b9869 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-tags.json @@ -0,0 +1,13 @@ +{ + "ResponseMetadata": { + "RequestId": "902d44a6-9456-4df3-9dcf-f2a26b77da7c" + }, + "Tags": [ + { + "ResourceType": "instance", + "ResourceId": "i-fde9cece", + "Value": "", + "Key": "notebook" + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-tags.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-tags.xml new file mode 100644 index 0000000000000000000000000000000000000000..42eec8d555f1ed5cab63ebcc06d8d0567a80e1aa --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-tags.xml @@ -0,0 +1,12 @@ + + + 902d44a6-9456-4df3-9dcf-f2a26b77da7c + + + i-fde9cece + instance + notebook + + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volume-status.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volume-status.json new file mode 100644 index 0000000000000000000000000000000000000000..c5e5c1f7637f587b99772970d43f979af77cc68a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volume-status.json @@ -0,0 +1,45 @@ +{ + "ResponseMetadata": { + "RequestId": "2e8b63e6-0016-4fa8-9cf0-49bcaa991c6b" + }, + "VolumeStatuses": [ + { + "VolumeStatus": { + "Status": "ok", + "Details": [ + { + "Status": "passed", + "Name": "io-enabled" + }, + { + "Status": "not-applicable", + "Name": "io-performance" + } + ] + }, + "AvailabilityZone": "us-west-2a", + "VolumeId": "vol-bc71579a", + "Actions": [], + "Events": [] + }, + { + "VolumeStatus": { + "Status": "ok", + "Details": [ + { + "Status": "passed", + "Name": "io-enabled" + }, + { + "Status": "not-applicable", + "Name": "io-performance" + } + ] + }, + "AvailabilityZone": "us-west-2b", + "VolumeId": "vol-a8d2e991", + "Actions": [], + "Events": [] + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volume-status.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volume-status.xml new file mode 100644 index 0000000000000000000000000000000000000000..7bfc776b32d69aaf83aa811c5d041d37cc53d0d1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volume-status.xml @@ -0,0 +1,44 @@ + + + 2e8b63e6-0016-4fa8-9cf0-49bcaa991c6b + + + vol-bc71579a + us-west-2a + + ok +
    + + io-enabled + passed + + + io-performance + not-applicable + +
    +
    + + +
    + + vol-a8d2e991 + us-west-2b + + ok +
    + + io-enabled + passed + + + io-performance + not-applicable + +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volumes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volumes.json new file mode 100644 index 0000000000000000000000000000000000000000..9ad746f12f06d22a45c02d33136b46171809e0f0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volumes.json @@ -0,0 +1,45 @@ +{ + "ResponseMetadata": { + "RequestId": "93f17066-e6f7-4fc2-8308-2c49c99ab86b" + }, + "Volumes": [ + { + "AvailabilityZone": "us-west-2a", + "Attachments": [ + { + "AttachTime": "2012-10-16T20:00:21.000Z", + "InstanceId": "i-fde9cece", + "VolumeId": "vol-bc71579a", + "State": "attached", + "DeleteOnTermination": true, + "Device": "/dev/sda1" + } + ], + "VolumeType": "standard", + "VolumeId": "vol-bc71579a", + "State": "in-use", + "SnapshotId": "snap-2723f74f", + "CreateTime": "2012-10-16T20:00:16.000Z", + "Size": 8 + }, + { + "AvailabilityZone": "us-west-2b", + "Attachments": [ + { + "AttachTime": "2013-03-09T16:44:07.000Z", + "InstanceId": "i-78f1b94a", + "VolumeId": "vol-a8d2e991", + "State": "attached", + "DeleteOnTermination": true, + "Device": "/dev/sda1" + } + ], + "VolumeType": "standard", + "VolumeId": "vol-a8d2e991", + "State": "in-use", + "SnapshotId": "snap-3d367c04", + "CreateTime": "2013-03-09T16:43:57.000Z", + "Size": 30 + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volumes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volumes.xml new file mode 100644 index 0000000000000000000000000000000000000000..e4c065bbd495f99b7de6636f17dd71b1c9b19105 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-volumes.xml @@ -0,0 +1,44 @@ + + + 93f17066-e6f7-4fc2-8308-2c49c99ab86b + + + vol-bc71579a + 8 + snap-2723f74f + us-west-2a + in-use + 2012-10-16T20:00:16.000Z + + + vol-bc71579a + i-fde9cece + /dev/sda1 + attached + 2012-10-16T20:00:21.000Z + true + + + standard + + + vol-a8d2e991 + 30 + snap-3d367c04 + us-west-2b + in-use + 2013-03-09T16:43:57.000Z + + + vol-a8d2e991 + i-78f1b94a + /dev/sda1 + attached + 2013-03-09T16:44:07.000Z + true + + + standard + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpcs.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpcs.json new file mode 100644 index 0000000000000000000000000000000000000000..e2edaf692312b37721d9636dedd6a0fa2f5889b9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpcs.json @@ -0,0 +1,15 @@ +{ + "Vpcs": [ + { + "VpcId": "vpc-8d2910e4", + "InstanceTenancy": "default", + "State": "available", + "DhcpOptionsId": "dopt-eb291082", + "CidrBlock": "10.0.0.0/16", + "IsDefault": false + } + ], + "ResponseMetadata": { + "RequestId": "ed65eddd-6d71-4eee-bc93-83d3a672c209" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpcs.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..3e070f68d3f7f0de71900ee1be5fa9f1e6d729f2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpcs.xml @@ -0,0 +1,14 @@ + + + ed65eddd-6d71-4eee-bc93-83d3a672c209 + + + vpc-8d2910e4 + available + 10.0.0.0/16 + dopt-eb291082 + default + false + + + \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-connections.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-connections.json new file mode 100644 index 0000000000000000000000000000000000000000..6bed6ad7a995fcc2578d17db163cac6c58c4ffa0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-connections.json @@ -0,0 +1,8 @@ +{"ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"}, + "VpnConnections": [{"CustomerGatewayConfiguration": "Gateway Info", + "CustomerGatewayId": "cgw-b4dc3961", + "State": "available", + "Tags": [], + "Type": "ipsec.1", + "VpnConnectionId": "vpn-44a8938f", + "VpnGatewayId": "vgw-8db04f81"}]} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-connections.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-connections.xml new file mode 100644 index 0000000000000000000000000000000000000000..a6b2f72368a03895921afad4117a3a332487fe3c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-connections.xml @@ -0,0 +1,15 @@ + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + + vpn-44a8938f + available + Gateway Info + ipsec.1 + cgw-b4dc3961 + vgw-8db04f81 + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-gateways.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-gateways.json new file mode 100644 index 0000000000000000000000000000000000000000..0b749bf14ec61a794636bd521028ddb6c87db403 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-gateways.json @@ -0,0 +1,8 @@ +{"ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"}, + "VpnGateways": [{"AvailabilityZone": "us-east-1a", + "State": "available", + "Tags": [], + "Type": "ipsec.1", + "VpcAttachments": [{"State": "attached", + "VpcId": "vpc-1a2b3c4d"}], + "VpnGatewayId": "vgw-8db04f81"}]} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-gateways.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-gateways.xml new file mode 100644 index 0000000000000000000000000000000000000000..578bcd191eedba14677a6b7e8bc38b9205ea1ae0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-describe-vpn-gateways.xml @@ -0,0 +1,19 @@ + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + + vgw-8db04f81 + available + ipsec.1 + us-east-1a + + + vpc-1a2b3c4d + attached + + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-network-interface.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-network-interface.json new file mode 100644 index 0000000000000000000000000000000000000000..8db0e5f6adeb21037bc9ecb16164460103ba45e1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-network-interface.json @@ -0,0 +1,3 @@ +{ + "ResponseMetadata": {"RequestId": "ce540707-0635-46bc-97da-33a8a362a0e8"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-network-interface.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-network-interface.xml new file mode 100644 index 0000000000000000000000000000000000000000..299dee9750cf6a3bf6629296085aa5f8ea08b006 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-network-interface.xml @@ -0,0 +1,4 @@ + + ce540707-0635-46bc-97da-33a8a362a0e8 + true + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-volume.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-volume.json new file mode 100644 index 0000000000000000000000000000000000000000..7e6c3a42823485f473ef19c9556a6dae275fe521 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-volume.json @@ -0,0 +1,10 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "AttachTime": "YYYY-MM-DDTHH:MM:SS.000Z", + "InstanceId": "i-1a2b3c4d", + "VolumeId": "vol-1a2b3c4d", + "State": "detaching", + "Device": "/dev/sdh" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-volume.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-volume.xml new file mode 100644 index 0000000000000000000000000000000000000000..79ca6c01631adc982e8c7d43722c310abf54dbc0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-detach-volume.xml @@ -0,0 +1,8 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + vol-1a2b3c4d + i-1a2b3c4d + /dev/sdh + detaching + YYYY-MM-DDTHH:MM:SS.000Z + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-get-password-data.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-get-password-data.json new file mode 100644 index 0000000000000000000000000000000000000000..86928ff815fbf88bf5571a2a29298b2456f4c4be --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-get-password-data.json @@ -0,0 +1,8 @@ +{ + "InstanceId": "i-2574e22a", + "Timestamp": "2009-10-24 15:00:00", + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "PasswordData": "TGludXggdmVyc2lvbiAyLjYuMTYteGVuVSAoYnVpbGRlckBwYXRjaGJhdC5hbWF6b25zYSkgKGdj" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-get-password-data.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-get-password-data.xml new file mode 100644 index 0000000000000000000000000000000000000000..da0830d931aac27101d3d37b355d84db5e0986a2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-get-password-data.xml @@ -0,0 +1,6 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + i-2574e22a + 2009-10-24 15:00:00 + TGludXggdmVyc2lvbiAyLjYuMTYteGVuVSAoYnVpbGRlckBwYXRjaGJhdC5hbWF6b25zYSkgKGdj + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-instance.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-instance.json new file mode 100644 index 0000000000000000000000000000000000000000..a2ca2bf0f9c0e7f4277d53c42b08753b2bdd8970 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-instance.json @@ -0,0 +1,29 @@ +{ + "ConversionTask": { + "ConversionTaskId": "import-i-ffvko9js", + "ImportInstance": { + "InstanceId": "i-12655a7f", + "Description": "", + "Volumes": [ + { + "Status": "active", + "AvailabilityZone": "us-east-1a", + "Description": "", + "Image": { + "Size": 1179593728, + "ImportManifestUrl": "https://s3.amazonaws.com/myawsbucket/a3a5e1b6-590d-43cc-97c1-15c7325d3f41/Win_2008_Server_Data_Center_SP2_32-bit.vmdkmanifest.xml?AWSaccessKeyId=AKIAIOSFODNN7EXAMPLE%26Expires=1294855591%26Signature=5snej01T1TtL0uR7KExtEXAMPLE%3D", + "Format": "VMDK" + }, + "Volume": { + "Id": "vol-1a2b3c4d", + "Size": 12 + }, + "BytesConverted": 0, + "StatusMessage": "" + } + ] + }, + "ExpirationTime": "2010-12-22T12:01Z" + }, + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-instance.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-instance.xml new file mode 100644 index 0000000000000000000000000000000000000000..33a6e61dd624b157d39be904289e036a3a0231b5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-instance.xml @@ -0,0 +1,29 @@ + + + import-i-ffvko9js + 2010-12-22T12:01Z + + + + 0 + us-east-1a + + VMDK + 1179593728 + https://s3.amazonaws.com/myawsbucket/a3a5e1b6-590d-43cc-97c1-15c7325d3f41/Win_2008_Server_Data_Center_SP2_32-bit.vmdkmanifest.xml?AWSaccessKeyId=AKIAIOSFODNN7EXAMPLE%26Expires=1294855591%26Signature=5snej01T1TtL0uR7KExtEXAMPLE%3D + + + + 12 + vol-1a2b3c4d + + active + + + + i-12655a7f + + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-key-pair.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-key-pair.json new file mode 100644 index 0000000000000000000000000000000000000000..e39d6b218c07bcd4df6b84efc0f067ab8d1180d3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-key-pair.json @@ -0,0 +1,7 @@ +{ + "KeyName": "gsg-keypair", + "KeyFingerprint": "00:00:00: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-key-pair.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-key-pair.xml new file mode 100644 index 0000000000000000000000000000000000000000..1d9036193c096595e1305379910a38edc531935d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-key-pair.xml @@ -0,0 +1,5 @@ + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + gsg-keypair + 00:00:00: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-volume.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-volume.json new file mode 100644 index 0000000000000000000000000000000000000000..d53be2a89d2a6f1c84e27eb714ff56e8d7b5ee66 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-volume.json @@ -0,0 +1,24 @@ +{ + "ConversionTask": { + "ConversionTaskId": "import-i-fh95npoc", + "ImportVolume": { + "Volume": { + "Id": "vol-34d8a2ff", + "Size": 8 + }, + "Image": { + "Checksum": "ccb1b0536a4a70e86016b85229b5c6b10b14a4eb", + "Size": 128696320, + "ImportManifestUrl": "https://s3.amazonaws.com/myawsbucket/a3a5e1b6-590d-43cc-97c1-15c7325d3f41/Win_2008_Server_Data_Center_SP2_32-bit.vmdkmanifest.xml?AWSaccessKeyId=AKIAIOSFODNN7EXAMPLE%26Expires=1294855591%26Signature=5snej01T1TtL0uR7KExtEXAMPLE%3D", + "Format": "VDMK" + }, + "BytesConverted": 0, + "Description": "", + "AvailabilityZone": "us-east-1c" + }, + "ExpirationTime": "2010-12-22T12:01Z", + "State": "active", + "StatusMessage": "" + }, + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-volume.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-volume.xml new file mode 100644 index 0000000000000000000000000000000000000000..bec04f67871b77285ceef90175a0be6168ed4bbd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-import-volume.xml @@ -0,0 +1,24 @@ + + + import-i-fh95npoc + 2010-12-22T12:01Z + + 0 + us-east-1c + + + VDMK + 128696320 + https://s3.amazonaws.com/myawsbucket/a3a5e1b6-590d-43cc-97c1-15c7325d3f41/Win_2008_Server_Data_Center_SP2_32-bit.vmdkmanifest.xml?AWSaccessKeyId=AKIAIOSFODNN7EXAMPLE%26Expires=1294855591%26Signature=5snej01T1TtL0uR7KExtEXAMPLE%3D + ccb1b0536a4a70e86016b85229b5c6b10b14a4eb + + + 8 + vol-34d8a2ff + + + active + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-modify-snapshot-attribute.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-modify-snapshot-attribute.json new file mode 100644 index 0000000000000000000000000000000000000000..57ab0c34f788728a4b2a23e3cc3cf183c9e69326 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-modify-snapshot-attribute.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-modify-snapshot-attribute.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-modify-snapshot-attribute.xml new file mode 100644 index 0000000000000000000000000000000000000000..c68342c723b4ec061b0ab1e3c4db9b14da0bc2da --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-modify-snapshot-attribute.xml @@ -0,0 +1,4 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + true + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-monitor-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-monitor-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..c010a169f1dfd32ee0b6b983867c2cb078f716e5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-monitor-instances.json @@ -0,0 +1,19 @@ +{ + "InstanceMonitorings": [ + { + "InstanceId": "i-43a4412a", + "Monitoring": { + "State": "pending" + } + }, + { + "InstanceId": "i-23a3397d", + "Monitoring": { + "State": "pending" + } + } + ], + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-monitor-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-monitor-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..35c2847ca6a89197cd9f18eb998627d49a3db1a0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-monitor-instances.xml @@ -0,0 +1,17 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + i-43a4412a + + pending + + + + i-23a3397d + + pending + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-register-image.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-register-image.json new file mode 100644 index 0000000000000000000000000000000000000000..897d4b0946db642db57737151df21ff7f2ade215 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-register-image.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + }, + "ImageId": "ami-1a2b3c4d" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-register-image.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-register-image.xml new file mode 100644 index 0000000000000000000000000000000000000000..2170bdf10a1adc30876b241672cff81a723d35e4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-register-image.xml @@ -0,0 +1,4 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + ami-1a2b3c4d + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-replace-network-acl-association.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-replace-network-acl-association.json new file mode 100644 index 0000000000000000000000000000000000000000..c2e7e4e69905994ee283d614f2e3868bfebcf728 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-replace-network-acl-association.json @@ -0,0 +1,6 @@ +{ + "NewAssociationId": "aclassoc-17b85d7e", + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-replace-network-acl-association.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-replace-network-acl-association.xml new file mode 100644 index 0000000000000000000000000000000000000000..c4d9b23a48241ea6db3a33586b413a4f218ce95e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-replace-network-acl-association.xml @@ -0,0 +1,4 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + aclassoc-17b85d7e + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-request-spot-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-request-spot-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..51c7fb5e3f8964599aa15fefc94959eb93c0615b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-request-spot-instances.json @@ -0,0 +1,29 @@ +{ + "SpotInstanceRequests": [ + { + "ProductDescription": "Linux/UNIX", + "SpotInstanceRequestId": "sir-1a2b3c4d", + "State": "open", + "AvailabilityZoneGroup": "MyAzGroup", + "LaunchSpecification": { + "EbsOptimized": false, + "BlockDeviceMappings": [], + "Monitoring": {"Enabled": false}, + "SecurityGroups": [ + { + "GroupName": "", + "GroupId": "" + } + ], + "InstanceType": "m1.small", + "ImageId": "ami-1a2b3c4d" + }, + "Type": "one-time", + "CreateTime": "YYYY-MM-DDTHH:MM:SS.000Z", + "SpotPrice": "0.5" + } + ], + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-request-spot-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-request-spot-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..78509cf4a80b202b237812181b70de9cbd63e410 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-request-spot-instances.xml @@ -0,0 +1,29 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + sir-1a2b3c4d + 0.5 + one-time + open + MyAzGroup + + ami-1a2b3c4d + + + + + + + m1.small + + + false + + false + + YYYY-MM-DDTHH:MM:SS.000Z + Linux/UNIX + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-run-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-run-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..c0b72c9b5b97e5aa868b106ef5555412fe12161c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-run-instances.json @@ -0,0 +1,80 @@ +{ + "OwnerId": "111122223333", + "ReservationId": "r-157ad274", + "ResponseMetadata": { + "RequestId": "e86ff3c8-2400-45e3-a4e7-f158a69283d4" + }, + "Groups": [], + "Instances": [ + { + "Monitoring": { + "State": "disabled" + }, + "PublicDnsName": "", + "StateReason": { + "Message": "pending", + "Code": "pending" + }, + "State": { + "Code": 0, + "Name": "pending" + }, + "LaunchTime": "2011-12-20T08:29:31.000Z", + "PrivateIpAddress": "10.0.0.142", + "ProductCodes": [], + "VpcId": "vpc-1ea24976", + "StateTransitionReason": "", + "InstanceId": "i-0ee0356c", + "ImageId": "ami-31814f58", + "PrivateDnsName": "", + "SecurityGroups": [ + { + "GroupName": "default", + "GroupId": "sg-050c1369" + } + ], + "ClientToken": "", + "SubnetId": "subnet-b2a249da", + "InstanceType": "m1.small", + "NetworkInterfaces": [ + { + "Status": "in-use", + "SourceDestCheck": true, + "VpcId": "vpc-1ea24976", + "Description": "", + "NetworkInterfaceId": "eni-c6bb50ae", + "Attachment": { + "Status": "attaching", + "DeviceIndex": 0, + "DeleteOnTermination": true, + "AttachmentId": "eni-attach-0326646a", + "AttachTime": "2011-12-20T08:29:31.000Z" + }, + "Groups": [ + { + "GroupName": "default", + "GroupId": "sg-050c1369" + } + ], + "SubnetId": "subnet-b2a249da", + "OwnerId": "111122223333", + "PrivateIpAddress": "10.0.0.142" + } + ], + "SourceDestCheck": true, + "Placement": { + "GroupName": "", + "Tenancy": "default", + "AvailabilityZone": "us-east-1b" + }, + "Hypervisor": "xen", + "BlockDeviceMappings": [], + "Architecture": "i386", + "KernelId": "aki-805ea7e9", + "RootDeviceName": "/dev/sda1", + "VirtualizationType": "paravirtual", + "RootDeviceType": "ebs", + "AmiLaunchIndex": 0 + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-run-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-run-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..151ee1e702877fb946475bc76e59a9dfbe7b29ae --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-run-instances.xml @@ -0,0 +1,78 @@ + + e86ff3c8-2400-45e3-a4e7-f158a69283d4 + r-157ad274 + 111122223333 + + + + i-0ee0356c + ami-31814f58 + + 0 + pending + + + + + 0 + + m1.small + 2011-12-20T08:29:31.000Z + + us-east-1b + + default + + aki-805ea7e9 + + disabled + + subnet-b2a249da + vpc-1ea24976 + 10.0.0.142 + true + + + sg-050c1369 + default + + + + pending + pending + + i386 + ebs + /dev/sda1 + + paravirtual + + xen + + + eni-c6bb50ae + subnet-b2a249da + vpc-1ea24976 + + 111122223333 + in-use + 10.0.0.142 + true + + + sg-050c1369 + default + + + + eni-attach-0326646a + 0 + attaching + 2011-12-20T08:29:31.000Z + true + + + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-start-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-start-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..ab5b0d205aff7e9a55e6fa81e61e6e65928bd49e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-start-instances.json @@ -0,0 +1,18 @@ +{ + "StartingInstances": [ + { + "InstanceId": "i-10a64379", + "CurrentState": { + "Code": 0, + "Name": "pending" + }, + "PreviousState": { + "Code": 80, + "Name": "stopped" + } + } + ], + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-start-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-start-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..6670e4725fa4b2e4c6bedbc4313533a4fc2eb7e6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-start-instances.xml @@ -0,0 +1,16 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + i-10a64379 + + 0 + pending + + + 80 + stopped + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-stop-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-stop-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..7665461a790269f03ddb1bb19a96b3b496b96883 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-stop-instances.json @@ -0,0 +1,18 @@ +{ + "StoppingInstances": [ + { + "InstanceId": "i-10a64379", + "CurrentState": { + "Code": 64, + "Name": "stopping" + }, + "PreviousState": { + "Code": 16, + "Name": "running" + } + } + ], + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-stop-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-stop-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..d10948e16d6a168702f3c07fb17e9e0dc68400d4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-stop-instances.xml @@ -0,0 +1,16 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + i-10a64379 + + 64 + stopping + + + 16 + running + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-unmonitor-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-unmonitor-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..cd328d6543216afd24c694099bf6c638d0e15ca6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-unmonitor-instances.json @@ -0,0 +1,19 @@ +{ + "InstanceMonitorings": [ + { + "InstanceId": "i-43a4412a", + "Monitoring": { + "State": "disabled" + } + }, + { + "InstanceId": "i-23a3397d", + "Monitoring": { + "State": "disabled" + } + } + ], + "ResponseMetadata": { + "RequestId": "59dbff89-35bd-4eac-99ed-be587EXAMPLE" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-unmonitor-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-unmonitor-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..65f76defe3d1b6fc853170f8da247b8271d14866 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ec2-unmonitor-instances.xml @@ -0,0 +1,17 @@ + + 59dbff89-35bd-4eac-99ed-be587EXAMPLE + + + i-43a4412a + + disabled + + + + i-23a3397d + + disabled + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-check-dns-availability.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-check-dns-availability.json new file mode 100644 index 0000000000000000000000000000000000000000..b7fee88a238c099d7bb8e8f3b9954b39e4304604 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-check-dns-availability.json @@ -0,0 +1,7 @@ +{ + "Available": true, + "FullyQualifiedCNAME": "sampleapplication.elasticbeanstalk.amazonaws.com", + "ResponseMetadata": { + "RequestId": "12f6701f-f1d6-11df-8a78-9f77047e0d0c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-check-dns-availability.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-check-dns-availability.xml new file mode 100644 index 0000000000000000000000000000000000000000..c31c487fb361e6caa61e25bc4f98d6da457e91a2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-check-dns-availability.xml @@ -0,0 +1,9 @@ + + + sampleapplication.elasticbeanstalk.amazonaws.com + true + + + 12f6701f-f1d6-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application-version.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application-version.json new file mode 100644 index 0000000000000000000000000000000000000000..e058fb3e152725fe25423774faa54eda3aa4f522 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application-version.json @@ -0,0 +1,16 @@ +{ + "ApplicationVersion": { + "ApplicationName": "SampleApp", + "VersionLabel": "Version1", + "Description": "description", + "DateCreated": "2010-11-17T03:21:59.161Z", + "DateUpdated": "2010-11-17T03:21:59.161Z", + "SourceBundle": { + "S3Bucket": "amazonaws.com", + "S3Key": "sample.war" + } + }, + "ResponseMetadata": { + "RequestId": "d653efef-f1f9-11df-8a78-9f77047e0d0c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application-version.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application-version.xml new file mode 100644 index 0000000000000000000000000000000000000000..f7610aeeb5a185346c74cb957acd4c5d6e73549e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application-version.xml @@ -0,0 +1,18 @@ + + + + + amazonaws.com + sample.war + + Version1 + description + SampleApp + 2010-11-17T03:21:59.161Z + 2010-11-17T03:21:59.161Z + + + + d653efef-f1f9-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application.json new file mode 100644 index 0000000000000000000000000000000000000000..7bb8459cadeb7211d82e75e6a63a7c6033d1686d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application.json @@ -0,0 +1,15 @@ +{ + "Application": { + "ApplicationName": "SampleApp", + "Description": "Sample Description", + "Versions": [], + "DateCreated": "2010-11-16T23:09:20.256Z", + "ConfigurationTemplates": [ + "Default" + ], + "DateUpdated": "2010-11-16T23:09:20.256Z" + }, + "ResponseMetadata": { + "RequestId": "8b00e053-f1d6-11df-8a78-9f77047e0d0c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application.xml new file mode 100644 index 0000000000000000000000000000000000000000..864869d7e1bdf2f41183b64d8047c8dbc2ce74a6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-application.xml @@ -0,0 +1,17 @@ + + + + + Sample Description + SampleApp + 2010-11-16T23:09:20.256Z + 2010-11-16T23:09:20.256Z + + Default + + + + + 8b00e053-f1d6-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-configuration-template.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-configuration-template.json new file mode 100644 index 0000000000000000000000000000000000000000..e8e1a7844aa93ef6c4a7228b0c5bb290acd4fc37 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-configuration-template.json @@ -0,0 +1,243 @@ +{ + "ApplicationName": "SampleApp", + "Description": "ConfigTemplateDescription", + "ResponseMetadata": { + "RequestId": "846cd905-f1fd-11df-8a78-9f77047e0d0c" + }, + "TemplateName": "AppTemplate", + "DateCreated": "2010-11-17T03:48:19.640Z", + "OptionSettings": [ + { + "Namespace": "aws:autoscaling:launchconfiguration", + "OptionName": "ImageId", + "Value": "ami-f2f0069b" + }, + { + "Namespace": "aws:elasticbeanstalk:sns:topics", + "OptionName": "Notification Endpoint", + "Value": "" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "PARAM4", + "Value": "" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "JDBC_CONNECTION_STRING", + "Value": "" + }, + { + "Namespace": "aws:autoscaling:launchconfiguration", + "OptionName": "SecurityGroups", + "Value": "elasticbeanstalk-default" + }, + { + "Namespace": "aws:elb:healthcheck", + "OptionName": "UnhealthyThreshold", + "Value": "5" + }, + { + "Namespace": "aws:autoscaling:launchconfiguration", + "OptionName": "InstanceType", + "Value": "t1.micro" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "Statistic", + "Value": "Average" + }, + { + "Namespace": "aws:elb:loadbalancer", + "OptionName": "LoadBalancerHTTPSPort", + "Value": "OFF" + }, + { + "Namespace": "aws:elb:policies", + "OptionName": "Stickiness Cookie Expiration", + "Value": "0" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "PARAM5", + "Value": "" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "MeasureName", + "Value": "NetworkOut" + }, + { + "Namespace": "aws:elb:healthcheck", + "OptionName": "Interval", + "Value": "30" + }, + { + "Namespace": "aws:elasticbeanstalk:application", + "OptionName": "Application Healthcheck URL", + "Value": "/" + }, + { + "Namespace": "aws:elasticbeanstalk:sns:topics", + "OptionName": "Notification Topic ARN", + "Value": "" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "LowerBreachScaleIncrement", + "Value": "-1" + }, + { + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "OptionName": "XX:MaxPermSize", + "Value": "64m" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "UpperBreachScaleIncrement", + "Value": "1" + }, + { + "Namespace": "aws:autoscaling:asg", + "OptionName": "MinSize", + "Value": "1" + }, + { + "Namespace": "aws:autoscaling:asg", + "OptionName": "Custom Availability Zones", + "Value": "us-east-1a" + }, + { + "Namespace": "aws:autoscaling:asg", + "OptionName": "Availability Zones", + "Value": "Any 1" + }, + { + "Namespace": "aws:elasticbeanstalk:hostmanager", + "OptionName": "LogPublicationControl", + "Value": "false" + }, + { + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "OptionName": "JVM Options", + "Value": "" + }, + { + "Namespace": "aws:elasticbeanstalk:sns:topics", + "OptionName": "Notification Topic Name", + "Value": "" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "PARAM2", + "Value": "" + }, + { + "Namespace": "aws:elb:loadbalancer", + "OptionName": "LoadBalancerHTTPPort", + "Value": "80" + }, + { + "Namespace": "aws:elb:healthcheck", + "OptionName": "Timeout", + "Value": "5" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "BreachDuration", + "Value": "2" + }, + { + "Namespace": "aws:autoscaling:launchconfiguration", + "OptionName": "MonitoringInterval", + "Value": "5 minute" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "PARAM1", + "Value": "" + }, + { + "Namespace": "aws:autoscaling:asg", + "OptionName": "MaxSize", + "Value": "4" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "LowerThreshold", + "Value": "2000000" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "AWS_SECRET_KEY", + "Value": "" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "AWS_ACCESS_KEY_ID", + "Value": "" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "UpperThreshold", + "Value": "6000000" + }, + { + "Namespace": "aws:elasticbeanstalk:sns:topics", + "OptionName": "Notification Protocol", + "Value": "email" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "Unit", + "Value": "Bytes" + }, + { + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "OptionName": "Xmx", + "Value": "256m" + }, + { + "Namespace": "aws:autoscaling:asg", + "OptionName": "Cooldown", + "Value": "360" + }, + { + "Namespace": "aws:autoscaling:trigger", + "OptionName": "Period", + "Value": "1" + }, + { + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "OptionName": "Xms", + "Value": "256m" + }, + { + "Namespace": "aws:autoscaling:launchconfiguration", + "OptionName": "EC2KeyName", + "Value": "" + }, + { + "Namespace": "aws:elb:policies", + "OptionName": "Stickiness Policy", + "Value": "false" + }, + { + "Namespace": "aws:elasticbeanstalk:application:environment", + "OptionName": "PARAM3", + "Value": "" + }, + { + "Namespace": "aws:elb:healthcheck", + "OptionName": "HealthyThreshold", + "Value": "3" + }, + { + "Namespace": "aws:elb:loadbalancer", + "OptionName": "SSLCertificateId", + "Value": "" + } + ], + "DateUpdated": "2010-11-17T03:48:19.640Z", + "SolutionStackName": "32bit Amazon Linux running Tomcat 7" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-configuration-template.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-configuration-template.xml new file mode 100644 index 0000000000000000000000000000000000000000..6008a916ed8f0a1625259fb79363a15369343cec --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-configuration-template.xml @@ -0,0 +1,245 @@ + + +32bit Amazon Linux running Tomcat 7 + + + ImageId + ami-f2f0069b + aws:autoscaling:launchconfiguration + + + Notification Endpoint + + aws:elasticbeanstalk:sns:topics + + + PARAM4 + + aws:elasticbeanstalk:application:environment + + + JDBC_CONNECTION_STRING + + aws:elasticbeanstalk:application:environment + + + SecurityGroups + elasticbeanstalk-default + aws:autoscaling:launchconfiguration + + + UnhealthyThreshold + 5 + aws:elb:healthcheck + + + InstanceType + t1.micro + aws:autoscaling:launchconfiguration + + +Statistic + Average + aws:autoscaling:trigger + + + LoadBalancerHTTPSPort + OFF + aws:elb:loadbalancer + + + Stickiness Cookie Expiration + 0 + aws:elb:policies + + + PARAM5 + + aws:elasticbeanstalk:application:environment + + + MeasureName + NetworkOut + aws:autoscaling:trigger + + + Interval + 30 + aws:elb:healthcheck + + + Application Healthcheck URL + / + aws:elasticbeanstalk:application + + + Notification Topic ARN + + aws:elasticbeanstalk:sns:topics + + + LowerBreachScaleIncrement + -1 + aws:autoscaling:trigger + + + XX:MaxPermSize + 64m + aws:elasticbeanstalk:container:tomcat:jvmoptions + + + UpperBreachScaleIncrement + 1 + aws:autoscaling:trigger + + + MinSize + 1 + aws:autoscaling:asg + + + Custom Availability Zones + us-east-1a + aws:autoscaling:asg + + + Availability Zones + Any 1 + aws:autoscaling:asg + + + LogPublicationControl + false + aws:elasticbeanstalk:hostmanager + + + JVM Options + + aws:elasticbeanstalk:container:tomcat:jvmoptions + + + Notification Topic Name + + aws:elasticbeanstalk:sns:topics + + + PARAM2 + + aws:elasticbeanstalk:application:environment + + + LoadBalancerHTTPPort + 80 + aws:elb:loadbalancer + + + Timeout + 5 + aws:elb:healthcheck + + + BreachDuration + 2 + aws:autoscaling:trigger + + + MonitoringInterval + 5 minute + aws:autoscaling:launchconfiguration + + + PARAM1 + + aws:elasticbeanstalk:application:environment + + + MaxSize + 4 + aws:autoscaling:asg + + + LowerThreshold + 2000000 + aws:autoscaling:trigger + + + AWS_SECRET_KEY + + aws:elasticbeanstalk:application:environment + + + AWS_ACCESS_KEY_ID + + aws:elasticbeanstalk:application:environment + + + UpperThreshold + 6000000 + aws:autoscaling:trigger + + + Notification Protocol + email + aws:elasticbeanstalk:sns:topics + + + Unit + Bytes + aws:autoscaling:trigger + + + Xmx + 256m + aws:elasticbeanstalk:container:tomcat:jvmoptions + + + Cooldown + 360 + aws:autoscaling:asg + + + Period + 1 + aws:autoscaling:trigger + + + Xms + 256m + aws:elasticbeanstalk:container:tomcat:jvmoptions + + +EC2KeyName + + aws:autoscaling:launchconfiguration + + + Stickiness Policy + false + aws:elb:policies + + + PARAM3 + + aws:elasticbeanstalk:application:environment + + + HealthyThreshold + 3 + aws:elb:healthcheck + + + SSLCertificateId + + aws:elb:loadbalancer + + + ConfigTemplateDescription + SampleApp + 2010-11-17T03:48:19.640Z + AppTemplate + 2010-11-17T03:48:19.640Z + + + 846cd905-f1fd-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-environment.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-environment.json new file mode 100644 index 0000000000000000000000000000000000000000..df7a130d2bb25ebf4faba6ffbc9cce90963482f5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-environment.json @@ -0,0 +1,15 @@ +{ + "ApplicationName": "SampleApp", + "EnvironmentName": "SampleApp", + "VersionLabel": "Version1", + "Status": "Deploying", + "Description": "EnvDescrip", + "ResponseMetadata": { + "RequestId": "15db925e-f1ff-11df-8a78-9f77047e0d0c" + }, + "EnvironmentId": "e-icsgecu3wf", + "SolutionStackName": "32bit Amazon Linux running Tomcat 7", + "Health": "Grey", + "DateUpdated": "2010-11-17T03:59:33.520Z", + "DateCreated": "2010-11-17T03:59:33.520Z" +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-environment.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-environment.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e84b425df5978b07a0b42664179100242c5d558 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-environment.xml @@ -0,0 +1,15 @@ + + +Version1 +Deploying +SampleApp +Grey +e-icsgecu3wf 2010-11-17T03:59:33.520Z 32bit Amazon Linux running Tomcat 7 + EnvDescrip + SampleApp + 2010-11-17T03:59:33.520Z + + + 15db925e-f1ff-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-storage-location.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-storage-location.json new file mode 100644 index 0000000000000000000000000000000000000000..ac4980e859aa2cfd6faeca41789c9d09ce00d883 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-storage-location.json @@ -0,0 +1,6 @@ +{ + "S3Bucket": "elasticbeanstalk-us-east-1-780612358023", + "ResponseMetadata": { + "RequestId": "ef51b94a-f1d6-11df-8a78-9f77047e0d0c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-storage-location.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-storage-location.xml new file mode 100644 index 0000000000000000000000000000000000000000..836c30678b8475dce94784fb36ddf7dafeef0aec --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-create-storage-location.xml @@ -0,0 +1,8 @@ + + + elasticbeanstalk-us-east-1-780612358023 + + + ef51b94a-f1d6-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-delete-application.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-delete-application.json new file mode 100644 index 0000000000000000000000000000000000000000..01a99e68e76712e3d3f2eeed5c6ccd12cb427d32 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-delete-application.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "1f155abd-f1d7-11df-8a78-9f77047e0d0c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-delete-application.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-delete-application.xml new file mode 100644 index 0000000000000000000000000000000000000000..50ef835f5e1a8e6e97d2bd4be466229aa39e99df --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-delete-application.xml @@ -0,0 +1,5 @@ + + + 1f155abd-f1d7-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-application-versions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-application-versions.json new file mode 100644 index 0000000000000000000000000000000000000000..0176ca15998f0ad605a34219c2d4e7c5dd5d6827 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-application-versions.json @@ -0,0 +1,8 @@ +{"ApplicationVersions": [{"ApplicationName": "SampleApp", + "DateCreated": "2010-11-17T03:21:59.161Z", + "DateUpdated": "2010-11-17T03:21:59.161Z", + "Description": "description", + "SourceBundle": {"S3Bucket": "amazonaws.com", + "S3Key": "sample.war"}, + "VersionLabel": "Version1"}], + "ResponseMetadata": {"RequestId": "773cd80a-f26c-11df-8a78-9f77047e0d0c"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-application-versions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-application-versions.xml new file mode 100644 index 0000000000000000000000000000000000000000..49ddab3728c1656d8cbc74547ba1371e2fa889d7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-application-versions.xml @@ -0,0 +1,20 @@ + + + + + + amazonaws.com + sample.war + + Version1 + description + SampleApp + 2010-11-17T03:21:59.161Z + 2010-11-17T03:21:59.161Z + + + + + 773cd80a-f26c-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-applications.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-applications.json new file mode 100644 index 0000000000000000000000000000000000000000..7e66f0c2e29fa686fb5ff0b39f7346d49c8505d8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-applications.json @@ -0,0 +1,7 @@ +{"Applications": [{"ApplicationName": "SampleApplication", + "ConfigurationTemplates": ["Default"], + "DateCreated": "2010-11-16T20:20:51.974Z", + "DateUpdated": "2010-11-16T20:20:51.974Z", + "Description": "Sample Description", + "Versions": []}], + "ResponseMetadata": {"RequestId": "577c70ff-f1d7-11df-8a78-9f77047e0d0c"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-applications.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-applications.xml new file mode 100644 index 0000000000000000000000000000000000000000..50952a29cd3543e688f55759613208f1e7388560 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-applications.xml @@ -0,0 +1,19 @@ + + + + + + Sample Description + SampleApplication + 2010-11-16T20:20:51.974Z + 2010-11-16T20:20:51.974Z + + Default + + + + + + 577c70ff-f1d7-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-configuration-options.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-configuration-options.json new file mode 100644 index 0000000000000000000000000000000000000000..2cb7f3803b41fb0bcb4cddf791adadc581b8e333 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-configuration-options.json @@ -0,0 +1,524 @@ +{ + "Options": [ + { + "Regex": { + "Pattern": "^\\S*$", + "Label": "nospaces" + }, + "Name": "AWS_SECRET_KEY", + "UserDefined": false, + "ValueType": "Scalar", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "DefaultValue": "" + }, + { + "Name": "PARAM1", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Regex": { + "Pattern": "^\\S*$", + "Label": "nospaces" + }, + "Name": "JDBC_CONNECTION_STRING", + "UserDefined": false, + "ValueType": "Scalar", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "DefaultValue": "" + }, + { + "Name": "PARAM2", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Regex": { + "Pattern": "^\\S*$", + "Label": "nospaces" + }, + "Name": "AWS_ACCESS_KEY_ID", + "UserDefined": false, + "ValueType": "Scalar", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "DefaultValue": "" + }, + { + "Name": "PARAM3", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "PARAM4", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "PARAM5", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:application:environment", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Regex": { + "Pattern": "^\\S*$", + "Label": "nospaces" + }, + "Name": "XX:MaxPermSize", + "UserDefined": false, + "ValueType": "Scalar", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "MaxLength": 200, + "DefaultValue": "64m" + }, + { + "Regex": { + "Pattern": "^\\S*$", + "Label": "nospaces" + }, + "Name": "Xms", + "UserDefined": false, + "ValueType": "Scalar", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "MaxLength": 200, + "DefaultValue": "256m" + }, + { + "Regex": { + "Pattern": "^\\S*$", + "Label": "nospaces" + }, + "Name": "Xmx", + "UserDefined": false, + "ValueType": "Scalar", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "MaxLength": 200, + "DefaultValue": "256m" + }, + { + "Name": "JVM Options", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "RestartApplicationServer", + "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "Notification Endpoint", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elasticbeanstalk:sns:topics", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "Notification Topic ARN", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elasticbeanstalk:sns:topics", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "Notification Protocol", + "UserDefined": false, + "DefaultValue": "email", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elasticbeanstalk:sns:topics", + "ValueType": "Scalar", + "ValueOptions": [ + "http", + "https", + "email", + "email-json", + "sqs" + ] + }, + { + "Name": "Notification Topic Name", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elasticbeanstalk:sns:topics", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "Stickiness Cookie Expiration", + "UserDefined": false, + "DefaultValue": "0", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:policies", + "MaxValue": 1000000, + "MinValue": 0, + "ValueType": "Scalar" + }, + { + "Name": "Stickiness Policy", + "UserDefined": false, + "DefaultValue": "false", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:policies", + "ValueType": "Boolean" + }, + { + "Name": "Interval", + "UserDefined": false, + "DefaultValue": "30", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:healthcheck", + "MaxValue": 300, + "MinValue": 5, + "ValueType": "Scalar" + }, + { + "Name": "UnhealthyThreshold", + "UserDefined": false, + "DefaultValue": "5", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:healthcheck", + "MaxValue": 10, + "MinValue": 2, + "ValueType": "Scalar" + }, + { + "Name": "HealthyThreshold", + "UserDefined": false, + "DefaultValue": "3", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:healthcheck", + "MaxValue": 10, + "MinValue": 2, + "ValueType": "Scalar" + }, + { + "Name": "Timeout", + "UserDefined": false, + "DefaultValue": "5", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:healthcheck", + "MaxValue": 60, + "MinValue": 2, + "ValueType": "Scalar" + }, + { + "Name": "LoadBalancerHTTPPort", + "UserDefined": false, + "DefaultValue": "80", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:loadbalancer", + "ValueType": "Scalar", + "ValueOptions": [ + "OFF", + "80" + ] + }, + { + "Name": "LoadBalancerHTTPSPort", + "UserDefined": false, + "DefaultValue": "OFF", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:loadbalancer", + "ValueType": "Scalar", + "ValueOptions": [ + "OFF", + "443", + "8443" + ] + }, + { + "Name": "SSLCertificateId", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:loadbalancer", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "Statistic", + "UserDefined": false, + "DefaultValue": "Average", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "ValueType": "Scalar", + "ValueOptions": [ + "Minimum", + "Maximum", + "Sum", + "Average" + ] + }, + { + "Name": "MeasureName", + "UserDefined": false, + "DefaultValue": "NetworkOut", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "ValueType": "Scalar", + "ValueOptions": [ + "CPUUtilization", + "NetworkIn", + "NetworkOut", + "DiskWriteOps", + "DiskReadBytes", + "DiskReadOps", + "DiskWriteBytes", + "Latency", + "RequestCount", + "HealthyHostCount", + "UnhealthyHostCount" + ] + }, + { + "Name": "Unit", + "UserDefined": false, + "DefaultValue": "Bytes", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "ValueType": "Scalar", + "ValueOptions": [ + "Seconds", + "Percent", + "Bytes", + "Bits", + "Count", + "Bytes/Second", + "Bits/Second", + "Count/Second", + "None" + ] + }, + { + "Name": "LowerThreshold", + "UserDefined": false, + "DefaultValue": "2000000", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "MaxValue": 20000000, + "MinValue": 0, + "ValueType": "Scalar" + }, + { + "Name": "UpperBreachScaleIncrement", + "UserDefined": false, + "DefaultValue": "1", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "LowerBreachScaleIncrement", + "UserDefined": false, + "DefaultValue": "-1", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "BreachDuration", + "UserDefined": false, + "DefaultValue": "5", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "MaxValue": 600, + "MinValue": 1, + "ValueType": "Scalar" + }, + { + "Name": "Period", + "UserDefined": false, + "DefaultValue": "5", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "MaxValue": 600, + "MinValue": 1, + "ValueType": "Scalar" + }, + { + "Name": "UpperThreshold", + "UserDefined": false, + "DefaultValue": "6000000", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "MaxValue": 20000000, + "MinValue": 0, + "ValueType": "Scalar" + }, + { + "Name": "MaxSize", + "UserDefined": false, + "DefaultValue": "4", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:asg", + "MaxValue": 10000, + "MinValue": 1, + "ValueType": "Scalar" + }, + { + "Name": "MinSize", + "UserDefined": false, + "DefaultValue": "1", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:asg", + "MaxValue": 10000, + "MinValue": 1, + "ValueType": "Scalar" + }, + { + "Name": "Availability Zones", + "UserDefined": false, + "DefaultValue": "Any 1", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:asg", + "ValueType": "Scalar", + "ValueOptions": [ + "Any 1", + "Any 2", + "Any" + ] + }, + { + "Name": "Cooldown", + "UserDefined": false, + "DefaultValue": "360", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:asg", + "MaxValue": 10000, + "MinValue": 0, + "ValueType": "Scalar" + }, + { + "Name": "Custom Availability Zones", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:asg", + "ValueType": "List", + "ValueOptions": [ + "us-west-2a", + "us-west-2b", + "us-west-2c" + ] + }, + { + "Name": "MonitoringInterval", + "UserDefined": false, + "DefaultValue": "5 minute", + "ChangeSeverity": "RestartEnvironment", + "Namespace": "aws:autoscaling:launchconfiguration", + "ValueType": "Scalar", + "ValueOptions": [ + "1 minute", + "5 minute" + ] + }, + { + "Name": "EC2KeyName", + "UserDefined": false, + "DefaultValue": "", + "ChangeSeverity": "RestartEnvironment", + "Namespace": "aws:autoscaling:launchconfiguration", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "SecurityGroups", + "UserDefined": false, + "DefaultValue": "elasticbeanstalk-default", + "ChangeSeverity": "RestartEnvironment", + "Namespace": "aws:autoscaling:launchconfiguration", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "ImageId", + "UserDefined": false, + "DefaultValue": "ami-f62fa3c6", + "ChangeSeverity": "RestartEnvironment", + "Namespace": "aws:autoscaling:launchconfiguration", + "MaxLength": 200, + "ValueType": "Scalar" + }, + { + "Name": "InstanceType", + "UserDefined": false, + "DefaultValue": "t1.micro", + "ChangeSeverity": "RestartEnvironment", + "Namespace": "aws:autoscaling:launchconfiguration", + "ValueType": "Scalar", + "ValueOptions": [ + "t1.micro", + "m1.small", + "c1.medium", + "m1.medium" + ] + }, + { + "Regex": { + "Pattern": "^\\S*$", + "Label": "nospaces" + }, + "Name": "Application Healthcheck URL", + "UserDefined": false, + "ValueType": "Scalar", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elasticbeanstalk:application", + "MaxLength": 200, + "DefaultValue": "/" + }, + { + "Name": "Automatically Terminate Unhealthy Instances", + "UserDefined": false, + "DefaultValue": "true", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elasticbeanstalk:monitoring", + "ValueType": "Boolean" + }, + { + "Name": "LogPublicationControl", + "UserDefined": false, + "DefaultValue": "false", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elasticbeanstalk:hostmanager", + "ValueType": "Boolean" + } + ], + "ResponseMetadata": { + "RequestId": "af3d86f9-9167-11e2-a92a-116deff19e14" + }, + "SolutionStackName": "32bit Amazon Linux running Tomcat 6" +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-configuration-options.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-configuration-options.xml new file mode 100644 index 0000000000000000000000000000000000000000..16d9031b46c5c318320924ffc1ac0e890fca177d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-configuration-options.xml @@ -0,0 +1,526 @@ + + + 32bit Amazon Linux running Tomcat 6 + + + false + RestartApplicationServer + 200 + + ^\S*$ + + + AWS_SECRET_KEY + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + PARAM1 + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + + ^\S*$ + + + JDBC_CONNECTION_STRING + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + PARAM2 + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + + ^\S*$ + + + AWS_ACCESS_KEY_ID + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + PARAM3 + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + PARAM4 + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + PARAM5 + Scalar + + aws:elasticbeanstalk:application:environment + + + false + RestartApplicationServer + 200 + + ^\S*$ + + + XX:MaxPermSize + Scalar + 64m + aws:elasticbeanstalk:container:tomcat:jvmoptions + + + false + RestartApplicationServer + 200 + + ^\S*$ + + + Xms + Scalar + 256m + aws:elasticbeanstalk:container:tomcat:jvmoptions + + + false + RestartApplicationServer + 200 + + ^\S*$ + + + Xmx + Scalar + 256m + aws:elasticbeanstalk:container:tomcat:jvmoptions + + + false + RestartApplicationServer + 200 + JVM Options + Scalar + + aws:elasticbeanstalk:container:tomcat:jvmoptions + + + false + NoInterruption + 200 + Notification Endpoint + Scalar + + aws:elasticbeanstalk:sns:topics + + + false + NoInterruption + 200 + Notification Topic ARN + Scalar + + aws:elasticbeanstalk:sns:topics + + + false + NoInterruption + Notification Protocol + + http + https + email + email-json + sqs + + Scalar + email + aws:elasticbeanstalk:sns:topics + + + false + NoInterruption + 200 + Notification Topic Name + Scalar + + aws:elasticbeanstalk:sns:topics + + + false + NoInterruption + 0 + Stickiness Cookie Expiration + Scalar + 0 + 1000000 + aws:elb:policies + + + false + NoInterruption + Stickiness Policy + Boolean + false + aws:elb:policies + + + false + NoInterruption + 5 + Interval + Scalar + 30 + 300 + aws:elb:healthcheck + + + false + NoInterruption + 2 + UnhealthyThreshold + Scalar + 5 + 10 + aws:elb:healthcheck + + + false + NoInterruption + 2 + HealthyThreshold + Scalar + 3 + 10 + aws:elb:healthcheck + + + false + NoInterruption + 2 + Timeout + Scalar + 5 + 60 + aws:elb:healthcheck + + + false + NoInterruption + LoadBalancerHTTPPort + + OFF + 80 + + Scalar + 80 + aws:elb:loadbalancer + + + false + NoInterruption + LoadBalancerHTTPSPort + + OFF + 443 + 8443 + + Scalar + OFF + aws:elb:loadbalancer + + + false + NoInterruption + 200 + SSLCertificateId + Scalar + + aws:elb:loadbalancer + + + false + NoInterruption + Statistic + + Minimum + Maximum + Sum + Average + + Scalar + Average + aws:autoscaling:trigger + + + false + NoInterruption + MeasureName + + CPUUtilization + NetworkIn + NetworkOut + DiskWriteOps + DiskReadBytes + DiskReadOps + DiskWriteBytes + Latency + RequestCount + HealthyHostCount + UnhealthyHostCount + + Scalar + NetworkOut + aws:autoscaling:trigger + + + false + NoInterruption + Unit + + Seconds + Percent + Bytes + Bits + Count + Bytes/Second + Bits/Second + Count/Second + None + + Scalar + Bytes + aws:autoscaling:trigger + + + false + NoInterruption + 0 + LowerThreshold + Scalar + 2000000 + 20000000 + aws:autoscaling:trigger + + + false + NoInterruption + 200 + UpperBreachScaleIncrement + Scalar + 1 + aws:autoscaling:trigger + + + false + NoInterruption + 200 + LowerBreachScaleIncrement + Scalar + -1 + aws:autoscaling:trigger + + + false + NoInterruption + 1 + BreachDuration + Scalar + 5 + 600 + aws:autoscaling:trigger + + + false + NoInterruption + 1 + Period + Scalar + 5 + 600 + aws:autoscaling:trigger + + + false + NoInterruption + 0 + UpperThreshold + Scalar + 6000000 + 20000000 + aws:autoscaling:trigger + + + false + NoInterruption + 1 + MaxSize + Scalar + 4 + 10000 + aws:autoscaling:asg + + + false + NoInterruption + 1 + MinSize + Scalar + 1 + 10000 + aws:autoscaling:asg + + + false + NoInterruption + Availability Zones + + Any 1 + Any 2 + Any + + Scalar + Any 1 + aws:autoscaling:asg + + + false + NoInterruption + 0 + Cooldown + Scalar + 360 + 10000 + aws:autoscaling:asg + + + false + NoInterruption + Custom Availability Zones + + us-west-2a + us-west-2b + us-west-2c + + List + + aws:autoscaling:asg + + + false + RestartEnvironment + MonitoringInterval + + 1 minute + 5 minute + + Scalar + 5 minute + aws:autoscaling:launchconfiguration + + + false + RestartEnvironment + 200 + EC2KeyName + Scalar + + aws:autoscaling:launchconfiguration + + + false + RestartEnvironment + 200 + SecurityGroups + Scalar + elasticbeanstalk-default + aws:autoscaling:launchconfiguration + + + false + RestartEnvironment + 200 + ImageId + Scalar + ami-f62fa3c6 + aws:autoscaling:launchconfiguration + + + false + RestartEnvironment + InstanceType + + t1.micro + m1.small + c1.medium + m1.medium + + Scalar + t1.micro + aws:autoscaling:launchconfiguration + + + false + NoInterruption + 200 + + ^\S*$ + + + Application Healthcheck URL + Scalar + / + aws:elasticbeanstalk:application + + + false + NoInterruption + Automatically Terminate Unhealthy Instances + Boolean + true + aws:elasticbeanstalk:monitoring + + + false + NoInterruption + LogPublicationControl + Boolean + false + aws:elasticbeanstalk:hostmanager + + + + + af3d86f9-9167-11e2-a92a-116deff19e14 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-environments.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-environments.json new file mode 100644 index 0000000000000000000000000000000000000000..62fb9ea2d6d1bc24be232b05c41f731fa463bfd7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-environments.json @@ -0,0 +1,13 @@ +{"Environments": [{"ApplicationName": "SampleApp", + "CNAME": "SampleApp-jxb293wg7n.elasticbeanstalk.amazonaws.com", + "DateCreated": "2010-11-17T03:59:33.520Z", + "DateUpdated": "2010-11-17T04:01:40.668Z", + "Description": "EnvDescrip", + "EndpointURL": "elasticbeanstalk-SampleApp-1394386994.us-east-1.elb.amazonaws.com", + "EnvironmentId": "e-icsgecu3wf", + "EnvironmentName": "SampleApp", + "Health": "Green", + "SolutionStackName": "32bit Amazon Linux running Tomcat 7", + "Status": "Available", + "VersionLabel": "Version1"}], + "ResponseMetadata": {"RequestId": "44790c68-f260-11df-8a78-9f77047e0d0c"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-environments.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-environments.xml new file mode 100644 index 0000000000000000000000000000000000000000..4746b8b7056a121ceb3f9619b8c8a29aaf866f8e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-environments.xml @@ -0,0 +1,23 @@ + + + + + Version1 + Available + SampleApp + elasticbeanstalk-SampleApp-1394386994.us-east-1.elb.amazonaws.com + SampleApp-jxb293wg7n.elasticbeanstalk.amazonaws.com + Green + e-icsgecu3wf + 2010-11-17T04:01:40.668Z + 32bit Amazon Linux running Tomcat 7 + EnvDescrip + SampleApp + 2010-11-17T03:59:33.520Z + + + + + 44790c68-f260-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-events.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-events.json new file mode 100644 index 0000000000000000000000000000000000000000..6368aa63b631666a0c6c4901afc4a0ce27d75180 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-events.json @@ -0,0 +1,27 @@ +{"Events": [{"ApplicationName": "SampleApp", + "EnvironmentName": "SampleAppVersion", + "EventDate": "2010-11-17T20:25:35.191Z", + "Message": "Successfully completed createEnvironment activity.", + "RequestId": "bb01fa74-f287-11df-8a78-9f77047e0d0c", + "Severity": "INFO", + "VersionLabel": "New Version"}, + {"ApplicationName": "SampleApp", + "EnvironmentName": "SampleAppVersion", + "EventDate": "2010-11-17T20:21:30Z", + "Message": "Launching a new EC2 instance: i-04a8c569", + "Severity": "DEBUG", + "VersionLabel": "New Version"}, + {"ApplicationName": "SampleApp", + "EnvironmentName": "SampleAppVersion", + "EventDate": "2010-11-17T20:20:32.008Z", + "Message": "At least one EC2 instance has entered the InService lifecycle state.", + "RequestId": "bb01fa74-f287-11df-8a78-9f77047e0d0c", + "Severity": "INFO", + "VersionLabel": "New Version"}, + {"ApplicationName": "SampleApp", + "EnvironmentName": "SampleAppVersion", + "EventDate": "2010-11-17T20:19:28Z", + "Message": "Elastic Load Balancer elasticbeanstalk-SampleAppVersion has failed 0 healthy instances - Environment may not be available.", + "Severity": "WARN", + "VersionLabel": "New Version"}], + "ResponseMetadata": {"RequestId": "f10d02dd-f288-11df-8a78-9f77047e0d0c"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-events.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-events.xml new file mode 100644 index 0000000000000000000000000000000000000000..78b6b8d7abae72b27bc9c6b8cc2fd6711d04f382 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-describe-events.xml @@ -0,0 +1,43 @@ + + + + + Successfully completed createEnvironment activity. + 2010-11-17T20:25:35.191Z + New Version + bb01fa74-f287-11df-8a78-9f77047e0d0c + SampleApp + SampleAppVersion + INFO + + + Launching a new EC2 instance: i-04a8c569 + 2010-11-17T20:21:30Z + New Version + SampleApp + SampleAppVersion + DEBUG + + + At least one EC2 instance has entered the InService lifecycle state. + 2010-11-17T20:20:32.008Z + New Version + bb01fa74-f287-11df-8a78-9f77047e0d0c + SampleApp + SampleAppVersion + INFO + + + Elastic Load Balancer elasticbeanstalk-SampleAppVersion has failed 0 healthy instances - Environment may not be available. + 2010-11-17T20:19:28Z + New Version + SampleApp + SampleAppVersion + WARN + + + + + f10d02dd-f288-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-list-available-solution-stacks.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-list-available-solution-stacks.json new file mode 100644 index 0000000000000000000000000000000000000000..073d83e87a8161e982bbf2353a3537e81dca95c3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-list-available-solution-stacks.json @@ -0,0 +1,145 @@ +{ + "SolutionStacks": [ + "32bit Amazon Linux running PHP 5.4", + "64bit Amazon Linux running PHP 5.4", + "32bit Amazon Linux running PHP 5.3", + "64bit Amazon Linux running PHP 5.3", + "32bit Amazon Linux running Node.js", + "64bit Amazon Linux running Node.js", + "64bit Windows Server 2008 R2 running IIS 7.5", + "64bit Windows Server 2012 running IIS 8", + "32bit Amazon Linux running Tomcat 7", + "64bit Amazon Linux running Tomcat 7", + "32bit Amazon Linux running Tomcat 6", + "64bit Amazon Linux running Tomcat 6", + "32bit Amazon Linux running Python", + "64bit Amazon Linux running Python", + "32bit Amazon Linux running Ruby 1.8.7", + "64bit Amazon Linux running Ruby 1.8.7", + "32bit Amazon Linux running Ruby 1.9.3", + "64bit Amazon Linux running Ruby 1.9.3" + ], + "ResponseMetadata": { + "RequestId": "af7e11cd-9167-11e2-9d65-771f0f370017" + }, + "SolutionStackDetails": [ + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "32bit Amazon Linux running PHP 5.4" + }, + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "64bit Amazon Linux running PHP 5.4" + }, + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "32bit Amazon Linux running PHP 5.3" + }, + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "64bit Amazon Linux running PHP 5.3" + }, + { + "PermittedFileTypes": [ + ".zip", + ".war" + ], + "SolutionStackName": "32bit Amazon Linux running Node.js" + }, + { + "PermittedFileTypes": [ + ".zip", + ".war" + ], + "SolutionStackName": "64bit Amazon Linux running Node.js" + }, + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "64bit Windows Server 2008 R2 running IIS 7.5" + }, + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "64bit Windows Server 2012 running IIS 8" + }, + { + "PermittedFileTypes": [ + "war", + "zip" + ], + "SolutionStackName": "32bit Amazon Linux running Tomcat 7" + }, + { + "PermittedFileTypes": [ + "war", + "zip" + ], + "SolutionStackName": "64bit Amazon Linux running Tomcat 7" + }, + { + "PermittedFileTypes": [ + "war", + "zip" + ], + "SolutionStackName": "32bit Amazon Linux running Tomcat 6" + }, + { + "PermittedFileTypes": [ + "war", + "zip" + ], + "SolutionStackName": "64bit Amazon Linux running Tomcat 6" + }, + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "32bit Amazon Linux running Python" + }, + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "64bit Amazon Linux running Python" + }, + { + "PermittedFileTypes": [ + "war", + "zip" + ], + "SolutionStackName": "32bit Amazon Linux running Ruby 1.8.7" + }, + { + "PermittedFileTypes": [ + "war", + "zip" + ], + "SolutionStackName": "64bit Amazon Linux running Ruby 1.8.7" + }, + { + "PermittedFileTypes": [ + "zip", + "war" + ], + "SolutionStackName": "32bit Amazon Linux running Ruby 1.9.3" + }, + { + "PermittedFileTypes": [ + "war", + "zip" + ], + "SolutionStackName": "64bit Amazon Linux running Ruby 1.9.3" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-list-available-solution-stacks.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-list-available-solution-stacks.xml new file mode 100644 index 0000000000000000000000000000000000000000..90e118239ca2513e0df4c87fac1b048725cb7cf9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-list-available-solution-stacks.xml @@ -0,0 +1,147 @@ + + + + 32bit Amazon Linux running PHP 5.4 + 64bit Amazon Linux running PHP 5.4 + 32bit Amazon Linux running PHP 5.3 + 64bit Amazon Linux running PHP 5.3 + 32bit Amazon Linux running Node.js + 64bit Amazon Linux running Node.js + 64bit Windows Server 2008 R2 running IIS 7.5 + 64bit Windows Server 2012 running IIS 8 + 32bit Amazon Linux running Tomcat 7 + 64bit Amazon Linux running Tomcat 7 + 32bit Amazon Linux running Tomcat 6 + 64bit Amazon Linux running Tomcat 6 + 32bit Amazon Linux running Python + 64bit Amazon Linux running Python + 32bit Amazon Linux running Ruby 1.8.7 + 64bit Amazon Linux running Ruby 1.8.7 + 32bit Amazon Linux running Ruby 1.9.3 + 64bit Amazon Linux running Ruby 1.9.3 + + + + 32bit Amazon Linux running PHP 5.4 + + zip + + + + 64bit Amazon Linux running PHP 5.4 + + zip + + + + 32bit Amazon Linux running PHP 5.3 + + zip + + + + 64bit Amazon Linux running PHP 5.3 + + zip + + + + 32bit Amazon Linux running Node.js + + .zip + .war + + + + 64bit Amazon Linux running Node.js + + .zip + .war + + + + 64bit Windows Server 2008 R2 running IIS 7.5 + + zip + + + + 64bit Windows Server 2012 running IIS 8 + + zip + + + + 32bit Amazon Linux running Tomcat 7 + + war + zip + + + + 64bit Amazon Linux running Tomcat 7 + + war + zip + + + + 32bit Amazon Linux running Tomcat 6 + + war + zip + + + + 64bit Amazon Linux running Tomcat 6 + + war + zip + + + + 32bit Amazon Linux running Python + + zip + + + + 64bit Amazon Linux running Python + + zip + + + + 32bit Amazon Linux running Ruby 1.8.7 + + war + zip + + + + 64bit Amazon Linux running Ruby 1.8.7 + + war + zip + + + + 32bit Amazon Linux running Ruby 1.9.3 + + zip + war + + + + 64bit Amazon Linux running Ruby 1.9.3 + + war + zip + + + + + + af7e11cd-9167-11e2-9d65-771f0f370017 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-retrieve-environment-info.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-retrieve-environment-info.json new file mode 100644 index 0000000000000000000000000000000000000000..36fe63f8230c09f9ddfc5a4f83e085a8f8cbd3b4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-retrieve-environment-info.json @@ -0,0 +1,13 @@ +{ + "EnvironmentInfo": [ + { + "SampleTimestamp": "2010-11-17T20:40:23.210Z", + "Message": "https://elasticbeanstalk.us-east-1.s3.amazonaws.com/environments%2Fa514386a-709f-4888-9683-068c38d744b4%2Flogs%2Fi-92a3ceff%2F278756a8-7d83-4bc1-93db-b1763163705a.log?Expires=1291236023%26AuthParams", + "InfoType": "tail", + "Ec2InstanceId": "i-92a3ceff" + } + ], + "ResponseMetadata": { + "RequestId": "e8e785c9-f28a-11df-8a78-9f77047e0d0c" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-retrieve-environment-info.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-retrieve-environment-info.xml new file mode 100644 index 0000000000000000000000000000000000000000..793d2640c1d5dd2b005301c79ec5c6f89f833d56 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-retrieve-environment-info.xml @@ -0,0 +1,15 @@ + + + + + https://elasticbeanstalk.us-east-1.s3.amazonaws.com/environments%2Fa514386a-709f-4888-9683-068c38d744b4%2Flogs%2Fi-92a3ceff%2F278756a8-7d83-4bc1-93db-b1763163705a.log?Expires=1291236023%26AuthParams + 2010-11-17T20:40:23.210Z + tail + i-92a3ceff + + + + + e8e785c9-f28a-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-terminate-environment.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-terminate-environment.json new file mode 100644 index 0000000000000000000000000000000000000000..a33573ec94cae5e9cf6831801048832833e1bbbf --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-terminate-environment.json @@ -0,0 +1,17 @@ +{ + "ApplicationName": "SampleApp", + "EnvironmentName": "SampleApp", + "VersionLabel": "Version1", + "Status": "Terminating", + "Description": "EnvDescrip", + "ResponseMetadata": { + "RequestId": "9b71af21-f26d-11df-8a78-9f77047e0d0c" + }, + "EnvironmentId": "e-icsgecu3wf", + "EndpointURL": "elasticbeanstalk-SampleApp-1394386994.us-east-1.elb.amazon\naws.com", + "SolutionStackName": "32bit Amazon Linux running Tomcat 7", + "CNAME": "SampleApp-jxb293wg7n.elasticbeanstalk.amazonaws.com", + "Health": "Grey", + "DateUpdated": "2010-11-17T17:10:41.976Z", + "DateCreated": "2010-11-17T03:59:33.520Z" +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-terminate-environment.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-terminate-environment.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ec7452c3b63ba4e50cb285a069057456c780b51 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-terminate-environment.xml @@ -0,0 +1,17 @@ + + + Version1 + Terminating + SampleApp + elasticbeanstalk-SampleApp-1394386994.us-east-1.elb.amazon +aws.com +SampleApp-jxb293wg7n.elasticbeanstalk.amazonaws.com Grey +e-icsgecu3wf 2010-11-17T17:10:41.976Z 32bit Amazon Linux running Tomcat 7 + EnvDescrip + SampleApp + 2010-11-17T03:59:33.520Z + + + 9b71af21-f26d-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application-version.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application-version.json new file mode 100644 index 0000000000000000000000000000000000000000..46cde96148109f27e1603dd6890de7f59df1667b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application-version.json @@ -0,0 +1,16 @@ +{ + "ApplicationVersion": { + "ApplicationName": "SampleApp", + "VersionLabel": "New Version", + "Description": "New Release Description", + "DateCreated": "2010-11-17T19:26:20.699Z", + "DateUpdated": "2010-11-17T20:48:16.632Z", + "SourceBundle": { + "S3Bucket": "awsemr", + "S3Key": "sample.war" + } + }, + "ResponseMetadata": { + "RequestId": "00b10aa1-f28c-11df-8a78-9f77047e0d0c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application-version.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application-version.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d1820fbed3c9848cfd2f2c711bb17e5f752d417 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application-version.xml @@ -0,0 +1,18 @@ + + + + + awsemr + sample.war + + New Version + New Release Description + SampleApp + 2010-11-17T19:26:20.699Z + 2010-11-17T20:48:16.632Z + + + + 00b10aa1-f28c-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application.json new file mode 100644 index 0000000000000000000000000000000000000000..11a6c8f82ec0e6b16c2ef98ba22d9ce3f5d5b847 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application.json @@ -0,0 +1,17 @@ +{ + "Application": { + "ApplicationName": "SampleApp", + "Description": "Another Description", + "Versions": [ + "New Version" + ], + "DateCreated": "2010-11-17T19:26:20.410Z", + "ConfigurationTemplates": [ + "Default" + ], + "DateUpdated": "2010-11-17T20:42:54.611Z" + }, + "ResponseMetadata": { + "RequestId": "40be666b-f28b-11df-8a78-9f77047e0d0c" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application.xml new file mode 100644 index 0000000000000000000000000000000000000000..528819cc7ab4c99dd4f812815bdc2a93b9328654 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elasticbeanstalk-update-application.xml @@ -0,0 +1,19 @@ + + + + + New Version + + Another Description + SampleApp + 2010-11-17T19:26:20.410Z + 2010-11-17T20:42:54.611Z + + Default + + + + + 40be666b-f28b-11df-8a78-9f77047e0d0c + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policies.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policies.json new file mode 100644 index 0000000000000000000000000000000000000000..7b85caf6749c40628902b50f1979cd287e536046 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policies.json @@ -0,0 +1,507 @@ +{ + "PolicyDescriptions": [ + { + "PolicyAttributeDescriptions": [ + { + "AttributeName": "Protocol-SSLv2", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-AES256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-RSA-AES256-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-DSS-AES256-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "AES256-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "KRB5-DES-CBC3-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "KRB5-DES-CBC3-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "ADH-DES-CBC3-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EDH-RSA-DES-CBC3-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EDH-DSS-DES-CBC3-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DES-CBC3-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DES-CBC3-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-AES128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-RSA-AES128-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-DSS-AES128-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "AES128-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "KRB5-RC4-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "KRB5-RC4-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "ADH-RC4-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "RC4-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "RC4-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "RC2-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "KRB5-DES-CBC-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "KRB5-DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "ADH-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EDH-RSA-DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EDH-DSS-DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DES-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-KRB5-RC4-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-KRB5-RC2-CBC-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-KRB5-DES-CBC-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-KRB5-RC4-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-KRB5-RC2-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-KRB5-DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-ADH-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-ADH-RC4-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-EDH-RSA-DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-EDH-DSS-DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-DES-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-RC2-CBC-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-RC4-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-RSA-CAMELLIA256-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-DSS-CAMELLIA256-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "ADH-CAMELLIA256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "CAMELLIA256-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "PSK-AES256-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "PSK-3DES-EDE-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-RSA-SEED-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-DSS-SEED-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-RSA-CAMELLIA128-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-DSS-CAMELLIA128-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "ADH-SEED-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-CAMELLIA128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "SEED-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "CAMELLIA128-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "PSK-AES128-CBC-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "PSK-RC4-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "Protocol-TLSv1", + "AttributeValue": "true" + }, + { + "AttributeName": "IDEA-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "Protocol-SSLv3", + "AttributeValue": "true" + } + ], + "PolicyName": "ELBSample-OpenSSLDefaultCipherPolicy", + "PolicyTypeName": "SSLNegotiationPolicyType" + }, + { + "PolicyAttributeDescriptions": [ + { + "AttributeName": "Protocol-SSLv2", + "AttributeValue": "false" + }, + { + "AttributeName": "EDH-DSS-DES-CBC3-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-RSA-CAMELLIA128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DES-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "KRB5-RC4-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-CAMELLIA128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-KRB5-RC4-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-RC4-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "PSK-RC4-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "PSK-AES128-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-EDH-RSA-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "CAMELLIA128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-DSS-AES128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EDH-RSA-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-RSA-SEED-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "KRB5-DES-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-RSA-CAMELLIA256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-DES-CBC3-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DES-CBC3-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-KRB5-RC2-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "EDH-DSS-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "KRB5-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "PSK-AES256-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-AES256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "KRB5-DES-CBC3-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "AES128-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-DSS-SEED-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-CAMELLIA256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-KRB5-RC4-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EDH-RSA-DES-CBC3-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-KRB5-DES-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "Protocol-TLSv1", + "AttributeValue": "true" + }, + { + "AttributeName": "PSK-3DES-EDE-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "SEED-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-DSS-CAMELLIA256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "IDEA-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "RC2-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "KRB5-RC4-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-AES128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "RC4-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "AES256-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "Protocol-SSLv3", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DES-CBC3-SHA", + "AttributeValue": "true" + }, + { + "AttributeName": "DHE-RSA-AES128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-EDH-DSS-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-KRB5-RC2-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-RSA-AES256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "KRB5-DES-CBC3-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "RC4-MD5", + "AttributeValue": "true" + }, + { + "AttributeName": "EXP-RC2-CBC-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-ADH-RC4-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-RC4-MD5", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "CAMELLIA256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-DSS-CAMELLIA128-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-KRB5-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "EXP-ADH-DES-CBC-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "DHE-DSS-AES256-SHA", + "AttributeValue": "false" + }, + { + "AttributeName": "ADH-SEED-SHA", + "AttributeValue": "false" + } + ], + "PolicyName": "ELBSample-ELBDefaultCipherPolicy", + "PolicyTypeName": "SSLNegotiationPolicyType" + } + ], + "ResponseMetadata": { + "RequestId": "ab663f4e-9167-11e2-ab97-3b4060f1aeb3" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policies.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policies.xml new file mode 100644 index 0000000000000000000000000000000000000000..a069a571116b90f6fadb6b079dd042032b071c01 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policies.xml @@ -0,0 +1,509 @@ + + + + + ELBSample-OpenSSLDefaultCipherPolicy + SSLNegotiationPolicyType + + + Protocol-SSLv2 + false + + + ADH-AES256-SHA + false + + + DHE-RSA-AES256-SHA + true + + + DHE-DSS-AES256-SHA + true + + + AES256-SHA + true + + + KRB5-DES-CBC3-MD5 + true + + + KRB5-DES-CBC3-SHA + true + + + ADH-DES-CBC3-SHA + false + + + EDH-RSA-DES-CBC3-SHA + true + + + EDH-DSS-DES-CBC3-SHA + true + + + DES-CBC3-SHA + true + + + DES-CBC3-MD5 + false + + + ADH-AES128-SHA + false + + + DHE-RSA-AES128-SHA + true + + + DHE-DSS-AES128-SHA + true + + + AES128-SHA + true + + + KRB5-RC4-MD5 + true + + + KRB5-RC4-SHA + true + + + ADH-RC4-MD5 + false + + + RC4-SHA + true + + + RC4-MD5 + true + + + RC2-CBC-MD5 + false + + + KRB5-DES-CBC-MD5 + true + + + KRB5-DES-CBC-SHA + true + + + ADH-DES-CBC-SHA + false + + + EDH-RSA-DES-CBC-SHA + true + + + EDH-DSS-DES-CBC-SHA + true + + + DES-CBC-SHA + true + + + DES-CBC-MD5 + false + + + EXP-KRB5-RC4-MD5 + true + + + EXP-KRB5-RC2-CBC-MD5 + true + + + EXP-KRB5-DES-CBC-MD5 + true + + + EXP-KRB5-RC4-SHA + true + + + EXP-KRB5-RC2-CBC-SHA + true + + + EXP-KRB5-DES-CBC-SHA + true + + + EXP-ADH-DES-CBC-SHA + false + + + EXP-ADH-RC4-MD5 + false + + + EXP-EDH-RSA-DES-CBC-SHA + true + + + EXP-EDH-DSS-DES-CBC-SHA + true + + + EXP-DES-CBC-SHA + true + + + EXP-RC2-CBC-MD5 + true + + + EXP-RC4-MD5 + true + + + DHE-RSA-CAMELLIA256-SHA + true + + + DHE-DSS-CAMELLIA256-SHA + true + + + ADH-CAMELLIA256-SHA + false + + + CAMELLIA256-SHA + true + + + PSK-AES256-CBC-SHA + true + + + PSK-3DES-EDE-CBC-SHA + true + + + DHE-RSA-SEED-SHA + true + + + DHE-DSS-SEED-SHA + true + + + DHE-RSA-CAMELLIA128-SHA + true + + + DHE-DSS-CAMELLIA128-SHA + true + + + ADH-SEED-SHA + false + + + ADH-CAMELLIA128-SHA + false + + + SEED-SHA + true + + + CAMELLIA128-SHA + true + + + PSK-AES128-CBC-SHA + true + + + PSK-RC4-SHA + true + + + Protocol-TLSv1 + true + + + IDEA-CBC-SHA + false + + + Protocol-SSLv3 + true + + + + + ELBSample-ELBDefaultCipherPolicy + SSLNegotiationPolicyType + + + Protocol-SSLv2 + false + + + EDH-DSS-DES-CBC3-SHA + false + + + DHE-RSA-CAMELLIA128-SHA + false + + + DES-CBC-MD5 + false + + + KRB5-RC4-SHA + false + + + ADH-CAMELLIA128-SHA + false + + + EXP-KRB5-RC4-MD5 + false + + + ADH-RC4-MD5 + false + + + PSK-RC4-SHA + false + + + PSK-AES128-CBC-SHA + false + + + EXP-EDH-RSA-DES-CBC-SHA + false + + + CAMELLIA128-SHA + false + + + DHE-DSS-AES128-SHA + false + + + EDH-RSA-DES-CBC-SHA + false + + + DHE-RSA-SEED-SHA + false + + + KRB5-DES-CBC-MD5 + false + + + DHE-RSA-CAMELLIA256-SHA + false + + + ADH-DES-CBC3-SHA + false + + + DES-CBC3-MD5 + false + + + EXP-KRB5-RC2-CBC-MD5 + false + + + EDH-DSS-DES-CBC-SHA + false + + + KRB5-DES-CBC-SHA + false + + + PSK-AES256-CBC-SHA + false + + + ADH-AES256-SHA + false + + + KRB5-DES-CBC3-SHA + false + + + AES128-SHA + true + + + DHE-DSS-SEED-SHA + false + + + ADH-CAMELLIA256-SHA + false + + + EXP-KRB5-RC4-SHA + false + + + EDH-RSA-DES-CBC3-SHA + false + + + EXP-KRB5-DES-CBC-MD5 + false + + + Protocol-TLSv1 + true + + + PSK-3DES-EDE-CBC-SHA + false + + + SEED-SHA + false + + + DHE-DSS-CAMELLIA256-SHA + false + + + IDEA-CBC-SHA + false + + + RC2-CBC-MD5 + false + + + KRB5-RC4-MD5 + false + + + ADH-AES128-SHA + false + + + RC4-SHA + true + + + AES256-SHA + true + + + Protocol-SSLv3 + true + + + EXP-DES-CBC-SHA + false + + + DES-CBC3-SHA + true + + + DHE-RSA-AES128-SHA + false + + + EXP-EDH-DSS-DES-CBC-SHA + false + + + EXP-KRB5-RC2-CBC-SHA + false + + + DHE-RSA-AES256-SHA + false + + + KRB5-DES-CBC3-MD5 + false + + + RC4-MD5 + true + + + EXP-RC2-CBC-MD5 + false + + + DES-CBC-SHA + false + + + EXP-ADH-RC4-MD5 + false + + + EXP-RC4-MD5 + false + + + ADH-DES-CBC-SHA + false + + + CAMELLIA256-SHA + false + + + DHE-DSS-CAMELLIA128-SHA + false + + + EXP-KRB5-DES-CBC-SHA + false + + + EXP-ADH-DES-CBC-SHA + false + + + DHE-DSS-AES256-SHA + false + + + ADH-SEED-SHA + false + + + + + + + ab663f4e-9167-11e2-ab97-3b4060f1aeb3 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policy-types.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policy-types.json new file mode 100644 index 0000000000000000000000000000000000000000..f217d1b3ae12ca16db7ccc4b17894b91fdcffc61 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policy-types.json @@ -0,0 +1,484 @@ +{ + "PolicyTypeDescriptions": [ + { + "PolicyAttributeTypeDescriptions": [ + { + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "CookieExpirationPeriod", + "AttributeType": "Long" + } + ], + "PolicyTypeName": "LBCookieStickinessPolicyType", + "Description": "Stickiness policy with session lifetimes controlled by the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners." + }, + { + "PolicyAttributeTypeDescriptions": [ + { + "Cardinality": "ONE_OR_MORE", + "AttributeName": "PublicKeyPolicyName", + "AttributeType": "PolicyName" + } + ], + "PolicyTypeName": "BackendServerAuthenticationPolicyType", + "Description": "Policy that controls authentication to back-end server(s) and contains one or more policies, such as an instance of a PublicKeyPolicyType. This policy can be associated only with back-end servers that are using HTTPS/SSL." + }, + { + "PolicyAttributeTypeDescriptions": [ + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "Protocol-SSLv2", + "Description": "A description for Protocol-SSLv2", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "true", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "Protocol-TLSv1", + "Description": "A description for Protocol-TLSv1", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "true", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "Protocol-SSLv3", + "Description": "A description for Protocol-SSLv3", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-RSA-AES256-SHA", + "Description": "A description for DHE-RSA-AES256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-DSS-AES256-SHA", + "Description": "A description for DHE-DSS-AES256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-RSA-CAMELLIA256-SHA", + "Description": "A description for DHE-RSA-CAMELLIA256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-DSS-CAMELLIA256-SHA", + "Description": "A description for DHE-DSS-CAMELLIA256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-AES256-SHA", + "Description": "A description for ADH-AES256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-CAMELLIA256-SHA", + "Description": "A description for ADH-CAMELLIA256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "true", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "AES256-SHA", + "Description": "A description for AES256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "CAMELLIA256-SHA", + "Description": "A description for CAMELLIA256-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "PSK-AES256-CBC-SHA", + "Description": "A description for PSK-AES256-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EDH-RSA-DES-CBC3-SHA", + "Description": "A description for EDH-RSA-DES-CBC3-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EDH-DSS-DES-CBC3-SHA", + "Description": "A description for EDH-DSS-DES-CBC3-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-DES-CBC3-SHA", + "Description": "A description for ADH-DES-CBC3-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "true", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DES-CBC3-SHA", + "Description": "A description for DES-CBC3-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DES-CBC3-MD5", + "Description": "A description for DES-CBC3-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "PSK-3DES-EDE-CBC-SHA", + "Description": "A description for PSK-3DES-EDE-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "KRB5-DES-CBC3-SHA", + "Description": "A description for KRB5-DES-CBC3-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "KRB5-DES-CBC3-MD5", + "Description": "A description for KRB5-DES-CBC3-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-RSA-AES128-SHA", + "Description": "A description for DHE-RSA-AES128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-DSS-AES128-SHA", + "Description": "A description for DHE-DSS-AES128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-RSA-SEED-SHA", + "Description": "A description for DHE-RSA-SEED-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-DSS-SEED-SHA", + "Description": "A description for DHE-DSS-SEED-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-RSA-CAMELLIA128-SHA", + "Description": "A description for DHE-RSA-CAMELLIA128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DHE-DSS-CAMELLIA128-SHA", + "Description": "A description for DHE-DSS-CAMELLIA128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-AES128-SHA", + "Description": "A description for ADH-AES128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-SEED-SHA", + "Description": "A description for ADH-SEED-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-CAMELLIA128-SHA", + "Description": "A description for ADH-CAMELLIA128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "true", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "AES128-SHA", + "Description": "A description for AES128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "SEED-SHA", + "Description": "A description for SEED-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "CAMELLIA128-SHA", + "Description": "A description for CAMELLIA128-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "RC2-CBC-MD5", + "Description": "A description for RC2-CBC-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "PSK-AES128-CBC-SHA", + "Description": "A description for PSK-AES128-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-RC4-MD5", + "Description": "A description for ADH-RC4-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "IDEA-CBC-SHA", + "Description": "A description for IDEA-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "true", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "RC4-SHA", + "Description": "A description for RC4-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "true", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "RC4-MD5", + "Description": "A description for RC4-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "PSK-RC4-SHA", + "Description": "A description for PSK-RC4-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "KRB5-RC4-SHA", + "Description": "A description for KRB5-RC4-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "KRB5-RC4-MD5", + "Description": "A description for KRB5-RC4-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EDH-RSA-DES-CBC-SHA", + "Description": "A description for EDH-RSA-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EDH-DSS-DES-CBC-SHA", + "Description": "A description for EDH-DSS-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "ADH-DES-CBC-SHA", + "Description": "A description for ADH-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DES-CBC-SHA", + "Description": "A description for DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "DES-CBC-MD5", + "Description": "A description for DES-CBC-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "KRB5-DES-CBC-SHA", + "Description": "A description for KRB5-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "KRB5-DES-CBC-MD5", + "Description": "A description for KRB5-DES-CBC-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-EDH-RSA-DES-CBC-SHA", + "Description": "A description for EXP-EDH-RSA-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-EDH-DSS-DES-CBC-SHA", + "Description": "A description for EXP-EDH-DSS-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-ADH-DES-CBC-SHA", + "Description": "A description for EXP-ADH-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-DES-CBC-SHA", + "Description": "A description for EXP-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-RC2-CBC-MD5", + "Description": "A description for EXP-RC2-CBC-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-KRB5-RC2-CBC-SHA", + "Description": "A description for EXP-KRB5-RC2-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-KRB5-DES-CBC-SHA", + "Description": "A description for EXP-KRB5-DES-CBC-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-KRB5-RC2-CBC-MD5", + "Description": "A description for EXP-KRB5-RC2-CBC-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-KRB5-DES-CBC-MD5", + "Description": "A description for EXP-KRB5-DES-CBC-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-ADH-RC4-MD5", + "Description": "A description for EXP-ADH-RC4-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-RC4-MD5", + "Description": "A description for EXP-RC4-MD5", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-KRB5-RC4-SHA", + "Description": "A description for EXP-KRB5-RC4-SHA", + "AttributeType": "Boolean" + }, + { + "DefaultValue": "false", + "Cardinality": "ZERO_OR_ONE", + "AttributeName": "EXP-KRB5-RC4-MD5", + "Description": "A description for EXP-KRB5-RC4-MD5", + "AttributeType": "Boolean" + } + ], + "PolicyTypeName": "SSLNegotiationPolicyType", + "Description": "Listener policy that defines the ciphers and protocols that will be accepted by the load balancer. This policy can be associated only with HTTPS/SSL listeners." + }, + { + "PolicyAttributeTypeDescriptions": [ + { + "Cardinality": "ONE", + "AttributeName": "PublicKey", + "AttributeType": "String" + } + ], + "PolicyTypeName": "PublicKeyPolicyType", + "Description": "Policy containing a list of public keys to accept when authenticating the back-end server(s). This policy cannot be applied directly to back-end servers or listeners but must be part of a BackendServerAuthenticationPolicyType." + }, + { + "PolicyAttributeTypeDescriptions": [ + { + "Cardinality": "ONE", + "AttributeName": "CookieName", + "AttributeType": "String" + } + ], + "PolicyTypeName": "AppCookieStickinessPolicyType", + "Description": "Stickiness policy with session lifetimes controlled by the lifetime of the application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners." + } + ], + "ResponseMetadata": { + "RequestId": "ab7c8724-9167-11e2-b472-75a63fc08e7f" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policy-types.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policy-types.xml new file mode 100644 index 0000000000000000000000000000000000000000..1923528765fcc34895702dbb8afc5b7c168ea11d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancer-policy-types.xml @@ -0,0 +1,486 @@ + + + + + + + CookieExpirationPeriod + Long + ZERO_OR_ONE + + + LBCookieStickinessPolicyType + Stickiness policy with session lifetimes controlled by the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners. + + + + + PublicKeyPolicyName + PolicyName + ONE_OR_MORE + + + BackendServerAuthenticationPolicyType + Policy that controls authentication to back-end server(s) and contains one or more policies, such as an instance of a PublicKeyPolicyType. This policy can be associated only with back-end servers that are using HTTPS/SSL. + + + + + Protocol-SSLv2 + A description for Protocol-SSLv2 + Boolean + false + ZERO_OR_ONE + + + Protocol-TLSv1 + A description for Protocol-TLSv1 + Boolean + true + ZERO_OR_ONE + + + Protocol-SSLv3 + A description for Protocol-SSLv3 + Boolean + true + ZERO_OR_ONE + + + DHE-RSA-AES256-SHA + A description for DHE-RSA-AES256-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-DSS-AES256-SHA + A description for DHE-DSS-AES256-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-RSA-CAMELLIA256-SHA + A description for DHE-RSA-CAMELLIA256-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-DSS-CAMELLIA256-SHA + A description for DHE-DSS-CAMELLIA256-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-AES256-SHA + A description for ADH-AES256-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-CAMELLIA256-SHA + A description for ADH-CAMELLIA256-SHA + Boolean + false + ZERO_OR_ONE + + + AES256-SHA + A description for AES256-SHA + Boolean + true + ZERO_OR_ONE + + + CAMELLIA256-SHA + A description for CAMELLIA256-SHA + Boolean + false + ZERO_OR_ONE + + + PSK-AES256-CBC-SHA + A description for PSK-AES256-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EDH-RSA-DES-CBC3-SHA + A description for EDH-RSA-DES-CBC3-SHA + Boolean + false + ZERO_OR_ONE + + + EDH-DSS-DES-CBC3-SHA + A description for EDH-DSS-DES-CBC3-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-DES-CBC3-SHA + A description for ADH-DES-CBC3-SHA + Boolean + false + ZERO_OR_ONE + + + DES-CBC3-SHA + A description for DES-CBC3-SHA + Boolean + true + ZERO_OR_ONE + + + DES-CBC3-MD5 + A description for DES-CBC3-MD5 + Boolean + false + ZERO_OR_ONE + + + PSK-3DES-EDE-CBC-SHA + A description for PSK-3DES-EDE-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + KRB5-DES-CBC3-SHA + A description for KRB5-DES-CBC3-SHA + Boolean + false + ZERO_OR_ONE + + + KRB5-DES-CBC3-MD5 + A description for KRB5-DES-CBC3-MD5 + Boolean + false + ZERO_OR_ONE + + + DHE-RSA-AES128-SHA + A description for DHE-RSA-AES128-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-DSS-AES128-SHA + A description for DHE-DSS-AES128-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-RSA-SEED-SHA + A description for DHE-RSA-SEED-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-DSS-SEED-SHA + A description for DHE-DSS-SEED-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-RSA-CAMELLIA128-SHA + A description for DHE-RSA-CAMELLIA128-SHA + Boolean + false + ZERO_OR_ONE + + + DHE-DSS-CAMELLIA128-SHA + A description for DHE-DSS-CAMELLIA128-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-AES128-SHA + A description for ADH-AES128-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-SEED-SHA + A description for ADH-SEED-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-CAMELLIA128-SHA + A description for ADH-CAMELLIA128-SHA + Boolean + false + ZERO_OR_ONE + + + AES128-SHA + A description for AES128-SHA + Boolean + true + ZERO_OR_ONE + + + SEED-SHA + A description for SEED-SHA + Boolean + false + ZERO_OR_ONE + + + CAMELLIA128-SHA + A description for CAMELLIA128-SHA + Boolean + false + ZERO_OR_ONE + + + RC2-CBC-MD5 + A description for RC2-CBC-MD5 + Boolean + false + ZERO_OR_ONE + + + PSK-AES128-CBC-SHA + A description for PSK-AES128-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-RC4-MD5 + A description for ADH-RC4-MD5 + Boolean + false + ZERO_OR_ONE + + + IDEA-CBC-SHA + A description for IDEA-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + RC4-SHA + A description for RC4-SHA + Boolean + true + ZERO_OR_ONE + + + RC4-MD5 + A description for RC4-MD5 + Boolean + true + ZERO_OR_ONE + + + PSK-RC4-SHA + A description for PSK-RC4-SHA + Boolean + false + ZERO_OR_ONE + + + KRB5-RC4-SHA + A description for KRB5-RC4-SHA + Boolean + false + ZERO_OR_ONE + + + KRB5-RC4-MD5 + A description for KRB5-RC4-MD5 + Boolean + false + ZERO_OR_ONE + + + EDH-RSA-DES-CBC-SHA + A description for EDH-RSA-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EDH-DSS-DES-CBC-SHA + A description for EDH-DSS-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + ADH-DES-CBC-SHA + A description for ADH-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + DES-CBC-SHA + A description for DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + DES-CBC-MD5 + A description for DES-CBC-MD5 + Boolean + false + ZERO_OR_ONE + + + KRB5-DES-CBC-SHA + A description for KRB5-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + KRB5-DES-CBC-MD5 + A description for KRB5-DES-CBC-MD5 + Boolean + false + ZERO_OR_ONE + + + EXP-EDH-RSA-DES-CBC-SHA + A description for EXP-EDH-RSA-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EXP-EDH-DSS-DES-CBC-SHA + A description for EXP-EDH-DSS-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EXP-ADH-DES-CBC-SHA + A description for EXP-ADH-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EXP-DES-CBC-SHA + A description for EXP-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EXP-RC2-CBC-MD5 + A description for EXP-RC2-CBC-MD5 + Boolean + false + ZERO_OR_ONE + + + EXP-KRB5-RC2-CBC-SHA + A description for EXP-KRB5-RC2-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EXP-KRB5-DES-CBC-SHA + A description for EXP-KRB5-DES-CBC-SHA + Boolean + false + ZERO_OR_ONE + + + EXP-KRB5-RC2-CBC-MD5 + A description for EXP-KRB5-RC2-CBC-MD5 + Boolean + false + ZERO_OR_ONE + + + EXP-KRB5-DES-CBC-MD5 + A description for EXP-KRB5-DES-CBC-MD5 + Boolean + false + ZERO_OR_ONE + + + EXP-ADH-RC4-MD5 + A description for EXP-ADH-RC4-MD5 + Boolean + false + ZERO_OR_ONE + + + EXP-RC4-MD5 + A description for EXP-RC4-MD5 + Boolean + false + ZERO_OR_ONE + + + EXP-KRB5-RC4-SHA + A description for EXP-KRB5-RC4-SHA + Boolean + false + ZERO_OR_ONE + + + EXP-KRB5-RC4-MD5 + A description for EXP-KRB5-RC4-MD5 + Boolean + false + ZERO_OR_ONE + + + SSLNegotiationPolicyType + Listener policy that defines the ciphers and protocols that will be accepted by the load balancer. This policy can be associated only with HTTPS/SSL listeners. + + + + + PublicKey + String + ONE + + + PublicKeyPolicyType + Policy containing a list of public keys to accept when authenticating the back-end server(s). This policy cannot be applied directly to back-end servers or listeners but must be part of a BackendServerAuthenticationPolicyType. + + + + + CookieName + String + ONE + + + AppCookieStickinessPolicyType + Stickiness policy with session lifetimes controlled by the lifetime of the application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners. + + + + + ab7c8724-9167-11e2-b472-75a63fc08e7f + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancers.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancers.json new file mode 100644 index 0000000000000000000000000000000000000000..4433e49ad68456a41c230ee1905cb95a7c872a9e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancers.json @@ -0,0 +1,6 @@ +{ + "LoadBalancerDescriptions": [], + "ResponseMetadata": { + "RequestId": "ab548cc1-9167-11e2-b472-75a63fc08e7f" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancers.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancers.xml new file mode 100644 index 0000000000000000000000000000000000000000..07c35e5772597e1c8d7c43ca17189f7cce32d6e2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/elb-describe-load-balancers.xml @@ -0,0 +1,8 @@ + + + + + + ab548cc1-9167-11e2-b472-75a63fc08e7f + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-create-virtual-mfa-device.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-create-virtual-mfa-device.json new file mode 100644 index 0000000000000000000000000000000000000000..a4ebae2c3f2b58af2fd06e5cf6c685277c5c5aca --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-create-virtual-mfa-device.json @@ -0,0 +1,10 @@ +{ + "ResponseMetadata": { + "RequestId": "c7bf48a5-d35c-11e2-b096-29dca78bf3ce" + }, + "VirtualMFADevice": { + "Base32StringSeed": "U3IWOL56EJ3Q5ILYBLU6NLTNZR3V5SAOWKQ5AOEPEQUUGQJFVDQKOA2N7OANTHBR", + "SerialNumber": "arn:aws:iam::419278470775:mfa/ExampleMFADevice", + "QRCodePNG": "foo" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-create-virtual-mfa-device.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-create-virtual-mfa-device.xml new file mode 100644 index 0000000000000000000000000000000000000000..1466f5ce9cee9c1c9ea8d345bd25a7faa097e882 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-create-virtual-mfa-device.xml @@ -0,0 +1,12 @@ + + + + Zm9v + VTNJV09MNTZFSjNRNUlMWUJMVTZOTFROWlIzVjVTQU9XS1E1QU9FUEVRVVVHUUpGVkRRS09BMk43T0FOVEhCUg== + arn:aws:iam::419278470775:mfa/ExampleMFADevice + + + + c7bf48a5-d35c-11e2-b096-29dca78bf3ce + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-account-summary.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-account-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..8d808d26c62c6d14e7c23a485ff52d0da1435c5e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-account-summary.json @@ -0,0 +1,27 @@ +{ + "SummaryMap": { + "AccessKeysPerUserQuota": 2, + "AssumeRolePolicySizeQuota": 2048, + "UsersQuota": 5000, + "GroupsPerUserQuota": 10, + "Users": 1, + "Roles": 0, + "MFADevices": 0, + "InstanceProfilesQuota": 100, + "AccountMFAEnabled": 0, + "ServerCertificates": 0, + "UserPolicySizeQuota": 2048, + "RolePolicySizeQuota": 10240, + "MFADevicesInUse": 0, + "GroupsQuota": 100, + "Groups": 0, + "InstanceProfiles": 0, + "GroupPolicySizeQuota": 5120, + "SigningCertificatesPerUserQuota": 2, + "ServerCertificatesQuota": 10, + "RolesQuota": 250 + }, + "ResponseMetadata": { + "RequestId": "a8e3b3ed-9167-11e2-8a19-1174a5b297de" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-account-summary.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-account-summary.xml new file mode 100644 index 0000000000000000000000000000000000000000..e5b0a957b5526f4a186cbf5f8a04cb43dded2db0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-account-summary.xml @@ -0,0 +1,89 @@ + + + + + Users + 1 + + + GroupsQuota + 100 + + + RolesQuota + 250 + + + GroupPolicySizeQuota + 5120 + + + ServerCertificates + 0 + + + ServerCertificatesQuota + 10 + + + Groups + 0 + + + MFADevicesInUse + 0 + + + UsersQuota + 5000 + + + AccountMFAEnabled + 0 + + + InstanceProfilesQuota + 100 + + + MFADevices + 0 + + + AccessKeysPerUserQuota + 2 + + + RolePolicySizeQuota + 10240 + + + UserPolicySizeQuota + 2048 + + + GroupsPerUserQuota + 10 + + + SigningCertificatesPerUserQuota + 2 + + + AssumeRolePolicySizeQuota + 2048 + + + InstanceProfiles + 0 + + + Roles + 0 + + + + + a8e3b3ed-9167-11e2-8a19-1174a5b297de + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-group.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-group.json new file mode 100644 index 0000000000000000000000000000000000000000..4ce25e3c813516174f3abd23f82919be1585b23f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-group.json @@ -0,0 +1,22 @@ +{ + "Group": { + "Path": "/", + "CreateDate": "2013-06-04T13:19:26Z", + "GroupId": "AGPAIX2UU43C4MKIJO6OE", + "Arn": "arn:aws:iam::419278470775:group/test_admin", + "GroupName": "test_admin" + }, + "Users": [ + { + "UserName": "harry", + "Path": "/", + "CreateDate": "2013-06-04T13:20:49Z", + "UserId": "AIDAIWOYUHHXRAGTJC6H2", + "Arn": "arn:aws:iam::419278470775:user/harry" + } + ], + "ResponseMetadata": { + "RequestId": "b23a1f90-d364-11e2-9e37-0baaf58cf1ee" + }, + "IsTruncated": false +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-group.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-group.xml new file mode 100644 index 0000000000000000000000000000000000000000..ae10da0a63017a1eb04ecd63367e6408e359d6fd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-group.xml @@ -0,0 +1,24 @@ + + + + + AIDAIWOYUHHXRAGTJC6H2 + / + harry + arn:aws:iam::419278470775:user/harry + 2013-06-04T13:20:49Z + + + false + + AGPAIX2UU43C4MKIJO6OE + test_admin + / + arn:aws:iam::419278470775:group/test_admin + 2013-06-04T13:19:26Z + + + + b23a1f90-d364-11e2-9e37-0baaf58cf1ee + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user-policy.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user-policy.json new file mode 100644 index 0000000000000000000000000000000000000000..f898462315bd44b428644ffff404b977a4d9d960 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user-policy.json @@ -0,0 +1,21 @@ +{ + "UserName": "test", + "PolicyName": "test", + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ec2:CreateSnapshot", + "ec2:DescribeInstances", + "ec2:DescribeVolumes" + ], + "Resource": "*", + "Effect": "Allow", + "Sid": "Stmt1331504410389" + } + ] + }, + "ResponseMetadata": { + "RequestId": "5a2702d5-bcfd-11e2-b2db-2f18d5db5f10" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user-policy.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user-policy.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7c688d846d752c1b36eb75a19673ac48d797a86 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user-policy.xml @@ -0,0 +1,10 @@ + + + test + test + %7B%0A%20%20%22Statement%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22Sid%22%3A%20%22Stmt1331504410389%22%2C%0A%20%20%20%20%20%20%22Action%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%22ec2%3ACreateSnapshot%22%2C%0A%20%20%20%20%20%20%20%20%22ec2%3ADescribeInstances%22%2C%0A%20%20%20%20%20%20%20%20%22ec2%3ADescribeVolumes%22%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22Effect%22%3A%20%22Allow%22%2C%0A%20%20%20%20%20%20%22Resource%22%3A%20%22%2A%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D + + + 5a2702d5-bcfd-11e2-b2db-2f18d5db5f10 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user.json new file mode 100644 index 0000000000000000000000000000000000000000..4ac184443fb54ff12d952f77fae349df28dfc793 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user.json @@ -0,0 +1,10 @@ +{ + "User": { + "CreateDate": "2011-12-19T23:16:46Z", + "UserId": "123456789012", + "Arn": "arn:aws:iam::123456789012:root" + }, + "ResponseMetadata": { + "RequestId": "a8ca5eb9-9167-11e2-8395-2fafede00095" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user.xml new file mode 100644 index 0000000000000000000000000000000000000000..a1875d68e123b0e03420991175fba8bc2d7b3075 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-get-user.xml @@ -0,0 +1,12 @@ + + + + 123456789012 + arn:aws:iam::123456789012:root + 2011-12-19T23:16:46Z + + + + a8ca5eb9-9167-11e2-8395-2fafede00095 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-access-keys.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-access-keys.json new file mode 100644 index 0000000000000000000000000000000000000000..f30499eaeabebcee716e9d1d9892fc21f583fc36 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-access-keys.json @@ -0,0 +1,8 @@ +{"AccessKeyMetadata": [{"AccessKeyId": "AKIAIOSFODNN7EXAMPLE", + "Status": "Active", + "UserName": "Bob"}, + {"AccessKeyId": "AKIAI44QH8DHBEXAMPLE", + "Status": "Inactive", + "UserName": "Bob"}], + "IsTruncated": false, + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-access-keys.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-access-keys.xml new file mode 100644 index 0000000000000000000000000000000000000000..4c8b4c6b6fa676fc24c8f86d13e5660da7db68ee --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-access-keys.xml @@ -0,0 +1,21 @@ + + + Bob + + + Bob + AKIAIOSFODNN7EXAMPLE + Active + + + Bob + AKIAI44QH8DHBEXAMPLE + Inactive + + + false + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-account-aliases.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-account-aliases.json new file mode 100644 index 0000000000000000000000000000000000000000..422c30bad6c6c2533831d31e15decb68b742f715 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-account-aliases.json @@ -0,0 +1,5 @@ +{"AccountAliases": ["foocorporation"], + "IsTruncated": false, + "ResponseMetadata": + {"RequestId": "c5a076e9-f1b0-11df-8fbe-45274EXAMPLE"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-account-aliases.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-account-aliases.xml new file mode 100644 index 0000000000000000000000000000000000000000..9df2d2cd7336fea4ef0242d44d5343aca85a6475 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-account-aliases.xml @@ -0,0 +1,11 @@ + + + false + + foocorporation + + + + c5a076e9-f1b0-11df-8fbe-45274EXAMPLE + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..c0de9c56b802506c5f3038845da248045095d9f9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-groups.json @@ -0,0 +1,16 @@ +{"Groups": [ + {"Arn": "arn:aws:iam::123456789012:group/Admins", + "GroupId": "AGPACKCEVSQ6C2EXAMPLE", + "GroupName": "Admins", + "Path": "/division_abc/subdivision_xyz/"}, + {"Arn": "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/engineering/Test", + "GroupId": "AGP2MAB8DPLSRHEXAMPLE", + "GroupName": "Test", + "Path": "/division_abc/subdivision_xyz/product_1234/engineering/"}, + {"Arn": "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/Managers", + "GroupId": "AGPIODR4TAW7CSEXAMPLE", + "GroupName": "Managers", + "Path": "/division_abc/subdivision_xyz/product_1234/"}], + "IsTruncated": false, + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca8717aeb263bb1be3a0e2cc6f5a13e7638a19ea --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-groups.xml @@ -0,0 +1,28 @@ + + + + + /division_abc/subdivision_xyz/ + Admins + AGPACKCEVSQ6C2EXAMPLE + arn:aws:iam::123456789012:group/Admins + + + /division_abc/subdivision_xyz/product_1234/engineering/ + Test + AGP2MAB8DPLSRHEXAMPLE + arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/engineering/Test + + + /division_abc/subdivision_xyz/product_1234/ + Managers + AGPIODR4TAW7CSEXAMPLE + arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/Managers + + + false + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-instance-profiles.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-instance-profiles.json new file mode 100644 index 0000000000000000000000000000000000000000..42b6f880764dc6c70261f68ec7d6b826f00239db --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-instance-profiles.json @@ -0,0 +1,14 @@ +{"InstanceProfiles": [ + {"Arn": "arn:aws:iam::123456789012:instance-profile/application_abc/component_xyz/Database", + "CreateDate": "2012-05-09T16:27:03Z", + "InstanceProfileName": "Database", + "Path": "/application_abc/component_xyz/", + "Roles": []}, + {"Arn": "arn:aws:iam::123456789012:instance-profile/application_abc/component_xyz/Webserver", + "CreateDate": "2012-05-09T16:27:11Z", + "InstanceProfileName": "Webserver", + "Path": "/application_abc/component_xyz/", + "Roles": []}], + "IsTruncated": false, + "ResponseMetadata": {"RequestId": "fd74fa8d-99f3-11e1-a4c3-27EXAMPLE804"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-instance-profiles.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-instance-profiles.xml new file mode 100644 index 0000000000000000000000000000000000000000..c624cd972d55c8ab469aa7b6848925c905ec9225 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-instance-profiles.xml @@ -0,0 +1,26 @@ + + + false + + + AIPACIFN4OZXG7EXAMPLE + + Database + /application_abc/component_xyz/ + arn:aws:iam::123456789012:instance-profile/application_abc/component_xyz/Database + 2012-05-09T16:27:03Z + + + AIPACZLSXM2EYYEXAMPLE + + Webserver + /application_abc/component_xyz/ + arn:aws:iam::123456789012:instance-profile/application_abc/component_xyz/Webserver + 2012-05-09T16:27:11Z + + + + + fd74fa8d-99f3-11e1-a4c3-27EXAMPLE804 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-mfa-devices.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-mfa-devices.json new file mode 100644 index 0000000000000000000000000000000000000000..f14cb5900ea7bbb23b74f0e2637b15a8b86faaa3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-mfa-devices.json @@ -0,0 +1,6 @@ +{"IsTruncated": false, + "MFADevices": [ + {"SerialNumber": "R1234", "UserName": "Bob"} + ], + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-mfa-devices.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-mfa-devices.xml new file mode 100644 index 0000000000000000000000000000000000000000..75ae00e2e3ceac2fa93675dcde04a6c4bbde0de5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-mfa-devices.xml @@ -0,0 +1,14 @@ + + + + + Bob + R1234 + + + false + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-roles.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-roles.json new file mode 100644 index 0000000000000000000000000000000000000000..ec9fc13741209d6b00fb92663df873b0f8f968f9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-roles.json @@ -0,0 +1,54 @@ +{ + "ResponseMetadata": { + "RequestId": "20f7279f-99ee-11e1-a4c3-27EXAMPLE804" + }, + "IsTruncated": false, + "Roles": [ + { + "AssumeRolePolicyDocument": { + "Version": "2008-10-17", + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "ec2.amazonaws.com" + ] + } + } + ] + }, + "RoleId": "AROACVSVTSZYEXAMPLEYK", + "CreateDate": "2012-05-09T15:45:35Z", + "RoleName": "S3Access", + "Path": "/application_abc/component_xyz/", + "Arn": "arn:aws:iam::123456789012:role/application_abc/component_xyz/S3Access" + }, + { + "AssumeRolePolicyDocument": { + "Version": "2008-10-17", + "Statement": [ + { + "Action": [ + "sts:AssumeRole" + ], + "Effect": "Allow", + "Principal": { + "Service": [ + "ec2.amazonaws.com" + ] + } + } + ] + }, + "RoleId": "AROAC2ICXG32EXAMPLEWK", + "CreateDate": "2012-05-09T15:45:45Z", + "RoleName": "SDBAccess", + "Path": "/application_abc/component_xyz/", + "Arn": "arn:aws:iam::123456789012:role/application_abc/component_xyz/SDBAccess" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-roles.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-roles.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ee1e78d042a02e2b2f9e3f5fbacf6644c2e04be --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-roles.xml @@ -0,0 +1,26 @@ + + + false + + + /application_abc/component_xyz/ + arn:aws:iam::123456789012:role/application_abc/component_xyz/S3Access + S3Access + %7B%22Version%22%3A%222008-10-17%22%2C%22Statement%22%3A%5B%7B%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22ec2.amazonaws.com%22%5D%7D%2C%22Action%22%3A%5B%22sts%3AAssumeRole%22%5D%7D%5D%7D + 2012-05-09T15:45:35Z + AROACVSVTSZYEXAMPLEYK + + + /application_abc/component_xyz/ + arn:aws:iam::123456789012:role/application_abc/component_xyz/SDBAccess + SDBAccess + %7B%22Version%22%3A%222008-10-17%22%2C%22Statement%22%3A%5B%7B%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22Service%22%3A%5B%22ec2.amazonaws.com%22%5D%7D%2C%22Action%22%3A%5B%22sts%3AAssumeRole%22%5D%7D%5D%7D + 2012-05-09T15:45:45Z + AROAC2ICXG32EXAMPLEWK + + + + + 20f7279f-99ee-11e1-a4c3-27EXAMPLE804 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-server-certificates.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-server-certificates.json new file mode 100644 index 0000000000000000000000000000000000000000..db4949b815daf9ac0561ad9a8b19b9221d9a049c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-server-certificates.json @@ -0,0 +1,20 @@ +{"IsTruncated": false, + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"}, + "ServerCertificateMetadataList": [ + {"Arn": "arn:aws:iam::123456789012:server-certificate/company/servercerts/ProdServerCert", + "Path": "/company/servercerts/", + "ServerCertificateId": "ASCACKCEVSQ6CEXAMPLE1", + "ServerCertificateName": "ProdServerCert", + "UploadDate": "2010-05-08T01:02:03.004Z"}, + {"Arn": "arn:aws:iam::123456789012:server-certificate/company/servercerts/BetaServerCert", + "Path": "/company/servercerts/", + "ServerCertificateId": "ASCACKCEVSQ6CEXAMPLE2", + "ServerCertificateName": "BetaServerCert", + "UploadDate": "2010-05-08T02:03:01.004Z"}, + {"Arn": "arn:aws:iam::123456789012:server-certificate/company/servercerts/TestServerCert", + "Path": "/company/servercerts/", + "ServerCertificateId": "ASCACKCEVSQ6CEXAMPLE3", + "ServerCertificateName": "TestServerCert", + "UploadDate": "2010-05-08T03:01:02.004Z"} + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-server-certificates.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-server-certificates.xml new file mode 100644 index 0000000000000000000000000000000000000000..141791ed45efbacd061156023861bcfe9364b886 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-server-certificates.xml @@ -0,0 +1,31 @@ + + + false + + + ProdServerCert + /company/servercerts/ + arn:aws:iam::123456789012:server-certificate/company/servercerts/ProdServerCert + 2010-05-08T01:02:03.004Z + ASCACKCEVSQ6CEXAMPLE1 + + + BetaServerCert + /company/servercerts/ + arn:aws:iam::123456789012:server-certificate/company/servercerts/BetaServerCert + 2010-05-08T02:03:01.004Z + ASCACKCEVSQ6CEXAMPLE2 + + + TestServerCert + /company/servercerts/ + arn:aws:iam::123456789012:server-certificate/company/servercerts/TestServerCert + 2010-05-08T03:01:02.004Z + ASCACKCEVSQ6CEXAMPLE3 + + + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-signing-certificates.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-signing-certificates.json new file mode 100644 index 0000000000000000000000000000000000000000..86cfe3657159af78aad06b650950134280c91932 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-signing-certificates.json @@ -0,0 +1,8 @@ +{"Certificates": [ + {"CertificateBody": "-----BEGIN CERTIFICATE-----\nMIICdzCCAeCgAwIBAgIGANc+Ha2wMA0GCSqGSIb3DQEBBQUAMFMxCzAJBgNVBAYT\nAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMQwwCgYDVQQLEwNBV1MxITAfBgNVBAMT\nGEFXUyBMaW1pdGVkLUFzc3VyYW5jZSBDQTAeFw0wOTAyMDQxNzE5MjdaFw0xMDAy\nMDQxNzE5MjdaMFIxCzAJBgNVBAYTAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMRcw\nFQYDVQQLEw5BV1MtRGV2ZWxvcGVyczEVMBMGA1UEAxMMNTdxNDl0c3ZwYjRtMIGf\nMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpB/vsOwmT/O0td1RqzKjttSBaPjbr\ndqwNe9BrOyB08fw2+Ch5oonZYXfGUrT6mkYXH5fQot9HvASrzAKHO596FdJA6DmL\nywdWe1Oggk7zFSXO1Xv+3vPrJtaYxYo3eRIp7w80PMkiOv6M0XK8ubcTouODeJbf\nsuDqcLnLDxwsvwIDAQABo1cwVTAOBgNVHQ8BAf8EBAMCBaAwFgYDVR0lAQH/BAww\nCgYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQULGNaBphBumaKbDRK\nCAi0mH8B3mowDQYJKoZIhvcNAQEFBQADgYEAuKxhkXaCLGcqDuweKtO/AEw9ZePH\nwr0XqsaIK2HZboqruebXEGsojK4Ks0WzwgrEynuHJwTn760xe39rSqXWIOGrOBaX\nwFpWHVjTFMKk+tSDG1lssLHyYWWdFFU4AnejRGORJYNaRHgVTKjHphc5jEhHm0BX\nAEaHzTpmEXAMPLE=\n-----END CERTIFICATE-----", + "CertificateId": "TA7SMP42TDN5Z26OBPJE7EXAMPLE", + "Status": "Active", + "UserName": "Bob"}], + "IsTruncated": false, + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-signing-certificates.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-signing-certificates.xml new file mode 100644 index 0000000000000000000000000000000000000000..ece537fd97f123c35b88c97942739657e116e1fc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-signing-certificates.xml @@ -0,0 +1,32 @@ + + + Bob + + + Bob + TA7SMP42TDN5Z26OBPJE7EXAMPLE + -----BEGIN CERTIFICATE----- +MIICdzCCAeCgAwIBAgIGANc+Ha2wMA0GCSqGSIb3DQEBBQUAMFMxCzAJBgNVBAYT +AlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMQwwCgYDVQQLEwNBV1MxITAfBgNVBAMT +GEFXUyBMaW1pdGVkLUFzc3VyYW5jZSBDQTAeFw0wOTAyMDQxNzE5MjdaFw0xMDAy +MDQxNzE5MjdaMFIxCzAJBgNVBAYTAlVTMRMwEQYDVQQKEwpBbWF6b24uY29tMRcw +FQYDVQQLEw5BV1MtRGV2ZWxvcGVyczEVMBMGA1UEAxMMNTdxNDl0c3ZwYjRtMIGf +MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpB/vsOwmT/O0td1RqzKjttSBaPjbr +dqwNe9BrOyB08fw2+Ch5oonZYXfGUrT6mkYXH5fQot9HvASrzAKHO596FdJA6DmL +ywdWe1Oggk7zFSXO1Xv+3vPrJtaYxYo3eRIp7w80PMkiOv6M0XK8ubcTouODeJbf +suDqcLnLDxwsvwIDAQABo1cwVTAOBgNVHQ8BAf8EBAMCBaAwFgYDVR0lAQH/BAww +CgYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQULGNaBphBumaKbDRK +CAi0mH8B3mowDQYJKoZIhvcNAQEFBQADgYEAuKxhkXaCLGcqDuweKtO/AEw9ZePH +wr0XqsaIK2HZboqruebXEGsojK4Ks0WzwgrEynuHJwTn760xe39rSqXWIOGrOBaX +wFpWHVjTFMKk+tSDG1lssLHyYWWdFFU4AnejRGORJYNaRHgVTKjHphc5jEhHm0BX +AEaHzTpmEXAMPLE= +-----END CERTIFICATE----- + Active + + + false + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-users.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-users.json new file mode 100644 index 0000000000000000000000000000000000000000..a8d9ff8d97ae43cc88d1801a0631873d1ee13337 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-users.json @@ -0,0 +1,14 @@ +{ + "IsTruncated": false, + "ResponseMetadata": {"RequestId": "7a62c49f-347e-4fc4-9331-6e8eEXAMPLE"}, + "Users": [ + {"Arn": "arn:aws:iam::123456789012:user\n /division_abc/subdivision_xyz/engineering/Andrew", + "Path": "/division_abc/subdivision_xyz/engineering/", + "UserId": "AID2MAB8DPLSRHEXAMPLE", + "UserName": "Andrew"}, + {"Arn": "arn:aws:iam::123456789012:user\n /division_abc/subdivision_xyz/engineering/Jackie", + "Path": "/division_abc/subdivision_xyz/engineering/", + "UserId": "AIDIODR4TAW7CSEXAMPLE", + "UserName": "Jackie"} + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-users.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-users.xml new file mode 100644 index 0000000000000000000000000000000000000000..12cabe78149b65af948c354924f782fc27445e03 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-users.xml @@ -0,0 +1,24 @@ + + + + + /division_abc/subdivision_xyz/engineering/ + Andrew + AID2MAB8DPLSRHEXAMPLE + arn:aws:iam::123456789012:user + /division_abc/subdivision_xyz/engineering/Andrew + + + /division_abc/subdivision_xyz/engineering/ + Jackie + AIDIODR4TAW7CSEXAMPLE + arn:aws:iam::123456789012:user + /division_abc/subdivision_xyz/engineering/Jackie + + + false + + + 7a62c49f-347e-4fc4-9331-6e8eEXAMPLE + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-virtual-mfa-devices.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-virtual-mfa-devices.json new file mode 100644 index 0000000000000000000000000000000000000000..21f92118a9cdaa97a98c7f1846c0aa521f81ab59 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-virtual-mfa-devices.json @@ -0,0 +1,19 @@ +{"IsTruncated": false, + "ResponseMetadata": {"RequestId": "b61ce1b1-0401-11e1-b2f8-2dEXAMPLEbfc"}, + "VirtualMFADevices": [ + {"SerialNumber": "arn:aws:iam::123456789012:mfa/MFAdeviceName"}, + {"EnableDate": "2011-10-20T20:49:03Z", + "SerialNumber": "arn:aws:iam::123456789012:mfa/RootMFAdeviceName", + "User": {"Arn": "arn:aws:iam::123456789012:root", + "CreateDate": "2009-10-13T22:00:36Z", + "UserId": "123456789012"}}, + {"EnableDate": "2011-10-31T20:45:02Z", + "SerialNumber": "arn:aws:iam:::mfa/ExampleUserMFAdeviceName", + "User": {"Arn": "arn:aws:iam::111122223333:user/ExampleUser", + "CreateDate": "2011-07-01T17:23:07Z", + "Path": "/", + "UserId": "AIDEXAMPLE4EXAMPLEXYZ", + "UserName": "ExampleUser"} + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-virtual-mfa-devices.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-virtual-mfa-devices.xml new file mode 100644 index 0000000000000000000000000000000000000000..c6ac63be7a10639de0d219f6f5dffed3b32ff29c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/iam-list-virtual-mfa-devices.xml @@ -0,0 +1,33 @@ + + + false + + + arn:aws:iam::123456789012:mfa/MFAdeviceName + + + arn:aws:iam::123456789012:mfa/RootMFAdeviceName + 2011-10-20T20:49:03Z + + 123456789012 + arn:aws:iam::123456789012:root + 2009-10-13T22:00:36Z + + + + arn:aws:iam:::mfa/ExampleUserMFAdeviceName + 2011-10-31T20:45:02Z + + AIDEXAMPLE4EXAMPLEXYZ + / + ExampleUser + arn:aws:iam::111122223333:user/ExampleUser + 2011-07-01T17:23:07Z + + + + + + b61ce1b1-0401-11e1-b2f8-2dEXAMPLEbfc + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/importexport-list-jobs.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/importexport-list-jobs.json new file mode 100644 index 0000000000000000000000000000000000000000..62a505888593c7ef639f9dc1099f2ca9f026c0fc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/importexport-list-jobs.json @@ -0,0 +1,10 @@ +{"IsTruncated": true, + "Jobs": [{"CreationDate": "2010-04-21T22:21:51Z", + "IsCanceled": false, + "JobId": "ADP7B", + "JobType": "Import"}, + {"CreationDate": "2010-04-21T22:19:05Z", + "IsCanceled": false, + "JobId": "AVEYF", + "JobType": "Import"}], + "ResponseMetadata": {"RequestId": "cc6ea8c0-4da9-11df-81c3-e94d3ca214a8"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/importexport-list-jobs.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/importexport-list-jobs.xml new file mode 100644 index 0000000000000000000000000000000000000000..e0390050abd021e32ba4ebbeea740604544ddd0d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/importexport-list-jobs.xml @@ -0,0 +1,22 @@ + + + + + Import + 2010-04-21T22:21:51Z + false + ADP7B + + + Import + 2010-04-21T22:19:05Z + false + AVEYF + + + true + + + cc6ea8c0-4da9-11df-81c3-e94d3ca214a8 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-engine-versions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-engine-versions.json new file mode 100644 index 0000000000000000000000000000000000000000..7bf7d43c4bffd964e6624cb6f2f09ff1fdbaff0c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-engine-versions.json @@ -0,0 +1,163 @@ +{ + "ResponseMetadata": { + "RequestId": "aa3623ef-9167-11e2-b6fb-e599bc501f26" + }, + "DBEngineVersions": [ + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.1.57", + "DBParameterGroupFamily": "mysql5.1", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.1.57" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.1.61", + "DBParameterGroupFamily": "mysql5.1", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.1.61" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.1.62", + "DBParameterGroupFamily": "mysql5.1", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.1.62" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.1.63", + "DBParameterGroupFamily": "mysql5.1", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.1.63" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.5.12", + "DBParameterGroupFamily": "mysql5.5", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.5.12" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.5.20", + "DBParameterGroupFamily": "mysql5.5", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.5.20" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.5.23", + "DBParameterGroupFamily": "mysql5.5", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.5.23" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.5.25a", + "DBParameterGroupFamily": "mysql5.5", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.5.25a" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.5.27", + "DBParameterGroupFamily": "mysql5.5", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.5.27" + }, + { + "Engine": "mysql", + "DBEngineVersionDescription": "MySQL 5.5.8", + "DBParameterGroupFamily": "mysql5.5", + "DBEngineDescription": "MySQL Community Edition", + "EngineVersion": "5.5.8" + }, + { + "Engine": "oracle-ee", + "DBParameterGroupFamily": "oracle-ee-11.2", + "DefaultCharacterSet": { + "CharacterSetName": "AL32UTF8", + "CharacterSetDescription": "Unicode 5.0 UTF-8 Universal character set" + }, + "DBEngineDescription": "Oracle Database Enterprise Edition", + "EngineVersion": "11.2.0.2.v3", + "DBEngineVersionDescription": "Oracle 11.2.0.2.v3" + }, + { + "Engine": "oracle-ee", + "DBParameterGroupFamily": "oracle-ee-11.2", + "DefaultCharacterSet": { + "CharacterSetName": "AL32UTF8", + "CharacterSetDescription": "Unicode 5.0 UTF-8 Universal character set" + }, + "DBEngineDescription": "Oracle Database Enterprise Edition", + "EngineVersion": "11.2.0.2.v4", + "DBEngineVersionDescription": "Oracle 11.2.0.2.v4" + }, + { + "Engine": "oracle-ee", + "DBParameterGroupFamily": "oracle-ee-11.2", + "DefaultCharacterSet": { + "CharacterSetName": "AL32UTF8", + "CharacterSetDescription": "Unicode 5.0 UTF-8 Universal character set" + }, + "DBEngineDescription": "Oracle Database Enterprise Edition", + "EngineVersion": "11.2.0.2.v5", + "DBEngineVersionDescription": "Oracle 11.2.0.2.v5" + }, + { + "Engine": "oracle-ee", + "DBParameterGroupFamily": "oracle-ee-11.2", + "DefaultCharacterSet": { + "CharacterSetName": "AL32UTF8", + "CharacterSetDescription": "Unicode 5.0 UTF-8 Universal character set" + }, + "DBEngineDescription": "Oracle Database Enterprise Edition", + "EngineVersion": "11.2.0.2.v6", + "DBEngineVersionDescription": "Oracle 11.2.0.2.v6" + }, + { + "Engine": "sqlserver-ex", + "DBEngineVersionDescription": "SQL Server 2008 R2 10.50.2789.0.v1", + "DBParameterGroupFamily": "sqlserver-ex-10.5", + "DBEngineDescription": "Microsoft SQL Server Express Edition", + "EngineVersion": "10.50.2789.0.v1" + }, + { + "Engine": "sqlserver-ex", + "DBEngineVersionDescription": "SQL Server 2012 11.00.2100.60.v1", + "DBParameterGroupFamily": "sqlserver-ex-11.0", + "DBEngineDescription": "Microsoft SQL Server Express Edition", + "EngineVersion": "11.00.2100.60.v1" + }, + { + "Engine": "sqlserver-se", + "DBEngineVersionDescription": "SQL Server 2008 R2 10.50.2789.0.v1", + "DBParameterGroupFamily": "sqlserver-se-10.5", + "DBEngineDescription": "Microsoft SQL Server Standard Edition", + "EngineVersion": "10.50.2789.0.v1" + }, + { + "Engine": "sqlserver-se", + "DBEngineVersionDescription": "SQL Server 2012 11.00.2100.60.v1", + "DBParameterGroupFamily": "sqlserver-se-11.0", + "DBEngineDescription": "Microsoft SQL Server Standard Edition", + "EngineVersion": "11.00.2100.60.v1" + }, + { + "Engine": "sqlserver-web", + "DBEngineVersionDescription": "SQL Server 2008 R2 10.50.2789.0.v1", + "DBParameterGroupFamily": "sqlserver-web-10.5", + "DBEngineDescription": "Microsoft SQL Server Web Edition", + "EngineVersion": "10.50.2789.0.v1" + }, + { + "Engine": "sqlserver-web", + "DBEngineVersionDescription": "SQL Server 2012 11.00.2100.60.v1", + "DBParameterGroupFamily": "sqlserver-web-11.0", + "DBEngineDescription": "Microsoft SQL Server Web Edition", + "EngineVersion": "11.00.2100.60.v1" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-engine-versions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-engine-versions.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e7592a7b61ccb493ee2432ea37af7214cecd978 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-engine-versions.xml @@ -0,0 +1,165 @@ + + + + + mysql5.1 + mysql + MySQL Community Edition + 5.1.57 + MySQL 5.1.57 + + + mysql5.1 + mysql + MySQL Community Edition + 5.1.61 + MySQL 5.1.61 + + + mysql5.1 + mysql + MySQL Community Edition + 5.1.62 + MySQL 5.1.62 + + + mysql5.1 + mysql + MySQL Community Edition + 5.1.63 + MySQL 5.1.63 + + + mysql5.5 + mysql + MySQL Community Edition + 5.5.12 + MySQL 5.5.12 + + + mysql5.5 + mysql + MySQL Community Edition + 5.5.20 + MySQL 5.5.20 + + + mysql5.5 + mysql + MySQL Community Edition + 5.5.23 + MySQL 5.5.23 + + + mysql5.5 + mysql + MySQL Community Edition + 5.5.25a + MySQL 5.5.25a + + + mysql5.5 + mysql + MySQL Community Edition + 5.5.27 + MySQL 5.5.27 + + + mysql5.5 + mysql + MySQL Community Edition + 5.5.8 + MySQL 5.5.8 + + + oracle-ee-11.2 + oracle-ee + Oracle Database Enterprise Edition + + AL32UTF8 + Unicode 5.0 UTF-8 Universal character set + + 11.2.0.2.v3 + Oracle 11.2.0.2.v3 + + + oracle-ee-11.2 + oracle-ee + Oracle Database Enterprise Edition + + AL32UTF8 + Unicode 5.0 UTF-8 Universal character set + + 11.2.0.2.v4 + Oracle 11.2.0.2.v4 + + + oracle-ee-11.2 + oracle-ee + Oracle Database Enterprise Edition + + AL32UTF8 + Unicode 5.0 UTF-8 Universal character set + + 11.2.0.2.v5 + Oracle 11.2.0.2.v5 + + + oracle-ee-11.2 + oracle-ee + Oracle Database Enterprise Edition + + AL32UTF8 + Unicode 5.0 UTF-8 Universal character set + + 11.2.0.2.v6 + Oracle 11.2.0.2.v6 + + + sqlserver-ex-10.5 + sqlserver-ex + Microsoft SQL Server Express Edition + 10.50.2789.0.v1 + SQL Server 2008 R2 10.50.2789.0.v1 + + + sqlserver-ex-11.0 + sqlserver-ex + Microsoft SQL Server Express Edition + 11.00.2100.60.v1 + SQL Server 2012 11.00.2100.60.v1 + + + sqlserver-se-10.5 + sqlserver-se + Microsoft SQL Server Standard Edition + 10.50.2789.0.v1 + SQL Server 2008 R2 10.50.2789.0.v1 + + + sqlserver-se-11.0 + sqlserver-se + Microsoft SQL Server Standard Edition + 11.00.2100.60.v1 + SQL Server 2012 11.00.2100.60.v1 + + + sqlserver-web-10.5 + sqlserver-web + Microsoft SQL Server Web Edition + 10.50.2789.0.v1 + SQL Server 2008 R2 10.50.2789.0.v1 + + + sqlserver-web-11.0 + sqlserver-web + Microsoft SQL Server Web Edition + 11.00.2100.60.v1 + SQL Server 2012 11.00.2100.60.v1 + + + + + aa3623ef-9167-11e2-b6fb-e599bc501f26 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..52b866d4f16508dba11f0593ab2fb5e6e5db1dc3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-instances.json @@ -0,0 +1,49 @@ +{ + "DBInstances": [ + { + "Endpoint": { + "Port": 3306, + "Address": "simcoprod01.cu7u2t4uz396.us-east-1.rds.amazonaws.com" + }, + "OptionGroupMemberships": [ + { + "Status": "in-sync", + "OptionGroupName": "default.mysql5.1" + } + ], + "DBInstanceStatus": "available", + "MasterUsername": "master", + "LicenseModel": "general-public-license", + "LatestRestorableTime": "2011-05-23T06:50:00Z", + "InstanceCreateTime": "2011-05-23T06:06:43.110Z", + "EngineVersion": "5.1.50", + "BackupRetentionPeriod": 1, + "PendingModifiedValues": {}, + "Engine": "mysql", + "MultiAZ": false, + "AvailabilityZone": "us-east-1a", + "DBSecurityGroups": [ + { + "Status": "active", + "DBSecurityGroupName": "default" + } + ], + "DBParameterGroups": [ + { + "DBParameterGroupName": "default.mysql5.1", + "ParameterApplyStatus": "in-sync" + } + ], + "AutoMinorVersionUpgrade": true, + "PreferredBackupWindow": "00:00-00:30", + "DBInstanceIdentifier": "simcoprod01", + "AllocatedStorage": 10, + "DBInstanceClass": "db.m1.large", + "PreferredMaintenanceWindow": "sat:07:30-sat:08:00", + "ReadReplicaDBInstanceIdentifiers": [] + } + ], + "ResponseMetadata": { + "RequestId": "9135fff3-8509-11e0-bd9b-a7b1ece36d51" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..2722ac1775fa76f7e82f539d0ce950a0c702df08 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-instances.xml @@ -0,0 +1,51 @@ + + + + + + 2011-05-23T06:50:00Z + mysql + + 1 + false + general-public-license + available + 5.1.50 + + 3306 +
    simcoprod01.cu7u2t4uz396.us-east-1.rds.amazonaws.com
    +
    + simcoprod01 + + + in-sync + default.mysql5.1 + + + + + active + default + + + 00:00-00:30 + true + sat:07:30-sat:08:00 + us-east-1a + 2011-05-23T06:06:43.110Z + 10 + + + default.mysql5.1 + in-sync + + + db.m1.large + master +
    +
    +
    + + 9135fff3-8509-11e0-bd9b-a7b1ece36d51 + +
    diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-parameter-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-parameter-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..b52000e72ac4ae445024ff7915587b1efea5b2c7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-parameter-groups.json @@ -0,0 +1,12 @@ +{ + "ResponseMetadata": { + "RequestId": "aa23ad55-9167-11e2-b691-fdba749921d2" + }, + "DBParameterGroups": [ + { + "DBParameterGroupName": "default.mysql5.5", + "DBParameterGroupFamily": "mysql5.5", + "Description": "Default parameter group for mysql5.5" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-parameter-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-parameter-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ac2f1c766a8097e88b026f9e5109a2c9f021138 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-parameter-groups.xml @@ -0,0 +1,14 @@ + + + + + mysql5.5 + Default parameter group for mysql5.5 + default.mysql5.5 + + + + + aa23ad55-9167-11e2-b691-fdba749921d2 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-security-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-security-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..7e1287c4c5c9851af7bfb41d6c666145742040d8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-security-groups.json @@ -0,0 +1,28 @@ +{ + "DBSecurityGroups": [ + { + "IPRanges": [], + "OwnerId": "123456789012", + "DBSecurityGroupDescription": "default", + "EC2SecurityGroups": [], + "DBSecurityGroupName": "default" + }, + { + "IPRanges": [], + "OwnerId": "123456789012", + "DBSecurityGroupDescription": "My first security group", + "EC2SecurityGroups": [], + "DBSecurityGroupName": "testgroup1" + }, + { + "IPRanges": [], + "OwnerId": "123456789012", + "DBSecurityGroupDescription": "My second security group", + "EC2SecurityGroups": [], + "DBSecurityGroupName": "testgroup2" + } + ], + "ResponseMetadata": { + "RequestId": "aaf3813f-9167-11e2-a2d0-e302f09d52ea" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-security-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-security-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..f6ff828e520fc1fe06adf302f6b823d3dce22394 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-security-groups.xml @@ -0,0 +1,30 @@ + + + + + + default + + 123456789012 + default + + + + My first security group + + 123456789012 + testgroup1 + + + + My second security group + + 123456789012 + testgroup2 + + + + + aaf3813f-9167-11e2-a2d0-e302f09d52ea + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-snapshots.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-snapshots.json new file mode 100644 index 0000000000000000000000000000000000000000..317c60e8afe00c3529df5579a73332166c7db36d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-snapshots.json @@ -0,0 +1,55 @@ +{ + "ResponseMetadata": { + "RequestId": "c4191173-8506-11e0-90aa-eb648410240d" + }, + "DBSnapshots": [ + { + "Engine": "mysql", + "SnapshotCreateTime": "2011-05-23T06:29:03.483Z", + "AvailabilityZone": "us-east-1a", + "MasterUsername": "master", + "LicenseModel": "general-public-license", + "Status": "available", + "DBSnapshotIdentifier": "mydbsnapshot", + "InstanceCreateTime": "2011-05-23T06:06:43.110Z", + "OptionGroupName": "myoptiongroupname", + "AllocatedStorage": 10, + "EngineVersion": "5.1.50", + "SnapshotType": "manual", + "Port": 3306, + "DBInstanceIdentifier": "simcoprod01" + }, + { + "Engine": "mysql", + "SnapshotCreateTime": "2011-03-11T07:20:24.082Z", + "AvailabilityZone": "us-east-1a", + "MasterUsername": "sa", + "LicenseModel": "general-public-license", + "Status": "available", + "DBSnapshotIdentifier": "mysnapshot1", + "InstanceCreateTime": "2010-08-04T23:27:36.420Z", + "OptionGroupName": "myoptiongroupname", + "AllocatedStorage": 50, + "EngineVersion": "5.1.49", + "SnapshotType": "manual", + "Port": 3306, + "DBInstanceIdentifier": "mydbinstance" + }, + { + "Engine": "mysql", + "SnapshotCreateTime": "2012-04-02T00:01:24.082Z", + "AvailabilityZone": "us-east-1d", + "MasterUsername": "master", + "LicenseModel": "general-public-license", + "Status": "available", + "DBSnapshotIdentifier": "rds:simcoprod01-2012-04-02-00-01", + "InstanceCreateTime": "2010-07-16T00:06:59.107Z", + "OptionGroupName": "myoptiongroupname", + "AllocatedStorage": 60, + "EngineVersion": "5.1.47", + "SnapshotType": "automated", + "Port": 3306, + "DBInstanceIdentifier": "simcoprod01" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-snapshots.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-snapshots.xml new file mode 100644 index 0000000000000000000000000000000000000000..b1240db6ce54f9822400e0f3086880383aae5544 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-snapshots.xml @@ -0,0 +1,57 @@ + + + + + 3306 + 2011-05-23T06:29:03.483Z + mysql + available + us-east-1a + general-public-license + 2011-05-23T06:06:43.110Z + 10 + simcoprod01 + 5.1.50 + mydbsnapshot + manual + master + myoptiongroupname + + + 3306 + 2011-03-11T07:20:24.082Z + mysql + available + us-east-1a + general-public-license + 2010-08-04T23:27:36.420Z + 50 + mydbinstance + 5.1.49 + mysnapshot1 + manual + sa + myoptiongroupname + + + 3306 + 2012-04-02T00:01:24.082Z + mysql + available + us-east-1d + general-public-license + 2010-07-16T00:06:59.107Z + 60 + simcoprod01 + 5.1.47 + rds:simcoprod01-2012-04-02-00-01 + automated + master + myoptiongroupname + + + + + c4191173-8506-11e0-90aa-eb648410240d + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-subnet-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-subnet-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..ccc44593852d07352f8e891201be3887d80babbc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-subnet-groups.json @@ -0,0 +1,65 @@ +{ + "ResponseMetadata": { + "RequestId": "31d0faee-229b-11e1-81f1-df3a2a803dad" + }, + "DBSubnetGroups": [ + { + "Subnets": [ + { + "SubnetStatus": "Active", + "SubnetIdentifier": "subnet-7c5b4115", + "SubnetAvailabilityZone": { + "Name": "us-east-1c" + } + }, + { + "SubnetStatus": "Active", + "SubnetIdentifier": "subnet-7b5b4112", + "SubnetAvailabilityZone": { + "Name": "us-east-1b" + } + }, + { + "SubnetStatus": "Active", + "SubnetIdentifier": "subnet-3ea6bd57", + "SubnetAvailabilityZone": { + "Name": "us-east-1d" + } + } + ], + "DBSubnetGroupName": "subnet_grp1", + "VpcId": "990524496922", + "DBSubnetGroupDescription": "description", + "SubnetGroupStatus": "Complete" + }, + { + "Subnets": [ + { + "SubnetStatus": "Active", + "SubnetIdentifier": "subnet-7c5b4115", + "SubnetAvailabilityZone": { + "Name": "us-east-1c" + } + }, + { + "SubnetStatus": "Active", + "SubnetIdentifier": "subnet-7b5b4112", + "SubnetAvailabilityZone": { + "Name": "us-east-1b" + } + }, + { + "SubnetStatus": "Active", + "SubnetIdentifier": "subnet-3ea6bd57", + "SubnetAvailabilityZone": { + "Name": "us-east-1d" + } + } + ], + "DBSubnetGroupName": "subnet_grp2", + "VpcId": "990524496922", + "DBSubnetGroupDescription": "description", + "SubnetGroupStatus": "Complete" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-subnet-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-subnet-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..130825f997d76d50a15ae59152ff66a2f45692f8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-db-subnet-groups.xml @@ -0,0 +1,67 @@ + + + + + 990524496922 + Complete + description + subnet_grp1 + + + Active + subnet-7c5b4115 + + us-east-1c + + + + Active + subnet-7b5b4112 + + us-east-1b + + + + Active + subnet-3ea6bd57 + + us-east-1d + + + + + + 990524496922 + Complete + description + subnet_grp2 + + + Active + subnet-7c5b4115 + + us-east-1c + + + + Active + subnet-7b5b4112 + + us-east-1b + + + + Active + subnet-3ea6bd57 + + us-east-1d + + + + + + + + 31d0faee-229b-11e1-81f1-df3a2a803dad + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-categories.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-categories.json new file mode 100644 index 0000000000000000000000000000000000000000..8d08567f88d5eea90cc846b45aabf47970d7e564 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-categories.json @@ -0,0 +1,45 @@ +{ + "EventCategoriesMapList": [ + { + "EventCategories": [ + "maintenance", + "creation", + "backup", + "low storage", + "configuration change", + "failover", + "restoration", + "availability", + "deletion", + "notification", + "recovery", + "failure" + ], + "SourceType": "db-instance" + }, + { + "EventCategories": [ + "configuration change", + "failure" + ], + "SourceType": "db-security-group" + }, + { + "EventCategories": [ + "configuration change" + ], + "SourceType": "db-parameter-group" + }, + { + "EventCategories": [ + "creation", + "restoration", + "deletion" + ], + "SourceType": "db-snapshot" + } + ], + "ResponseMetadata": { + "RequestId": "aa1184e4-9167-11e2-b6fb-e599bc501f26" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-categories.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-categories.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec567248bc462de9b2e091f210b7513c4d9a5a7d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-categories.xml @@ -0,0 +1,47 @@ + + + + + db-instance + + maintenance + creation + backup + low storage + configuration change + failover + restoration + availability + deletion + notification + recovery + failure + + + + db-security-group + + configuration change + failure + + + + db-parameter-group + + configuration change + + + + db-snapshot + + creation + restoration + deletion + + + + + + aa1184e4-9167-11e2-b6fb-e599bc501f26 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-subscriptions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-subscriptions.json new file mode 100644 index 0000000000000000000000000000000000000000..c415b3c09978cd82387c31ae93ec2ee8b8a5cd14 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-subscriptions.json @@ -0,0 +1,6 @@ +{ + "EventSubscriptionsList": [], + "ResponseMetadata": { + "RequestId": "a9fd87af-9167-11e2-b691-fdba749921d2" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-subscriptions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-subscriptions.xml new file mode 100644 index 0000000000000000000000000000000000000000..973b11d3f1e36341f83ce869998c78128041cb77 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-event-subscriptions.xml @@ -0,0 +1,8 @@ + + + + + + a9fd87af-9167-11e2-b691-fdba749921d2 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-events.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-events.json new file mode 100644 index 0000000000000000000000000000000000000000..9071eb5bf19727de292c4651f731a8c41257c3e4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-events.json @@ -0,0 +1,37 @@ +{ + "Events": [ + { + "Date": "2010-08-11T17:12:52.860Z", + "Message": "Applied change to security group", + "SourceIdentifier": "mydbsecuritygroup", + "SourceType": "db-security-group" + }, + { + "Date": "2010-08-11T18:10:15.269Z", + "Message": "Database instance created", + "SourceIdentifier": "mydbinstance3", + "SourceType": "db-instance" + }, + { + "Date": "2010-08-11T18:10:34.690Z", + "Message": "Backing up database instance", + "SourceIdentifier": "mydbinstance3", + "SourceType": "db-instance" + }, + { + "Date": "2010-08-11T18:25:52.263Z", + "Message": "Backing up DB Instance", + "SourceIdentifier": "mynewdbinstance", + "SourceType": "db-instance" + }, + { + "Date": "2010-08-11T18:25:52.263Z", + "Message": "Creating user snapshot", + "SourceIdentifier": "mynewdbsnapshot3", + "SourceType": "db-snapshot" + } + ], + "ResponseMetadata": { + "RequestId": "95b948cd-bf45-11de-86a4-97241dfaadff" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-events.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-events.xml new file mode 100644 index 0000000000000000000000000000000000000000..bb69f77727b013021f43d1ac15dd59079719ae0b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-events.xml @@ -0,0 +1,39 @@ + + + + + Applied change to security group + db-security-group + 2010-08-11T17:12:52.860Z + mydbsecuritygroup + + + Database instance created + db-instance + 2010-08-11T18:10:15.269Z + mydbinstance3 + + + Backing up database instance + db-instance + 2010-08-11T18:10:34.690Z + mydbinstance3 + + + Backing up DB Instance + db-instance + 2010-08-11T18:25:52.263Z + mynewdbinstance + + + Creating user snapshot + db-snapshot + 2010-08-11T18:25:52.263Z + mynewdbsnapshot3 + + + + + 95b948cd-bf45-11de-86a4-97241dfaadff + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-option-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-option-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..d115ec2afd891accef81b2ba0624196ea9e497dc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-option-groups.json @@ -0,0 +1,15 @@ +{ + "ResponseMetadata": { + "RequestId": "ab072fb0-9167-11e2-b6fb-e599bc501f26" + }, + "OptionGroupsList": [ + { + "MajorEngineVersion": "5.5", + "OptionGroupDescription": "Default option group for mysql 5.5", + "Options": [], + "EngineName": "mysql", + "AllowsVpcAndNonVpcInstanceMemberships": true, + "OptionGroupName": "default:mysql-5-5" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-option-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-option-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ddf34fe631e21ef739101368f11a263fc53bf3f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-option-groups.xml @@ -0,0 +1,17 @@ + + + + + true + 5.5 + default:mysql-5-5 + mysql + Default option group for mysql 5.5 + + + + + + ab072fb0-9167-11e2-b6fb-e599bc501f26 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances-offerings.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances-offerings.json new file mode 100644 index 0000000000000000000000000000000000000000..70176151b0cc358a4d7b6e5150f91ec3f654bc22 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances-offerings.json @@ -0,0 +1,49 @@ +{ + "Marker": "M2E5OGJmN2QtYjRjNi00NzNmLWI4MGMtYmFkNzFmNzA2YzUw", + "ResponseMetadata": { + "RequestId": "aa4fed7d-9167-11e2-b691-fdba749921d2" + }, + "ReservedDBInstancesOfferings": [ + { + "MultiAZ": false, + "OfferingType": "Heavy Utilization", + "FixedPrice": 2058.0, + "UsagePrice": 0.0, + "ReservedDBInstancesOfferingId": "248e7b75-0815-427d-a429-b0fed4633e8c", + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.139, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "oracle-se1(li)", + "Duration": 94608000, + "DBInstanceClass": "db.m1.large", + "CurrencyCode": "USD" + }, + { + "MultiAZ": false, + "OfferingType": "Light Utilization", + "FixedPrice": 548.0, + "UsagePrice": 0.234, + "ReservedDBInstancesOfferingId": "248e7b75-09fe-4f1d-afbc-296929db4f47", + "RecurringCharges": [], + "ProductDescription": "oracle-ee(byol)", + "Duration": 94608000, + "DBInstanceClass": "db.m2.xlarge", + "CurrencyCode": "USD" + }, + { + "MultiAZ": true, + "OfferingType": "Light Utilization", + "FixedPrice": 2512.0, + "UsagePrice": 1.026, + "ReservedDBInstancesOfferingId": "248e7b75-0a34-4615-b83c-e4b445862054", + "RecurringCharges": [], + "ProductDescription": "oracle-se1(li)", + "Duration": 94608000, + "DBInstanceClass": "db.m1.xlarge", + "CurrencyCode": "USD" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances-offerings.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances-offerings.xml new file mode 100644 index 0000000000000000000000000000000000000000..f386f3ebcb115a45b8d5283dc3c1eff1d4c06ae3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances-offerings.xml @@ -0,0 +1,51 @@ + + + M2E5OGJmN2QtYjRjNi00NzNmLWI4MGMtYmFkNzFmNzA2YzUw + + + Heavy Utilization + 94608000 + USD + + + Hourly + 0.139 + + + 2058.0 + oracle-se1(li) + 0.0 + 248e7b75-0815-427d-a429-b0fed4633e8c + false + db.m1.large + + + Light Utilization + 94608000 + USD + + 548.0 + oracle-ee(byol) + 0.234 + 248e7b75-09fe-4f1d-afbc-296929db4f47 + false + db.m2.xlarge + + + Light Utilization + 94608000 + USD + + 2512.0 + oracle-se1(li) + 1.026 + 248e7b75-0a34-4615-b83c-e4b445862054 + true + db.m1.xlarge + + + + + aa4fed7d-9167-11e2-b691-fdba749921d2 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances.json new file mode 100644 index 0000000000000000000000000000000000000000..15e26a577af3aa4a2e236bb82ee218a1a186c214 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances.json @@ -0,0 +1,23 @@ +{ + "ReservedDBInstances": [ + { + "MultiAZ": false, + "OfferingType": "Medium Utilization", + "FixedPrice": 227.5, + "CurrencyCode": "USD", + "ProductDescription": "mysql", + "ReservedDBInstancesOfferingId": "649fd0c8-cf6d-47a0-bfa6-060f8e75e95f", + "RecurringCharges": [], + "Duration": 31536000, + "State": "active", + "DBInstanceCount": 1, + "StartTime": "2010-12-15T00:25:14.131Z", + "ReservedDBInstanceId": "myreservationid", + "DBInstanceClass": "db.m1.small", + "UsagePrice": 0.046 + } + ], + "ResponseMetadata": { + "RequestId": "c695119b-2961-11e1-bd06-6fe008f046c3" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b340fa36f1a8b9b7ca9a901792136148ceebcae --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/rds-describe-reserved-db-instances.xml @@ -0,0 +1,25 @@ + + + + + Medium Utilization + USD + + mysql + 649fd0c8-cf6d-47a0-bfa6-060f8e75e95f + false + active + myreservationid + 1 + 2010-12-15T00:25:14.131Z + 31536000 + 227.5 + 0.046 + db.m1.small + + + + + c695119b-2961-11e1-bd06-6fe008f046c3 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-authorize-cluster-security-group-ingress.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-authorize-cluster-security-group-ingress.json new file mode 100644 index 0000000000000000000000000000000000000000..b35beb1ad9186826f924e6c22cce3d65c30443a7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-authorize-cluster-security-group-ingress.json @@ -0,0 +1,16 @@ +{ + "ClusterSecurityGroup": { + "Description": "my security group", + "ClusterSecurityGroupName": "securitygroup1", + "EC2SecurityGroups": [], + "IPRanges": [ + { + "Status": "authorized", + "CIDRIP": "192.168.40.3/32" + } + ] + }, + "ResponseMetadata": { + "RequestId": "8c7cd4c8-6501-11e2-a8da-655adc216806" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-authorize-cluster-security-group-ingress.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-authorize-cluster-security-group-ingress.xml new file mode 100644 index 0000000000000000000000000000000000000000..db77b2cf52acc51a2a23f6f8b916fce41835f182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-authorize-cluster-security-group-ingress.xml @@ -0,0 +1,18 @@ + + + + + + + 192.168.40.3/32 + authorized + + + my security group + securitygroup1 + + + + 8c7cd4c8-6501-11e2-a8da-655adc216806 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-copy-cluster-snapshot.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-copy-cluster-snapshot.json new file mode 100644 index 0000000000000000000000000000000000000000..1e17c28b1acdbd512b720ace2c45c689aff46d13 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-copy-cluster-snapshot.json @@ -0,0 +1,20 @@ +{ + "Snapshot": { + "Status": "available", + "SnapshotCreateTime": "2013-01-22T19:27:58.931Z", + "AvailabilityZone": "us-east-1c", + "ClusterVersion": "1.0", + "MasterUsername": "adminuser", + "DBName": "dev", + "ClusterCreateTime": "2013-01-22T19:23:59.368Z", + "SnapshotType": "manual", + "NodeType": "dw.hs1.xlarge", + "ClusterIdentifier": "examplecluster", + "Port": 5439, + "NumberOfNodes": 2, + "SnapshotIdentifier": "my-snapshot-456" + }, + "ResponseMetadata": { + "RequestId": "aebb56f5-64fe-11e2-88c5-53eb05787dfb" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-copy-cluster-snapshot.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-copy-cluster-snapshot.xml new file mode 100644 index 0000000000000000000000000000000000000000..68677174288b56003974209fca9810150178d991 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-copy-cluster-snapshot.xml @@ -0,0 +1,22 @@ + + + + 5439 + my-snapshot-456 + available + manual + 1.0 + 2013-01-22T19:27:58.931Z + 2 + dev + 2013-01-22T19:23:59.368Z + us-east-1c + dw.hs1.xlarge + examplecluster + adminuser + + + + aebb56f5-64fe-11e2-88c5-53eb05787dfb + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-parameter-group.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-parameter-group.json new file mode 100644 index 0000000000000000000000000000000000000000..854e5551e7f1ca971e64cb5aa860756d70c652ab --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-parameter-group.json @@ -0,0 +1,10 @@ +{ + "ClusterParameterGroup": { + "ParameterGroupFamily": "redshift-1.0", + "Description": "description my parameter group", + "ParameterGroupName": "parametergroup1" + }, + "ResponseMetadata": { + "RequestId": "6d6df847-64f3-11e2-bea9-49e0ce183f07" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-parameter-group.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-parameter-group.xml new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3750fc24cce60a9459f96391ccdac248cb95 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-parameter-group.xml @@ -0,0 +1,12 @@ + + + + redshift-1.0 + description my parameter group + parametergroup1 + + + + 6d6df847-64f3-11e2-bea9-49e0ce183f07 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-security-group.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-security-group.json new file mode 100644 index 0000000000000000000000000000000000000000..775203cc1ed01a1fc445d4ae9a8937723603e45f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-security-group.json @@ -0,0 +1,11 @@ +{ + "ClusterSecurityGroup": { + "Description": "my security group", + "ClusterSecurityGroupName": "securitygroup1", + "EC2SecurityGroups": [], + "IPRanges": [] + }, + "ResponseMetadata": { + "RequestId": "f9ee270f-64f7-11e2-a8da-655adc216806" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-security-group.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-security-group.xml new file mode 100644 index 0000000000000000000000000000000000000000..d2ec5d6f26215f96dc29cca01cc7cf7375628761 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-security-group.xml @@ -0,0 +1,13 @@ + + + + + + my security group + securitygroup1 + + + + f9ee270f-64f7-11e2-a8da-655adc216806 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-snapshot.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-snapshot.json new file mode 100644 index 0000000000000000000000000000000000000000..6de41513abd6d1d912e999436737e8966327b5d7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-snapshot.json @@ -0,0 +1,20 @@ +{ + "Snapshot": { + "Status": "creating", + "SnapshotCreateTime": "2013-01-23T01:08:29.142Z", + "AvailabilityZone": "us-east-1c", + "ClusterVersion": "1.0", + "MasterUsername": "adminuser", + "DBName": "dev", + "ClusterCreateTime": "2013-01-22T19:23:59.368Z", + "SnapshotType": "manual", + "NodeType": "dw.hs1.xlarge", + "ClusterIdentifier": "examplecluster", + "Port": 5439, + "NumberOfNodes": 2, + "SnapshotIdentifier": "my-snapshot-123" + }, + "ResponseMetadata": { + "RequestId": "65baef14-64f9-11e2-bea9-49e0ce183f07" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-snapshot.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-snapshot.xml new file mode 100644 index 0000000000000000000000000000000000000000..58dbd302b4e5af67fd08d73795e74559da1213f8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-snapshot.xml @@ -0,0 +1,22 @@ + + + + 5439 + my-snapshot-123 + creating + manual + 1.0 + 2013-01-23T01:08:29.142Z + 2 + dev + 2013-01-22T19:23:59.368Z + us-east-1c + dw.hs1.xlarge + examplecluster + adminuser + + + + 65baef14-64f9-11e2-bea9-49e0ce183f07 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-subnet-group.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-subnet-group.json new file mode 100644 index 0000000000000000000000000000000000000000..6af3cbcf4d02f851118f25e2f7daa85ba2b6b00c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-subnet-group.json @@ -0,0 +1,20 @@ +{ + "ClusterSubnetGroup": { + "Subnets": [ + { + "SubnetStatus": "Active", + "SubnetIdentifier": "subnet-756a591f", + "SubnetAvailabilityZone": { + "Name": "us-east-1c" + } + } + ], + "VpcId": "vpc-796a5913", + "SubnetGroupStatus": "Complete", + "Description": "My subnet group 1", + "ClusterSubnetGroupName": "mysubnetgroup1" + }, + "ResponseMetadata": { + "RequestId": "0a60660f-6a4a-11e2-aad2-71d00c36728e" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-subnet-group.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-subnet-group.xml new file mode 100644 index 0000000000000000000000000000000000000000..b1a97b22af3e197942c0610c2834d67c9726c2da --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster-subnet-group.xml @@ -0,0 +1,22 @@ + + + + vpc-796a5913 + My subnet group 1 + mysubnetgroup1 + Complete + + + Active + subnet-756a591f + + us-east-1c + + + + + + + 0a60660f-6a4a-11e2-aad2-71d00c36728e + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster.json new file mode 100644 index 0000000000000000000000000000000000000000..efb4371ed056a9c1cbc748ee06dcc9d95dfb15e5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster.json @@ -0,0 +1,35 @@ +{ + "Cluster": { + "NodeType": "dw.hs1.xlarge", + "ClusterVersion": "1.0", + "PubliclyAccessible": true, + "MasterUsername": "masteruser", + "Encrypted": false, + "ClusterParameterGroups": [ + { + "ParameterApplyStatus": "in-sync", + "ParameterGroupName": "default.redshift-1.0" + } + ], + "ClusterSecurityGroups": [ + { + "Status": "active", + "ClusterSecurityGroupName": "default" + } + ], + "AllowVersionUpgrade": true, + "VpcSecurityGroups": [], + "PreferredMaintenanceWindow": "sun:10:30-sun:11:00", + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterStatus": "creating", + "ClusterIdentifier": "examplecluster", + "DBName": "dev", + "NumberOfNodes": 2, + "PendingModifiedValues": { + "MasterUserPassword": "****" + } + }, + "ResponseMetadata": { + "RequestId": "e69b1294-64ef-11e2-b07c-f7fbdd006c67" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster.xml new file mode 100644 index 0000000000000000000000000000000000000000..15a4b34c346707612638215663a86e8d770515d6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-create-cluster.xml @@ -0,0 +1,37 @@ + + + + + **** + + 1.0 + + creating + 2 + 1 + true + false + dev + sun:10:30-sun:11:00 + + + in-sync + default.redshift-1.0 + + + + + active + default + + + dw.hs1.xlarge + examplecluster + true + masteruser + + + + e69b1294-64ef-11e2-b07c-f7fbdd006c67 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-parameter-group.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-parameter-group.json new file mode 100644 index 0000000000000000000000000000000000000000..35edc6a811ec20b23d4e02aa8e3800c9a2d0e6a1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-parameter-group.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "29674ca0-40da-11e2-b679-dba6cf515770" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-parameter-group.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-parameter-group.xml new file mode 100644 index 0000000000000000000000000000000000000000..d57c57756d8fbc132d165d9ebb5e828e803761ad --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-parameter-group.xml @@ -0,0 +1,5 @@ + + + 29674ca0-40da-11e2-b679-dba6cf515770 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-snapshot.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-snapshot.json new file mode 100644 index 0000000000000000000000000000000000000000..cb08dbdc43ec369158f1d1b8f812b64708d337b1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-snapshot.json @@ -0,0 +1,20 @@ +{ + "Snapshot": { + "Status": "deleted", + "SnapshotCreateTime": "2012-12-07T23:31:02.372Z", + "AvailabilityZone": "us-east-1a", + "ClusterVersion": "1.0", + "MasterUsername": "masteruser", + "DBName": "mydb", + "ClusterCreateTime": "2012-12-06T23:09:01.475Z", + "SnapshotType": "manual", + "NodeType": "dw.hs1.xlarge", + "ClusterIdentifier": "examplecluster", + "Port": 5439, + "NumberOfNodes": 3, + "SnapshotIdentifier": "snapshot-1234" + }, + "ResponseMetadata": { + "RequestId": "88a31de4-40d1-11e2-8a25-eb010998df4e" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-snapshot.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-snapshot.xml new file mode 100644 index 0000000000000000000000000000000000000000..cb115492282da4c7238ba0d5f81c887553477545 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster-snapshot.xml @@ -0,0 +1,22 @@ + + + + 2012-12-07T23:31:02.372Z + 5439 + snapshot-1234 + deleted + 2012-12-06T23:09:01.475Z + manual + 1.0 + us-east-1a + examplecluster + masteruser + dw.hs1.xlarge + mydb + 3 + + + + 88a31de4-40d1-11e2-8a25-eb010998df4e + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster.json new file mode 100644 index 0000000000000000000000000000000000000000..df548f39fcd2c3a43c345d08627aebcb036bc405 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster.json @@ -0,0 +1,39 @@ +{ + "Cluster": { + "NodeType": "dw.hs1.xlarge", + "Endpoint": { + "Port": 5439, + "Address": "examplecluster2.cobbanlpscsn.us-east-1.redshift.amazonaws.com" + }, + "ClusterVersion": "1.0", + "PubliclyAccessible": true, + "MasterUsername": "masteruser", + "Encrypted": true, + "ClusterParameterGroups": [ + { + "ParameterApplyStatus": "in-sync", + "ParameterGroupName": "default.redshift-1.0" + } + ], + "ClusterSecurityGroups": [ + { + "Status": "active", + "ClusterSecurityGroupName": "default" + } + ], + "AllowVersionUpgrade": true, + "VpcSecurityGroups": [], + "AvailabilityZone": "us-east-1a", + "ClusterCreateTime": "2013-01-23T00:11:32.804Z", + "PreferredMaintenanceWindow": "sun:10:30-sun:11:00", + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterStatus": "deleting", + "ClusterIdentifier": "examplecluster2", + "DBName": "dev", + "NumberOfNodes": 2, + "PendingModifiedValues": {} + }, + "ResponseMetadata": { + "RequestId": "f2e6b87e-6503-11e2-b343-393adc3f0a21" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster.xml new file mode 100644 index 0000000000000000000000000000000000000000..47f6807cd1a69b69be4275e0439661fa7162d349 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-delete-cluster.xml @@ -0,0 +1,41 @@ + + + + + 1.0 + + + 5439 +
    examplecluster2.cobbanlpscsn.us-east-1.redshift.amazonaws.com
    +
    + deleting + 2 + 1 + true + true + dev + sun:10:30-sun:11:00 + + + in-sync + default.redshift-1.0 + + + 2013-01-23T00:11:32.804Z + + + active + default + + + us-east-1a + dw.hs1.xlarge + examplecluster2 + true + masteruser +
    +
    + + f2e6b87e-6503-11e2-b343-393adc3f0a21 + +
    diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameter-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameter-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..69b73367887dc387272a43e60a3eb693dbbaeec9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameter-groups.json @@ -0,0 +1,7 @@ +{"ParameterGroups": [{"Description": "Default parameter group for redshift-1.0", + "ParameterGroupFamily": "redshift-1.0", + "ParameterGroupName": "default.redshift-1.0"}, + {"Description": "description my parameter group", + "ParameterGroupFamily": "redshift-1.0", + "ParameterGroupName": "parametergroup1"}], + "ResponseMetadata": {"RequestId": "6d28788b-64f5-11e2-b343-393adc3f0a21"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameter-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameter-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..b3051ac520c90a9b8198eae8dad1513bc5708523 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameter-groups.xml @@ -0,0 +1,19 @@ + + + + + redshift-1.0 + Default parameter group for redshift-1.0 + default.redshift-1.0 + + + redshift-1.0 + description my parameter group + parametergroup1 + + + + + 6d28788b-64f5-11e2-b343-393adc3f0a21 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameters.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameters.json new file mode 100644 index 0000000000000000000000000000000000000000..43d65bf082a94396601e78a9dde0fe3f8e13138f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameters.json @@ -0,0 +1,65 @@ +{ + "ResponseMetadata": { + "RequestId": "2ba35df4-40d3-11e2-82cf-0b45b05c0221" + }, + "Parameters": [ + { + "Description": "Sets the display format for date and time values.", + "DataType": "string", + "IsModifiable": true, + "Source": "engine-default", + "ParameterValue": "ISO, MDY", + "ParameterName": "datestyle" + }, + { + "Description": "Sets the number of digits displayed for floating-point values", + "DataType": "integer", + "IsModifiable": true, + "AllowedValues": "-15-2", + "Source": "engine-default", + "ParameterValue": "0", + "ParameterName": "extra_float_digits" + }, + { + "Description": "This parameter applies a user-defined label to a group of queries that are run during the same session..", + "DataType": "string", + "IsModifiable": true, + "Source": "engine-default", + "ParameterValue": "default", + "ParameterName": "query_group" + }, + { + "Description": "require ssl for all databaseconnections", + "DataType": "boolean", + "IsModifiable": true, + "AllowedValues": "true,false", + "Source": "engine-default", + "ParameterValue": "false", + "ParameterName": "require_ssl" + }, + { + "Description": "Sets the schema search order for names that are not schema-qualified.", + "DataType": "string", + "IsModifiable": true, + "Source": "engine-default", + "ParameterValue": "$user, public", + "ParameterName": "search_path" + }, + { + "Description": "Aborts any statement that takes over the specified number of milliseconds.", + "DataType": "integer", + "IsModifiable": true, + "Source": "engine-default", + "ParameterValue": "0", + "ParameterName": "statement_timeout" + }, + { + "Description": "wlm json configuration", + "DataType": "string", + "IsModifiable": true, + "Source": "engine-default", + "ParameterValue": "[{\"query_concurrency\":5}]", + "ParameterName": "wlm_json_configuration" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameters.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameters.xml new file mode 100644 index 0000000000000000000000000000000000000000..2289fd44d54f7b4ae839312d1d4ba62e394125c5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-parameters.xml @@ -0,0 +1,67 @@ + + + + + ISO, MDY + string + engine-default + true + Sets the display format for date and time values. + datestyle + + + 0 + integer + engine-default + true + Sets the number of digits displayed for floating-point values + -15-2 + extra_float_digits + + + default + string + engine-default + true + This parameter applies a user-defined label to a group of queries that are run during the same session.. + query_group + + + false + boolean + engine-default + true + require ssl for all databaseconnections + true,false + require_ssl + + + $user, public + string + engine-default + true + Sets the schema search order for names that are not schema-qualified. + search_path + + + 0 + integer + engine-default + true + Aborts any statement that takes over the specified number of milliseconds. + statement_timeout + + + [{"query_concurrency":5}] + string + engine-default + true + wlm json configuration + wlm_json_configuration + + + + + 2ba35df4-40d3-11e2-82cf-0b45b05c0221 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-security-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-security-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..4553abcc905d59e16d4915fe950607b812c29f55 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-security-groups.json @@ -0,0 +1,24 @@ +{ + "ClusterSecurityGroups": [ + { + "Description": "default", + "ClusterSecurityGroupName": "default", + "EC2SecurityGroups": [], + "IPRanges": [ + { + "Status": "authorized", + "CIDRIP": "0.0.0.0/0" + } + ] + }, + { + "Description": "my security group", + "ClusterSecurityGroupName": "securitygroup1", + "EC2SecurityGroups": [], + "IPRanges": [] + } + ], + "ResponseMetadata": { + "RequestId": "947a8305-64f8-11e2-bec0-17624ad140dd" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-security-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-security-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..f11e80597db538139387f2e1cb6104a759992ebc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-security-groups.xml @@ -0,0 +1,26 @@ + + + + + + + + 0.0.0.0/0 + authorized + + + default + default + + + + + my security group + securitygroup1 + + + + + 947a8305-64f8-11e2-bec0-17624ad140dd + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-snapshots.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-snapshots.json new file mode 100644 index 0000000000000000000000000000000000000000..04df99871cb8f06937fd4eb2f42efc7443b618bb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-snapshots.json @@ -0,0 +1,27 @@ +{"ResponseMetadata": {"RequestId": "56a9daf4-64fa-11e2-a8da-655adc216806"}, + "Snapshots": [{"AvailabilityZone": "us-east-1c", + "ClusterCreateTime": "2013-01-22T19:23:59.368Z", + "ClusterIdentifier": "examplecluster", + "ClusterVersion": "1.0", + "DBName": "dev", + "MasterUsername": "adminuser", + "NodeType": "dw.hs1.xlarge", + "NumberOfNodes": 2, + "Port": 5439, + "SnapshotCreateTime": "2013-01-22T19:27:58.931Z", + "SnapshotIdentifier": "cm:examplecluster-2013-01-22-19-27-58", + "SnapshotType": "automated", + "Status": "available"}, + {"AvailabilityZone": "us-east-1c", + "ClusterCreateTime": "2013-01-22T19:23:59.368Z", + "ClusterIdentifier": "examplecluster", + "ClusterVersion": "1.0", + "DBName": "dev", + "MasterUsername": "adminuser", + "NodeType": "dw.hs1.xlarge", + "NumberOfNodes": 2, + "Port": 5439, + "SnapshotCreateTime": "2013-01-23T01:09:03.149Z", + "SnapshotIdentifier": "my-snapshot-123", + "SnapshotType": "manual", + "Status": "available"}]} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-snapshots.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-snapshots.xml new file mode 100644 index 0000000000000000000000000000000000000000..010bbaffe2deea961f523cecd126b58dc80b2b34 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-snapshots.xml @@ -0,0 +1,39 @@ + + + + + 5439 + cm:examplecluster-2013-01-22-19-27-58 + available + automated + 1.0 + 2013-01-22T19:27:58.931Z + 2 + dev + 2013-01-22T19:23:59.368Z + us-east-1c + dw.hs1.xlarge + examplecluster + adminuser + + + 5439 + my-snapshot-123 + available + manual + 1.0 + 2013-01-23T01:09:03.149Z + 2 + dev + 2013-01-22T19:23:59.368Z + us-east-1c + dw.hs1.xlarge + examplecluster + adminuser + + + + + 56a9daf4-64fa-11e2-a8da-655adc216806 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-subnet-groups.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-subnet-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..c5bcab1e5c230cd7d709445f134c0fd1954dcc9f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-subnet-groups.json @@ -0,0 +1,13 @@ +{"ClusterSubnetGroups": [ + {"ClusterSubnetGroupName": "my-subnet-group", + "Description": "my subnet group", + "SubnetGroupStatus": "Complete", + "Subnets": [{"SubnetAvailabilityZone": {"Name": "us-east-1a"}, + "SubnetIdentifier": "subnet-71c5091c", + "SubnetStatus": "Active"}, + {"SubnetAvailabilityZone": {"Name": "us-east-1a"}, + "SubnetIdentifier": "subnet-78de1215", + "SubnetStatus": "Active"}], + "VpcId": "vpc-5d917a30"}], + "ResponseMetadata": {"RequestId": "42024b68-6af3-11e2-a726-6368a468fa67"} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-subnet-groups.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-subnet-groups.xml new file mode 100644 index 0000000000000000000000000000000000000000..2d05712ee1ec4ccfd51fe6dbe6a5be225455e44c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-subnet-groups.xml @@ -0,0 +1,31 @@ + + + + + vpc-5d917a30 + my subnet group + my-subnet-group + Complete + + + Active + subnet-71c5091c + + us-east-1a + + + + Active + subnet-78de1215 + + us-east-1a + + + + + + + + 42024b68-6af3-11e2-a726-6368a468fa67 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-versions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-versions.json new file mode 100644 index 0000000000000000000000000000000000000000..2d10f4e9215d1d87105c1b73957f82ad0cef85ca --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-versions.json @@ -0,0 +1,12 @@ +{ + "ClusterVersions": [ + { + "ClusterVersion": "1.0", + "Description": "release db engine 1.0.54", + "ClusterParameterGroupFamily": "redshift-1.0" + } + ], + "ResponseMetadata": { + "RequestId": "6641e675-9167-11e2-a970-49138ad38474" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-versions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-versions.xml new file mode 100644 index 0000000000000000000000000000000000000000..9e3e7123baaafe274b80969fef0dc296a95b11ef --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-cluster-versions.xml @@ -0,0 +1,14 @@ + + + + + redshift-1.0 + release db engine 1.0.54 + 1.0 + + + + + 6641e675-9167-11e2-a970-49138ad38474 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-clusters.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-clusters.json new file mode 100644 index 0000000000000000000000000000000000000000..1092441380396eb640af7f62a54edaf5ec090ef3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-clusters.json @@ -0,0 +1,20 @@ +{"Clusters": [{"AllowVersionUpgrade": true, + "AutomatedSnapshotRetentionPeriod": 1, + "AvailabilityZone": "us-east-1a", + "ClusterIdentifier": "examplecluster", + "ClusterParameterGroups": [{"ParameterApplyStatus": "in-sync", + "ParameterGroupName": "default.redshift-1.0"}], + "ClusterSecurityGroups": [{"ClusterSecurityGroupName": "default", + "Status": "active"}], + "ClusterStatus": "creating", + "ClusterVersion": "1.0", + "DBName": "dev", + "Encrypted": false, + "MasterUsername": "masteruser", + "NodeType": "dw.hs1.xlarge", + "NumberOfNodes": 2, + "PendingModifiedValues": {"MasterUserPassword": "****"}, + "PreferredMaintenanceWindow": "sun:10:30-sun:11:00", + "PubliclyAccessible": true, + "VpcSecurityGroups": []}], + "ResponseMetadata": {"RequestId": "837d45d6-64f0-11e2-b07c-f7fbdd006c67"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-clusters.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-clusters.xml new file mode 100644 index 0000000000000000000000000000000000000000..ac8bc2a98f22338593171bff1ee6225440e459d3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-clusters.xml @@ -0,0 +1,40 @@ + + + + + + **** + + 1.0 + + creating + 2 + 1 + true + false + dev + sun:10:30-sun:11:00 + + + in-sync + default.redshift-1.0 + + + + + active + default + + + us-east-1a + dw.hs1.xlarge + examplecluster + true + masteruser + + + + + 837d45d6-64f0-11e2-b07c-f7fbdd006c67 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-events.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-events.json new file mode 100644 index 0000000000000000000000000000000000000000..f1a59bff0d9896c9d3d9f7750a3b175824e5bb92 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-events.json @@ -0,0 +1,5 @@ +{"Events": [{"Date": "2012-12-07T23:05:02.660Z", + "Message": "Cluster security group securitygroup1 has been updated. Changes need to be applied to all clusters using this cluster security group.", + "SourceIdentifier": "securitygroup1", + "SourceType": "cluster-security-group"}], + "ResponseMetadata": {"RequestId": "3eeb9efe-40c5-11e2-816a-1bba29fad1f5"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-events.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-events.xml new file mode 100644 index 0000000000000000000000000000000000000000..e530d989351e28a8adefd636ce065423ec446e47 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-events.xml @@ -0,0 +1,15 @@ + + + + + Cluster security group securitygroup1 has been updated. Changes need to be applied to all clusters using this cluster security group. + cluster-security-group + 2012-12-07T23:05:02.660Z + securitygroup1 + + + + + 3eeb9efe-40c5-11e2-816a-1bba29fad1f5 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-orderable-cluster-options.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-orderable-cluster-options.json new file mode 100644 index 0000000000000000000000000000000000000000..4a6ec8bbc6664f73ef4cfc0aaaf6210d83e0dedf --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-orderable-cluster-options.json @@ -0,0 +1,55 @@ +{ + "OrderableClusterOptions": [ + { + "NodeType": "dw.hs1.8xlarge", + "AvailabilityZones": [ + { + "Name": "us-east-1a" + }, + { + "Name": "us-east-1c" + }, + { + "Name": "us-east-1d" + } + ], + "ClusterVersion": "1.0", + "ClusterType": "multi-node" + }, + { + "NodeType": "dw.hs1.xlarge", + "AvailabilityZones": [ + { + "Name": "us-east-1a" + }, + { + "Name": "us-east-1c" + }, + { + "Name": "us-east-1d" + } + ], + "ClusterVersion": "1.0", + "ClusterType": "multi-node" + }, + { + "NodeType": "dw.hs1.xlarge", + "AvailabilityZones": [ + { + "Name": "us-east-1a" + }, + { + "Name": "us-east-1c" + }, + { + "Name": "us-east-1d" + } + ], + "ClusterVersion": "1.0", + "ClusterType": "single-node" + } + ], + "ResponseMetadata": { + "RequestId": "667a0dd4-9167-11e2-800a-8379c2537432" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-orderable-cluster-options.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-orderable-cluster-options.xml new file mode 100644 index 0000000000000000000000000000000000000000..f11c758e4fa704fc9462893bf4244c4bf6899bf4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-orderable-cluster-options.xml @@ -0,0 +1,57 @@ + + + + + multi-node + 1.0 + dw.hs1.8xlarge + + + us-east-1a + + + us-east-1c + + + us-east-1d + + + + + multi-node + 1.0 + dw.hs1.xlarge + + + us-east-1a + + + us-east-1c + + + us-east-1d + + + + + single-node + 1.0 + dw.hs1.xlarge + + + us-east-1a + + + us-east-1c + + + us-east-1d + + + + + + + 667a0dd4-9167-11e2-800a-8379c2537432 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-node-offerings.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-node-offerings.json new file mode 100644 index 0000000000000000000000000000000000000000..bed831ca4637c8277f01c95ac73f6751e8881b1b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-node-offerings.json @@ -0,0 +1,63 @@ +{ + "ReservedNodeOfferings": [ + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 24000.0, + "NodeType": "dw.hs1.8xlarge", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.912, + "RecurringChargeFrequency": "Hourly" + } + ], + "Duration": 94608000, + "ReservedNodeOfferingId": "c48ab04c-bc77-4ce4-8ada-b10c15c7b8b3" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 20000.0, + "NodeType": "dw.hs1.8xlarge", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 1.72, + "RecurringChargeFrequency": "Hourly" + } + ], + "Duration": 31536000, + "ReservedNodeOfferingId": "248e7b75-5f85-40dc-9d11-6f1e6c7cf9c2" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 2500.0, + "NodeType": "dw.hs1.xlarge", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.215, + "RecurringChargeFrequency": "Hourly" + } + ], + "Duration": 31536000, + "ReservedNodeOfferingId": "d586503b-7006-4cf5-888a-cf8f694e07bb" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 3000.0, + "NodeType": "dw.hs1.xlarge", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.114, + "RecurringChargeFrequency": "Hourly" + } + ], + "Duration": 94608000, + "ReservedNodeOfferingId": "4b2293b4-64a6-4e4a-9042-cf617efa3b76" + } + ], + "ResponseMetadata": { + "RequestId": "665aecb7-9167-11e2-a970-49138ad38474" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-node-offerings.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-node-offerings.xml new file mode 100644 index 0000000000000000000000000000000000000000..6d215e7b8276da3656beb6e937dc56e61fc2ec70 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-node-offerings.xml @@ -0,0 +1,65 @@ + + + + + Heavy Utilization + 94608000 + + + Hourly + 0.912 + + + 24000.0 + c48ab04c-bc77-4ce4-8ada-b10c15c7b8b3 + 0.0 + dw.hs1.8xlarge + + + Heavy Utilization + 31536000 + + + Hourly + 1.72 + + + 20000.0 + 248e7b75-5f85-40dc-9d11-6f1e6c7cf9c2 + 0.0 + dw.hs1.8xlarge + + + Heavy Utilization + 31536000 + + + Hourly + 0.215 + + + 2500.0 + d586503b-7006-4cf5-888a-cf8f694e07bb + 0.0 + dw.hs1.xlarge + + + Heavy Utilization + 94608000 + + + Hourly + 0.114 + + + 3000.0 + 4b2293b4-64a6-4e4a-9042-cf617efa3b76 + 0.0 + dw.hs1.xlarge + + + + + 665aecb7-9167-11e2-a970-49138ad38474 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-nodes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-nodes.json new file mode 100644 index 0000000000000000000000000000000000000000..f884e52c99a71f176cd7c6cac7a05db7e864c095 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-nodes.json @@ -0,0 +1,32 @@ +{"ReservedNodes": [{"Duration": 31536000, + "FixedPrice": 800.0, + "NodeCount": 1, + "NodeType": "dw.hs1.xlarge", + "OfferingType": "Medium Utilization", + "RecurringCharges": [], + "ReservedNodeId": "4357912c-9266-469d-beb0-0f1b775e1bc9", + "StartTime": "2013-01-22T18:46:48.600Z", + "State": "payment-pending", + "UsagePrice": 0.158}, + {"Duration": 94608000, + "FixedPrice": 12452.0, + "NodeCount": 2, + "NodeType": "dw.hs1.8xlarge", + "OfferingType": "Heavy Utilization", + "RecurringCharges": [{"RecurringChargeAmount": 0.21, + "RecurringChargeFrequency": "Hourly"}], + "ReservedNodeId": "93bbbca2-e88c-4b8b-a600-b64eaabf18a3", + "StartTime": "2013-01-22T20:09:16.630Z", + "State": "payment-pending", + "UsagePrice": 0.0}, + {"Duration": 31536000, + "FixedPrice": 800.0, + "NodeCount": 1, + "NodeType": "dw.hs1.xlarge", + "OfferingType": "Medium Utilization", + "RecurringCharges": [], + "ReservedNodeId": "bbcd9749-f2ea-4d01-9b1b-b576f618eb4e", + "StartTime": "2013-01-23T21:49:32.517Z", + "State": "payment-pending", + "UsagePrice": 0.158}], + "ResponseMetadata": {"RequestId": "24dc90c8-672d-11e2-b2e1-8f41f0379151"}} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-nodes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-nodes.xml new file mode 100644 index 0000000000000000000000000000000000000000..4a632c40fb22d8d6581a4236eccc26a9af1b47fd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-reserved-nodes.xml @@ -0,0 +1,50 @@ + + + + + 2013-01-22T18:46:48.600Z + Medium Utilization + 31536000 + + 800.0 + 0.158 + payment-pending + dw.hs1.xlarge + 1 + 4357912c-9266-469d-beb0-0f1b775e1bc9 + + + 2013-01-22T20:09:16.630Z + Heavy Utilization + 94608000 + + + Hourly + 0.21 + + + 12452.0 + 0.0 + payment-pending + dw.hs1.8xlarge + 2 + 93bbbca2-e88c-4b8b-a600-b64eaabf18a3 + + + 2013-01-23T21:49:32.517Z + Medium Utilization + 31536000 + + 800.0 + 0.158 + payment-pending + dw.hs1.xlarge + 1 + bbcd9749-f2ea-4d01-9b1b-b576f618eb4e + + + + + 24dc90c8-672d-11e2-b2e1-8f41f0379151 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-resize.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-resize.json new file mode 100644 index 0000000000000000000000000000000000000000..6eade45317fe360e4997c9e55a64a299e0df97e7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-resize.json @@ -0,0 +1,9 @@ +{ + "Status": "SUCCEEDED", + "ResponseMetadata": { + "RequestId": "ff826bc5-a157-11e2-98d4-3b276285f8df" + }, + "TargetClusterType": "multi-node", + "TargetNodeType": "db.m2.4xlarge", + "TargetNumberOfNodes": 2 +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-resize.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-resize.xml new file mode 100644 index 0000000000000000000000000000000000000000..a23d125b8b5cb390bba0ac5f37af61d24d041df6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-describe-resize.xml @@ -0,0 +1,11 @@ + + + multi-node + SUCCEEDED + db.m2.4xlarge + 2 + + + ff826bc5-a157-11e2-98d4-3b276285f8df + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-modify-cluster-parameter-group.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-modify-cluster-parameter-group.json new file mode 100644 index 0000000000000000000000000000000000000000..39bcb87188a043ca372cf62db5042bafb6992182 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-modify-cluster-parameter-group.json @@ -0,0 +1,7 @@ +{ + "ParameterGroupStatus": "Your parameter group has been updated but changes won't get applied until you reboot the associated Clusters.", + "ParameterGroupName": "parametergroup1", + "ResponseMetadata": { + "RequestId": "86e64043-40de-11e2-8a25-eb010998df4e" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-modify-cluster-parameter-group.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-modify-cluster-parameter-group.xml new file mode 100644 index 0000000000000000000000000000000000000000..a36bdc8b9446ff82cc67ee2d1f5cc4b33fd2002d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-modify-cluster-parameter-group.xml @@ -0,0 +1,9 @@ + + + Your parameter group has been updated but changes won't get applied until you reboot the associated Clusters. + parametergroup1 + + + 86e64043-40de-11e2-8a25-eb010998df4e + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-purchase-reserved-node-offering.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-purchase-reserved-node-offering.json new file mode 100644 index 0000000000000000000000000000000000000000..3ad4c5a8e387d86c54c34a62849a7b39f4a82892 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-purchase-reserved-node-offering.json @@ -0,0 +1,22 @@ +{ + "ReservedNode": { + "OfferingType": "Heavy Utilization", + "FixedPrice": 12452.0, + "NodeType": "dw.hs1.8xlarge", + "ReservedNodeId": "1ba8e2e3-dacf-48d9-841f-cc675182a8a6", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.21, + "RecurringChargeFrequency": "Hourly" + } + ], + "NodeCount": 2, + "State": "payment-pending", + "StartTime": "2013-01-18T21:42:44.402Z", + "Duration": 94608000 + }, + "ResponseMetadata": { + "RequestId": "fcb117cc-61b7-11e2-b6e9-87e586e4ca38" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-purchase-reserved-node-offering.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-purchase-reserved-node-offering.xml new file mode 100644 index 0000000000000000000000000000000000000000..5e9401387b70b56f8d1545d6488f9c478c2d0ed7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-purchase-reserved-node-offering.xml @@ -0,0 +1,24 @@ + + + + 2013-01-18T21:42:44.402Z + Heavy Utilization + 94608000 + + + Hourly + 0.21 + + + 12452.0 + 0.0 + payment-pending + dw.hs1.8xlarge + 2 + 1ba8e2e3-dacf-48d9-841f-cc675182a8a6 + + + + fcb117cc-61b7-11e2-b6e9-87e586e4ca38 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reboot-cluster.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reboot-cluster.json new file mode 100644 index 0000000000000000000000000000000000000000..6800795c8e4bf42f3e53bacc4604a2a8866ed5eb --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reboot-cluster.json @@ -0,0 +1,39 @@ +{ + "Cluster": { + "NodeType": "dw.hs1.xlarge", + "Endpoint": { + "Port": 5439, + "Address": "examplecluster.cobaosmlqshn.us-east-1.redshift.amazonaws.com" + }, + "ClusterVersion": "1.0", + "PubliclyAccessible": true, + "MasterUsername": "adminuser", + "Encrypted": false, + "ClusterParameterGroups": [ + { + "ParameterApplyStatus": "in-sync", + "ParameterGroupName": "default.redshift-1.0" + } + ], + "ClusterSecurityGroups": [ + { + "Status": "active", + "ClusterSecurityGroupName": "default" + } + ], + "AllowVersionUpgrade": true, + "VpcSecurityGroups": [], + "AvailabilityZone": "us-east-1c", + "ClusterCreateTime": "2013-01-22T19:23:59.368Z", + "PreferredMaintenanceWindow": "sun:06:30-sun:07:00", + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterStatus": "rebooting", + "ClusterIdentifier": "examplecluster", + "DBName": "dev", + "NumberOfNodes": 2, + "PendingModifiedValues": {} + }, + "ResponseMetadata": { + "RequestId": "5edee79e-6503-11e2-9e70-918437dd236d" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reboot-cluster.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reboot-cluster.xml new file mode 100644 index 0000000000000000000000000000000000000000..0ceb9cb4e278cf8bffdd1b39224b951506773948 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reboot-cluster.xml @@ -0,0 +1,41 @@ + + + + + 1.0 + + + 5439 +
    examplecluster.cobaosmlqshn.us-east-1.redshift.amazonaws.com
    +
    + rebooting + 2 + 1 + true + false + dev + sun:06:30-sun:07:00 + + + in-sync + default.redshift-1.0 + + + 2013-01-22T19:23:59.368Z + + + active + default + + + us-east-1c + dw.hs1.xlarge + examplecluster + true + adminuser +
    +
    + + 5edee79e-6503-11e2-9e70-918437dd236d + +
    diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reset-cluster-parameter-group.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reset-cluster-parameter-group.json new file mode 100644 index 0000000000000000000000000000000000000000..c7285dc191fdb0e0778cfe95ecd11ad4a298579f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reset-cluster-parameter-group.json @@ -0,0 +1,7 @@ +{ + "ParameterGroupStatus": "Your parameter group has been updated but changes won't get applied until you reboot the associated Clusters.", + "ParameterGroupName": "parametergroup1", + "ResponseMetadata": { + "RequestId": "625d23c1-40dc-11e2-8a25-eb010998df4e" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reset-cluster-parameter-group.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reset-cluster-parameter-group.xml new file mode 100644 index 0000000000000000000000000000000000000000..55ec0899b4a8d319140df52a475515c32b136c4f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-reset-cluster-parameter-group.xml @@ -0,0 +1,9 @@ + + + Your parameter group has been updated but changes won't get applied until you reboot the associated Clusters. + parametergroup1 + + + 625d23c1-40dc-11e2-8a25-eb010998df4e + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-restore-from-cluster-snapshot.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-restore-from-cluster-snapshot.json new file mode 100644 index 0000000000000000000000000000000000000000..0ab31fb16fd3a336d38cf61d950eb6026ed8e304 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-restore-from-cluster-snapshot.json @@ -0,0 +1,33 @@ +{ + "Cluster": { + "NodeType": "dw.hs1.xlarge", + "ClusterVersion": "1.0", + "PubliclyAccessible": true, + "MasterUsername": "adminuser", + "Encrypted": false, + "ClusterParameterGroups": [ + { + "ParameterApplyStatus": "in-sync", + "ParameterGroupName": "default.redshift-1.0" + } + ], + "ClusterSecurityGroups": [ + { + "Status": "active", + "ClusterSecurityGroupName": "default" + } + ], + "AllowVersionUpgrade": true, + "VpcSecurityGroups": [], + "PreferredMaintenanceWindow": "sun:06:30-sun:07:00", + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterStatus": "creating", + "ClusterIdentifier": "examplecluster-restored", + "DBName": "dev", + "NumberOfNodes": 2, + "PendingModifiedValues": {} + }, + "ResponseMetadata": { + "RequestId": "52a9aee8-6505-11e2-bec0-17624ad140dd" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-restore-from-cluster-snapshot.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-restore-from-cluster-snapshot.xml new file mode 100644 index 0000000000000000000000000000000000000000..9168cd70bf282e2b389170f52860ac049b797988 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-restore-from-cluster-snapshot.xml @@ -0,0 +1,35 @@ + + + + + 1.0 + + creating + 2 + 1 + true + false + dev + sun:06:30-sun:07:00 + + + in-sync + default.redshift-1.0 + + + + + active + default + + + dw.hs1.xlarge + examplecluster-restored + true + adminuser + + + + 52a9aee8-6505-11e2-bec0-17624ad140dd + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-revoke-cluster-security-group-ingress.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-revoke-cluster-security-group-ingress.json new file mode 100644 index 0000000000000000000000000000000000000000..6f7e4088a14c2746c1fb5d2f7b3d217752fd8b16 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-revoke-cluster-security-group-ingress.json @@ -0,0 +1,11 @@ +{ + "ClusterSecurityGroup": { + "Description": "my security group", + "ClusterSecurityGroupName": "securitygroup1", + "EC2SecurityGroups": [], + "IPRanges": [] + }, + "ResponseMetadata": { + "RequestId": "d8eff363-6502-11e2-a8da-655adc216806" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-revoke-cluster-security-group-ingress.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-revoke-cluster-security-group-ingress.xml new file mode 100644 index 0000000000000000000000000000000000000000..51ae233f7b52678c44b4579c1fe7a9af3e38f174 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/redshift-revoke-cluster-security-group-ingress.xml @@ -0,0 +1,13 @@ + + + + + + my security group + securitygroup1 + + + + d8eff363-6502-11e2-a8da-655adc216806 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-acl.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-acl.json new file mode 100644 index 0000000000000000000000000000000000000000..03007a6028a86c29ece5050d383409026447dd03 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-acl.json @@ -0,0 +1,17 @@ +{ + "Owner": { + "DisplayName": "CustomersName@amazon.com", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a" + }, + "Grants": [ + { + "Grantee": { + "DisplayName": "CustomersName@amazon.com", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a", + "Type": "CanonicalUser" + }, + "Permission": "FULL_CONTROL" + } + ], + "ResponseMetadata": {} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-acl.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-acl.xml new file mode 100644 index 0000000000000000000000000000000000000000..f10aa98aa4c3dd16217c57ff5ec232742980bf70 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-acl.xml @@ -0,0 +1,16 @@ + + + 75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + CustomersName@amazon.com + + + + +75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + CustomersName@amazon.com + + FULL_CONTROL + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-location.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-location.json new file mode 100644 index 0000000000000000000000000000000000000000..19caf63d3229226443645a55c056d6d4ce4c8276 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-location.json @@ -0,0 +1,4 @@ +{ + "ResponseMetadata": {}, + "LocationConstraint": "EU" +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-location.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-location.xml new file mode 100644 index 0000000000000000000000000000000000000000..5c4e0cad931cc1258a0b5fcff8842f7c9e993836 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-location.xml @@ -0,0 +1,2 @@ + +EU diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-logging.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-logging.json new file mode 100644 index 0000000000000000000000000000000000000000..0c3262d377a59c541787a2cd8e838939ca0e92d1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-logging.json @@ -0,0 +1,16 @@ +{ + "LoggingEnabled": { + "TargetPrefix": "mybucket-access_log-/", + "TargetBucket": "mybucketlogs", + "TargetGrants": [ + { + "Grantee": { + "EmailAddress": "user@company.com", + "Type": "AmazonCustomerByEmail" + }, + "Permission": "READ" + } + ] + }, + "ResponseMetadata": {} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-logging.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-logging.xml new file mode 100644 index 0000000000000000000000000000000000000000..a2bf90638ec19346227e78a0c32b886ff82d45ab --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-logging.xml @@ -0,0 +1,16 @@ + + + + mybucketlogs + mybucket-access_log-/ + + + + user@company.com + + READ + + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-policy.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-policy.json new file mode 100644 index 0000000000000000000000000000000000000000..cbbec49451e53fde02a3b1d8ecb0f6975722b86d --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-policy.json @@ -0,0 +1,4 @@ +{ + "ResponseMetadata": {}, + "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"AddPerm\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"s3:GetObject\",\"Resource\":\"arn:aws:s3:::bucket-name/*\"}]}" +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-policy.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-policy.xml new file mode 100644 index 0000000000000000000000000000000000000000..7002a7507db722fda9b057641b6623f34ddbb47f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-get-bucket-policy.xml @@ -0,0 +1 @@ +{"Version":"2012-10-17","Statement":[{"Sid":"AddPerm","Effect":"Allow","Principal":"*","Action":"s3:GetObject","Resource":"arn:aws:s3:::bucket-name/*"}]} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-buckets.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-buckets.json new file mode 100644 index 0000000000000000000000000000000000000000..991fd2cafffc23d59dc2c23e59d537ec8cbdde9a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-buckets.json @@ -0,0 +1,153 @@ +{ + "Owner": { + "DisplayName": "mitchaws", + "ID": "1936a5d8a2b189cda450d1d1d514f3861b3adc2df5152d2a294487b9445d1e7f" + }, + "Buckets": [ + { + "CreationDate": "2012-02-20T17:45:32.000Z", + "Name": "botostats" + }, + { + "CreationDate": "2012-12-18T20:38:12.000Z", + "Name": "bucket-1355863083" + }, + { + "CreationDate": "2013-01-31T22:24:01.000Z", + "Name": "elasticbeanstalk-us-east-1-419278470775" + }, + { + "CreationDate": "2013-03-20T13:29:16.000Z", + "Name": "elasticbeanstalk-us-west-2-419278470775" + }, + { + "CreationDate": "2012-03-26T19:02:12.000Z", + "Name": "encryption-1332788550" + }, + { + "CreationDate": "2012-09-04T17:27:28.000Z", + "Name": "encryption-1346779637" + }, + { + "CreationDate": "2012-01-09T05:53:44.000Z", + "Name": "garnaat-amazon" + }, + { + "CreationDate": "2012-01-23T02:54:39.000Z", + "Name": "garnaat_test_lifecycle" + }, + { + "CreationDate": "2012-12-18T20:30:10.000Z", + "Name": "keytest-1355862601" + }, + { + "CreationDate": "2012-12-19T01:28:24.000Z", + "Name": "keytest-1355863376" + }, + { + "CreationDate": "2012-05-14T20:17:26.000Z", + "Name": "mgtest2cloudformation" + }, + { + "CreationDate": "2012-05-14T14:36:38.000Z", + "Name": "mgtestcloudformation" + }, + { + "CreationDate": "2012-05-14T14:34:13.000Z", + "Name": "mitchtestcloudformation" + }, + { + "CreationDate": "2012-12-18T20:31:31.000Z", + "Name": "multidelete-1355862684" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multidelete-1355862730" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multidelete-1355863407" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multidelete-1355863439" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multidelete-1355863446" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multidelete-1355863455" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multidelete-1355863464" + }, + { + "CreationDate": "2012-12-18T20:44:38.000Z", + "Name": "multidelete-1355863470" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multipart-1355862845" + }, + { + "CreationDate": "2012-12-18T20:35:08.000Z", + "Name": "multipart-1355862901" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multipart-1355863550" + }, + { + "CreationDate": "2012-12-19T01:28:25.000Z", + "Name": "multipart-1355863593" + }, + { + "CreationDate": "2013-03-13T05:42:01.000Z", + "Name": "pyconprod" + }, + { + "CreationDate": "2012-03-18T19:28:26.000Z", + "Name": "src-bucket-1332098908" + }, + { + "CreationDate": "2012-03-26T19:01:49.000Z", + "Name": "src-bucket-1332788526" + }, + { + "CreationDate": "2012-03-26T19:10:02.000Z", + "Name": "src-bucket-1332789019" + }, + { + "CreationDate": "2012-03-27T17:08:36.000Z", + "Name": "src-bucket-1332868116" + }, + { + "CreationDate": "2012-06-13T17:36:12.000Z", + "Name": "src-bucket-1339608971" + }, + { + "CreationDate": "2013-01-09T02:50:52.000Z", + "Name": "src-bucket-1357699848" + }, + { + "CreationDate": "2012-04-28T20:42:19.000Z", + "Name": "stats.pythonboto.org" + }, + { + "CreationDate": "2013-01-10T21:44:06.000Z", + "Name": "test-1357854245" + }, + { + "CreationDate": "2013-01-10T21:44:07.000Z", + "Name": "test-1357854246" + }, + { + "CreationDate": "2012-09-01T10:25:07.000Z", + "Name": "version-1328224364" + } + ], + "ResponseMetadata": {} +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-buckets.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-buckets.xml new file mode 100644 index 0000000000000000000000000000000000000000..3d0a49cf684a86186e87d336a79459354ea165c5 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-buckets.xml @@ -0,0 +1,2 @@ + +1936a5d8a2b189cda450d1d1d514f3861b3adc2df5152d2a294487b9445d1e7fmitchawsbotostats2012-02-20T17:45:32.000Zbucket-13558630832012-12-18T20:38:12.000Zelasticbeanstalk-us-east-1-4192784707752013-01-31T22:24:01.000Zelasticbeanstalk-us-west-2-4192784707752013-03-20T13:29:16.000Zencryption-13327885502012-03-26T19:02:12.000Zencryption-13467796372012-09-04T17:27:28.000Zgarnaat-amazon2012-01-09T05:53:44.000Zgarnaat_test_lifecycle2012-01-23T02:54:39.000Zkeytest-13558626012012-12-18T20:30:10.000Zkeytest-13558633762012-12-19T01:28:24.000Zmgtest2cloudformation2012-05-14T20:17:26.000Zmgtestcloudformation2012-05-14T14:36:38.000Zmitchtestcloudformation2012-05-14T14:34:13.000Zmultidelete-13558626842012-12-18T20:31:31.000Zmultidelete-13558627302012-12-19T01:28:25.000Zmultidelete-13558634072012-12-19T01:28:25.000Zmultidelete-13558634392012-12-19T01:28:25.000Zmultidelete-13558634462012-12-19T01:28:25.000Zmultidelete-13558634552012-12-19T01:28:25.000Zmultidelete-13558634642012-12-19T01:28:25.000Zmultidelete-13558634702012-12-18T20:44:38.000Zmultipart-13558628452012-12-19T01:28:25.000Zmultipart-13558629012012-12-18T20:35:08.000Zmultipart-13558635502012-12-19T01:28:25.000Zmultipart-13558635932012-12-19T01:28:25.000Zpyconprod2013-03-13T05:42:01.000Zsrc-bucket-13320989082012-03-18T19:28:26.000Zsrc-bucket-13327885262012-03-26T19:01:49.000Zsrc-bucket-13327890192012-03-26T19:10:02.000Zsrc-bucket-13328681162012-03-27T17:08:36.000Zsrc-bucket-13396089712012-06-13T17:36:12.000Zsrc-bucket-13576998482013-01-09T02:50:52.000Zstats.pythonboto.org2012-04-28T20:42:19.000Ztest-13578542452013-01-10T21:44:06.000Ztest-13578542462013-01-10T21:44:07.000Zversion-13282243642012-09-01T10:25:07.000Z \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads#2.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads#2.json new file mode 100644 index 0000000000000000000000000000000000000000..df89574b36f8a033824db8af03e3041b2ed0d4fa --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads#2.json @@ -0,0 +1,54 @@ +{ + "UploadIdMarker": "", + "ResponseMetadata": {}, + "NextKeyMarker": "my-movie.m2ts", + "Bucket": "bucket", + "NextUploadIdMarker": "YW55IGlkZWEgd2h5IGVsdmluZydzIHVwbG9hZCBmYWlsZWQ", + "Uploads": [ + { + "Initiator": { + "DisplayName": "user1-11111a31-17b5-4fb7-9df5-b111111f13de", + "ID": "arn:aws:iam::111122223333:user/user1-11111a31-17b5-4fb7-9df5-b111111f13de" + }, + "Initiated": "2010-11-10T20:48:33.000Z", + "UploadId": "XMgbGlrZSBlbHZpbmcncyBub3QgaGF2aW5nIG11Y2ggbHVjaw", + "StorageClass": "STANDARD", + "Key": "my-divisor", + "Owner": { + "DisplayName": "OwnerDisplayName", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a" + } + }, + { + "Initiator": { + "DisplayName": "InitiatorDisplayName", + "ID": "b1d16700c70b0b05597d7acd6a3f92be" + }, + "Initiated": "2010-11-10T20:48:33.000Z", + "UploadId": "VXBsb2FkIElEIGZvciBlbHZpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA", + "StorageClass": "STANDARD", + "Key": "my-movie.m2ts", + "Owner": { + "DisplayName": "OwnerDisplayName", + "ID": "b1d16700c70b0b05597d7acd6a3f92be" + } + }, + { + "Initiator": { + "DisplayName": "user1-22222a31-17b5-4fb7-9df5-b222222f13de", + "ID": "arn:aws:iam::444455556666:user/user1-22222a31-17b5-4fb7-9df5-b222222f13de" + }, + "Initiated": "2010-11-10T20:49:33.000Z", + "UploadId": "YW55IGlkZWEgd2h5IGVsdmluZydzIHVwbG9hZCBmYWlsZWQ", + "StorageClass": "STANDARD", + "Key": "my-movie.m2ts", + "Owner": { + "DisplayName": "OwnerDisplayName", + "ID": "b1d16700c70b0b05597d7acd6a3f92be" + } + } + ], + "KeyMarker": "", + "MaxUploads": 3, + "IsTruncated": true +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads#2.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads#2.xml new file mode 100644 index 0000000000000000000000000000000000000000..e23a03974dfd138dcd9f20d8e52575507021dbf8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads#2.xml @@ -0,0 +1,52 @@ + + + bucket + + + my-movie.m2ts + YW55IGlkZWEgd2h5IGVsdmluZydzIHVwbG9hZCBmYWlsZWQ + 3 + true + + my-divisor + XMgbGlrZSBlbHZpbmcncyBub3QgaGF2aW5nIG11Y2ggbHVjaw + + arn:aws:iam::111122223333:user/user1-11111a31-17b5-4fb7-9df5-b111111f13de + user1-11111a31-17b5-4fb7-9df5-b111111f13de + + + 75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + OwnerDisplayName + + STANDARD + 2010-11-10T20:48:33.000Z + + + my-movie.m2ts + VXBsb2FkIElEIGZvciBlbHZpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA + + b1d16700c70b0b05597d7acd6a3f92be + InitiatorDisplayName + + + b1d16700c70b0b05597d7acd6a3f92be + OwnerDisplayName + + STANDARD + 2010-11-10T20:48:33.000Z + + + my-movie.m2ts + YW55IGlkZWEgd2h5IGVsdmluZydzIHVwbG9hZCBmYWlsZWQ + + arn:aws:iam::444455556666:user/user1-22222a31-17b5-4fb7-9df5-b222222f13de + user1-22222a31-17b5-4fb7-9df5-b222222f13de + + + b1d16700c70b0b05597d7acd6a3f92be + OwnerDisplayName + + STANDARD + 2010-11-10T20:49:33.000Z + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads.json new file mode 100644 index 0000000000000000000000000000000000000000..429e5bbd44098cb587e6819b1f4f286a49e0c5d4 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads.json @@ -0,0 +1,16 @@ +{ + "UploadIdMarker": "", + "CommonPrefixes": [ + {"Prefix": "foo/"}, + {"Prefix": "foobar/"} + ], + "ResponseMetadata": {}, + "NextKeyMarker": "", + "Bucket": "botocoretest1374528673-218", + "Prefix": "foo", + "Delimiter": "/", + "NextUploadIdMarker": "", + "KeyMarker": "", + "MaxUploads": 1000, + "IsTruncated": false +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads.xml new file mode 100644 index 0000000000000000000000000000000000000000..9b3f472a62d9c61b4a81814de407491e7ca6f1d3 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-multipart-uploads.xml @@ -0,0 +1,14 @@ + + + botocoretest1374528673-218 + + + + + / + foo + 1000 + false + foo/ + foobar/ + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-object-versions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-object-versions.json new file mode 100644 index 0000000000000000000000000000000000000000..4567a219348942a62c0132d977e5d38d92b21e75 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-object-versions.json @@ -0,0 +1,72 @@ +{ + "Name": "bucket", + "ResponseMetadata": {}, + "Versions": [ + { + "LastModified": "2009-10-12T17:50:30.000Z", + "VersionId": "3/L4kqtJl40Nr8X8gdRQBpUMLUo", + "ETag": "\"fba9dede5f27731c9771645a39863328\"", + "StorageClass": "STANDARD", + "Key": "my-image.jpg", + "Owner": { + "DisplayName": "mtd@amazon.com", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a" + }, + "IsLatest": true, + "Size": 434234 + }, + { + "LastModified": "2009-10-10T17:50:30.000Z", + "VersionId": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893", + "ETag": "\"9b2cf535f27731c974343645a3985328\"", + "StorageClass": "STANDARD", + "Key": "my-second-image.jpg", + "Owner": { + "DisplayName": "mtd@amazon.com", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a" + }, + "IsLatest": false, + "Size": 166434 + }, + { + "LastModified": "2009-10-11T12:50:30.000Z", + "VersionId": "UIORUnfndfhnw89493jJFJ", + "ETag": "\"772cf535f27731c974343645a3985328\"", + "StorageClass": "STANDARD", + "Key": "my-third-image.jpg", + "Owner": { + "DisplayName": "mtd@amazon.com", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a" + }, + "IsLatest": false, + "Size": 64 + } + ], + "MaxKeys": 5, + "Prefix": "my", + "KeyMarker": "", + "DeleteMarkers": [ + { + "Owner": { + "DisplayName": "mtd@amazon.com", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a" + }, + "IsLatest": true, + "VersionId": "03jpff543dhffds434rfdsFDN943fdsFkdmqnh892", + "Key": "my-second-image.jpg", + "LastModified": "2009-11-12T17:50:30.000Z" + }, + { + "Owner": { + "DisplayName": "mtd@amazon.com", + "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a" + }, + "IsLatest": true, + "VersionId": "03jpff543dhffds434rfdsFDN943fdsFkdmqnh892", + "Key": "my-third-image.jpg", + "LastModified": "2009-10-15T17:50:30.000Z" + } + ], + "IsTruncated": false, + "VersionIdMarker": "" +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-object-versions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-object-versions.xml new file mode 100644 index 0000000000000000000000000000000000000000..cbc62ec3a9d2d17ebe32acb38b9e31dbdecc9eae --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-object-versions.xml @@ -0,0 +1,68 @@ + + + bucket + my + + + 5 + false + + my-image.jpg + 3/L4kqtJl40Nr8X8gdRQBpUMLUo + true + 2009-10-12T17:50:30.000Z + "fba9dede5f27731c9771645a39863328" + 434234 + STANDARD + + 75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + mtd@amazon.com + + + + my-second-image.jpg + 03jpff543dhffds434rfdsFDN943fdsFkdmqnh892 + true + 2009-11-12T17:50:30.000Z + + 75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + mtd@amazon.com + + + + my-second-image.jpg + QUpfdndhfd8438MNFDN93jdnJFkdmqnh893 + false + 2009-10-10T17:50:30.000Z + "9b2cf535f27731c974343645a3985328" + 166434 + STANDARD + + 75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + mtd@amazon.com + + + + my-third-image.jpg + 03jpff543dhffds434rfdsFDN943fdsFkdmqnh892 + true + 2009-10-15T17:50:30.000Z + + 75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + mtd@amazon.com + + + + my-third-image.jpg + UIORUnfndfhnw89493jJFJ + false + 2009-10-11T12:50:30.000Z + "772cf535f27731c974343645a3985328" + 64 + STANDARD + + 75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a + mtd@amazon.com + + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-objects.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-objects.json new file mode 100644 index 0000000000000000000000000000000000000000..ed2671e8dd7af3c72ed601ec3f678520ffe186d7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-objects.json @@ -0,0 +1,32 @@ +{ + "Name": "test-1357854246", + "ResponseMetadata": {}, + "MaxKeys": 1000, + "Prefix": "", + "Marker": "", + "IsTruncated": false, + "Contents": [ + { + "LastModified": "2013-01-10T21:45:09.000Z", + "ETag": "\"1d921b22129502cbbe5cbaf2c8bac682\"", + "StorageClass": "STANDARD", + "Key": "key1", + "Owner": { + "DisplayName": "aws", + "ID": "1936a5d8a2b189cda450d1d1d514f3861b3adc2df515" + }, + "Size": 10000 + }, + { + "LastModified": "2013-01-10T22:45:09.000Z", + "ETag": "\"1d921b22129502cbbe5cbaf2c8bac682\"", + "StorageClass": "STANDARD", + "Key": "key2", + "Owner": { + "DisplayName": "aws", + "ID": "1936a5d8a2b189cda450d1d1d514f3861b3adc2df515" + }, + "Size": 1234 + } + ] +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-objects.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-objects.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5dbe6df534e0f9619ab868f7baf879d36992c70 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/s3-list-objects.xml @@ -0,0 +1,30 @@ + + + test-1357854246 + + + 1000 + false + + key1 + 2013-01-10T21:45:09.000Z + "1d921b22129502cbbe5cbaf2c8bac682" + 10000 + + 1936a5d8a2b189cda450d1d1d514f3861b3adc2df515 + aws + + STANDARD + + + key2 + 2013-01-10T22:45:09.000Z + "1d921b22129502cbbe5cbaf2c8bac682" + 1234 + + 1936a5d8a2b189cda450d1d1d514f3861b3adc2df515 + aws + + STANDARD + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-delete-identity.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-delete-identity.json new file mode 100644 index 0000000000000000000000000000000000000000..174c424f757c593d35bb47dcd6dbe35ecc87333c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-delete-identity.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "d96bd874-9bf2-11e1-8ee7-c98a0037a2b6" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-delete-identity.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-delete-identity.xml new file mode 100644 index 0000000000000000000000000000000000000000..11577793c5a68d4a58d3b473c3f6e29b59867888 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-delete-identity.xml @@ -0,0 +1,6 @@ + + + + d96bd874-9bf2-11e1-8ee7-c98a0037a2b6 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-dkim-attributes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-dkim-attributes.json new file mode 100644 index 0000000000000000000000000000000000000000..16c5010d8aaf38322e2fd6947a042e9c6f39cb88 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-dkim-attributes.json @@ -0,0 +1,16 @@ +{ + "DkimAttributes": { + "amazon.com": { + "DkimTokens": [ + "vvjuipp74whm76gqoni7qmwwn4w4qusjiainivf6f", + "3frqe7jn4obpuxjpwpolz6ipb3k5nvt2nhjpik2oy", + "wrqplteh7oodxnad7hsl4mixg2uavzneazxv5sxi2" + ], + "DkimEnabled": true, + "DkimVerificationStatus": "Success" + } + }, + "ResponseMetadata": { + "RequestId": "bb5a105d-c468-11e1-82eb-dff885ccc06a" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-dkim-attributes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-dkim-attributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..b3febeba4aed1fc0c7c195fea15a741c426b0f45 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-dkim-attributes.xml @@ -0,0 +1,21 @@ + + + + + amazon.com + + true + Success + + vvjuipp74whm76gqoni7qmwwn4w4qusjiainivf6f + 3frqe7jn4obpuxjpwpolz6ipb3k5nvt2nhjpik2oy + wrqplteh7oodxnad7hsl4mixg2uavzneazxv5sxi2 + + + + + + + bb5a105d-c468-11e1-82eb-dff885ccc06a + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-notification-attributes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-notification-attributes.json new file mode 100644 index 0000000000000000000000000000000000000000..0184e26f6cfccc048cff738f9deb55e24b686e89 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-notification-attributes.json @@ -0,0 +1,12 @@ +{ + "NotificationAttributes": { + "user@example.com": { + "ForwardingEnabled": true, + "ComplaintTopic": "arn:aws:sns:us-east-1:123456789012:example", + "BounceTopic": "arn:aws:sns:us-east-1:123456789012:example" + } + }, + "ResponseMetadata": { + "RequestId": "e038e509-b72a-11e1-901f-1fbd90e8104f" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-notification-attributes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-notification-attributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..f20803b3dc517f8a4d0f9f2eadef2980714d29c8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-notification-attributes.xml @@ -0,0 +1,17 @@ + + + + + user@example.com + + true + arn:aws:sns:us-east-1:123456789012:example + arn:aws:sns:us-east-1:123456789012:example + + + + + + e038e509-b72a-11e1-901f-1fbd90e8104f + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-verification-attributes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-verification-attributes.json new file mode 100644 index 0000000000000000000000000000000000000000..ca6d6aafee2ad734ef38283b171829dc5b95b979 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-verification-attributes.json @@ -0,0 +1,14 @@ +{ + "VerificationAttributes": { + "user@domain.com": { + "VerificationStatus": "Pending" + }, + "domain.com": { + "VerificationToken": "QTKknzFg2J4ygwa+XvHAxUl1hyHoY0gVfZdfjIedHZ0=", + "VerificationStatus": "Pending" + } + }, + "ResponseMetadata": { + "RequestId": "1d0c29f1-9bf3-11e1-8ee7-c98a0037a2b6" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-verification-attributes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-verification-attributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ff21897cf6e2ac15340c463ce731b10f3250452 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-identity-verification-attributes.xml @@ -0,0 +1,22 @@ + + + + + domain.com + + Pending + QTKknzFg2J4ygwa+XvHAxUl1hyHoY0gVfZdfjIedHZ0= + + + + user@domain.com + + Pending + + + + + + 1d0c29f1-9bf3-11e1-8ee7-c98a0037a2b6 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-quota.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-quota.json new file mode 100644 index 0000000000000000000000000000000000000000..715fb922e0e2ec4577c55109f6f69a6af412c45e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-quota.json @@ -0,0 +1,8 @@ +{ + "Max24HourSend": 200.0, + "ResponseMetadata": { + "RequestId": "65a6913a-9167-11e2-9374-7d889fec53f7" + }, + "SentLast24Hours": 0.0, + "MaxSendRate": 1.0 +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-quota.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-quota.xml new file mode 100644 index 0000000000000000000000000000000000000000..128b4eb1260754d8d766933800d55e4455ac0a22 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-quota.xml @@ -0,0 +1,10 @@ + + + 0.0 + 200.0 + 1.0 + + + 65a6913a-9167-11e2-9374-7d889fec53f7 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-statistics.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-statistics.json new file mode 100644 index 0000000000000000000000000000000000000000..5199142e1978742f3573da3762c7d18c79dc80a0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-statistics.json @@ -0,0 +1,11 @@ +{"ResponseMetadata": {"RequestId": "c2b66ee5-c866-11e0-b17f-cddb0ab334db"}, + "SendDataPoints": [{"Bounces": 0, + "Complaints": 0, + "DeliveryAttempts": 8, + "Rejects": 0, + "Timestamp": "2011-08-03T19:23:00Z"}, + {"Bounces": 0, + "Complaints": 0, + "DeliveryAttempts": 7, + "Rejects": 0, + "Timestamp": "2011-08-03T06:53:00Z"}]} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-statistics.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-statistics.xml new file mode 100644 index 0000000000000000000000000000000000000000..cd9e77b8a33d17dda788b2fdc79307c40548c356 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-get-send-statistics.xml @@ -0,0 +1,23 @@ + + + + + 8 + 2011-08-03T19:23:00Z + 0 + 0 + 0 + + + 7 + 2011-08-03T06:53:00Z + 0 + 0 + 0 + + + + + c2b66ee5-c866-11e0-b17f-cddb0ab334db + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-list-identities.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-list-identities.json new file mode 100644 index 0000000000000000000000000000000000000000..ad1483a1640a87177badb2c65472c7ae0a30bfc9 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-list-identities.json @@ -0,0 +1,9 @@ +{ + "Identities": [ + "foobar.com", + "foo@bar.com" + ], + "ResponseMetadata": { + "RequestId": "659700d6-9167-11e2-8db7-37375a39d514" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-list-identities.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-list-identities.xml new file mode 100644 index 0000000000000000000000000000000000000000..bdb7b630bde703f6dd910ff44ccd6538e070aa9b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-list-identities.xml @@ -0,0 +1,11 @@ + + + + foobar.com + foo@bar.com + + + + 659700d6-9167-11e2-8db7-37375a39d514 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-email.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-email.json new file mode 100644 index 0000000000000000000000000000000000000000..aeecf840f77b0689c483c846e6263b9d6943060c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-email.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "d5964849-c866-11e0-9beb-01a62d68c57f" + }, + "MessageId": "00000131d51d2292-159ad6eb-077c-46e6-ad09-ae7c05925ed4-000000" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-email.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-email.xml new file mode 100644 index 0000000000000000000000000000000000000000..2036e1758cabcd7bb1c6d755d7eebab9286dcc02 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-email.xml @@ -0,0 +1,8 @@ + + + 00000131d51d2292-159ad6eb-077c-46e6-ad09-ae7c05925ed4-000000 + + + d5964849-c866-11e0-9beb-01a62d68c57f + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-raw-email.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-raw-email.json new file mode 100644 index 0000000000000000000000000000000000000000..e174b520dee751c6a3422701834f47d21ace28bf --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-raw-email.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "e0abcdfa-c866-11e0-b6d0-273d09173b49" + }, + "MessageId": "00000131d51d6b36-1d4f9293-0aee-4503-b573-9ae4e70e9e38-000000" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-raw-email.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-raw-email.xml new file mode 100644 index 0000000000000000000000000000000000000000..b07935f2dab76ca66e67e4cfbfd952436168b461 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-send-raw-email.xml @@ -0,0 +1,8 @@ + + + 00000131d51d6b36-1d4f9293-0aee-4503-b573-9ae4e70e9e38-000000 + + + e0abcdfa-c866-11e0-b6d0-273d09173b49 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-set-identity-dkim-enabled.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-set-identity-dkim-enabled.json new file mode 100644 index 0000000000000000000000000000000000000000..4756ef24254760c2edcb396df08e706010ebc0cc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-set-identity-dkim-enabled.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "7aa61362-c469-11e1-aee5-6bbb4608fbcc" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-set-identity-dkim-enabled.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-set-identity-dkim-enabled.xml new file mode 100644 index 0000000000000000000000000000000000000000..2dc16a0e9e9a9c84db568aff019ace078035ded8 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-set-identity-dkim-enabled.xml @@ -0,0 +1,6 @@ + + + + 7aa61362-c469-11e1-aee5-6bbb4608fbcc + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-dkim.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-dkim.json new file mode 100644 index 0000000000000000000000000000000000000000..8ea1b9cb8914c2d55a0aaa68ddd12c1dcb43bc60 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-dkim.json @@ -0,0 +1,10 @@ +{ + "DkimTokens": [ + "vvjuipp74whm76gqoni7qmwwn4w4qusjiainivf6sf", + "3frqe7jn4obpuxjpwpolz6ipb3k5nvt2nhjpik2oy", + "wrqplteh7oodxnad7hsl4mixg2uavzneazxv5sxi2" + ], + "ResponseMetadata": { + "RequestId": "9662c15b-c469-11e1-99d1-797d6ecd6414" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-dkim.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-dkim.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ad84529ac1613fdd2716b49f193f6ac8b402250 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-dkim.xml @@ -0,0 +1,12 @@ + + + + vvjuipp74whm76gqoni7qmwwn4w4qusjiainivf6sf + 3frqe7jn4obpuxjpwpolz6ipb3k5nvt2nhjpik2oy + wrqplteh7oodxnad7hsl4mixg2uavzneazxv5sxi2 + + + + 9662c15b-c469-11e1-99d1-797d6ecd6414 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-identity.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-identity.json new file mode 100644 index 0000000000000000000000000000000000000000..59c578e7d1e94e62f936eaa9597936bf56186239 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-identity.json @@ -0,0 +1,6 @@ +{ + "VerificationToken": "QTKknzFg2J4ygwa+XvHAxUl1hyHoY0gVfZdfjIedHZ0=", + "ResponseMetadata": { + "RequestId": "94f6368e-9bf2-11e1-8ee7-c98a0037a2b6" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-identity.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-identity.xml new file mode 100644 index 0000000000000000000000000000000000000000..1b7dca0356d44104352c326f9c961f078d8bb1a6 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/ses-verify-domain-identity.xml @@ -0,0 +1,8 @@ + + + QTKknzFg2J4ygwa+XvHAxUl1hyHoY0gVfZdfjIedHZ0= + + + 94f6368e-9bf2-11e1-8ee7-c98a0037a2b6 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-add-permission.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-add-permission.json new file mode 100644 index 0000000000000000000000000000000000000000..2b0172a3ec2bee0b7d10ee6291bb77ed370d4318 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-add-permission.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "6a213e4e-33a8-11df-9540-99d0768312d3" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-add-permission.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-add-permission.xml new file mode 100644 index 0000000000000000000000000000000000000000..892473a234f992a9a1aefd05dbc0bcc2d7507a13 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-add-permission.xml @@ -0,0 +1,5 @@ + + + 6a213e4e-33a8-11df-9540-99d0768312d3 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-confirm-subscription.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-confirm-subscription.json new file mode 100644 index 0000000000000000000000000000000000000000..b83b15936727b8f5edf09e370a1e3fc0b50eb2e7 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-confirm-subscription.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "7a50221f-3774-11df-a9b7-05d48da6f042" + }, + "SubscriptionArn": "arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-confirm-subscription.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-confirm-subscription.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb2b555f2e1163bddf8ff212166d79b66897e198 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-confirm-subscription.xml @@ -0,0 +1,8 @@ + + + arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca + + + 7a50221f-3774-11df-a9b7-05d48da6f042 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-create-topic.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-create-topic.json new file mode 100644 index 0000000000000000000000000000000000000000..60f82c3551c990ff91cb2a8e42e3bc79ea82f712 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-create-topic.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "a8dec8b3-33a4-11df-8963-01868b7c937a" + }, + "TopicArn": "arn:aws:sns:us-east-1:123456789012:My-Topic" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-create-topic.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-create-topic.xml new file mode 100644 index 0000000000000000000000000000000000000000..e09a33103994232fb0c910442a8d4698b4bd2781 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-create-topic.xml @@ -0,0 +1,8 @@ + + + arn:aws:sns:us-east-1:123456789012:My-Topic + + + a8dec8b3-33a4-11df-8963-01868b7c937a + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-subscription-attributes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-subscription-attributes.json new file mode 100644 index 0000000000000000000000000000000000000000..a5e8e0a41279356e4a9a608a24e1214375269dec --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-subscription-attributes.json @@ -0,0 +1,10 @@ +{ + "Attributes": { + "Owner": "123456789012", + "DeliveryPolicy": "{\"healthyRetryPolicy\":{\"numRetries\":10}}", + "SubscriptionArn": "arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca" + }, + "ResponseMetadata": { + "RequestId": "057f074c-33a7-11df-9540-99d0768312d3" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-subscription-attributes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-subscription-attributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..44981ca39c88ac59764019ef76ae4689240be70e --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-subscription-attributes.xml @@ -0,0 +1,21 @@ + + + + + Owner + 123456789012 + + + DeliveryPolicy + {"healthyRetryPolicy":{"numRetries":10}} + + + SubscriptionArn + arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca + + + + + 057f074c-33a7-11df-9540-99d0768312d3 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-topic-attributes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-topic-attributes.json new file mode 100644 index 0000000000000000000000000000000000000000..6d754b7370872213e38158932fe1db6b9965eb4a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-topic-attributes.json @@ -0,0 +1,10 @@ +{ + "Attributes": { + "Owner": "123456789012", + "Policy": "{\n\"Version\":\"2008-10-17\",\"Id\":\"us-east-1/698519295917/test__default_policy_ID\",\"Statement\" : [{\"Effect\":\"Allow\",\"Sid\":\"us-east-1/698519295917/test__default_statement_ID\",\"Principal\" : {\"AWS\": \"*\"},\"Action\":[\"SNS:GetTopicAttributes\",\"SNS:SetTopicAttributes\",\"SNS:AddPermission\",\"SNS:RemovePermission\",\"SNS:DeleteTopic\",\"SNS:Subscribe\",\"SNS:ListSubscriptionsByTopic\",\"SNS:Publish\",\"SNS:Receive\"],\"Resource\":\"arn:aws:sns:us-east-1:698519295917:test\",\"Condition\" : {\"StringLike\" : {\"AWS:SourceArn\": \"arn:aws:*:*:698519295917:*\"}}}]}", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:My-Topic" + }, + "ResponseMetadata": { + "RequestId": "057f074c-33a7-11df-9540-99d0768312d3" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-topic-attributes.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-topic-attributes.xml new file mode 100644 index 0000000000000000000000000000000000000000..f3f91671f4bbec310ded59a57fbc02b6a829d649 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-get-topic-attributes.xml @@ -0,0 +1,22 @@ + + + + + Owner + 123456789012 + + + Policy + { +"Version":"2008-10-17","Id":"us-east-1/698519295917/test__default_policy_ID","Statement" : [{"Effect":"Allow","Sid":"us-east-1/698519295917/test__default_statement_ID","Principal" : {"AWS": "*"},"Action":["SNS:GetTopicAttributes","SNS:SetTopicAttributes","SNS:AddPermission","SNS:RemovePermission","SNS:DeleteTopic","SNS:Subscribe","SNS:ListSubscriptionsByTopic","SNS:Publish","SNS:Receive"],"Resource":"arn:aws:sns:us-east-1:698519295917:test","Condition" : {"StringLike" : {"AWS:SourceArn": "arn:aws:*:*:698519295917:*"}}}]} + + + TopicArn + arn:aws:sns:us-east-1:123456789012:My-Topic + + + + + 057f074c-33a7-11df-9540-99d0768312d3 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions-by-topic.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions-by-topic.json new file mode 100644 index 0000000000000000000000000000000000000000..276390b9588f5d5001f5c08510236885039794f1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions-by-topic.json @@ -0,0 +1,14 @@ +{ + "ResponseMetadata": { + "RequestId": "b9275252-3774-11df-9540-99d0768312d3" + }, + "Subscriptions": [ + { + "Owner": "123456789012", + "Endpoint": "example@amazon.com", + "Protocol": "email", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:My-Topic", + "SubscriptionArn": "arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca" + } + ] +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions-by-topic.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions-by-topic.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f2e6c632625965dc0c8af8545b0fba213a446f1 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions-by-topic.xml @@ -0,0 +1,16 @@ + + + + + arn:aws:sns:us-east-1:123456789012:My-Topic + email + arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca + 123456789012 + example@amazon.com + + + + + b9275252-3774-11df-9540-99d0768312d3 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions.json new file mode 100644 index 0000000000000000000000000000000000000000..7fa5d52394d4027fb6fe17fa4e51d5d771ae7e81 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions.json @@ -0,0 +1,6 @@ +{"ResponseMetadata": {"RequestId": "384ac68d-3775-11df-8963-01868b7c937a"}, + "Subscriptions": [{"Endpoint": "example@amazon.com", + "Owner": "123456789012", + "Protocol": "email", + "SubscriptionArn": "arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca", + "TopicArn": "arn:aws:sns:us-east-1:698519295917:My-Topic"}]} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions.xml new file mode 100644 index 0000000000000000000000000000000000000000..6dcc76655a8ba9166918b3635278bd9cfd18451a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-subscriptions.xml @@ -0,0 +1,16 @@ + + + + + arn:aws:sns:us-east-1:698519295917:My-Topic + email + arn:aws:sns:us-east-1:123456789012:My-Topic:80289ba6-0fd4-4079-afb4-ce8c8260f0ca + 123456789012 + example@amazon.com + + + + + 384ac68d-3775-11df-8963-01868b7c937a + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-topics.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-topics.json new file mode 100644 index 0000000000000000000000000000000000000000..1cd26577c401942dabcc1b9801c564cbbaaefa8b --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-topics.json @@ -0,0 +1,2 @@ +{"ResponseMetadata": {"RequestId": "3f1478c7-33a9-11df-9540-99d0768312d3"}, + "Topics": [{"TopicArn": "arn:aws:sns:us-east-1:123456789012:My-Topic"}]} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-topics.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-topics.xml new file mode 100644 index 0000000000000000000000000000000000000000..79565b57885b8b4bf085ecdfc43153c41fe61669 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-list-topics.xml @@ -0,0 +1,12 @@ + + + + + arn:aws:sns:us-east-1:123456789012:My-Topic + + + + + 3f1478c7-33a9-11df-9540-99d0768312d3 + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-publish.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-publish.json new file mode 100644 index 0000000000000000000000000000000000000000..5190aa57201deb1e03e54d3260a4164c244d7100 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-publish.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "f187a3c1-376f-11df-8963-01868b7c937a" + }, + "MessageId": "94f20ce6-13c5-43a0-9a9e-ca52d816e90b" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-publish.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-publish.xml new file mode 100644 index 0000000000000000000000000000000000000000..8657942a91ecf050b2b1e539de2230ad750b2b93 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-publish.xml @@ -0,0 +1,8 @@ + + + 94f20ce6-13c5-43a0-9a9e-ca52d816e90b + + + f187a3c1-376f-11df-8963-01868b7c937a + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-subscribe.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-subscribe.json new file mode 100644 index 0000000000000000000000000000000000000000..94afedddb10a7a372600c57b43c9a40f32f8724c --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-subscribe.json @@ -0,0 +1,6 @@ +{ + "ResponseMetadata": { + "RequestId": "a169c740-3766-11df-8963-01868b7c937a" + }, + "SubscriptionArn": "pending confirmation" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-subscribe.xml b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-subscribe.xml new file mode 100644 index 0000000000000000000000000000000000000000..e6521871ca648f04a3d398c50779262936fb1b56 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sns-subscribe.xml @@ -0,0 +1,8 @@ + + + pending confirmation + + + a169c740-3766-11df-8963-01868b7c937a + + diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-add-permission.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-add-permission.json new file mode 100644 index 0000000000000000000000000000000000000000..94475291b033ee9aface80fb2d9a52d12e3037ca --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-add-permission.json @@ -0,0 +1,5 @@ +{ + "ResponseMetadata": { + "RequestId": "9a285199-c8d6-47c2-bdb2-314cb47d599d" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-create-queue.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-create-queue.json new file mode 100644 index 0000000000000000000000000000000000000000..09191ed24bed550cd911390821da6bc46e3f1d5f --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-create-queue.json @@ -0,0 +1,6 @@ +{ + "QueueUrl": "http://sqs.us-east-1.amazonaws.com/123456789012/testQueue", + "ResponseMetadata": { + "RequestId": "7a62c49f-347e-4fc4-9331-6e8e7a96aa73" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-delete-message-batch.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-delete-message-batch.json new file mode 100644 index 0000000000000000000000000000000000000000..faa860c35d2896e485fec8c4bf550ce71a6f0631 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-delete-message-batch.json @@ -0,0 +1,13 @@ +{ + "Successful": [ + { + "Id": "msg1" + }, + { + "Id": "msg2" + } + ], + "ResponseMetadata": { + "RequestId": "d6f86b7a-74d1-4439-b43f-196a1e29cd85" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-get-queue-attributes.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-get-queue-attributes.json new file mode 100644 index 0000000000000000000000000000000000000000..2b0595f5c44293d0c4f2e25ae426b2e744702132 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-get-queue-attributes.json @@ -0,0 +1,17 @@ +{ + "Attributes": { + "ApproximateNumberOfMessagesNotVisible": "0", + "CreatedTimestamp": "1351044153", + "QueueArn": "arn:aws:sqs:us-east-1:123456789012:test1351044153", + "ApproximateNumberOfMessages": "0", + "DelaySeconds": "0", + "VisibilityTimeout": "45", + "ApproximateNumberOfMessagesDelayed": "0", + "MessageRetentionPeriod": "345600", + "LastModifiedTimestamp": "1351044214", + "MaximumMessageSize": "65536" + }, + "ResponseMetadata": { + "RequestId": "0c8d2786-b7b4-56e2-a823-6e80a404d6fd" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-get-queue-url.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-get-queue-url.json new file mode 100644 index 0000000000000000000000000000000000000000..8f29cfa4cb6b1c2199ce8bae2fbfc84e161da6e2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-get-queue-url.json @@ -0,0 +1,6 @@ +{ + "QueueUrl": "http://sqs.us-east-1.amazonaws.com/123456789012/testQueue", + "ResponseMetadata": { + "RequestId": "470a6f13-2ed9-4181-ad8a-2fdea142988e" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-receive-message.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-receive-message.json new file mode 100644 index 0000000000000000000000000000000000000000..55a92ce1a36066adc04faf858259fd3ad5c739a2 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-receive-message.json @@ -0,0 +1,19 @@ +{ + "Messages": [ + { + "Body": "This is a test message", + "Attributes": { + "ApproximateFirstReceiveTimestamp": "1250700979248", + "SenderId": "195004372649", + "ApproximateReceiveCount": "5", + "SentTimestamp": "1238099229000" + }, + "ReceiptHandle": "MbZj6wDWli+JvwwJaBV+3dcjk2YW2vA3+STFFljTM8tJJg6HRG6PYSasuWXPJB+Cw\n Lj1FjgXUv1uSj1gUPAWV66FU/WeR4mq2OKpEGYWbnLmpRCJVAyeMjeU5ZBdtcQ+QE\n auMZc8ZRv37sIW2iJKq3M9MFx1YvV11A2x/KSbkJ0=", + "MD5OfBody": "fafb00f5732ab283681e124bf8747ed1", + "MessageId": "5fea7756-0ea4-451a-a703-a558b933e274" + } + ], + "ResponseMetadata": { + "RequestId": "b6633655-283d-45b4-aee4-4e84e0ae6afa" + } +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-send-message-batch.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-send-message-batch.json new file mode 100644 index 0000000000000000000000000000000000000000..691d40e531d0b3a77feb4449c126ebd41c0ba523 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-send-message-batch.json @@ -0,0 +1,17 @@ +{ + "Successful": [ + { + "MD5OfMessageBody": "0e024d309850c78cba5eabbeff7cae71", + "Id": "test_msg_001", + "MessageId": "0a5231c7-8bff-4955-be2e-8dc7c50a25fa" + }, + { + "MD5OfMessageBody": "7fb8146a82f95e0af155278f406862c2", + "Id": "test_msg_002", + "MessageId": "15ee1ed3-87e7-40c1-bdaa-2e49968ea7e9" + } + ], + "ResponseMetadata": { + "RequestId": "ca1ad5d0-8271-408b-8d0f-1351bf547e74" + } +} diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-send-message.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-send-message.json new file mode 100644 index 0000000000000000000000000000000000000000..87a2eacb26f45daca1b283b6d831453dfd6a00dd --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sqs-send-message.json @@ -0,0 +1,7 @@ +{ + "MD5OfMessageBody": "fafb00f5732ab283681e124bf8747ed1", + "ResponseMetadata": { + "RequestId": "27daac76-34dd-47df-bd01-1f6e873584a0" + }, + "MessageId": "5fea7756-0ea4-451a-a703-a558b933e274" +} \ No newline at end of file diff --git a/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sts-get-session-token.json b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sts-get-session-token.json new file mode 100644 index 0000000000000000000000000000000000000000..d43ff3f1f0efc15505025e0386eaf0ae33c69ecc --- /dev/null +++ b/testbed/boto__botocore/tests/unit/response_parsing/xml/responses/sts-get-session-token.json @@ -0,0 +1,5 @@ +{"Credentials": {"AccessKeyId": "AKIAIOSFODNN7EXAMPLE", + "Expiration": "2011-07-11T19:55:29.611Z", + "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + "SessionToken": "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/L\n To6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3z\n rkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtp\n Z3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE"}, + "ResponseMetadata": {"RequestId": "58c5dbae-abef-11e0-8cfe-09039844ac7d"}} diff --git a/testbed/boto__botocore/tests/unit/retries/test_bucket.py b/testbed/boto__botocore/tests/unit/retries/test_bucket.py new file mode 100644 index 0000000000000000000000000000000000000000..aa1d6d0ac89f430e145d46eb5ff8ae6b53823bd0 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/retries/test_bucket.py @@ -0,0 +1,121 @@ +from botocore.exceptions import CapacityNotAvailableError +from botocore.retries import bucket +from tests import unittest + + +class FakeClock(bucket.Clock): + def __init__(self, timestamp_sequences): + self.timestamp_sequences = timestamp_sequences + self.sleep_call_amounts = [] + + def sleep(self, amount): + self.sleep_call_amounts.append(amount) + + def current_time(self): + return self.timestamp_sequences.pop(0) + + +class TestTokenBucket(unittest.TestCase): + def setUp(self): + self.timestamp_sequences = [0] + self.clock = FakeClock(self.timestamp_sequences) + + def create_token_bucket(self, max_rate=10, min_rate=0.1): + return bucket.TokenBucket( + max_rate=max_rate, clock=self.clock, min_rate=min_rate + ) + + def test_can_acquire_amount(self): + self.timestamp_sequences.extend( + [ + # Requests tokens every second, which is well below our + # 10 TPS fill rate. + 1, + 2, + 3, + 4, + 5, + ] + ) + token_bucket = self.create_token_bucket(max_rate=10) + for _ in range(5): + self.assertTrue(token_bucket.acquire(1, block=False)) + + def test_can_change_max_capacity_lower(self): + # Requests at 1 TPS. + self.timestamp_sequences.extend([1, 2, 3, 4, 5]) + token_bucket = self.create_token_bucket(max_rate=10) + # Request the first 5 tokens with max_rate=10 + for _ in range(5): + self.assertTrue(token_bucket.acquire(1, block=False)) + # Now scale the max_rate down to 1 on the 5th second. + self.timestamp_sequences.append(5) + token_bucket.max_rate = 1 + # And then from seconds 6-10 we request at one per second. + self.timestamp_sequences.extend([6, 7, 8, 9, 10]) + for _ in range(5): + self.assertTrue(token_bucket.acquire(1, block=False)) + + def test_max_capacity_is_at_least_one(self): + token_bucket = self.create_token_bucket() + self.timestamp_sequences.append(1) + token_bucket.max_rate = 0.5 + self.assertEqual(token_bucket.max_rate, 0.5) + self.assertEqual(token_bucket.max_capacity, 1) + + def test_acquire_fails_on_non_block_mode_returns_false(self): + self.timestamp_sequences.extend( + [ + # Initial creation time. + 0, + # Requests a token 1 second later. + 1, + ] + ) + token_bucket = self.create_token_bucket(max_rate=10) + with self.assertRaises(CapacityNotAvailableError): + token_bucket.acquire(100, block=False) + + def test_can_retrieve_at_max_send_rate(self): + self.timestamp_sequences.extend( + [ + # Request a new token every 100ms (10 TPS) for 2 seconds. + 1 + 0.1 * i + for i in range(20) + ] + ) + token_bucket = self.create_token_bucket(max_rate=10) + for _ in range(20): + self.assertTrue(token_bucket.acquire(1, block=False)) + + def test_acquiring_blocks_when_capacity_reached(self): + # This is 1 token every 0.1 seconds. + token_bucket = self.create_token_bucket(max_rate=10) + self.timestamp_sequences.extend( + [ + # The first acquire() happens after .1 seconds. + 0.1, + # The second acquire() will fail because we get tokens at + # 1 per 0.1 seconds. We will then sleep for 0.05 seconds until we + # get a new token. + 0.15, + # And at 0.2 seconds we get our token. + 0.2, + # And at 0.3 seconds we have no issues getting a token. + # Because we're using such small units (to avoid bloating the + # test run time), we have to go slightly over 0.3 seconds here. + 0.300001, + ] + ) + self.assertTrue(token_bucket.acquire(1, block=False)) + self.assertEqual(token_bucket.available_capacity, 0) + self.assertTrue(token_bucket.acquire(1, block=True)) + self.assertEqual(token_bucket.available_capacity, 0) + self.assertTrue(token_bucket.acquire(1, block=False)) + + def test_rate_cant_go_below_min(self): + token_bucket = self.create_token_bucket(max_rate=1, min_rate=0.2) + self.timestamp_sequences.append(1) + token_bucket.max_rate = 0.1 + self.assertEqual(token_bucket.max_rate, 0.2) + self.assertEqual(token_bucket.max_capacity, 1) diff --git a/testbed/boto__botocore/tests/unit/retries/test_quota.py b/testbed/boto__botocore/tests/unit/retries/test_quota.py new file mode 100644 index 0000000000000000000000000000000000000000..9a735950c382a8a6589e19b9f4540d3b7c3ea397 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/retries/test_quota.py @@ -0,0 +1,33 @@ +from botocore.retries import quota +from tests import unittest + + +class TestRetryQuota(unittest.TestCase): + def setUp(self): + self.retry_quota = quota.RetryQuota(50) + + def test_can_acquire_amount(self): + self.assertTrue(self.retry_quota.acquire(5)) + self.assertEqual(self.retry_quota.available_capacity, 45) + + def test_can_release_amount(self): + self.assertTrue(self.retry_quota.acquire(5)) + self.assertEqual(self.retry_quota.available_capacity, 45) + self.retry_quota.release(5) + self.assertEqual(self.retry_quota.available_capacity, 50) + + def test_cant_exceed_max_capacity(self): + self.assertTrue(self.retry_quota.acquire(5)) + self.assertEqual(self.retry_quota.available_capacity, 45) + self.retry_quota.release(10) + self.assertEqual(self.retry_quota.available_capacity, 50) + + def test_noop_if_at_max_capacity(self): + self.retry_quota.release(10) + self.assertEqual(self.retry_quota.available_capacity, 50) + + def test_cant_go_below_zero(self): + self.assertTrue(self.retry_quota.acquire(49)) + self.assertEqual(self.retry_quota.available_capacity, 1) + self.assertFalse(self.retry_quota.acquire(10)) + self.assertEqual(self.retry_quota.available_capacity, 1) diff --git a/testbed/boto__botocore/tests/unit/retries/test_standard.py b/testbed/boto__botocore/tests/unit/retries/test_standard.py new file mode 100644 index 0000000000000000000000000000000000000000..55dcb7ae580f567cb664d9b829644afc09280b08 --- /dev/null +++ b/testbed/boto__botocore/tests/unit/retries/test_standard.py @@ -0,0 +1,735 @@ +from collections import Counter + +import pytest + +from botocore import model +from botocore.awsrequest import AWSResponse +from botocore.exceptions import ( + ConnectionError, + HTTPClientError, + ReadTimeoutError, +) +from botocore.retries import quota, standard +from tests import mock, unittest + +RETRYABLE_THROTTLED_RESPONSES = [ + # From the spec under "Throttling Errors" + # The status codes technically don't matter here, but we're adding + # them for completeness. + # StatusCode, ErrorCode, Retryable? + (400, 'Throttling', True), + (400, 'ThrottlingException', True), + (400, 'ThrottledException', True), + (400, 'RequestThrottledException', True), + (400, 'TooManyRequestsException', True), + (400, 'ProvisionedThroughputExceededException', True), + (400, 'TransactionInProgressException', True), + (503, 'RequestLimitExceeded', True), + (509, 'BandwidthLimitExceeded', True), + (400, 'LimitExceededException', True), + (403, 'RequestThrottled', True), + (503, 'SlowDown', True), + (400, 'PriorRequestNotComplete', True), + (502, 'EC2ThrottledException', True), + # These are some negative test cases, not in the spec but we'll use + # to verify we can detect throttled errors correctly. + (400, 'NotAThrottlingError', False), + (500, 'InternalServerError', False), + # "None" here represents no parsed response we just have a plain + # HTTP response and a 400 status code response. + (400, None, False), + (500, None, False), + (200, None, False), +] + +RETRYABLE_TRANSIENT_ERRORS = [ + # StatusCode, Error, Retryable? + (400, 'RequestTimeout', True), + (400, 'RequestTimeoutException', True), + (400, 'PriorRequestNotComplete', True), + # "Any HTTP response with an HTTP status code of 500, 502, 503, or 504". + (500, None, True), + (502, None, True), + (503, None, True), + (504, None, True), + # We'll also add a few errors with an explicit error code to verify + # that the code doesn't matter. + (500, 'InternalServiceError', True), + (502, 'BadError', True), + # These are botocore specific errors that correspond to + # "Any IO (socket) level error where we are unable to read an HTTP + # response. + (None, ConnectionError(error='unknown'), True), + (None, HTTPClientError(error='unknown'), True), + # Negative cases + (200, None, False), + # This is a throttling error not a transient error + (400, 'Throttling', False), + (400, None, False), +] + + +# These tests are intended to be paired with the +# SERVICE_DESCRIPTION_WITH_RETRIES definition. +RETRYABLE_MODELED_ERRORS = [ + (400, 'ModeledThrottlingError', True), + (400, 'ModeledRetryableError', True), + # Note this is ErrorCodeRetryable, not ModeledRetryableErrorWithCode, + # because the shape has a error code defined for it. + (400, 'ErrorCodeRetryable', True), + (400, 'NonRetryableError', False), + (None, ConnectionError(error='unknown'), False), +] + + +SERVICE_DESCRIPTION_WITH_RETRIES = { + 'metadata': {}, + 'operations': { + 'TestOperation': { + 'name': 'TestOperation', + 'input': {'shape': 'FakeInputOutputShape'}, + 'output': {'shape': 'FakeInputOutputShape'}, + 'errors': [ + {'shape': 'ModeledThrottlingError'}, + {'shape': 'ModeledRetryableError'}, + {'shape': 'ModeledRetryableErrorWithCode'}, + {'shape': 'NonRetryableError'}, + ], + } + }, + 'shapes': { + 'FakeInputOutputShape': { + 'type': 'structure', + 'members': {}, + }, + 'ModeledThrottlingError': { + 'type': 'structure', + 'members': { + 'message': { + 'shape': 'ErrorMessage', + } + }, + 'exception': True, + 'retryable': {'throttling': True}, + }, + 'ModeledRetryableError': { + 'type': 'structure', + 'members': { + 'message': { + 'shape': 'ErrorMessage', + } + }, + 'exception': True, + 'retryable': {}, + }, + 'ModeledRetryableErrorWithCode': { + 'type': 'structure', + 'members': { + 'message': { + 'shape': 'ErrorMessage', + } + }, + 'error': { + 'code': 'ErrorCodeRetryable', + }, + 'exception': True, + 'retryable': {'throttling': True}, + }, + 'NonRetryableError': { + 'type': 'structure', + 'members': { + 'message': { + 'shape': 'ErrorMessage', + } + }, + 'exception': True, + }, + }, +} + + +@pytest.mark.parametrize('case', RETRYABLE_TRANSIENT_ERRORS) +def test_can_detect_retryable_transient_errors(case): + transient_checker = standard.TransientRetryableChecker() + _verify_retryable(transient_checker, None, *case) + + +@pytest.mark.parametrize('case', RETRYABLE_THROTTLED_RESPONSES) +def test_can_detect_retryable_throttled_errors(case): + throttled_checker = standard.ThrottledRetryableChecker() + _verify_retryable(throttled_checker, None, *case) + + +@pytest.mark.parametrize('case', RETRYABLE_MODELED_ERRORS) +def test_can_detect_modeled_retryable_errors(case): + modeled_retry_checker = standard.ModeledRetryableChecker() + _verify_retryable( + modeled_retry_checker, get_operation_model_with_retries(), *case + ) + + +@pytest.mark.parametrize( + 'case', + [ + case + for case in RETRYABLE_TRANSIENT_ERRORS + + RETRYABLE_THROTTLED_RESPONSES + + RETRYABLE_MODELED_ERRORS + if case[2] + ], +) +def test_standard_retry_conditions(case): + """This is verifying that the high level object used for checking + retry conditions still handles all the individual testcases. + + It's possible that cases that are retryable for an individual checker + aren't retryable for a different checker. We need to filter out all + the False cases (if case[2]). + """ + standard_checker = standard.StandardRetryConditions() + op_model = get_operation_model_with_retries() + _verify_retryable(standard_checker, op_model, *case) + + +def get_operation_model_with_retries(): + service = model.ServiceModel( + SERVICE_DESCRIPTION_WITH_RETRIES, service_name='my-service' + ) + return service.operation_model('TestOperation') + + +def _verify_retryable( + checker, operation_model, status_code, error, is_retryable +): + http_response = AWSResponse( + status_code=status_code, raw=None, headers={}, url='https://foo/' + ) + parsed_response = None + caught_exception = None + if error is not None: + if isinstance(error, Exception): + caught_exception = error + else: + parsed_response = {'Error': {'Code': error, 'Message': 'Error'}} + context = standard.RetryContext( + attempt_number=1, + operation_model=operation_model, + parsed_response=parsed_response, + http_response=http_response, + caught_exception=caught_exception, + ) + assert checker.is_retryable(context) == is_retryable + + +def arbitrary_retry_context(): + # Used when you just need a dummy retry context that looks like + # a failed request. + return standard.RetryContext( + attempt_number=1, + operation_model=None, + parsed_response={'Error': {'Code': 'ErrorCode', 'Message': 'message'}}, + http_response=AWSResponse( + status_code=500, raw=None, headers={}, url='https://foo' + ), + caught_exception=None, + ) + + +def test_can_honor_max_attempts(): + checker = standard.MaxAttemptsChecker(max_attempts=3) + context = arbitrary_retry_context() + context.attempt_number = 1 + assert checker.is_retryable(context) is True + + context.attempt_number = 2 + assert checker.is_retryable(context) is True + + context.attempt_number = 3 + assert checker.is_retryable(context) is False + + +def test_max_attempts_adds_metadata_key_when_reached(): + checker = standard.MaxAttemptsChecker(max_attempts=3) + context = arbitrary_retry_context() + context.attempt_number = 3 + assert checker.is_retryable(context) is False + assert context.get_retry_metadata() == {'MaxAttemptsReached': True} + + +def test_retries_context_not_on_request_context(): + checker = standard.MaxAttemptsChecker(max_attempts=3) + context = arbitrary_retry_context() + context.attempt_number = 3 + assert checker.is_retryable(context) is False + assert context.request_context == {} + + +def test_can_create_default_retry_handler(): + mock_client = mock.Mock() + mock_client.meta.service_model.service_id = model.ServiceId('my-service') + assert isinstance( + standard.register_retry_handler(mock_client), standard.RetryHandler + ) + call_args_list = mock_client.meta.events.register.call_args_list + # We should have registered the retry quota to after-calls + first_call = call_args_list[0][0] + second_call = call_args_list[1][0] + # Not sure if there's a way to verify the class associated with the + # bound method matches what we expect. + assert first_call[0] == 'after-call.my-service' + assert second_call[0] == 'needs-retry.my-service' + + +class TestRetryHandler(unittest.TestCase): + def setUp(self): + self.retry_policy = mock.Mock(spec=standard.RetryPolicy) + self.retry_event_adapter = mock.Mock(spec=standard.RetryEventAdapter) + self.retry_quota = mock.Mock(spec=standard.RetryQuotaChecker) + self.retry_handler = standard.RetryHandler( + retry_policy=self.retry_policy, + retry_event_adapter=self.retry_event_adapter, + retry_quota=self.retry_quota, + ) + + def test_does_need_retry(self): + self.retry_event_adapter.create_retry_context.return_value = ( + mock.sentinel.retry_context + ) + self.retry_policy.should_retry.return_value = True + self.retry_quota.acquire_retry_quota.return_value = True + self.retry_policy.compute_retry_delay.return_value = 1 + + self.assertEqual(self.retry_handler.needs_retry(fake_kwargs='foo'), 1) + self.retry_event_adapter.create_retry_context.assert_called_with( + fake_kwargs='foo' + ) + self.retry_policy.should_retry.assert_called_with( + mock.sentinel.retry_context + ) + self.retry_quota.acquire_retry_quota.assert_called_with( + mock.sentinel.retry_context + ) + self.retry_policy.compute_retry_delay.assert_called_with( + mock.sentinel.retry_context + ) + + def test_does_not_need_retry(self): + self.retry_event_adapter.create_retry_context.return_value = ( + mock.sentinel.retry_context + ) + self.retry_policy.should_retry.return_value = False + + self.assertIsNone(self.retry_handler.needs_retry(fake_kwargs='foo')) + # Shouldn't consult quota if we don't have a retryable condition. + self.assertFalse(self.retry_quota.acquire_retry_quota.called) + + def test_needs_retry_but_not_enough_quota(self): + self.retry_event_adapter.create_retry_context.return_value = ( + mock.sentinel.retry_context + ) + self.retry_policy.should_retry.return_value = True + self.retry_quota.acquire_retry_quota.return_value = False + + self.assertIsNone(self.retry_handler.needs_retry(fake_kwargs='foo')) + + def test_retry_handler_adds_retry_metadata_to_response(self): + self.retry_event_adapter.create_retry_context.return_value = ( + mock.sentinel.retry_context + ) + self.retry_policy.should_retry.return_value = False + self.assertIsNone(self.retry_handler.needs_retry(fake_kwargs='foo')) + adapter = self.retry_event_adapter + adapter.adapt_retry_response_from_context.assert_called_with( + mock.sentinel.retry_context + ) + + +class TestRetryEventAdapter(unittest.TestCase): + def setUp(self): + self.success_response = {'ResponseMetadata': {}, 'Foo': {}} + self.failed_response = {'ResponseMetadata': {}, 'Error': {}} + self.http_success = AWSResponse( + status_code=200, raw=None, headers={}, url='https://foo/' + ) + self.http_failed = AWSResponse( + status_code=500, raw=None, headers={}, url='https://foo/' + ) + self.caught_exception = ConnectionError(error='unknown') + + def test_create_context_from_success_response(self): + context = standard.RetryEventAdapter().create_retry_context( + response=(self.http_success, self.success_response), + attempts=1, + caught_exception=None, + request_dict={'context': {'foo': 'bar'}}, + operation=mock.sentinel.operation_model, + ) + + self.assertEqual(context.attempt_number, 1) + self.assertEqual( + context.operation_model, mock.sentinel.operation_model + ) + self.assertEqual(context.parsed_response, self.success_response) + self.assertEqual(context.http_response, self.http_success) + self.assertEqual(context.caught_exception, None) + self.assertEqual(context.request_context, {'foo': 'bar'}) + + def test_create_context_from_service_error(self): + context = standard.RetryEventAdapter().create_retry_context( + response=(self.http_failed, self.failed_response), + attempts=1, + caught_exception=None, + request_dict={'context': {'foo': 'bar'}}, + operation=mock.sentinel.operation_model, + ) + # We already tested the other attributes in + # test_create_context_from_success_response so we're only checking + # the attributes relevant to this test. + self.assertEqual(context.parsed_response, self.failed_response) + self.assertEqual(context.http_response, self.http_failed) + + def test_create_context_from_exception(self): + context = standard.RetryEventAdapter().create_retry_context( + response=None, + attempts=1, + caught_exception=self.caught_exception, + request_dict={'context': {'foo': 'bar'}}, + operation=mock.sentinel.operation_model, + ) + self.assertEqual(context.parsed_response, None) + self.assertEqual(context.http_response, None) + self.assertEqual(context.caught_exception, self.caught_exception) + + def test_can_inject_metadata_back_to_context(self): + adapter = standard.RetryEventAdapter() + context = adapter.create_retry_context( + attempts=1, + operation=None, + caught_exception=None, + request_dict={'context': {}}, + response=(self.http_failed, self.failed_response), + ) + context.add_retry_metadata(MaxAttemptsReached=True) + adapter.adapt_retry_response_from_context(context) + self.assertEqual( + self.failed_response['ResponseMetadata']['MaxAttemptsReached'], + True, + ) + + +class TestRetryPolicy(unittest.TestCase): + def setUp(self): + self.retry_checker = mock.Mock(spec=standard.StandardRetryConditions) + self.retry_backoff = mock.Mock(spec=standard.ExponentialBackoff) + self.retry_policy = standard.RetryPolicy( + retry_checker=self.retry_checker, retry_backoff=self.retry_backoff + ) + + def test_delegates_to_retry_checker(self): + self.retry_checker.is_retryable.return_value = True + self.assertTrue(self.retry_policy.should_retry(mock.sentinel.context)) + self.retry_checker.is_retryable.assert_called_with( + mock.sentinel.context + ) + + def test_delegates_to_retry_backoff(self): + self.retry_backoff.delay_amount.return_value = 1 + self.assertEqual( + self.retry_policy.compute_retry_delay(mock.sentinel.context), 1 + ) + self.retry_backoff.delay_amount.assert_called_with( + mock.sentinel.context + ) + + +class TestExponentialBackoff(unittest.TestCase): + def setUp(self): + self.random = lambda: 1 + self.backoff = standard.ExponentialBackoff( + max_backoff=20, random=self.random + ) + + def test_range_of_exponential_backoff(self): + backoffs = [ + self.backoff.delay_amount(standard.RetryContext(attempt_number=i)) + for i in range(1, 10) + ] + # Note that we're capped at 20 which is our max backoff. + self.assertEqual(backoffs, [1, 2, 4, 8, 16, 20, 20, 20, 20]) + + def test_exponential_backoff_with_jitter(self): + backoff = standard.ExponentialBackoff() + backoffs = [ + backoff.delay_amount(standard.RetryContext(attempt_number=3)) + for i in range(10) + ] + # For attempt number 3, we should have a max value of 4 (2 ^ 2), + # so we can assert all the backoff values are within that range. + for x in backoffs: + self.assertTrue(0 <= x <= 4) + + def test_uniform_rand_dist_on_max_attempts(self): + backoff = standard.ExponentialBackoff() + num_datapoints = 10_000 + backoffs = [ + backoff.delay_amount(standard.RetryContext(attempt_number=10)) + for i in range(num_datapoints) + ] + self._assert_looks_like_uniform_distribution(backoffs) + + def _assert_looks_like_uniform_distribution(self, backoffs): + histogram = Counter(int(el) for el in backoffs) + expected_value = len(backoffs) / len(histogram) + # This is an arbitrarily chosen tolerance, but we're being fairly + # lenient here and giving a 20% tolerance. We're only interested + # in cases where it's obviously broken and not a uniform distribution. + tolerance = 0.20 + low = expected_value - (expected_value * tolerance) + high = expected_value + (expected_value * tolerance) + out_of_range = [ + str(i) for i in histogram.values() if not low <= i <= high + ] + if out_of_range: + raise AssertionError( + "Backoff values outside of uniform distribution range " + f"({low} - {high}): {', '.join(out_of_range)}" + ) + + +class TestRetryQuotaChecker(unittest.TestCase): + def setUp(self): + self.quota = quota.RetryQuota(500) + self.quota_checker = standard.RetryQuotaChecker(self.quota) + self.request_context = {} + + def create_context(self, is_timeout_error=False, status_code=200): + caught_exception = None + if is_timeout_error: + caught_exception = ReadTimeoutError(endpoint_url='https://foo') + http_response = AWSResponse( + status_code=status_code, raw=None, headers={}, url='https://foo/' + ) + context = standard.RetryContext( + attempt_number=1, + request_context=self.request_context, + caught_exception=caught_exception, + http_response=http_response, + ) + return context + + def test_can_acquire_quota_non_timeout_error(self): + self.assertTrue( + self.quota_checker.acquire_retry_quota(self.create_context()) + ) + self.assertEqual(self.request_context['retry_quota_capacity'], 5) + + def test_can_acquire_quota_for_timeout_error(self): + self.assertTrue( + self.quota_checker.acquire_retry_quota( + self.create_context(is_timeout_error=True) + ) + ) + self.assertEqual(self.request_context['retry_quota_capacity'], 10) + + def test_can_release_quota_based_on_context_value_on_success(self): + context = self.create_context() + # This is where we had to retry the request but eventually + # succeeded. + http_response = self.create_context(status_code=200).http_response + self.assertTrue(self.quota_checker.acquire_retry_quota(context)) + self.assertEqual(self.quota.available_capacity, 495) + self.quota_checker.release_retry_quota( + context.request_context, http_response=http_response + ) + self.assertEqual(self.quota.available_capacity, 500) + + def test_dont_release_quota_if_all_retries_failed(self): + context = self.create_context() + # If max_attempts_reached is True, then it means we used up all + # our retry attempts and still failed. In this case we shouldn't + # give any retry quota back. + http_response = self.create_context(status_code=500).http_response + self.assertTrue(self.quota_checker.acquire_retry_quota(context)) + self.assertEqual(self.quota.available_capacity, 495) + self.quota_checker.release_retry_quota( + context.request_context, http_response=http_response + ) + self.assertEqual(self.quota.available_capacity, 495) + + def test_can_release_default_quota_if_not_in_context(self): + context = self.create_context() + self.assertTrue(self.quota_checker.acquire_retry_quota(context)) + self.assertEqual(self.quota.available_capacity, 495) + # We're going to remove the quota amount from the request context. + # This represents a successful request with no retries. + self.request_context.pop('retry_quota_capacity') + self.quota_checker.release_retry_quota( + context.request_context, context.http_response + ) + # We expect only 1 unit was released. + self.assertEqual(self.quota.available_capacity, 496) + + def test_acquire_quota_fails(self): + quota_checker = standard.RetryQuotaChecker( + quota.RetryQuota(initial_capacity=5) + ) + # The first one succeeds. + self.assertTrue( + quota_checker.acquire_retry_quota(self.create_context()) + ) + # But we should fail now because we're out of quota. + self.request_context.pop('retry_quota_capacity') + self.assertFalse( + quota_checker.acquire_retry_quota(self.create_context()) + ) + self.assertNotIn('retry_quota_capacity', self.request_context) + + def test_quota_reached_adds_retry_metadata(self): + quota_checker = standard.RetryQuotaChecker( + quota.RetryQuota(initial_capacity=0) + ) + context = self.create_context() + self.assertFalse(quota_checker.acquire_retry_quota(context)) + self.assertEqual( + context.get_retry_metadata(), {'RetryQuotaReached': True} + ) + + def test_single_failed_request_does_not_give_back_quota(self): + context = self.create_context() + http_response = self.create_context(status_code=400).http_response + # First deduct some amount of the retry quota so we're not hitting + # the upper bound. + self.quota.acquire(50) + self.assertEqual(self.quota.available_capacity, 450) + self.quota_checker.release_retry_quota( + context.request_context, http_response=http_response + ) + self.assertEqual(self.quota.available_capacity, 450) + + +class TestRetryContext(unittest.TestCase): + def test_can_get_error_code(self): + context = arbitrary_retry_context() + context.parsed_response['Error']['Code'] = 'MyErrorCode' + self.assertEqual(context.get_error_code(), 'MyErrorCode') + + def test_no_error_code_if_no_parsed_response(self): + context = arbitrary_retry_context() + context.parsed_response = None + self.assertIsNone(context.get_error_code()) + + def test_no_error_code_returns_none(self): + context = arbitrary_retry_context() + context.parsed_response = {} + self.assertIsNone(context.get_error_code()) + + def test_can_add_retry_reason(self): + context = arbitrary_retry_context() + context.add_retry_metadata(MaxAttemptsReached=True) + self.assertEqual( + context.get_retry_metadata(), {'MaxAttemptsReached': True} + ) + + def test_handles_non_error_top_level_error_key_get_error_code(self): + response = AWSResponse( + status_code=200, + raw=None, + headers={}, + url='https://foo', + ) + # A normal response can have a top level "Error" key that doesn't map + # to an error code and should be ignored + context = standard.RetryContext( + attempt_number=1, + operation_model=None, + parsed_response={'Error': 'This is a 200 response body'}, + http_response=response, + caught_exception=None, + ) + self.assertEqual(context.get_error_code(), None) + + +class TestThrottlingErrorDetector(unittest.TestCase): + def setUp(self): + self.throttling_detector = standard.ThrottlingErrorDetector( + standard.RetryEventAdapter() + ) + + def create_needs_retry_kwargs(self, **kwargs): + retry_kwargs = { + 'response': None, + 'attempts': 1, + 'operation': None, + 'caught_exception': None, + 'request_dict': {'context': {}}, + } + retry_kwargs.update(kwargs) + return retry_kwargs + + def test_can_check_error_from_code(self): + kwargs = self.create_needs_retry_kwargs() + kwargs['response'] = (None, {'Error': {'Code': 'ThrottledException'}}) + self.assertTrue(self.throttling_detector.is_throttling_error(**kwargs)) + + def test_no_throttling_error(self): + kwargs = self.create_needs_retry_kwargs() + kwargs['response'] = (None, {'Error': {'Code': 'RandomError'}}) + self.assertFalse( + self.throttling_detector.is_throttling_error(**kwargs) + ) + + def test_detects_modeled_errors(self): + kwargs = self.create_needs_retry_kwargs() + kwargs['response'] = ( + None, + {'Error': {'Code': 'ModeledThrottlingError'}}, + ) + kwargs['operation'] = get_operation_model_with_retries() + self.assertTrue(self.throttling_detector.is_throttling_error(**kwargs)) + + +class TestModeledRetryErrorDetector(unittest.TestCase): + def setUp(self): + self.modeled_error = standard.ModeledRetryErrorDetector() + + def test_not_retryable(self): + context = arbitrary_retry_context() + self.assertIsNone(self.modeled_error.detect_error_type(context)) + + def test_transient_error(self): + context = arbitrary_retry_context() + context.parsed_response['Error']['Code'] = 'ModeledRetryableError' + context.operation_model = get_operation_model_with_retries() + self.assertEqual( + self.modeled_error.detect_error_type(context), + self.modeled_error.TRANSIENT_ERROR, + ) + + def test_throttling_error(self): + context = arbitrary_retry_context() + context.parsed_response['Error']['Code'] = 'ModeledThrottlingError' + context.operation_model = get_operation_model_with_retries() + self.assertEqual( + self.modeled_error.detect_error_type(context), + self.modeled_error.THROTTLING_ERROR, + ) + + +class Yes(standard.BaseRetryableChecker): + def is_retryable(self, context): + return True + + +class No(standard.BaseRetryableChecker): + def is_retryable(self, context): + return False + + +class TestOrRetryChecker(unittest.TestCase): + def test_can_match_any_checker(self): + self.assertTrue(standard.OrRetryChecker([Yes(), No()])) + self.assertTrue(standard.OrRetryChecker([No(), Yes()])) + self.assertTrue(standard.OrRetryChecker([Yes(), Yes()])) + + def test_false_if_no_checkers_match(self): + self.assertTrue(standard.OrRetryChecker([No(), No(), No()])) diff --git a/testbed/boto__botocore/tests/unit/retries/test_throttling.py b/testbed/boto__botocore/tests/unit/retries/test_throttling.py new file mode 100644 index 0000000000000000000000000000000000000000..2a17ef736a7bf86833306d51a139be8005f3e7ef --- /dev/null +++ b/testbed/boto__botocore/tests/unit/retries/test_throttling.py @@ -0,0 +1,76 @@ +from botocore.retries import throttling +from tests import unittest + + +class TestCubicCalculator(unittest.TestCase): + def create_cubic_calculator( + self, starting_max_rate=10, beta=0.7, scale_constant=0.4 + ): + return throttling.CubicCalculator( + starting_max_rate=starting_max_rate, + scale_constant=scale_constant, + start_time=0, + beta=beta, + ) + + # For these tests, rather than duplicate the formulas in the tests, + # I want to check against a fixed set of inputs with by-hand verified + # values to ensure we're doing the calculations correctly. + + def test_starting_params(self): + cubic = self.create_cubic_calculator(starting_max_rate=10) + self.assertAlmostEqual( + cubic.get_params_snapshot().k, 1.9574338205844317 + ) + + def test_success_responses_until_max_hit(self): + # For this test we're interested in the behavior less so than + # the specific numbers. There's a few cases we care about: + # + cubic = self.create_cubic_calculator(starting_max_rate=10) + params = cubic.get_params_snapshot() + start_k = params.k + start_w_max = params.w_max + # Before we get to t == start_k, our throttle is below our + # max w_max + assertLessEqual = self.assertLessEqual + assertLessEqual(cubic.success_received(start_k / 3.0), start_w_max) + assertLessEqual(cubic.success_received(start_k / 2.0), start_w_max) + assertLessEqual(cubic.success_received(start_k / 1.1), start_w_max) + # At t == start_k, we should be at w_max. + self.assertAlmostEqual(cubic.success_received(timestamp=start_k), 10.0) + # And once we pass start_k, we'll be above w_max. + self.assertGreaterEqual( + cubic.success_received(start_k * 1.1), start_w_max + ) + self.assertGreaterEqual( + cubic.success_received(start_k * 2.0), start_w_max + ) + + def test_error_response_decreases_rate_by_beta(self): + # This is the default value here so we're just being explicit. + cubic = self.create_cubic_calculator(starting_max_rate=10, beta=0.7) + + # So let's say we made it up to 8 TPS before we were throttled. + rate_when_throttled = 8 + new_rate = cubic.error_received( + current_rate=rate_when_throttled, timestamp=1 + ) + self.assertAlmostEqual(new_rate, rate_when_throttled * 0.7) + + new_params = cubic.get_params_snapshot() + self.assertEqual( + new_params, + throttling.CubicParams( + w_max=rate_when_throttled, k=1.8171205928321397, last_fail=1 + ), + ) + + def test_t_0_should_match_beta_decrease(self): + # So if I have beta of 0.6 + cubic = self.create_cubic_calculator(starting_max_rate=10, beta=0.6) + # When I get throttled I should decrease my rate by 60%. + new_rate = cubic.error_received(current_rate=10, timestamp=1) + self.assertEqual(new_rate, 6.0) + # And my starting rate at time t=1 should start at that new rate. + self.assertAlmostEqual(cubic.success_received(timestamp=1), 6.0) diff --git a/testbed/boto__botocore/tests/unit/test_compat.py b/testbed/boto__botocore/tests/unit/test_compat.py new file mode 100644 index 0000000000000000000000000000000000000000..6b448ae5e00924e2d34a77c1e64ce0a4175de57a --- /dev/null +++ b/testbed/boto__botocore/tests/unit/test_compat.py @@ -0,0 +1,227 @@ +# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import datetime + +import pytest + +from botocore.compat import ( + HAS_CRT, + compat_shell_split, + ensure_bytes, + get_md5, + get_tzinfo_options, + total_seconds, + unquote_str, +) +from botocore.exceptions import MD5UnavailableError +from tests import BaseEnvVar, mock, unittest + + +class TotalSecondsTest(BaseEnvVar): + def test_total_seconds(self): + delta = datetime.timedelta(days=1, seconds=45) + remaining = total_seconds(delta) + self.assertEqual(remaining, 86445.0) + + delta = datetime.timedelta(seconds=33, microseconds=772) + remaining = total_seconds(delta) + self.assertEqual(remaining, 33.000772) + + +class TestUnquoteStr(unittest.TestCase): + def test_unquote_str(self): + value = '%E2%9C%93' + # Note: decoded to unicode and utf-8 decoded as well. + # This would work in python2 and python3. + self.assertEqual(unquote_str(value), '\u2713') + + def test_unquote_normal(self): + value = 'foo' + # Note: decoded to unicode and utf-8 decoded as well. + # This would work in python2 and python3. + self.assertEqual(unquote_str(value), 'foo') + + def test_unquote_with_spaces(self): + value = 'foo+bar' + # Note: decoded to unicode and utf-8 decoded as well. + # This would work in python2 and python3. + self.assertEqual(unquote_str(value), 'foo bar') + + +class TestEnsureBytes(unittest.TestCase): + def test_string(self): + value = 'foo' + response = ensure_bytes(value) + self.assertIsInstance(response, bytes) + self.assertEqual(response, b'foo') + + def test_binary(self): + value = b'bar' + response = ensure_bytes(value) + self.assertIsInstance(response, bytes) + self.assertEqual(response, b'bar') + + def test_unicode(self): + value = 'baz' + response = ensure_bytes(value) + self.assertIsInstance(response, bytes) + self.assertEqual(response, b'baz') + + def test_non_ascii(self): + value = '\u2713' + response = ensure_bytes(value) + self.assertIsInstance(response, bytes) + self.assertEqual(response, b'\xe2\x9c\x93') + + def test_non_string_or_bytes_raises_error(self): + value = 500 + with self.assertRaises(ValueError): + ensure_bytes(value) + + +class TestGetMD5(unittest.TestCase): + def test_available(self): + md5 = mock.Mock() + with mock.patch('botocore.compat.MD5_AVAILABLE', True): + with mock.patch('hashlib.md5', mock.Mock(return_value=md5)): + self.assertEqual(get_md5(), md5) + + def test_unavailable_raises_error(self): + with mock.patch('botocore.compat.MD5_AVAILABLE', False): + with self.assertRaises(MD5UnavailableError): + get_md5() + + +@pytest.fixture +def shell_split_runner(): + # Single runner fixture for all tests + return ShellSplitTestRunner() + + +def get_windows_test_cases(): + windows_cases = { + r'': [], + r'spam \\': [r'spam', '\\\\'], + r'spam ': [r'spam'], + r' spam': [r'spam'], + 'spam eggs': [r'spam', r'eggs'], + 'spam\teggs': [r'spam', r'eggs'], + 'spam\neggs': ['spam\neggs'], + '""': [''], + '" "': [' '], + '"\t"': ['\t'], + '\\\\': ['\\\\'], + '\\\\ ': ['\\\\'], + '\\\\\t': ['\\\\'], + r'\"': ['"'], + # The following four test cases are official test cases given in + # Microsoft's documentation. + r'"abc" d e': [r'abc', r'd', r'e'], + r'a\\b d"e f"g h': [r'a\\b', r'de fg', r'h'], + r'a\\\"b c d': [r'a\"b', r'c', r'd'], + r'a\\\\"b c" d e': [r'a\\b c', r'd', r'e'], + } + return windows_cases.items() + + +@pytest.mark.parametrize( + "input_string, expected_output", get_windows_test_cases() +) +def test_compat_shell_split_windows( + shell_split_runner, input_string, expected_output +): + shell_split_runner.assert_equal(input_string, expected_output, "win32") + + +def test_compat_shell_split_windows_raises_error(shell_split_runner): + shell_split_runner.assert_raises(r'"', ValueError, "win32") + + +def get_unix_test_cases(): + unix_cases = { + r'': [], + r'spam \\': [r'spam', '\\'], + r'spam ': [r'spam'], + r' spam': [r'spam'], + 'spam eggs': [r'spam', r'eggs'], + 'spam\teggs': [r'spam', r'eggs'], + 'spam\neggs': ['spam', 'eggs'], + '""': [''], + '" "': [' '], + '"\t"': ['\t'], + '\\\\': ['\\'], + '\\\\ ': ['\\'], + '\\\\\t': ['\\'], + r'\"': ['"'], + # The following four test cases are official test cases given in + # Microsoft's documentation, but adapted to unix shell splitting. + r'"abc" d e': [r'abc', r'd', r'e'], + r'a\\b d"e f"g h': [r'a\b', r'de fg', r'h'], + r'a\\\"b c d': [r'a\"b', r'c', r'd'], + r'a\\\\"b c" d e': [r'a\\b c', r'd', r'e'], + } + return unix_cases.items() + + +@pytest.mark.parametrize( + "input_string, expected_output", get_unix_test_cases() +) +def test_compat_shell_split_unix_linux2( + shell_split_runner, input_string, expected_output +): + shell_split_runner.assert_equal(input_string, expected_output, "linux2") + + +@pytest.mark.parametrize( + "input_string, expected_output", get_unix_test_cases() +) +def test_compat_shell_split_unix_darwin( + shell_split_runner, input_string, expected_output +): + shell_split_runner.assert_equal(input_string, expected_output, "darwin") + + +def test_compat_shell_split_unix_linux2_raises_error(shell_split_runner): + shell_split_runner.assert_raises(r'"', ValueError, "linux2") + + +def test_compat_shell_split_unix_darwin_raises_error(shell_split_runner): + shell_split_runner.assert_raises(r'"', ValueError, "darwin") + + +class ShellSplitTestRunner: + def assert_equal(self, s, expected, platform): + assert compat_shell_split(s, platform) == expected + + def assert_raises(self, s, exception_cls, platform): + with pytest.raises(exception_cls): + compat_shell_split(s, platform) + + +class TestTimezoneOperations(unittest.TestCase): + def test_get_tzinfo_options(self): + options = get_tzinfo_options() + self.assertTrue(len(options) > 0) + + for tzinfo in options: + self.assertIsInstance(tzinfo(), datetime.tzinfo) + + +class TestCRTIntegration(unittest.TestCase): + def test_has_crt_global(self): + try: + import awscrt.auth # noqa + + assert HAS_CRT + except ImportError: + assert not HAS_CRT