diff --git a/.doc_gen/metadata/cross_metadata.yaml b/.doc_gen/metadata/cross_metadata.yaml index 92c94b9c4fb..85746027908 100644 --- a/.doc_gen/metadata/cross_metadata.yaml +++ b/.doc_gen/metadata/cross_metadata.yaml @@ -9,6 +9,7 @@ cross_FSA: .NET: versions: - sdk_version: 3 + github: dotnetv3/cross-service/FeedbackSentimentAnalyzer block_content: cross_FSA_NetV3_block.xml Java: versions: diff --git a/.github/linters/.editorconfig b/.github/linters/.editorconfig deleted file mode 100644 index 4d68dd253c7..00000000000 --- a/.github/linters/.editorconfig +++ /dev/null @@ -1,66 +0,0 @@ -# editorconfig.org - -# top-most EditorConfig file -root = true - -# C# files -[*.cs] -insert_final_newline = false -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true -file_header_template = Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. \nSPDX-License-Identifier: Apache-2.0 - -# New line preferences -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true - -# Indentation preferences -csharp_indent_block_contents = true -csharp_indent_braces = false -csharp_indent_case_contents = true -csharp_indent_case_contents_when_block = true -csharp_indent_switch_labels = true -csharp_indent_labels = one_less_than_current - -# Code style defaults -dotnet_sort_system_directives_first = true - -# Space preferences -csharp_space_after_cast = false -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_after_comma = true -csharp_space_after_dot = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_after_semicolon_in_for_statement = true -csharp_space_around_binary_operators = before_and_after -csharp_space_around_declaration_statements = do_not_ignore -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_before_comma = false -csharp_space_before_dot = false -csharp_space_before_open_square_brackets = false -csharp_space_before_semicolon_in_for_statement = false -csharp_space_between_empty_square_brackets = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_declaration_name_and_open_parenthesis = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_between_square_brackets = false - -# SA1600: Elements must be documented is disabled. -dotnet_diagnostic.SA1600.severity = none -dotnet_diagnostic.SA1615.severity = none -# SA1633: allow custom file header -dotnet_diagnostic.SA1633.severity = none -# SA1101: do not require keyword this -dotnet_diagnostic.SA1101.severity = none -# IDE2000: Disallow multiple blank lines -dotnet_diagnostic.IDE2000.severity = error diff --git a/.github/workflows/dotnet-check.yml b/.github/workflows/dotnet-check.yml new file mode 100644 index 00000000000..f6b8048789b --- /dev/null +++ b/.github/workflows/dotnet-check.yml @@ -0,0 +1,34 @@ +name: Dotnet lint check +on: + push: + paths: + - "dotnetv3/**" + branches: + - main + pull_request: + paths: + - "dotnetv3/**" + workflow_dispatch: +permissions: + contents: read +jobs: + dotnetcheck: + runs-on: ubuntu-latest + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 5.0.x + 6.0.x + - name: Checkout files + uses: actions/checkout@v3 + - name: Build check + run: | + cd dotnetv3 + dotnet build -v=q --property WarningLevel=0 /clp:ErrorsOnly + - name: Lint and format check + if: success() || failure() + run: | + cd dotnetv3 + dotnet format --verify-no-changes \ No newline at end of file diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index feb6dd7f076..1ece2b565fb 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -35,6 +35,5 @@ jobs: VALIDATE_PYTHON: true VALIDATE_PYTHON_BLACK: true VALIDATE_RUBY: true - VALIDATE_CSHARP: true VALIDATE_KOTLIN: true VALIDATE_EDITORCONFIG: true diff --git a/.tools/test/SPECIFICATION.md b/.tools/test/SPECIFICATION.md new file mode 100644 index 00000000000..04962223e92 --- /dev/null +++ b/.tools/test/SPECIFICATION.md @@ -0,0 +1,44 @@ +# Deployment Instructions +These instructions assume a "target account" (where tests will be invoked) of "python" per [this repository's configuration](config/targets.yaml). +You can replace Python with any of the other languages listed in this repository's configuration. + +To request an alternate configuration for your own repository, please [submit an issue](https://github.com/awsdocs/aws-doc-sdk-examples/issues/new?labels=type%2Fenhancement&labels=Tools&title=%5BEnhancement%5D%3A+Weathertop+Customization+Request&&) with the `Tools` label. + +## 1. Deploy Consumer Stack for your language (e.g. Python) +Admin will: +1. Set Python virtualenv within [sqs_lambda_to_batch_fargate directory](sqs_lambda_to_batch_fargate). +1. `export LANAUGE_NAME=python`. +1. Get Python account tokens. +2. `cdk bootstrap` and `cdk deploy`. + +## 2. Enable Consumer Stack to receive event notifications +User will: +1. Set `status` to `enabled` in [targets.yaml](config/targets.yaml) for your language +1. Raise PR. + +Admin will: +1. Approve and merge PR. +1. Set Python virtualenv within [eventbridge_rule_with_sns_fanout directory](eventbridge_rule_with_sns_fanout). +1. Get Admin account tokens. +1. `cdk bootstrap` and `cdk deploy`. +1. Request user [submit test job](#3-submit-test-job). + +## 3. Submit test job +User will: +1. Log into console for Python account +1. Navigate to "Job Definitions". +![](docs/validation-flow-1.jpg) +1. Click "Submit Job". +![](docs/validation-flow-2.jpg) +1. Add name, select queue, and click "Next". +![](docs/validation-flow-3.jpg) +1. Click "Next". +![](docs/validation-flow-4.jpg) +1. Click "Create job". +![](docs/validation-flow-5.jpg) +1. [Validate results of test job](#3-optional-view-test-job-results) + +## 3. Optional: View CloudWatch job results in Batch +1. Navigate to a job +1. When status is `SUCCEEDED` or `FAILED`, click "Logging" tab. +![](docs/validation-flow-6.jpg) \ No newline at end of file diff --git a/.tools/test/config/targets.yaml b/.tools/test/config/targets.yaml index 43cd3aa4080..b3adcb54bf8 100644 --- a/.tools/test/config/targets.yaml +++ b/.tools/test/config/targets.yaml @@ -1,15 +1,15 @@ cpp: account_id: "770244195820" - status: "disabled" + status: "enabled" dotnetv3: account_id: "441997275833" - status: "disabled" + status: "enabled" gov2: account_id: "234521034040" - status: "disabled" + status: "enabled" javascriptv3: account_id: "875008041426" - status: "disabled" + status: "enabled" javav2: account_id: "814548047983" # back-up "667348412466" status: "disabled" @@ -18,19 +18,19 @@ kotlin: status: "disabled" php: account_id: "733931915187" - status: "disabled" + status: "enabled" python: account_id: "664857444588" - status: "disabled" + status: "enabled" ruby: account_id: "616362385685" - status: "disabled" + status: "enabled" rust_dev_preview: account_id: "050288538048" - status: "disabled" + status: "enabled" sap-abap: account_id: "099736152523" status: "disabled" swift: account_id: "637397754108" - status: "disabled" \ No newline at end of file + status: "enabled" \ No newline at end of file diff --git a/.tools/test/docs/validation-flow-1.jpg b/.tools/test/docs/validation-flow-1.jpg new file mode 100644 index 00000000000..d001d744697 Binary files /dev/null and b/.tools/test/docs/validation-flow-1.jpg differ diff --git a/.tools/test/docs/validation-flow-2.jpg b/.tools/test/docs/validation-flow-2.jpg new file mode 100644 index 00000000000..3319fa21897 Binary files /dev/null and b/.tools/test/docs/validation-flow-2.jpg differ diff --git a/.tools/test/docs/validation-flow-3.jpg b/.tools/test/docs/validation-flow-3.jpg new file mode 100644 index 00000000000..bf8fc0044f3 Binary files /dev/null and b/.tools/test/docs/validation-flow-3.jpg differ diff --git a/.tools/test/docs/validation-flow-4.jpg b/.tools/test/docs/validation-flow-4.jpg new file mode 100644 index 00000000000..4a415123d1d Binary files /dev/null and b/.tools/test/docs/validation-flow-4.jpg differ diff --git a/.tools/test/docs/validation-flow-5.jpg b/.tools/test/docs/validation-flow-5.jpg new file mode 100644 index 00000000000..1921ce9b363 Binary files /dev/null and b/.tools/test/docs/validation-flow-5.jpg differ diff --git a/.tools/test/docs/validation-flow-6.jpg b/.tools/test/docs/validation-flow-6.jpg new file mode 100644 index 00000000000..75e00f5a1a3 Binary files /dev/null and b/.tools/test/docs/validation-flow-6.jpg differ diff --git a/dotnetv3/.editorconfig b/dotnetv3/.editorconfig index 7957dceb589..96f5495f94c 100644 --- a/dotnetv3/.editorconfig +++ b/dotnetv3/.editorconfig @@ -5,12 +5,86 @@ root = true # C# files [*.cs] +# Organize usings +dotnet_sort_system_directives_first = true +# this. preferences +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_readonly_field = true:suggestion +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent + +############################### +# Naming Conventions # +############################### +# Style Definitions +dotnet_naming_style.pascal_case_style.capitalization = pascal_case +# Use PascalCase for constant fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.applicable_accessibilities = * +dotnet_naming_symbols.constant_fields.required_modifiers = const + +############################### +# C# Coding Conventions # +############################### +# var preferences +csharp_style_var_for_built_in_types = true:silent +csharp_style_var_when_type_is_apparent = true:silent +csharp_style_var_elsewhere = true:silent +# Expression-bodied members +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +# Pattern matching preferences +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +# Null-checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion +# Expression-level preferences +csharp_prefer_braces = true:silent +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion + +############################### +# C# Formatting Rules # +############################### insert_final_newline = false indent_style = space indent_size = 4 trim_trailing_whitespace = true -file_header_template = Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. \nSPDX-License-Identifier: Apache-2.0 - # New line preferences csharp_new_line_before_open_brace = all csharp_new_line_before_else = true @@ -19,7 +93,6 @@ csharp_new_line_before_finally = true csharp_new_line_before_members_in_object_initializers = true csharp_new_line_before_members_in_anonymous_types = true csharp_new_line_between_query_expression_clauses = true - # Indentation preferences csharp_indent_block_contents = true csharp_indent_braces = false @@ -27,10 +100,6 @@ csharp_indent_case_contents = true csharp_indent_case_contents_when_block = true csharp_indent_switch_labels = true csharp_indent_labels = one_less_than_current - -# Code style defaults -dotnet_sort_system_directives_first = true - # Space preferences csharp_space_after_cast = false csharp_space_after_colon_in_inheritance_clause = true @@ -55,13 +124,30 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false csharp_space_between_parentheses = false csharp_space_between_square_brackets = false +############################### +# Custom Rules # +############################### +# File header. +file_header_template = Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. \nSPDX-License-Identifier: Apache-2.0 # SA1600: Elements must be documented is disabled. dotnet_diagnostic.SA1600.severity = none dotnet_diagnostic.SA1615.severity = none -# SA1633: allow custom file header +dotnet_diagnostic.SA0001.severity = suggestion +dotnet_diagnostic.SA1200.severity = suggestion +# IDE0005 remove unused using statements. +dotnet_diagnostic.IDE0005.severity = error +# CS0168 do not allow unused variables. +dotnet_diagnostic.CS0168.severity = error +# CS8601: nullability warnings +dotnet_diagnostic.CS8601.severity = suggestion +dotnet_diagnostic.CS8604.severity = suggestion +# SA1633: allow custom file header. dotnet_diagnostic.SA1633.severity = none -# SA1101: do not require keyword this +# SA1101: do not require keyword this. dotnet_diagnostic.SA1101.severity = none - -# IDE2000: Disallow multiple blank lines +# SA1309: allow underscores in field names. +dotnet_diagnostic.SA1309.severity = none +# IDE2000: Disallow multiple blank lines. dotnet_diagnostic.IDE2000.severity = error +# IDE0073: Require a file header. +dotnet_diagnostic.IDE0073.severity = error diff --git a/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs b/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs index dd1ca040a7b..f1662c817e7 100644 --- a/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs +++ b/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs @@ -13,8 +13,7 @@ namespace DescribeCertificate class DescribeCertificate { // The following example retrieves and displays the metadate for a - // certificate using the AWS Certificate Manager (ACM) service. It - // was created using AWS SDK for .NET 3.5 and .NET 5.0. + // certificate using the AWS Certificate Manager (ACM) service. // Specify your AWS Region (an example Region is shown). private static readonly RegionEndpoint ACMRegion = RegionEndpoint.USEast1; @@ -76,11 +75,11 @@ static async Task DescribeCertificateResponseAsync( { response = await client.DescribeCertificateAsync(request); } - catch (InvalidArnException ex) + catch (InvalidArnException) { Console.WriteLine($"Error: The ARN specified is invalid."); } - catch (ResourceNotFoundException ex) + catch (ResourceNotFoundException) { Console.WriteLine($"Error: The specified certificate could not be found."); } diff --git a/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.cs b/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.cs index 6f4ce0c7895..467b70ec9e7 100644 --- a/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.cs +++ b/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.cs @@ -22,21 +22,19 @@ private AmazonCertificateManagerClient CreateMockACMClient() It.IsAny() )).Callback((request, token) => { - if (request is not null) - { - } }).Returns((DescribeCertificateRequest r, CancellationToken token) => { return Task.FromResult(new DescribeCertificateResponse() { HttpStatusCode = System.Net.HttpStatusCode.OK - }); ; + }); }); return mockCertificateManagerClient.Object; } [Fact] + [Trait("Category", "Unit")] public async Task ListCertificatesAsyncTest() { var client = CreateMockACMClient(); diff --git a/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs b/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs index 71f31eed947..bf1d1e1499b 100644 --- a/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs +++ b/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // snippet-start:[ACM.dotnetv3.ListCertificates] @@ -13,8 +13,7 @@ namespace ListCertificates { // The following example retrieves and displays a list of the // certificates defined for the default account using the AWS - // Certificate Manager (ACM) service. It was created using - // AWS SDK for .NET 3.5 and .NET 5.0. + // Certificate Manager (ACM) service. class ListCertificates { // Specify your AWS Region (an example Region is shown). diff --git a/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.cs b/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.cs index 06a1486016b..6128c9b9933 100644 --- a/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.cs +++ b/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.cs @@ -1,7 +1,6 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 -using System; using System.Net; using System.Threading; using System.Threading.Tasks; @@ -23,9 +22,6 @@ private AmazonCertificateManagerClient CreateMockACMClient() It.IsAny() )).Callback((request, token) => { - if (request is not null) - { - } }).Returns((ListCertificatesRequest r, CancellationToken token) => { return Task.FromResult(new ListCertificatesResponse() @@ -38,6 +34,7 @@ private AmazonCertificateManagerClient CreateMockACMClient() } [Fact] + [Trait("Category", "Unit")] public async Task ListCertificatesAsyncTest() { var client = CreateMockACMClient(); diff --git a/dotnetv3/ACM/README.md b/dotnetv3/ACM/README.md index 2a6b417e63f..7ed8fdc0ae4 100644 --- a/dotnetv3/ACM/README.md +++ b/dotnetv3/ACM/README.md @@ -1,4 +1,4 @@ - + # ACM code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Aurora/README.md b/dotnetv3/Aurora/README.md index 85f0e90095d..899f855223d 100644 --- a/dotnetv3/Aurora/README.md +++ b/dotnetv3/Aurora/README.md @@ -1,4 +1,4 @@ - + # Aurora code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Aurora/Scenarios/AuroraScenario.cs b/dotnetv3/Aurora/Scenarios/AuroraScenario.cs index 9df1463b746..b04ff34e2f6 100644 --- a/dotnetv3/Aurora/Scenarios/AuroraScenario.cs +++ b/dotnetv3/Aurora/Scenarios/AuroraScenario.cs @@ -32,7 +32,7 @@ 6. Modify the auto_increment_offset and auto_increment_increment parameters using the ModifyDBClusterParameterGroupAsync method. 7. Get and display the updated parameters using the DescribeDBClusterParametersAsync method with a source of "user". 8. Get a list of allowed engine versions using the DescribeDBEngineVersionsAsync method. - 9. Create an Aurora DB cluster that contains a MySql database and uses the parameter group + 9. Create an Aurora DB cluster that contains a MySql database and uses the parameter group. using the CreateDBClusterAsync method. 10. Wait for the DB cluster to be ready using the DescribeDBClustersAsync method. 11. Display and select from a list of instance classes available for the selected engine and version @@ -127,6 +127,7 @@ static async Task Main(string[] args) Console.WriteLine(sepBar); } catch (Exception ex) + { await CleanupResources(newInstance, newCluster, parameterGroup); logger.LogError(ex, "There was a problem executing the scenario."); diff --git a/dotnetv3/Aurora/Tests/Usings.cs b/dotnetv3/Aurora/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/Aurora/Tests/Usings.cs +++ b/dotnetv3/Aurora/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/AutoScaling/Actions/AutoScalingWrapper.cs b/dotnetv3/AutoScaling/Actions/AutoScalingWrapper.cs index a76e501d0f0..63e3a870875 100644 --- a/dotnetv3/AutoScaling/Actions/AutoScalingWrapper.cs +++ b/dotnetv3/AutoScaling/Actions/AutoScalingWrapper.cs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[AutoScaling.dotnetv3.AutoScalingActions.AutoScalingWrapper] -using LaunchTemplateSpecification = Amazon.AutoScaling.Model.LaunchTemplateSpecification; namespace AutoScalingActions; diff --git a/dotnetv3/AutoScaling/Actions/EC2Wrapper.cs b/dotnetv3/AutoScaling/Actions/EC2Wrapper.cs index 6ec512bbca6..df0f6503747 100644 --- a/dotnetv3/AutoScaling/Actions/EC2Wrapper.cs +++ b/dotnetv3/AutoScaling/Actions/EC2Wrapper.cs @@ -107,4 +107,4 @@ public async Task> ListAvailabilityZonesAsync() } } -// snippet-end:[AutoScaling.dotnetv3.AutoScalingActions.EC2Wrapper] +// snippet-end:[AutoScaling.dotnetv3.AutoScalingActions.EC2Wrapper] \ No newline at end of file diff --git a/dotnetv3/AutoScaling/README.md b/dotnetv3/AutoScaling/README.md index 7c302dd1433..33724408000 100644 --- a/dotnetv3/AutoScaling/README.md +++ b/dotnetv3/AutoScaling/README.md @@ -1,4 +1,4 @@ - + # Auto Scaling code examples for the SDK for .NET ## Overview @@ -39,16 +39,16 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv3 Code excerpts that show you how to call individual service functions. -* [Create a group](Actions/AutoScalingWrapper.cs#L29) (`CreateAutoScalingGroup`) -* [Delete a group](Actions/AutoScalingWrapper.cs#L175) (`DeleteAutoScalingGroup`) -* [Disable metrics collection for a group](Actions/AutoScalingWrapper.cs#L203) (`DisableMetricsCollection`) -* [Enable metrics collection for a group](Actions/AutoScalingWrapper.cs#L224) (`EnableMetricsCollection`) -* [Get information about groups](Actions/AutoScalingWrapper.cs#L110) (`DescribeAutoScalingGroups`) -* [Get information about instances](Actions/AutoScalingWrapper.cs#L110) (`DescribeAutoScalingInstances`) -* [Get information about scaling activities](Actions/AutoScalingWrapper.cs#L87) (`DescribeScalingActivities`) -* [Set the desired capacity of a group](Actions/AutoScalingWrapper.cs#L250) (`SetDesiredCapacity`) -* [Terminate an instance in a group](Actions/AutoScalingWrapper.cs#L276) (`TerminateInstanceInAutoScalingGroup`) -* [Update a group](Actions/AutoScalingWrapper.cs#L307) (`UpdateAutoScalingGroup`) +* [Create a group](Actions/AutoScalingWrapper.cs#L28) (`CreateAutoScalingGroup`) +* [Delete a group](Actions/AutoScalingWrapper.cs#L174) (`DeleteAutoScalingGroup`) +* [Disable metrics collection for a group](Actions/AutoScalingWrapper.cs#L202) (`DisableMetricsCollection`) +* [Enable metrics collection for a group](Actions/AutoScalingWrapper.cs#L223) (`EnableMetricsCollection`) +* [Get information about groups](Actions/AutoScalingWrapper.cs#L109) (`DescribeAutoScalingGroups`) +* [Get information about instances](Actions/AutoScalingWrapper.cs#L109) (`DescribeAutoScalingInstances`) +* [Get information about scaling activities](Actions/AutoScalingWrapper.cs#L86) (`DescribeScalingActivities`) +* [Set the desired capacity of a group](Actions/AutoScalingWrapper.cs#L249) (`SetDesiredCapacity`) +* [Terminate an instance in a group](Actions/AutoScalingWrapper.cs#L275) (`TerminateInstanceInAutoScalingGroup`) +* [Update a group](Actions/AutoScalingWrapper.cs#L306) (`UpdateAutoScalingGroup`) ### Scenarios diff --git a/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/AutoScalingBasics.cs b/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/AutoScalingBasics.cs index 85c44386487..dc809b39765 100644 --- a/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/AutoScalingBasics.cs +++ b/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/AutoScalingBasics.cs @@ -4,7 +4,6 @@ // snippet-start:[AutoScaling.dotnetv3.AutoScalingBasics] using Amazon.EC2; -using Amazon.EC2.Model; using Microsoft.Extensions.Configuration; using Host = Microsoft.Extensions.Hosting.Host; diff --git a/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/Usings.cs b/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/Usings.cs index a4a69321c66..663fb170fe0 100644 --- a/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/Usings.cs +++ b/dotnetv3/AutoScaling/Scenarios/AutoScalingBasics/Usings.cs @@ -5,12 +5,11 @@ global using Amazon.AutoScaling; global using Amazon.AutoScaling.Model; global using Amazon.CloudWatch; -global using Amazon.CloudWatch.Model; +global using AutoScalingActions; global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.Hosting; global using Microsoft.Extensions.Logging; global using Microsoft.Extensions.Logging.Console; global using Microsoft.Extensions.Logging.Debug; -global using AutoScalingActions; // snippet-end:[AutoScaling.dotnetv3.AutoScalingBasics.Usings] \ No newline at end of file diff --git a/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs b/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs index d8be8da34aa..38e242ba5b4 100644 --- a/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs +++ b/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs @@ -3,8 +3,6 @@ using Amazon.AutoScaling; using Amazon.AutoScaling.Model; -using Amazon.EC2; -using AutoScalingActions; namespace AutoScalingTests { diff --git a/dotnetv3/AutoScaling/Tests/Usings.cs b/dotnetv3/AutoScaling/Tests/Usings.cs index 8dbb18ff915..719b04136e3 100644 --- a/dotnetv3/AutoScaling/Tests/Usings.cs +++ b/dotnetv3/AutoScaling/Tests/Usings.cs @@ -1,17 +1,12 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -global using Amazon; -global using Amazon.CloudWatch.Model; global using Amazon.CloudWatch; -global using Amazon.EC2.Model; global using Amazon.EC2; +global using AutoScalingActions; global using Microsoft.Extensions.Configuration; -global using Microsoft.Extensions.Hosting; -global using Microsoft.Extensions.DependencyInjection; global using Xunit; global using Xunit.Extensions.Ordering; -global using AutoScalingActions; // Optional. [assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs b/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs index e1bde13bcd1..546b62a45ea 100644 --- a/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs +++ b/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs @@ -17,58 +17,58 @@ public class Left public class Properties { [JsonPropertyName("markdown")] - public string Markdown { get; set; } + public string Markdown { get; set; } = null!; [JsonPropertyName("metrics")] - public List> Metrics { get; set; } + public List> Metrics { get; set; } = null!; [JsonPropertyName("view")] - public string View { get; set; } + public string View { get; set; } = null!; [JsonPropertyName("region")] - public string Region { get; set; } + public string Region { get; set; } = null!; [JsonPropertyName("stat")] - public string Stat { get; set; } + public string Stat { get; set; } = null!; [JsonPropertyName("period")] - public int? Period { get; set; } + public int? Period { get; set; } = null!; [JsonPropertyName("yAxis")] - public YAxis YAxis { get; set; } + public YAxis YAxis { get; set; } = null!; [JsonPropertyName("stacked")] - public bool? Stacked { get; set; } + public bool? Stacked { get; set; } = null!; [JsonPropertyName("title")] - public string Title { get; set; } + public string Title { get; set; } = null!; [JsonPropertyName("setPeriodToTimeRange")] - public bool? SetPeriodToTimeRange { get; set; } + public bool? SetPeriodToTimeRange { get; set; } = null!; [JsonPropertyName("liveData")] - public bool? LiveData { get; set; } + public bool? LiveData { get; set; } = null!; [JsonPropertyName("sparkline")] - public bool? Sparkline { get; set; } + public bool? Sparkline { get; set; } = null!; [JsonPropertyName("trend")] - public bool? Trend { get; set; } + public bool? Trend { get; set; } = null!; [JsonPropertyName("alarms")] - public List Alarms { get; set; } + public List Alarms { get; set; } = null!; } public class DashboardModel { [JsonPropertyName("widgets")] - public List Widgets { get; set; } + public List Widgets { get; set; } = null!; } public class Widget { [JsonPropertyName("type")] - public string Type { get; set; } + public string Type { get; set; } = null!; [JsonPropertyName("x")] public int X { get; set; } @@ -89,5 +89,5 @@ public class Widget public class YAxis { [JsonPropertyName("left")] - public Left Left { get; set; } + public Left Left { get; set; } = null!; } \ No newline at end of file diff --git a/dotnetv3/CloudWatch/README.md b/dotnetv3/CloudWatch/README.md index c926a066ec2..2d2dcbbd456 100644 --- a/dotnetv3/CloudWatch/README.md +++ b/dotnetv3/CloudWatch/README.md @@ -1,4 +1,4 @@ - + # CloudWatch code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/CloudWatch/Tests/Usings.cs b/dotnetv3/CloudWatch/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/CloudWatch/Tests/Usings.cs +++ b/dotnetv3/CloudWatch/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/CloudWatchLogs/README.md b/dotnetv3/CloudWatchLogs/README.md index 578e9bece35..4b66ab1a77d 100644 --- a/dotnetv3/CloudWatchLogs/README.md +++ b/dotnetv3/CloudWatchLogs/README.md @@ -1,4 +1,4 @@ - + # CloudWatch Logs code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Cognito/README.md b/dotnetv3/Cognito/README.md index a480eb6e361..61a956a7231 100644 --- a/dotnetv3/Cognito/README.md +++ b/dotnetv3/Cognito/README.md @@ -1,4 +1,4 @@ - + # Amazon Cognito Identity Provider code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Cognito/Scenarios/Cognito_Basics/Usings.cs b/dotnetv3/Cognito/Scenarios/Cognito_Basics/Usings.cs index 6a18140465e..f264a8837d0 100644 --- a/dotnetv3/Cognito/Scenarios/Cognito_Basics/Usings.cs +++ b/dotnetv3/Cognito/Scenarios/Cognito_Basics/Usings.cs @@ -2,11 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[Cognito.dotnetv3.CognitoBasics.Usings] -global using Amazon; global using Amazon.CognitoIdentityProvider; -global using Amazon.CognitoIdentityProvider.Model; global using CognitoActions; -global using CognitoBasics; global using Microsoft.Extensions.Configuration; global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.Hosting; diff --git a/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs b/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs index eda7e62a33b..04f2e7d7fcd 100644 --- a/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs +++ b/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs @@ -119,7 +119,7 @@ public async Task VerifySoftwareTokenAsyncTest() [Trait("Category", "Integration")] public async Task AssociateSoftwareTokenAsyncTest() { - var newSession = _wrapper.AssociateSoftwareTokenAsync(_session); + var newSession = await _wrapper.AssociateSoftwareTokenAsync(_session); Assert.NotNull(newSession); } diff --git a/dotnetv3/Comprehend/README.md b/dotnetv3/Comprehend/README.md index d1c7c54ea65..77580116fca 100644 --- a/dotnetv3/Comprehend/README.md +++ b/dotnetv3/Comprehend/README.md @@ -1,4 +1,4 @@ - + # Amazon Comprehend code examples for the SDK for .NET ## Overview @@ -42,6 +42,12 @@ Code excerpts that show you how to call individual service functions. * [Detect the sentiment of a document](DetectSentimentExample/DetectSentimentExample/DetectSentiment.cs#L6) (`DetectSentiment`) * [Start a topic modeling job](TopicModelingExample/TopicModelingExample/TopicModeling.cs#L6) (`StartTopicsDetectionJob`) +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create an application to analyze customer feedback](../cross-service/FeedbackSentimentAnalyzer) + ## Run the examples ### Instructions diff --git a/dotnetv3/Dockerfile b/dotnetv3/Dockerfile index e4d5b6849cb..80d990651a6 100644 --- a/dotnetv3/Dockerfile +++ b/dotnetv3/Dockerfile @@ -10,6 +10,6 @@ COPY --from=mcr.microsoft.com/dotnet/sdk:5.0 /usr/share/dotnet/shared /usr/share # such as dotnetv3/CloudWatch/Scenarios to build and run an interactive scenario with `dotnet run` COPY . /dotnetv3 -RUN cd /dotnetv3 && dotnet build +RUN cd /dotnetv3 && dotnet build -v=q --property WarningLevel=0 /clp:ErrorsOnly --nologo -CMD ["dotnet", "test", "dotnetv3", "--filter", "Category=Unit"] \ No newline at end of file +CMD ["dotnet", "test", "dotnetv3", "--filter", "Category=Unit", "--verbosity=quiet", "/clp:ErrorsOnly", "--nologo"] \ No newline at end of file diff --git a/dotnetv3/DotNetV3Examples.sln b/dotnetv3/DotNetV3Examples.sln index 0af0f7d3ce4..4c237f18ea4 100644 --- a/dotnetv3/DotNetV3Examples.sln +++ b/dotnetv3/DotNetV3Examples.sln @@ -629,6 +629,116 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TopicsAndQueuesScenario", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TopicsAndQueuesTests", "cross-service\TopicsAndQueues\Tests\TopicsAndQueuesTests\TopicsAndQueuesTests.csproj", "{7ADB4E2B-03C7-4C55-AB3B-5E7BCBB51FC3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FeedbackSentimentAnalyzer", "FeedbackSentimentAnalyzer", "{4188BE06-1B71-4D8E-B0D8-08E32E94B75F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FsaTranslateText", "cross-service\FeedbackSentimentAnalyzer\FsaTranslateText\FsaTranslateText.csproj", "{B2694FC7-C8F5-4ED1-96C5-D58BE798E696}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FsaSynthesizeAudio", "cross-service\FeedbackSentimentAnalyzer\FsaSynthesizeAudio\FsaSynthesizeAudio.csproj", "{274B6CD5-F0AE-431D-AA37-C923B3AA31A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FsaServicesTest", "cross-service\FeedbackSentimentAnalyzer\FsaServicesTest\FsaServicesTest.csproj", "{42B728E6-F1D2-4805-8EA2-B4C05728579D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FsaServices", "cross-service\FeedbackSentimentAnalyzer\FsaServices\FsaServices.csproj", "{54EECFA3-D65D-43C1-BC5B-00F5C0F9FF24}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FsaExtractText", "cross-service\FeedbackSentimentAnalyzer\FsaExtractText\FsaExtractText.csproj", "{FC73DE3F-8AC8-454C-BC54-6862C6718A3E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FsaAnalyzeSentiment", "cross-service\FeedbackSentimentAnalyzer\FsaAnalyzeSentiment\FsaAnalyzeSentiment.csproj", "{5CC5C93A-24E8-4A99-B004-BC341CBBBC73}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GlacierTests", "Glacier\Tests\GlacierTests.csproj", "{A3B1A461-01D7-4EDE-9ACF-75D5D260B788}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GlacierActions", "Glacier\Actions\GlacierActions.csproj", "{FF8DBFD2-3D49-4ED0-9FAA-2BEEC5CF33EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoScalingTests", "AutoScaling\Tests\AutoScalingTests.csproj", "{28C9796E-9E28-4715-BD44-82CCF4BF8797}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scenarios", "Scenarios", "{A0D54C23-C7ED-45D3-92C8-7B267E499CD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoScalingBasics", "AutoScaling\Scenarios\AutoScalingBasics\AutoScalingBasics.csproj", "{96B016E8-CDB3-490B-A1BB-6A9008E9E30B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoScalingActions", "AutoScaling\Actions\AutoScalingActions.csproj", "{18B07F62-06CC-4562-BB86-2C072758B90F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebsiteConfigExample", "S3\WebsiteConfigExample\WebsiteConfigExample.csproj", "{3BCCDCB1-7E96-48C7-B1A8-436A87B6D143}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "versioned-examples", "versioned-examples", "{81CA4EDA-4FFC-4A6B-946C-1A2FCD4BAD84}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListObjectVersionsExample", "S3\versioned-examples\ListObjectVersionsExample\ListObjectVersionsExample.csproj", "{DCFC3111-BACD-443C-9F94-BE6AC330C671}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeleteObjectVersionExample", "S3\versioned-examples\DeleteObjectVersionExample\DeleteObjectVersionExample.csproj", "{039FE92F-8E91-42A2-88D7-4A10AC517E54}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeleteMultipleObjectsExample", "S3\versioned-examples\DeleteMultipleObjectsExample\DeleteMultipleObjectsExample.csproj", "{8FE729EF-10A1-4491-AA1A-F48C94D0A28F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UploadUsingPresignedURLExample", "S3\UploadUsingPresignedURLExample\UploadUsingPresignedURLExample.csproj", "{CDC501EA-5910-4430-A83A-433DB0B93450}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransferAccelerationExample", "S3\TransferAccelerationExample\TransferAccelerationExample.csproj", "{8D43FF6E-C40B-4673-9313-ECB8AE9708F6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrackMPUUsingHighLevelAPIExample", "S3\TrackMPUUsingHighLevelAPIExample\TrackMPUUsingHighLevelAPIExample.csproj", "{E8303092-30BC-469F-8CDD-5D287E95FA0B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SSECLowLevelMPUcopyObjectExample", "S3\SSECLowLevelMPUcopyObjectExample\SSECLowLevelMPUcopyObjectExample.csproj", "{8111F1F7-B1B8-4B1A-A89C-40242964AE59}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SSEClientEncryptionExample", "S3\SSEClientEncryptionExample\SSEClientEncryptionExample.csproj", "{698B0AA6-1DEA-46B8-BAAC-CA948E863E51}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerSideEncryptionExample", "S3\ServerSideEncryptionExample\ServerSideEncryptionExample.csproj", "{897A47E9-F620-4606-9420-D8CFFD5E6457}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerAccessLoggingExample", "S3\ServerAccessLoggingExample\ServerAccessLoggingExample.csproj", "{C63F6684-52C0-420E-91DA-359651194EFA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scenarios", "scenarios", "{0169CEB9-B6A7-447D-921D-C79358DDCCE6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TransferUtilityBasics", "TransferUtilityBasics", "{CA5B5F81-2FD5-49C5-A337-79CE9CF5E7FD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransferUtilityBasicsTests", "S3\scenarios\TransferUtilityBasics\TransferUtilityBasicsTests\TransferUtilityBasicsTests.csproj", "{429D456D-7767-4E80-9738-0704C622A922}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransferUtilityBasics", "S3\scenarios\TransferUtilityBasics\TransferUtilityBasics\TransferUtilityBasics.csproj", "{2A325BEF-247B-4569-AFD5-EB790CBA5407}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "S3_BasicsScenarioTests", "S3\S3_BasicsScenarioTests\S3_BasicsScenarioTests.csproj", "{9EC99E1A-1F72-4FBE-9B69-82FAE3B26E69}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "S3_BasicsScenario", "S3\S3_Basics\S3_BasicsScenario.csproj", "{C4A95E4C-B743-4790-9BAF-5B94EC4D0965}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "S3CORSExample", "S3\s3CORSExample\S3CORSExample.csproj", "{A363DDF5-D3DE-4552-A1B8-F315F09D7653}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RestoreArchivedObjectExample", "S3\RestoreArchivedObjectExample\RestoreArchivedObjectExample.csproj", "{9D5024EE-EAB1-478D-9129-8E9CA38E1FDC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectTagExample", "S3\ObjectTagExample\ObjectTagExample.csproj", "{A756425E-5D0B-451F-9765-FC5DF265E7C5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "non-versioned-examples", "non-versioned-examples", "{9823AF2B-9826-4D8A-A7AE-CEBEDA388532}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeleteObjectExample", "S3\non-versioned-examples\DeleteObjectExample\DeleteObjectExample.csproj", "{64601BC1-480A-43CA-824F-3DBE0AFE0BED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeleteMultipleObjectsExample", "S3\non-versioned-examples\DeleteMultipleObjectsExample\DeleteMultipleObjectsExample.csproj", "{2C07BC72-CBFA-4756-AB5E-D86B015885F1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MPUapiCopyObjExample", "S3\MPUapiCopyObjExample\MPUapiCopyObjExample.csproj", "{42D5D6CB-BBC7-42BF-A53E-58C59DA434F0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManageACLsExample", "S3\ManageACLsExample\ManageACLsExample.csproj", "{AF06AF6A-4511-4420-8B91-FE5A7A98C752}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListObjectsPaginatorExample", "S3\ListObjectsPaginatorExample\ListObjectsPaginatorExample.csproj", "{26F28AE0-7C49-40B8-99D3-77FE2EC5A6C8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBucketsExample", "S3\ListBucketsExample\ListBucketsExample.csproj", "{08B63DD9-FE95-4CF2-ACD4-F205EF19E84E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LifecycleExample", "S3\LifecycleExample\LifecycleExample.csproj", "{6E137541-E5AF-4CBF-9E75-124661B4A00F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenPresignedUrlExample", "S3\GenPresignedURLExample\GenPresignedUrlExample.csproj", "{5EEAEFF7-98DD-486B-9117-0B02B0605340}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnableNotificationsExample", "S3\EnableNotificationsExample\EnableNotificationsExample.csproj", "{4A6F3398-F29F-453D-AA81-2C90C9963566}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CopyObjectExample", "S3\CopyObjectExample\CopyObjectExample.csproj", "{20C81068-0C6E-4BEF-A2B6-EDD9C0293883}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BucketACLExample", "S3\BucketACLExample\BucketACLExample.csproj", "{2DF42E41-E3C4-4147-99F1-8AECBE254FB6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AbortMPUExample", "S3\AbortMPUExample\AbortMPUExample.csproj", "{1003D731-4729-4BB6-AAD3-409D2974F13E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ECS", "ECS", "{25A467A2-7CB0-464A-BDE3-06A3A70C9157}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECSTests", "ECS\ECSTests\ECSTests.csproj", "{36F41966-8554-444B-AF95-CB223B55EF21}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECSScenario", "ECS\ECSScenario\ECSScenario.csproj", "{FFF563B8-7DBC-436C-8CD9-98D8CDFBB854}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECSActions", "ECS\ECSActions\ECSActions.csproj", "{C5A439E3-1659-4BA7-8668-4D2C3CCEA992}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StepFunctions", "StepFunctions", "{66F40B36-B02C-4B6E-9978-592BB0040FD8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StepFunctionsTests", "StepFunctions\Tests\StepFunctionsTests.csproj", "{6A9E4CE0-E5B2-4136-B796-BFE673954ACA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StepFunctionsBasics", "StepFunctions\Scenarios\StepFunctionsBasics.csproj", "{8638D5FD-CFEB-4FBA-A8C0-B65F31B8AE93}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StepFunctionsActions", "StepFunctions\Actions\StepFunctionsActions.csproj", "{0340F970-AE33-4ABD-9B2B-E7CF266E33CC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1379,6 +1489,194 @@ Global {7ADB4E2B-03C7-4C55-AB3B-5E7BCBB51FC3}.Debug|Any CPU.Build.0 = Debug|Any CPU {7ADB4E2B-03C7-4C55-AB3B-5E7BCBB51FC3}.Release|Any CPU.ActiveCfg = Release|Any CPU {7ADB4E2B-03C7-4C55-AB3B-5E7BCBB51FC3}.Release|Any CPU.Build.0 = Release|Any CPU + {B2694FC7-C8F5-4ED1-96C5-D58BE798E696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2694FC7-C8F5-4ED1-96C5-D58BE798E696}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2694FC7-C8F5-4ED1-96C5-D58BE798E696}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2694FC7-C8F5-4ED1-96C5-D58BE798E696}.Release|Any CPU.Build.0 = Release|Any CPU + {274B6CD5-F0AE-431D-AA37-C923B3AA31A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {274B6CD5-F0AE-431D-AA37-C923B3AA31A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {274B6CD5-F0AE-431D-AA37-C923B3AA31A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {274B6CD5-F0AE-431D-AA37-C923B3AA31A4}.Release|Any CPU.Build.0 = Release|Any CPU + {42B728E6-F1D2-4805-8EA2-B4C05728579D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42B728E6-F1D2-4805-8EA2-B4C05728579D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42B728E6-F1D2-4805-8EA2-B4C05728579D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42B728E6-F1D2-4805-8EA2-B4C05728579D}.Release|Any CPU.Build.0 = Release|Any CPU + {54EECFA3-D65D-43C1-BC5B-00F5C0F9FF24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54EECFA3-D65D-43C1-BC5B-00F5C0F9FF24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54EECFA3-D65D-43C1-BC5B-00F5C0F9FF24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54EECFA3-D65D-43C1-BC5B-00F5C0F9FF24}.Release|Any CPU.Build.0 = Release|Any CPU + {FC73DE3F-8AC8-454C-BC54-6862C6718A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC73DE3F-8AC8-454C-BC54-6862C6718A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC73DE3F-8AC8-454C-BC54-6862C6718A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC73DE3F-8AC8-454C-BC54-6862C6718A3E}.Release|Any CPU.Build.0 = Release|Any CPU + {5CC5C93A-24E8-4A99-B004-BC341CBBBC73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5CC5C93A-24E8-4A99-B004-BC341CBBBC73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5CC5C93A-24E8-4A99-B004-BC341CBBBC73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5CC5C93A-24E8-4A99-B004-BC341CBBBC73}.Release|Any CPU.Build.0 = Release|Any CPU + {A3B1A461-01D7-4EDE-9ACF-75D5D260B788}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3B1A461-01D7-4EDE-9ACF-75D5D260B788}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3B1A461-01D7-4EDE-9ACF-75D5D260B788}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3B1A461-01D7-4EDE-9ACF-75D5D260B788}.Release|Any CPU.Build.0 = Release|Any CPU + {FF8DBFD2-3D49-4ED0-9FAA-2BEEC5CF33EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF8DBFD2-3D49-4ED0-9FAA-2BEEC5CF33EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF8DBFD2-3D49-4ED0-9FAA-2BEEC5CF33EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF8DBFD2-3D49-4ED0-9FAA-2BEEC5CF33EF}.Release|Any CPU.Build.0 = Release|Any CPU + {28C9796E-9E28-4715-BD44-82CCF4BF8797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28C9796E-9E28-4715-BD44-82CCF4BF8797}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28C9796E-9E28-4715-BD44-82CCF4BF8797}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28C9796E-9E28-4715-BD44-82CCF4BF8797}.Release|Any CPU.Build.0 = Release|Any CPU + {96B016E8-CDB3-490B-A1BB-6A9008E9E30B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96B016E8-CDB3-490B-A1BB-6A9008E9E30B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96B016E8-CDB3-490B-A1BB-6A9008E9E30B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96B016E8-CDB3-490B-A1BB-6A9008E9E30B}.Release|Any CPU.Build.0 = Release|Any CPU + {18B07F62-06CC-4562-BB86-2C072758B90F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18B07F62-06CC-4562-BB86-2C072758B90F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18B07F62-06CC-4562-BB86-2C072758B90F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18B07F62-06CC-4562-BB86-2C072758B90F}.Release|Any CPU.Build.0 = Release|Any CPU + {3BCCDCB1-7E96-48C7-B1A8-436A87B6D143}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BCCDCB1-7E96-48C7-B1A8-436A87B6D143}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BCCDCB1-7E96-48C7-B1A8-436A87B6D143}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BCCDCB1-7E96-48C7-B1A8-436A87B6D143}.Release|Any CPU.Build.0 = Release|Any CPU + {DCFC3111-BACD-443C-9F94-BE6AC330C671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCFC3111-BACD-443C-9F94-BE6AC330C671}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCFC3111-BACD-443C-9F94-BE6AC330C671}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCFC3111-BACD-443C-9F94-BE6AC330C671}.Release|Any CPU.Build.0 = Release|Any CPU + {039FE92F-8E91-42A2-88D7-4A10AC517E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {039FE92F-8E91-42A2-88D7-4A10AC517E54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {039FE92F-8E91-42A2-88D7-4A10AC517E54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {039FE92F-8E91-42A2-88D7-4A10AC517E54}.Release|Any CPU.Build.0 = Release|Any CPU + {8FE729EF-10A1-4491-AA1A-F48C94D0A28F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FE729EF-10A1-4491-AA1A-F48C94D0A28F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FE729EF-10A1-4491-AA1A-F48C94D0A28F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FE729EF-10A1-4491-AA1A-F48C94D0A28F}.Release|Any CPU.Build.0 = Release|Any CPU + {CDC501EA-5910-4430-A83A-433DB0B93450}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDC501EA-5910-4430-A83A-433DB0B93450}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDC501EA-5910-4430-A83A-433DB0B93450}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDC501EA-5910-4430-A83A-433DB0B93450}.Release|Any CPU.Build.0 = Release|Any CPU + {8D43FF6E-C40B-4673-9313-ECB8AE9708F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D43FF6E-C40B-4673-9313-ECB8AE9708F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D43FF6E-C40B-4673-9313-ECB8AE9708F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D43FF6E-C40B-4673-9313-ECB8AE9708F6}.Release|Any CPU.Build.0 = Release|Any CPU + {E8303092-30BC-469F-8CDD-5D287E95FA0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E8303092-30BC-469F-8CDD-5D287E95FA0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E8303092-30BC-469F-8CDD-5D287E95FA0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E8303092-30BC-469F-8CDD-5D287E95FA0B}.Release|Any CPU.Build.0 = Release|Any CPU + {8111F1F7-B1B8-4B1A-A89C-40242964AE59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8111F1F7-B1B8-4B1A-A89C-40242964AE59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8111F1F7-B1B8-4B1A-A89C-40242964AE59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8111F1F7-B1B8-4B1A-A89C-40242964AE59}.Release|Any CPU.Build.0 = Release|Any CPU + {698B0AA6-1DEA-46B8-BAAC-CA948E863E51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {698B0AA6-1DEA-46B8-BAAC-CA948E863E51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {698B0AA6-1DEA-46B8-BAAC-CA948E863E51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {698B0AA6-1DEA-46B8-BAAC-CA948E863E51}.Release|Any CPU.Build.0 = Release|Any CPU + {897A47E9-F620-4606-9420-D8CFFD5E6457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {897A47E9-F620-4606-9420-D8CFFD5E6457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {897A47E9-F620-4606-9420-D8CFFD5E6457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {897A47E9-F620-4606-9420-D8CFFD5E6457}.Release|Any CPU.Build.0 = Release|Any CPU + {C63F6684-52C0-420E-91DA-359651194EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C63F6684-52C0-420E-91DA-359651194EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C63F6684-52C0-420E-91DA-359651194EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C63F6684-52C0-420E-91DA-359651194EFA}.Release|Any CPU.Build.0 = Release|Any CPU + {429D456D-7767-4E80-9738-0704C622A922}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {429D456D-7767-4E80-9738-0704C622A922}.Debug|Any CPU.Build.0 = Debug|Any CPU + {429D456D-7767-4E80-9738-0704C622A922}.Release|Any CPU.ActiveCfg = Release|Any CPU + {429D456D-7767-4E80-9738-0704C622A922}.Release|Any CPU.Build.0 = Release|Any CPU + {2A325BEF-247B-4569-AFD5-EB790CBA5407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A325BEF-247B-4569-AFD5-EB790CBA5407}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A325BEF-247B-4569-AFD5-EB790CBA5407}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A325BEF-247B-4569-AFD5-EB790CBA5407}.Release|Any CPU.Build.0 = Release|Any CPU + {9EC99E1A-1F72-4FBE-9B69-82FAE3B26E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9EC99E1A-1F72-4FBE-9B69-82FAE3B26E69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EC99E1A-1F72-4FBE-9B69-82FAE3B26E69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9EC99E1A-1F72-4FBE-9B69-82FAE3B26E69}.Release|Any CPU.Build.0 = Release|Any CPU + {C4A95E4C-B743-4790-9BAF-5B94EC4D0965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4A95E4C-B743-4790-9BAF-5B94EC4D0965}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4A95E4C-B743-4790-9BAF-5B94EC4D0965}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4A95E4C-B743-4790-9BAF-5B94EC4D0965}.Release|Any CPU.Build.0 = Release|Any CPU + {A363DDF5-D3DE-4552-A1B8-F315F09D7653}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A363DDF5-D3DE-4552-A1B8-F315F09D7653}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A363DDF5-D3DE-4552-A1B8-F315F09D7653}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A363DDF5-D3DE-4552-A1B8-F315F09D7653}.Release|Any CPU.Build.0 = Release|Any CPU + {9D5024EE-EAB1-478D-9129-8E9CA38E1FDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D5024EE-EAB1-478D-9129-8E9CA38E1FDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D5024EE-EAB1-478D-9129-8E9CA38E1FDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D5024EE-EAB1-478D-9129-8E9CA38E1FDC}.Release|Any CPU.Build.0 = Release|Any CPU + {A756425E-5D0B-451F-9765-FC5DF265E7C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A756425E-5D0B-451F-9765-FC5DF265E7C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A756425E-5D0B-451F-9765-FC5DF265E7C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A756425E-5D0B-451F-9765-FC5DF265E7C5}.Release|Any CPU.Build.0 = Release|Any CPU + {64601BC1-480A-43CA-824F-3DBE0AFE0BED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64601BC1-480A-43CA-824F-3DBE0AFE0BED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64601BC1-480A-43CA-824F-3DBE0AFE0BED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64601BC1-480A-43CA-824F-3DBE0AFE0BED}.Release|Any CPU.Build.0 = Release|Any CPU + {2C07BC72-CBFA-4756-AB5E-D86B015885F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C07BC72-CBFA-4756-AB5E-D86B015885F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C07BC72-CBFA-4756-AB5E-D86B015885F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C07BC72-CBFA-4756-AB5E-D86B015885F1}.Release|Any CPU.Build.0 = Release|Any CPU + {42D5D6CB-BBC7-42BF-A53E-58C59DA434F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42D5D6CB-BBC7-42BF-A53E-58C59DA434F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42D5D6CB-BBC7-42BF-A53E-58C59DA434F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42D5D6CB-BBC7-42BF-A53E-58C59DA434F0}.Release|Any CPU.Build.0 = Release|Any CPU + {AF06AF6A-4511-4420-8B91-FE5A7A98C752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF06AF6A-4511-4420-8B91-FE5A7A98C752}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF06AF6A-4511-4420-8B91-FE5A7A98C752}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF06AF6A-4511-4420-8B91-FE5A7A98C752}.Release|Any CPU.Build.0 = Release|Any CPU + {26F28AE0-7C49-40B8-99D3-77FE2EC5A6C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26F28AE0-7C49-40B8-99D3-77FE2EC5A6C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26F28AE0-7C49-40B8-99D3-77FE2EC5A6C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26F28AE0-7C49-40B8-99D3-77FE2EC5A6C8}.Release|Any CPU.Build.0 = Release|Any CPU + {08B63DD9-FE95-4CF2-ACD4-F205EF19E84E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08B63DD9-FE95-4CF2-ACD4-F205EF19E84E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08B63DD9-FE95-4CF2-ACD4-F205EF19E84E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08B63DD9-FE95-4CF2-ACD4-F205EF19E84E}.Release|Any CPU.Build.0 = Release|Any CPU + {6E137541-E5AF-4CBF-9E75-124661B4A00F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E137541-E5AF-4CBF-9E75-124661B4A00F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E137541-E5AF-4CBF-9E75-124661B4A00F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E137541-E5AF-4CBF-9E75-124661B4A00F}.Release|Any CPU.Build.0 = Release|Any CPU + {5EEAEFF7-98DD-486B-9117-0B02B0605340}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EEAEFF7-98DD-486B-9117-0B02B0605340}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EEAEFF7-98DD-486B-9117-0B02B0605340}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EEAEFF7-98DD-486B-9117-0B02B0605340}.Release|Any CPU.Build.0 = Release|Any CPU + {4A6F3398-F29F-453D-AA81-2C90C9963566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A6F3398-F29F-453D-AA81-2C90C9963566}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A6F3398-F29F-453D-AA81-2C90C9963566}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A6F3398-F29F-453D-AA81-2C90C9963566}.Release|Any CPU.Build.0 = Release|Any CPU + {20C81068-0C6E-4BEF-A2B6-EDD9C0293883}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20C81068-0C6E-4BEF-A2B6-EDD9C0293883}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20C81068-0C6E-4BEF-A2B6-EDD9C0293883}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20C81068-0C6E-4BEF-A2B6-EDD9C0293883}.Release|Any CPU.Build.0 = Release|Any CPU + {2DF42E41-E3C4-4147-99F1-8AECBE254FB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DF42E41-E3C4-4147-99F1-8AECBE254FB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DF42E41-E3C4-4147-99F1-8AECBE254FB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DF42E41-E3C4-4147-99F1-8AECBE254FB6}.Release|Any CPU.Build.0 = Release|Any CPU + {1003D731-4729-4BB6-AAD3-409D2974F13E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1003D731-4729-4BB6-AAD3-409D2974F13E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1003D731-4729-4BB6-AAD3-409D2974F13E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1003D731-4729-4BB6-AAD3-409D2974F13E}.Release|Any CPU.Build.0 = Release|Any CPU + {36F41966-8554-444B-AF95-CB223B55EF21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36F41966-8554-444B-AF95-CB223B55EF21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36F41966-8554-444B-AF95-CB223B55EF21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36F41966-8554-444B-AF95-CB223B55EF21}.Release|Any CPU.Build.0 = Release|Any CPU + {FFF563B8-7DBC-436C-8CD9-98D8CDFBB854}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FFF563B8-7DBC-436C-8CD9-98D8CDFBB854}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FFF563B8-7DBC-436C-8CD9-98D8CDFBB854}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FFF563B8-7DBC-436C-8CD9-98D8CDFBB854}.Release|Any CPU.Build.0 = Release|Any CPU + {C5A439E3-1659-4BA7-8668-4D2C3CCEA992}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5A439E3-1659-4BA7-8668-4D2C3CCEA992}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5A439E3-1659-4BA7-8668-4D2C3CCEA992}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5A439E3-1659-4BA7-8668-4D2C3CCEA992}.Release|Any CPU.Build.0 = Release|Any CPU + {6A9E4CE0-E5B2-4136-B796-BFE673954ACA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A9E4CE0-E5B2-4136-B796-BFE673954ACA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A9E4CE0-E5B2-4136-B796-BFE673954ACA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A9E4CE0-E5B2-4136-B796-BFE673954ACA}.Release|Any CPU.Build.0 = Release|Any CPU + {8638D5FD-CFEB-4FBA-A8C0-B65F31B8AE93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8638D5FD-CFEB-4FBA-A8C0-B65F31B8AE93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8638D5FD-CFEB-4FBA-A8C0-B65F31B8AE93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8638D5FD-CFEB-4FBA-A8C0-B65F31B8AE93}.Release|Any CPU.Build.0 = Release|Any CPU + {0340F970-AE33-4ABD-9B2B-E7CF266E33CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0340F970-AE33-4ABD-9B2B-E7CF266E33CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0340F970-AE33-4ABD-9B2B-E7CF266E33CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0340F970-AE33-4ABD-9B2B-E7CF266E33CC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1663,6 +1961,59 @@ Global {511F5CBC-F5E1-4810-97D6-C32D17F5E590} = {CDE74222-B991-4247-8559-74E3D3C72549} {BFCE1B4C-EAAE-4229-AAC2-F86ABA9D62E1} = {C9371629-7914-43EE-B39F-C2FF2ADE7129} {7ADB4E2B-03C7-4C55-AB3B-5E7BCBB51FC3} = {BAA64C6F-39BE-41A0-A69C-8A0CCB924A98} + {4188BE06-1B71-4D8E-B0D8-08E32E94B75F} = {722A2732-0E7B-47C6-9532-127D82497030} + {B2694FC7-C8F5-4ED1-96C5-D58BE798E696} = {4188BE06-1B71-4D8E-B0D8-08E32E94B75F} + {274B6CD5-F0AE-431D-AA37-C923B3AA31A4} = {4188BE06-1B71-4D8E-B0D8-08E32E94B75F} + {42B728E6-F1D2-4805-8EA2-B4C05728579D} = {4188BE06-1B71-4D8E-B0D8-08E32E94B75F} + {54EECFA3-D65D-43C1-BC5B-00F5C0F9FF24} = {4188BE06-1B71-4D8E-B0D8-08E32E94B75F} + {FC73DE3F-8AC8-454C-BC54-6862C6718A3E} = {4188BE06-1B71-4D8E-B0D8-08E32E94B75F} + {5CC5C93A-24E8-4A99-B004-BC341CBBBC73} = {4188BE06-1B71-4D8E-B0D8-08E32E94B75F} + {A3B1A461-01D7-4EDE-9ACF-75D5D260B788} = {FD66B3DF-89FE-43E4-B2D2-8F1900E5A2DD} + {FF8DBFD2-3D49-4ED0-9FAA-2BEEC5CF33EF} = {FD66B3DF-89FE-43E4-B2D2-8F1900E5A2DD} + {28C9796E-9E28-4715-BD44-82CCF4BF8797} = {F1E506B7-81E3-4E1E-A81E-B810FE690ADE} + {A0D54C23-C7ED-45D3-92C8-7B267E499CD1} = {F1E506B7-81E3-4E1E-A81E-B810FE690ADE} + {96B016E8-CDB3-490B-A1BB-6A9008E9E30B} = {A0D54C23-C7ED-45D3-92C8-7B267E499CD1} + {18B07F62-06CC-4562-BB86-2C072758B90F} = {F1E506B7-81E3-4E1E-A81E-B810FE690ADE} + {3BCCDCB1-7E96-48C7-B1A8-436A87B6D143} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {81CA4EDA-4FFC-4A6B-946C-1A2FCD4BAD84} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {DCFC3111-BACD-443C-9F94-BE6AC330C671} = {81CA4EDA-4FFC-4A6B-946C-1A2FCD4BAD84} + {039FE92F-8E91-42A2-88D7-4A10AC517E54} = {81CA4EDA-4FFC-4A6B-946C-1A2FCD4BAD84} + {8FE729EF-10A1-4491-AA1A-F48C94D0A28F} = {81CA4EDA-4FFC-4A6B-946C-1A2FCD4BAD84} + {CDC501EA-5910-4430-A83A-433DB0B93450} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {8D43FF6E-C40B-4673-9313-ECB8AE9708F6} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {E8303092-30BC-469F-8CDD-5D287E95FA0B} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {8111F1F7-B1B8-4B1A-A89C-40242964AE59} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {698B0AA6-1DEA-46B8-BAAC-CA948E863E51} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {897A47E9-F620-4606-9420-D8CFFD5E6457} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {C63F6684-52C0-420E-91DA-359651194EFA} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {0169CEB9-B6A7-447D-921D-C79358DDCCE6} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {CA5B5F81-2FD5-49C5-A337-79CE9CF5E7FD} = {0169CEB9-B6A7-447D-921D-C79358DDCCE6} + {429D456D-7767-4E80-9738-0704C622A922} = {CA5B5F81-2FD5-49C5-A337-79CE9CF5E7FD} + {2A325BEF-247B-4569-AFD5-EB790CBA5407} = {CA5B5F81-2FD5-49C5-A337-79CE9CF5E7FD} + {9EC99E1A-1F72-4FBE-9B69-82FAE3B26E69} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {C4A95E4C-B743-4790-9BAF-5B94EC4D0965} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {A363DDF5-D3DE-4552-A1B8-F315F09D7653} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {9D5024EE-EAB1-478D-9129-8E9CA38E1FDC} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {A756425E-5D0B-451F-9765-FC5DF265E7C5} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {9823AF2B-9826-4D8A-A7AE-CEBEDA388532} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {64601BC1-480A-43CA-824F-3DBE0AFE0BED} = {9823AF2B-9826-4D8A-A7AE-CEBEDA388532} + {2C07BC72-CBFA-4756-AB5E-D86B015885F1} = {9823AF2B-9826-4D8A-A7AE-CEBEDA388532} + {42D5D6CB-BBC7-42BF-A53E-58C59DA434F0} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {AF06AF6A-4511-4420-8B91-FE5A7A98C752} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {26F28AE0-7C49-40B8-99D3-77FE2EC5A6C8} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {08B63DD9-FE95-4CF2-ACD4-F205EF19E84E} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {6E137541-E5AF-4CBF-9E75-124661B4A00F} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {5EEAEFF7-98DD-486B-9117-0B02B0605340} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {4A6F3398-F29F-453D-AA81-2C90C9963566} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {20C81068-0C6E-4BEF-A2B6-EDD9C0293883} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {2DF42E41-E3C4-4147-99F1-8AECBE254FB6} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {1003D731-4729-4BB6-AAD3-409D2974F13E} = {B47ED197-D962-4C0D-9AFA-258C6D46F343} + {36F41966-8554-444B-AF95-CB223B55EF21} = {25A467A2-7CB0-464A-BDE3-06A3A70C9157} + {FFF563B8-7DBC-436C-8CD9-98D8CDFBB854} = {25A467A2-7CB0-464A-BDE3-06A3A70C9157} + {C5A439E3-1659-4BA7-8668-4D2C3CCEA992} = {25A467A2-7CB0-464A-BDE3-06A3A70C9157} + {6A9E4CE0-E5B2-4136-B796-BFE673954ACA} = {66F40B36-B02C-4B6E-9978-592BB0040FD8} + {8638D5FD-CFEB-4FBA-A8C0-B65F31B8AE93} = {66F40B36-B02C-4B6E-9978-592BB0040FD8} + {0340F970-AE33-4ABD-9B2B-E7CF266E33CC} = {66F40B36-B02C-4B6E-9978-592BB0040FD8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {08502818-E8E1-4A91-A51C-4C8C8D4FF9CA} diff --git a/dotnetv3/EC2/Actions/Usings.cs b/dotnetv3/EC2/Actions/Usings.cs index 4ee04173b2d..a071fe162ce 100644 --- a/dotnetv3/EC2/Actions/Usings.cs +++ b/dotnetv3/EC2/Actions/Usings.cs @@ -2,11 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 global using System.Net; -global using System.Threading.Tasks; global using Amazon.EC2; global using Amazon.EC2.Model; -global using Amazon.Runtime; global using Amazon.SimpleSystemsManagement; global using Amazon.SimpleSystemsManagement.Model; -global using Microsoft.Extensions.DependencyInjection; -global using Microsoft.Extensions.Hosting; \ No newline at end of file +global using Microsoft.Extensions.DependencyInjection; \ No newline at end of file diff --git a/dotnetv3/EC2/README.md b/dotnetv3/EC2/README.md index f42140db0be..63d4b6aabcc 100644 --- a/dotnetv3/EC2/README.md +++ b/dotnetv3/EC2/README.md @@ -1,4 +1,4 @@ - + # Amazon EC2 code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/EC2/Scenarios/EC2_Basics/Usings.cs b/dotnetv3/EC2/Scenarios/EC2_Basics/Usings.cs index 4cb91b51607..e636db8e0f8 100644 --- a/dotnetv3/EC2/Scenarios/EC2_Basics/Usings.cs +++ b/dotnetv3/EC2/Scenarios/EC2_Basics/Usings.cs @@ -2,12 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 global using Amazon.EC2; -global using Amazon.EC2.Model; -global using Amazon.Runtime; global using Amazon.SimpleSystemsManagement; global using EC2Actions; -global using Microsoft.Extensions.DependencyInjection; -global using Microsoft.Extensions.Hosting; -global using Microsoft.Extensions.Logging; -global using Microsoft.Extensions.Logging.Console; -global using Microsoft.Extensions.Logging.Debug; \ No newline at end of file +global using Microsoft.Extensions.DependencyInjection; \ No newline at end of file diff --git a/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/CreateVPCforS3Tests.cs b/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/CreateVPCforS3Tests.cs index 6336a844e03..cf9ce668421 100644 --- a/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/CreateVPCforS3Tests.cs +++ b/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/CreateVPCforS3Tests.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + using Amazon.EC2; using CreateVPCforS3Example; using Microsoft.Extensions.Configuration; diff --git a/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/Usings.cs b/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/Usings.cs index 8c927eb747a..92fe41799a7 100644 --- a/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/Usings.cs +++ b/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCTests/Usings.cs @@ -1 +1,4 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; \ No newline at end of file diff --git a/dotnetv3/ECS/ECSActions/ECSWrapper.cs b/dotnetv3/ECS/ECSActions/ECSWrapper.cs index e298e95ac61..d6e89ac1168 100644 --- a/dotnetv3/ECS/ECSActions/ECSWrapper.cs +++ b/dotnetv3/ECS/ECSActions/ECSWrapper.cs @@ -135,4 +135,4 @@ public async Task> GetTaskARNsAsync(string clusterARN) } // snippet-end:[ECS.dotnetv3.ECSActions.ListTasks] } -// snippet-end:[ECS.dotnetv3.ECSActions.ECSWrapper] +// snippet-end:[ECS.dotnetv3.ECSActions.ECSWrapper] \ No newline at end of file diff --git a/dotnetv3/ECS/ECSActions/HelloECS.cs b/dotnetv3/ECS/ECSActions/HelloECS.cs index a667f5690fc..da4729e6288 100644 --- a/dotnetv3/ECS/ECSActions/HelloECS.cs +++ b/dotnetv3/ECS/ECSActions/HelloECS.cs @@ -32,4 +32,4 @@ static async System.Threading.Tasks.Task Main(string[] args) } } } -// snippet-end:[ECS.dotnetv3.ECSActions.HelloECS] +// snippet-end:[ECS.dotnetv3.ECSActions.HelloECS] \ No newline at end of file diff --git a/dotnetv3/ECS/ECSTests/ECSTests.cs b/dotnetv3/ECS/ECSTests/ECSTests.cs index 8d75b668869..b1ce5e927c0 100644 --- a/dotnetv3/ECS/ECSTests/ECSTests.cs +++ b/dotnetv3/ECS/ECSTests/ECSTests.cs @@ -1,14 +1,10 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 +using Amazon.ECS; +using ECSActions; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; -using System.Text.Json.Serialization; -using System.Text.Json; -using System.Text; -using Amazon.Runtime; -using ECSActions; -using Amazon.ECS; namespace ECSTests; diff --git a/dotnetv3/ECS/README.md b/dotnetv3/ECS/README.md index a28d03bbea1..1c3c830bc8a 100644 --- a/dotnetv3/ECS/README.md +++ b/dotnetv3/ECS/README.md @@ -1,4 +1,4 @@ - + # Amazon ECS code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/EventBridge/README.md b/dotnetv3/EventBridge/README.md index 49e4b51583c..059f5bd09be 100644 --- a/dotnetv3/EventBridge/README.md +++ b/dotnetv3/EventBridge/README.md @@ -1,4 +1,4 @@ - + # EventBridge code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/EventBridge/Tests/Usings.cs b/dotnetv3/EventBridge/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/EventBridge/Tests/Usings.cs +++ b/dotnetv3/EventBridge/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/Glacier/Actions/HelloGlacier.cs b/dotnetv3/Glacier/Actions/HelloGlacier.cs index fbcf056614e..4f26e423c24 100644 --- a/dotnetv3/Glacier/Actions/HelloGlacier.cs +++ b/dotnetv3/Glacier/Actions/HelloGlacier.cs @@ -28,4 +28,4 @@ static async Task Main() } } } -// snippet-end:[Glacier.dotnetv3.HelloGlacier] +// snippet-end:[Glacier.dotnetv3.HelloGlacier] \ No newline at end of file diff --git a/dotnetv3/Glacier/README.md b/dotnetv3/Glacier/README.md index e35f8ca7984..0d085c50038 100644 --- a/dotnetv3/Glacier/README.md +++ b/dotnetv3/Glacier/README.md @@ -1,4 +1,4 @@ - + # S3 Glacier code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Glacier/Tests/Usings.cs b/dotnetv3/Glacier/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/Glacier/Tests/Usings.cs +++ b/dotnetv3/Glacier/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/Glue/Actions/Usings.cs b/dotnetv3/Glue/Actions/Usings.cs index 20681b51464..d08c9dc42e9 100644 --- a/dotnetv3/Glue/Actions/Usings.cs +++ b/dotnetv3/Glue/Actions/Usings.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc.or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 global using Amazon.Glue; global using Amazon.Glue.Model; diff --git a/dotnetv3/Glue/README.md b/dotnetv3/Glue/README.md index ea18e0f9500..492b7ac7e94 100644 --- a/dotnetv3/Glue/README.md +++ b/dotnetv3/Glue/README.md @@ -1,4 +1,4 @@ - + # AWS Glue code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Glue/Scenarios/Glue_Basics/Usings.cs b/dotnetv3/Glue/Scenarios/Glue_Basics/Usings.cs index 7478dc82b2a..c761db3f21a 100644 --- a/dotnetv3/Glue/Scenarios/Glue_Basics/Usings.cs +++ b/dotnetv3/Glue/Scenarios/Glue_Basics/Usings.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc.or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // snippet-start:[Glue.dotnetv3.GlueBasics.GlobalUsings] global using Amazon.Glue; diff --git a/dotnetv3/Glue/Tests/GlueTests.cs b/dotnetv3/Glue/Tests/GlueTests.cs index ea961828513..47de01c572e 100644 --- a/dotnetv3/Glue/Tests/GlueTests.cs +++ b/dotnetv3/Glue/Tests/GlueTests.cs @@ -5,8 +5,6 @@ using Amazon.Glue.Model; using GlueActions; using Microsoft.Extensions.Configuration; -using Xunit.Abstractions; -using Xunit.Sdk; namespace GlueTests { diff --git a/dotnetv3/Glue/Tests/Usings.cs b/dotnetv3/Glue/Tests/Usings.cs index f8b80a7340a..158ebd88747 100644 --- a/dotnetv3/Glue/Tests/Usings.cs +++ b/dotnetv3/Glue/Tests/Usings.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc.or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/IAM/Actions/Usings.cs b/dotnetv3/IAM/Actions/Usings.cs index 8db686353b1..98c857e0329 100644 --- a/dotnetv3/IAM/Actions/Usings.cs +++ b/dotnetv3/IAM/Actions/Usings.cs @@ -4,13 +4,5 @@ // snippet-start:[IAM.dotnetv3.Actions.Usings] global using Amazon.IdentityManagement; global using Amazon.IdentityManagement.Model; -global using Amazon.Runtime.Internal; -global using Amazon.Runtime.SharedInterfaces; -global using IAMActions; -global using Microsoft.Extensions.DependencyInjection; -global using Microsoft.Extensions.Hosting; -global using Microsoft.Extensions.Logging; -global using Microsoft.Extensions.Logging.Console; -global using Microsoft.Extensions.Logging.Debug; // snippet-end:[IAM.dotnetv3.Actions.Usings] \ No newline at end of file diff --git a/dotnetv3/IAM/README.md b/dotnetv3/IAM/README.md index f7cbc5ffcdd..c2293991427 100644 --- a/dotnetv3/IAM/README.md +++ b/dotnetv3/IAM/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/IAM/Scenarios/IAMBasics/Usings.cs b/dotnetv3/IAM/Scenarios/IAMBasics/Usings.cs index 8be58b00b47..db8fc625126 100644 --- a/dotnetv3/IAM/Scenarios/IAMBasics/Usings.cs +++ b/dotnetv3/IAM/Scenarios/IAMBasics/Usings.cs @@ -2,12 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[IAM.dotnetv3.IAMBasics.Usings] -global using Amazon; global using Amazon.IdentityManagement; global using Amazon.S3; -global using Amazon.S3.Model; global using Amazon.SecurityToken; -global using Amazon.SecurityToken.Model; global using IAMActions; global using IamScenariosCommon; global using Microsoft.Extensions.DependencyInjection; diff --git a/dotnetv3/IAM/Scenarios/IAMGroups/IAMGroups.cs b/dotnetv3/IAM/Scenarios/IAMGroups/IAMGroups.cs index 905271b4df2..55f216ff618 100644 --- a/dotnetv3/IAM/Scenarios/IAMGroups/IAMGroups.cs +++ b/dotnetv3/IAM/Scenarios/IAMGroups/IAMGroups.cs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[IAM.dotnetv3.IAMGroups] -using Amazon.Runtime; using Microsoft.Extensions.Configuration; namespace IAMGroups; diff --git a/dotnetv3/IAM/Scenarios/IAMGroups/Usings.cs b/dotnetv3/IAM/Scenarios/IAMGroups/Usings.cs index 4775ecf0a1c..8a472e0217b 100644 --- a/dotnetv3/IAM/Scenarios/IAMGroups/Usings.cs +++ b/dotnetv3/IAM/Scenarios/IAMGroups/Usings.cs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[IAM.dotnetv3.IAMGroups.Usings] -global using Amazon; global using Amazon.IdentityManagement; global using Amazon.S3; global using Amazon.SecurityToken; diff --git a/dotnetv3/IAM/Scenarios/IamScenariosCommon/Usings.cs b/dotnetv3/IAM/Scenarios/IamScenariosCommon/Usings.cs index 67efb7e30d1..1d334c891ad 100644 --- a/dotnetv3/IAM/Scenarios/IamScenariosCommon/Usings.cs +++ b/dotnetv3/IAM/Scenarios/IamScenariosCommon/Usings.cs @@ -2,19 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[IAM.dotnetv3.IamScenariosCommon.Usings] -global using Amazon; -global using Amazon.IdentityManagement; global using Amazon.S3; global using Amazon.S3.Model; -global using Amazon.S3.Util; global using Amazon.SecurityToken; global using Amazon.SecurityToken.Model; -global using IAMActions; -global using Microsoft.Extensions.DependencyInjection; -global using Microsoft.Extensions.FileSystemGlobbing.Internal; -global using Microsoft.Extensions.Hosting; -global using Microsoft.Extensions.Logging; -global using Microsoft.Extensions.Logging.Console; -global using Microsoft.Extensions.Logging.Debug; // snippet-end:[IAM.dotnetv3.IamScenariosCommon.Usings] \ No newline at end of file diff --git a/dotnetv3/IAM/Tests/IamWrapperTests.cs b/dotnetv3/IAM/Tests/IamWrapperTests.cs index 09481c3f6b5..bcd9d473113 100644 --- a/dotnetv3/IAM/Tests/IamWrapperTests.cs +++ b/dotnetv3/IAM/Tests/IamWrapperTests.cs @@ -3,9 +3,6 @@ using Amazon.IdentityManagement; using Amazon.IdentityManagement.Model; -using IAMActions; -using Xunit; -using Xunit.Sdk; namespace IAMActions.Tests { diff --git a/dotnetv3/IAM/Tests/S3WrapperTests.cs b/dotnetv3/IAM/Tests/S3WrapperTests.cs index 387fe9023bc..13e8873d1a6 100644 --- a/dotnetv3/IAM/Tests/S3WrapperTests.cs +++ b/dotnetv3/IAM/Tests/S3WrapperTests.cs @@ -2,11 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 using Amazon.S3; -using Amazon.S3.Model; using Amazon.S3.Util; using Amazon.SecurityToken; -using IamScenariosCommon; -using Xunit; namespace IAMTests { diff --git a/dotnetv3/IAM/Tests/Usings.cs b/dotnetv3/IAM/Tests/Usings.cs index ff49a12ab37..12e7799c14f 100644 --- a/dotnetv3/IAM/Tests/Usings.cs +++ b/dotnetv3/IAM/Tests/Usings.cs @@ -1,4 +1,6 @@ -global using IAMActions; +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using IamScenariosCommon; global using Microsoft.Extensions.Configuration; global using Xunit; diff --git a/dotnetv3/KMS/README.md b/dotnetv3/KMS/README.md index cddb8672b32..20ab3e22c43 100644 --- a/dotnetv3/KMS/README.md +++ b/dotnetv3/KMS/README.md @@ -1,4 +1,4 @@ - + # AWS KMS code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Keyspaces/README.md b/dotnetv3/Keyspaces/README.md index 97e642374bd..c6b15358ca6 100644 --- a/dotnetv3/Keyspaces/README.md +++ b/dotnetv3/Keyspaces/README.md @@ -1,4 +1,4 @@ - + # Amazon Keyspaces code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs b/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs index 23c89e5b09d..485c6c7f798 100644 --- a/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs +++ b/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[Keyspaces.dotnetv3.CassandraWrapper] -using System.CodeDom; using System.Net; using Cassandra; diff --git a/dotnetv3/Keyspaces/Scenarios/KeyspacesBasics.cs b/dotnetv3/Keyspaces/Scenarios/KeyspacesBasics.cs index b8634d00039..ab31588bd88 100644 --- a/dotnetv3/Keyspaces/Scenarios/KeyspacesBasics.cs +++ b/dotnetv3/Keyspaces/Scenarios/KeyspacesBasics.cs @@ -63,7 +63,7 @@ static async Task Main(string[] args) Console.Write(". "); } while (getKeyspaceArn != keyspaceArn); } - catch (ResourceNotFoundException ex) + catch (ResourceNotFoundException) { Console.WriteLine("Waiting for keyspace to be created."); } @@ -108,7 +108,7 @@ static async Task Main(string[] args) resp = await keyspacesWrapper.GetTable(keyspaceName, tableName); Console.Write("."); } - catch (ResourceNotFoundException ex) + catch (ResourceNotFoundException) { Console.Write("."); } @@ -239,7 +239,7 @@ static async Task Main(string[] args) wasRestored = (resp.Status == TableStatus.ACTIVE); } while (!wasRestored); } - catch (ResourceNotFoundException ex) + catch (ResourceNotFoundException) { // If the restored table raised an error, it isn't // ready yet. diff --git a/dotnetv3/Keyspaces/Scenarios/Usings.cs b/dotnetv3/Keyspaces/Scenarios/Usings.cs index 2cb5fdce6a2..5d3d55e7b8e 100644 --- a/dotnetv3/Keyspaces/Scenarios/Usings.cs +++ b/dotnetv3/Keyspaces/Scenarios/Usings.cs @@ -2,10 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[Keyspaces.dotnetv3.KeyspacesBasicsGlobalUsings] -global using System.Net.Security; -global using System.Runtime.ConstrainedExecution; global using System.Security.Cryptography.X509Certificates; -global using System.Text; global using Amazon.Keyspaces; global using Amazon.Keyspaces.Model; global using KeyspacesActions; diff --git a/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs b/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs index b0eb509e42c..5e271e29ace 100644 --- a/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs +++ b/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs @@ -129,6 +129,7 @@ public async Task CreateTableTest() /// An async Task. [Fact()] [Order(4)] + [Trait("Category", "Integration")] public async Task GetTableTest() { var response = await _wrapper.GetTable(_keyspaceName, _tableName); @@ -178,7 +179,7 @@ public async Task RestoreTableTest() var resp = await _wrapper.GetTable(_keyspaceName, _tableName); } while (!wasRestored); } - catch (ResourceNotFoundException ex) + catch (ResourceNotFoundException) { wasRestored = true; } @@ -219,7 +220,7 @@ public async Task DeleteTableTest() var resp = await _wrapper.GetTable(_keyspaceName, _tableName); } while (!wasDeleted); } - catch (ResourceNotFoundException ex) + catch (ResourceNotFoundException) { wasDeleted = true; } diff --git a/dotnetv3/Kinesis/README.md b/dotnetv3/Kinesis/README.md index 9e698f9e076..4d633f51169 100644 --- a/dotnetv3/Kinesis/README.md +++ b/dotnetv3/Kinesis/README.md @@ -1,4 +1,4 @@ - + # Kinesis code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Lambda/LambdaCalculator/LambdaCalculator/Function.cs b/dotnetv3/Lambda/LambdaCalculator/LambdaCalculator/Function.cs index d8caca1f4dc..12159eb6cab 100644 --- a/dotnetv3/Lambda/LambdaCalculator/LambdaCalculator/Function.cs +++ b/dotnetv3/Lambda/LambdaCalculator/LambdaCalculator/Function.cs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[lambda.dotnetv3.handler.arithmetic] -using System.Diagnostics; using Amazon.Lambda.Core; // Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. diff --git a/dotnetv3/Lambda/README.md b/dotnetv3/Lambda/README.md index 25ee5f55a5a..e5bf2a2b672 100644 --- a/dotnetv3/Lambda/README.md +++ b/dotnetv3/Lambda/README.md @@ -1,4 +1,4 @@ - + # Lambda code examples for the SDK for .NET ## Overview @@ -58,7 +58,8 @@ functions within the same service. Sample applications that work across multiple AWS services. -* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Create a serverless application to manage photos](../cross-service/PhotoAssetManager) +* [Create an application to analyze customer feedback](../cross-service/FeedbackSentimentAnalyzer) ## Run the examples diff --git a/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs b/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs index b3099acf67d..2061229f640 100644 --- a/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs +++ b/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[Lambda.dotnetv3.LambdaBasics] -using Amazon.IdentityManagement; using Amazon.Lambda.Model; using Microsoft.Extensions.Configuration; diff --git a/dotnetv3/Lambda/Tests/LambdaTests.cs b/dotnetv3/Lambda/Tests/LambdaTests.cs index 532657b3ec0..39b1433433e 100644 --- a/dotnetv3/Lambda/Tests/LambdaTests.cs +++ b/dotnetv3/Lambda/Tests/LambdaTests.cs @@ -1,13 +1,11 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using Amazon.IdentityManagement; using Amazon.IdentityManagement; using Amazon.IdentityManagement.Model; using Amazon.Lambda; using Amazon.Lambda.Model; using Microsoft.Extensions.Configuration; -using Xunit; namespace LambdaTests { diff --git a/dotnetv3/Lambda/Tests/Usings.cs b/dotnetv3/Lambda/Tests/Usings.cs index 3dd480e561f..219ed694921 100644 --- a/dotnetv3/Lambda/Tests/Usings.cs +++ b/dotnetv3/Lambda/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using LambdaActions; global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/MediaConvert/Actions/MediaConvertWrapper.cs b/dotnetv3/MediaConvert/Actions/MediaConvertWrapper.cs index 6512c91b6ac..5ad59b4871e 100644 --- a/dotnetv3/MediaConvert/Actions/MediaConvertWrapper.cs +++ b/dotnetv3/MediaConvert/Actions/MediaConvertWrapper.cs @@ -1,4 +1,7 @@ -using Amazon.MediaConvert; +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +using Amazon.MediaConvert; using Amazon.MediaConvert.Model; namespace MediaConvertActions; diff --git a/dotnetv3/MediaConvert/README.md b/dotnetv3/MediaConvert/README.md index 207117c8870..9816279fd3a 100644 --- a/dotnetv3/MediaConvert/README.md +++ b/dotnetv3/MediaConvert/README.md @@ -1,4 +1,4 @@ - + # MediaConvert code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/MediaConvert/Tests/MediaConvertTests.cs b/dotnetv3/MediaConvert/Tests/MediaConvertTests.cs index 38c0c6c03fa..f00a08c0fce 100644 --- a/dotnetv3/MediaConvert/Tests/MediaConvertTests.cs +++ b/dotnetv3/MediaConvert/Tests/MediaConvertTests.cs @@ -1,7 +1,9 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + using Amazon.MediaConvert; using MediaConvertActions; using Microsoft.Extensions.Configuration; -using Xunit.Extensions.Ordering; namespace MediaConvertTests; diff --git a/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicy.cs b/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicy.cs index a366d39f73c..7c6d1ed2698 100644 --- a/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicy.cs +++ b/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicy.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace AttachPolicyExample { diff --git a/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs b/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs index f680c4bb256..8bb2a0b293a 100644 --- a/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs +++ b/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace CreateAccountExample { @@ -13,13 +13,13 @@ namespace CreateAccountExample /// Creates a new AWS Organizations account. The example was created /// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. /// - class CreateAccount + public class CreateAccount { /// /// Initializes an Organizations client object and uses it to create /// the new account with the name specified in accountName. /// - static async Task Main() + public static async Task Main() { IAmazonOrganizations client = new AmazonOrganizationsClient(); var accountName = "ExampleAccount"; diff --git a/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs b/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs index ecee18e09ec..935c1b21b2b 100644 --- a/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs +++ b/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace CreateOrganizationExample { diff --git a/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs b/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs index c3926c7045b..b70b94fb9e2 100644 --- a/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs +++ b/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace CreateOrganizationalUnitExample { diff --git a/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs b/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs index d0b5ad7a14a..3ccdbf9ce17 100644 --- a/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs +++ b/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace CreatePolicyExample { @@ -13,14 +13,14 @@ namespace CreatePolicyExample /// Creates a new AWS Organizations Policy. The example was created /// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. /// - class CreatePolicy + public class CreatePolicy { /// /// Initializes the AWS Organizations client object, uses it to /// create a new Organizations Policy, and then displays information /// about the newly created Policy. /// - static async Task Main() + public static async Task Main() { IAmazonOrganizations client = new AmazonOrganizationsClient(); var policyContent = "{" + diff --git a/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs b/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs index 3f44f9648a3..e36b3af5a70 100644 --- a/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs +++ b/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace DeleteOrganizationExample { diff --git a/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs b/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs index 6b925961a07..68d5ac6d12b 100644 --- a/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs +++ b/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace DeleteOrganizationalUnitExample { diff --git a/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs b/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs index 8814929239c..53ca3f83b53 100644 --- a/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs +++ b/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace DeletePolicyExample { diff --git a/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs b/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs index ac539f5eed8..b80d96b5fda 100644 --- a/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs +++ b/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace DetachPolicyExample { diff --git a/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs b/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs index 28efc87b530..fda82f0abb0 100644 --- a/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs +++ b/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace ListAccountsExample { @@ -14,13 +14,13 @@ namespace ListAccountsExample /// with the default account. The example was created using the AWS SDK for /// .NET and .NET Core 5.0. /// - class ListAccounts + public class ListAccounts { /// /// Creates the Organizations client and then calls its /// ListAccountsAsync method. /// - static async Task Main() + public static async Task Main() { // Create the client object using the default account. IAmazonOrganizations client = new AmazonOrganizationsClient(); diff --git a/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs b/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs index c02b12816c0..63bed2e7816 100644 --- a/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs +++ b/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace ListOrganizationalUnitsForParentExample { diff --git a/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs b/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs index b888b6851f9..b6935c74686 100644 --- a/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs +++ b/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace ListPoliciesExample { diff --git a/dotnetv3/Organizations/README.md b/dotnetv3/Organizations/README.md index 3b69e8d48be..dd3a5abd093 100644 --- a/dotnetv3/Organizations/README.md +++ b/dotnetv3/Organizations/README.md @@ -1,4 +1,4 @@ - + # Organizations code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Polly/DescribeVoicesExample/Properties/launchSettings.json b/dotnetv3/Polly/DescribeVoicesExample/Properties/launchSettings.json new file mode 100644 index 00000000000..33504c948ad --- /dev/null +++ b/dotnetv3/Polly/DescribeVoicesExample/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "WSL": { + "commandName": "WSL2", + "distributionName": "" + } + } +} \ No newline at end of file diff --git a/dotnetv3/Polly/README.md b/dotnetv3/Polly/README.md index 4cfe84c6f17..180b7629cd0 100644 --- a/dotnetv3/Polly/README.md +++ b/dotnetv3/Polly/README.md @@ -1,4 +1,4 @@ - + # Amazon Polly code examples for the SDK for .NET ## Overview @@ -41,6 +41,12 @@ Code excerpts that show you how to call individual service functions. * [Store a pronunciation lexicon](PutLexiconExample/PutLexicon.cs#L10) (`PutLexicon`) * [Synthesize speech from text](SynthesizeSpeechExample/SynthesizeSpeech.cs#L11) (`SynthesizeSpeech`) +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create an application to analyze customer feedback](../cross-service/FeedbackSentimentAnalyzer) + ## Run the examples ### Instructions diff --git a/dotnetv3/RDS/Actions/RDSWrapper.ParameterGroups.cs b/dotnetv3/RDS/Actions/RDSWrapper.ParameterGroups.cs index 27543295dca..20736881b60 100644 --- a/dotnetv3/RDS/Actions/RDSWrapper.ParameterGroups.cs +++ b/dotnetv3/RDS/Actions/RDSWrapper.ParameterGroups.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Net; using System.Threading.Tasks; -using Amazon.RDS; using Amazon.RDS.Model; namespace RDSActions; diff --git a/dotnetv3/RDS/README.md b/dotnetv3/RDS/README.md index d169158feda..c96c145e96b 100644 --- a/dotnetv3/RDS/README.md +++ b/dotnetv3/RDS/README.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for .NET ## Overview @@ -40,17 +40,17 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv3 Code excerpts that show you how to call individual service functions. * [Create a DB instance](Actions/RDSWrapper.Instances.cs#L100) (`CreateDBInstance`) -* [Create a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L38) (`CreateDBParameterGroup`) +* [Create a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L37) (`CreateDBParameterGroup`) * [Create a snapshot of a DB instance](Actions/RDSWrapper.Snapshots.cs#L17) (`CreateDBSnapshot`) * [Delete a DB instance](Actions/RDSWrapper.Instances.cs#L139) (`DeleteDBInstance`) -* [Delete a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L86) (`DeleteDBParameterGroup`) +* [Delete a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L85) (`DeleteDBParameterGroup`) * [Describe DB instances](Actions/RDSWrapper.Instances.cs#L75) (`DescribeDBInstances`) -* [Describe DB parameter groups](Actions/RDSWrapper.ParameterGroups.cs#L19) (`DescribeDBParameterGroups`) +* [Describe DB parameter groups](Actions/RDSWrapper.ParameterGroups.cs#L18) (`DescribeDBParameterGroups`) * [Describe database engine versions](Actions/RDSWrapper.Instances.cs#L24) (`DescribeDBEngineVersions`) * [Describe options for DB instances](Actions/RDSWrapper.Instances.cs#L46) (`DescribeOrderableDBInstanceOptions`) -* [Describe parameters in a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L106) (`DescribeDBParameters`) +* [Describe parameters in a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L105) (`DescribeDBParameters`) * [Describe snapshots of DB instances](Actions/RDSWrapper.Snapshots.cs#L39) (`DescribeDBSnapshots`) -* [Update parameters in a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L63) (`ModifyDBParameterGroup`) +* [Update parameters in a DB parameter group](Actions/RDSWrapper.ParameterGroups.cs#L62) (`ModifyDBParameterGroup`) ### Scenarios diff --git a/dotnetv3/RDS/Tests/Usings.cs b/dotnetv3/RDS/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/RDS/Tests/Usings.cs +++ b/dotnetv3/RDS/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs b/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs index 74b165848b8..b86098619e3 100644 --- a/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs +++ b/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs @@ -1,4 +1,7 @@ -namespace DetectFacesExample +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +namespace DetectFacesExample { // snippet-start:[Rekognition.dotnetv3.DetectFacesExample] using System; diff --git a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExample/GlobalSuppressions.cs b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExample/GlobalSuppressions.cs deleted file mode 100644 index af0f57f7100..00000000000 --- a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExample/GlobalSuppressions.cs +++ /dev/null @@ -1,11 +0,0 @@ -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:File should have header", Justification = "", Scope = "namespace", Target = "~N:FaceRekognitionExample")] -[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1615:Element return value should be documented", Justification = "", Scope = "member", Target = "~M:FaceRekognitionExample.FaceRekognition.IdentifyCelebrityFaces(Amazon.Rekognition.AmazonRekognitionClient,System.String)~System.Threading.Tasks.Task")] -[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1615:Element return value should be documented", Justification = "", Scope = "member", Target = "~M:FaceRekognitionExample.FaceRekognition.IdentifyFaces(Amazon.Rekognition.AmazonRekognitionClient,System.String)~System.Threading.Tasks.Task")] -[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "", Scope = "member", Target = "~M:FaceRekognitionExample.FaceRekognition.Main(System.String[])~System.Threading.Tasks.Task")] \ No newline at end of file diff --git a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionTests.cs b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionTests.cs index b0a77aa3fc4..30f99cee58f 100644 --- a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionTests.cs +++ b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionTests.cs @@ -16,6 +16,7 @@ public class FaceRekognitionTests private const string _filename = "test.png"; [Fact] + [Trait("Category", "Unit")] public async Task IdentifyFacesTests() { var mockClient = new Mock(); @@ -51,6 +52,7 @@ public async Task IdentifyFacesTests() } [Fact] + [Trait("Category", "Unit")] public async Task IdentifyCelebretiesTest() { var mockClient = new Mock(); diff --git a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/GlobalSuppressions.cs b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/GlobalSuppressions.cs deleted file mode 100644 index 1c04ca501d3..00000000000 --- a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/GlobalSuppressions.cs +++ /dev/null @@ -1,9 +0,0 @@ -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:File should have header", Justification = "", Scope = "namespace", Target = "~N:FaceRekognitionExampleTests")] -[assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1309:Field names should not begin with underscore", Justification = "", Scope = "member", Target = "~F:FaceRekognitionExampleTests.FaceRekognitionTests._filename")] \ No newline at end of file diff --git a/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/Properties/launchSettings.json b/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/Properties/launchSettings.json new file mode 100644 index 00000000000..33504c948ad --- /dev/null +++ b/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "WSL": { + "commandName": "WSL2", + "distributionName": "" + } + } +} \ No newline at end of file diff --git a/dotnetv3/Rekognition/README.md b/dotnetv3/Rekognition/README.md index d7f8c4e74c4..17868fd0022 100644 --- a/dotnetv3/Rekognition/README.md +++ b/dotnetv3/Rekognition/README.md @@ -1,4 +1,4 @@ - + # Amazon Rekognition code examples for the SDK for .NET ## Overview @@ -39,7 +39,7 @@ Code excerpts that show you how to call individual service functions. * [Delete a collection](DeleteCollectionExample/DeleteCollection.cs#L6) (`DeleteCollection`) * [Delete faces from a collection](DeleteFacesExample/DeleteFaces.cs#L6) (`DeleteFaces`) * [Describe a collection](DescribeCollectionExample/DescribeCollection.cs#L6) (`DescribeCollection`) -* [Detect faces in an image](DetectFacesExample/DetectFaces.cs#L3) (`DetectFaces`) +* [Detect faces in an image](DetectFacesExample/DetectFaces.cs#L6) (`DetectFaces`) * [Detect labels in an image](DetectLabelsExample/DetectLabels.cs#L6) (`DetectLabels`) * [Detect moderation labels in an image](DetectModerationLabelsExample/DetectModerationLabels.cs#L6) (`DetectModerationLabels`) * [Detect text in an image](DetectTextExample/DetectText.cs#L6) (`DetectText`) @@ -55,7 +55,7 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. -* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Create a serverless application to manage photos](../cross-service/PhotoAssetManager) * [Detect objects in images](../cross-service/PhotoAnalyzerApp) ## Run the examples diff --git a/dotnetv3/Route53/Tests/Usings.cs b/dotnetv3/Route53/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/Route53/Tests/Usings.cs +++ b/dotnetv3/Route53/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/S3/AbortMPUExample/AbortMPU.cs b/dotnetv3/S3/AbortMPUExample/AbortMPU.cs index 5c4a99d0862..adcad84aa35 100644 --- a/dotnetv3/S3/AbortMPUExample/AbortMPU.cs +++ b/dotnetv3/S3/AbortMPUExample/AbortMPU.cs @@ -55,4 +55,4 @@ await transferUtility.AbortMultipartUploadsAsync( } // snippet-end:[S3.dotnetv3.AbortMPUExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/BucketACLExample/BucketACL.cs b/dotnetv3/S3/BucketACLExample/BucketACL.cs index de96471d609..06c5f406272 100644 --- a/dotnetv3/S3/BucketACLExample/BucketACL.cs +++ b/dotnetv3/S3/BucketACLExample/BucketACL.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// This example shows how to work with access control lists (ACLs) in an @@ -113,4 +113,4 @@ public static void DisplayACL(S3AccessControlList acl) } // snippet-end:[S3.dotnetv3.BucketACLExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/CopyObjectExample/CopyObject.cs b/dotnetv3/S3/CopyObjectExample/CopyObject.cs index 1ac132e69ed..c74d126b113 100644 --- a/dotnetv3/S3/CopyObjectExample/CopyObject.cs +++ b/dotnetv3/S3/CopyObjectExample/CopyObject.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// This example copies an object from one Amazon Simple Storage Service @@ -11,7 +11,6 @@ namespace CopyObject // snippet-start:[S3.dotnet35.CopyObject] using System; using System.Threading.Tasks; - using Amazon; using Amazon.S3; using Amazon.S3.Model; @@ -87,4 +86,4 @@ public static async Task CopyingObjectAsync( } // snippet-end:[S3.dotnet35.CopyObject] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs b/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs index 6c5bb2b81a8..5123a80ce5c 100644 --- a/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs +++ b/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs @@ -82,4 +82,4 @@ public static async Task EnableNotificationAsync( } // snippet-end:[S3.dotnetv3.EnableNotificationsExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/LifecycleExample/Lifecycle.cs b/dotnetv3/S3/LifecycleExample/Lifecycle.cs index bba5f8e3a1c..15d6f9926ad 100644 --- a/dotnetv3/S3/LifecycleExample/Lifecycle.cs +++ b/dotnetv3/S3/LifecycleExample/Lifecycle.cs @@ -213,4 +213,4 @@ public static async Task RemoveLifecycleConfigAsync(IAmazonS3 client, string buc } // snippet-end:[S3.dotnetv3.LifecycleExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/ListBucketsExample/ListBuckets.cs b/dotnetv3/S3/ListBucketsExample/ListBuckets.cs index 773df907324..3de3693a5cf 100644 --- a/dotnetv3/S3/ListBucketsExample/ListBuckets.cs +++ b/dotnetv3/S3/ListBucketsExample/ListBuckets.cs @@ -16,21 +16,10 @@ namespace ListBucketsExample using Amazon.S3; using Amazon.S3.Model; - class ListBuckets + public class ListBuckets { private static IAmazonS3 _s3Client; - static async Task Main() - { - // The client uses the AWS Region of the default user. - // If the Region where the buckets were created is different, - // pass the Region to the client constructor. For example: - // _s3Client = new AmazonS3Client(RegionEndpoint.USEast1); - _s3Client = new AmazonS3Client(); - var response = await GetBuckets(_s3Client); - DisplayBucketList(response.Buckets); - } - /// /// Get a list of the buckets owned by the default user. /// @@ -52,6 +41,18 @@ public static void DisplayBucketList(List bucketList) bucketList .ForEach(b => Console.WriteLine($"Bucket name: {b.BucketName}, created on: {b.CreationDate}")); } + + public static async Task Main() + { + // The client uses the AWS Region of the default user. + // If the Region where the buckets were created is different, + // pass the Region to the client constructor. For example: + // _s3Client = new AmazonS3Client(RegionEndpoint.USEast1); + _s3Client = new AmazonS3Client(); + var response = await GetBuckets(_s3Client); + DisplayBucketList(response.Buckets); + } } } -// snippet-end:[S3.dotnetv3.ListBuckets] + +// snippet-end:[S3.dotnetv3.ListBuckets] \ No newline at end of file diff --git a/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs b/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs index 2703d5f5908..72578904de2 100644 --- a/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs +++ b/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace ListObjectsPaginatorExample { @@ -53,4 +53,4 @@ public static async Task ListingObjectsAsync(IAmazonS3 client, string bucketName } // snippet-end:[S3.dotnetv3.ListObjectsPaginatorExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs b/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs index 759726547ed..29ca7606674 100644 --- a/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs +++ b/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// This example shows how to perform a multi-part copy from one Amazon @@ -118,4 +118,4 @@ public static async Task MPUCopyObjectAsync(AmazonS3Client client) } // snippet-end:[S3.dotnetv3.MPUapiCopyObjectExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/ManageACLsExample/ManageACLs.cs b/dotnetv3/S3/ManageACLsExample/ManageACLs.cs index 40be694f24d..d96f4f7292b 100644 --- a/dotnetv3/S3/ManageACLsExample/ManageACLs.cs +++ b/dotnetv3/S3/ManageACLsExample/ManageACLs.cs @@ -13,7 +13,6 @@ namespace ManageACLsExample using System; using System.Collections.Generic; using System.Threading.Tasks; - using Amazon; using Amazon.S3; using Amazon.S3.Model; @@ -195,4 +194,4 @@ public static async Task AddACLToExistingObjectAsync(IAmazonS3 client, string bu } // snippet-end:[S3.dotnetv3.ManageACLsExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/ObjectTagExample/ObjectTag.cs b/dotnetv3/S3/ObjectTagExample/ObjectTag.cs index 415abdf8613..adb63147576 100644 --- a/dotnetv3/S3/ObjectTagExample/ObjectTag.cs +++ b/dotnetv3/S3/ObjectTagExample/ObjectTag.cs @@ -63,7 +63,7 @@ public static async Task PutObjectsWithTagsAsync(IAmazonS3 client, string bucket PutObjectResponse response = await client.PutObjectAsync(putRequest); // Now retrieve the new object's tags. - GetObjectTaggingRequest getTagsRequest = new() + GetObjectTaggingRequest getTagsRequest = new GetObjectTaggingRequest() { BucketName = bucketName, Key = keyName, @@ -75,7 +75,7 @@ public static async Task PutObjectsWithTagsAsync(IAmazonS3 client, string bucket objectTags.Tagging .ForEach(t => Console.WriteLine($"Key: {t.Key}, Value: {t.Value}")); - Tagging newTagSet = new() + Tagging newTagSet = new Tagging() { TagSet = new List { @@ -84,7 +84,7 @@ public static async Task PutObjectsWithTagsAsync(IAmazonS3 client, string bucket }, }; - PutObjectTaggingRequest putObjTagsRequest = new () + PutObjectTaggingRequest putObjTagsRequest = new PutObjectTaggingRequest() { BucketName = bucketName, Key = keyName, @@ -94,7 +94,7 @@ public static async Task PutObjectsWithTagsAsync(IAmazonS3 client, string bucket PutObjectTaggingResponse response2 = await client.PutObjectTaggingAsync(putObjTagsRequest); // Retrieve the tags again and show the values. - GetObjectTaggingRequest getTagsRequest2 = new() + GetObjectTaggingRequest getTagsRequest2 = new GetObjectTaggingRequest() { BucketName = bucketName, Key = keyName, @@ -113,4 +113,4 @@ public static async Task PutObjectsWithTagsAsync(IAmazonS3 client, string bucket } // snippet-end:[S3.dotnetv3.ObjectTagExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/README.md b/dotnetv3/S3/README.md index 89ca5709282..1a851ca3985 100644 --- a/dotnetv3/S3/README.md +++ b/dotnetv3/S3/README.md @@ -1,4 +1,4 @@ - + # Amazon S3 code examples for the SDK for .NET ## Overview @@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions. * [Get an object from a bucket](S3_Basics/S3Bucket.cs#L85) (`GetObject`) * [Get the ACL of a bucket](BucketACLExample/BucketACL.cs#L76) (`GetBucketAcl`) * [Get the lifecycle configuration of a bucket](LifecycleExample/Lifecycle.cs#L170) (`GetBucketLifecycleConfiguration`) -* [Get the website configuration for a bucket](WebsiteConfigExample/WebsiteConfig.cs#L72) (`GetBucketWebsite`) +* [Get the website configuration for a bucket](WebsiteConfigExample/WebsiteConfig.cs#L73) (`GetBucketWebsite`) * [List buckets](ListBucketsExample/ListBuckets.cs#L4) (`ListBuckets`) * [List object versions in a bucket](versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs#L11) (`ListObjectVersions`) * [List objects in a bucket](S3_Basics/S3Bucket.cs#L171) (`ListObjectsV2`) @@ -77,7 +77,7 @@ functions within the same service. Sample applications that work across multiple AWS services. -* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Create a serverless application to manage photos](../cross-service/PhotoAssetManager) * [Detect objects in images](../cross-service/PhotoAnalyzerApp) ## Run the examples diff --git a/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs b/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs index ce012dc98d5..d4a4c53af5e 100644 --- a/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs +++ b/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs @@ -70,7 +70,7 @@ public static async Task RestoreObjectAsync(IAmazonS3 client, string bucketName, /// archived object you want to restore. public static async Task CheckRestorationStatusAsync(IAmazonS3 client, string bucketName, string objectKey) { - GetObjectMetadataRequest metadataRequest = new() + GetObjectMetadataRequest metadataRequest = new GetObjectMetadataRequest() { BucketName = bucketName, Key = objectKey, @@ -84,4 +84,4 @@ public static async Task CheckRestorationStatusAsync(IAmazonS3 client, string bu } // snippet-end:[S3.dotnetv3.RestoreArchivedObjectExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/S3_Basics/GlobalUsings.cs b/dotnetv3/S3/S3_Basics/GlobalUsings.cs index 27ae33eab13..beb68ecbc7b 100644 --- a/dotnetv3/S3/S3_Basics/GlobalUsings.cs +++ b/dotnetv3/S3/S3_Basics/GlobalUsings.cs @@ -5,4 +5,4 @@ global using Amazon.S3; global using Amazon.S3.Model; -// snippet-end:[S3.dotnetv3.S3_BasicsScenario.GlobalUsings] +// snippet-end:[S3.dotnetv3.S3_BasicsScenario.GlobalUsings] \ No newline at end of file diff --git a/dotnetv3/S3/S3_Basics/S3Bucket.cs b/dotnetv3/S3/S3_Basics/S3Bucket.cs index a84c55ae888..29e357a5d7c 100644 --- a/dotnetv3/S3/S3_Basics/S3Bucket.cs +++ b/dotnetv3/S3/S3_Basics/S3Bucket.cs @@ -285,4 +285,4 @@ public static async Task DeleteBucketAsync(IAmazonS3 client, string bucket // snippet-end:[S3.dotnetv3.S3_Basics-DeleteBucket] } -} +} \ No newline at end of file diff --git a/dotnetv3/S3/S3_Basics/S3_Basics.cs b/dotnetv3/S3/S3_Basics/S3_Basics.cs index d41b932528e..fafab964c6d 100644 --- a/dotnetv3/S3/S3_Basics/S3_Basics.cs +++ b/dotnetv3/S3/S3_Basics/S3_Basics.cs @@ -152,4 +152,4 @@ public static async Task Main() } // snippet-end:[S3.dotnetv3.S3_BasicsScenario] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/S3_BasicsScenarioTests/GlobalUsings.cs b/dotnetv3/S3/S3_BasicsScenarioTests/GlobalUsings.cs index 6ed315738d8..5f90c3bb123 100644 --- a/dotnetv3/S3/S3_BasicsScenarioTests/GlobalUsings.cs +++ b/dotnetv3/S3/S3_BasicsScenarioTests/GlobalUsings.cs @@ -3,7 +3,7 @@ // Global using directives -global using Xunit; global using Amazon.S3; global using Amazon.S3.Model; global using Moq; +global using Xunit; \ No newline at end of file diff --git a/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs b/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs index 42b3782ec8b..9ebe14e9910 100644 --- a/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs +++ b/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs @@ -36,8 +36,11 @@ public static async Task Main() var base64Key = CreateEncryptionKey(); await CreateSampleObjUsingClientEncryptionKeyAsync( - client, existingBucketName, - sourceKeyName, filePath, base64Key); + client, + existingBucketName, + sourceKeyName, + filePath, + base64Key); } /// @@ -116,7 +119,6 @@ public static async Task CreateSampleObjUsingClientEncryptionKeyAsync( BucketName = existingBucketName, Key = sourceKeyName, UploadId = initResponse.UploadId, - }; completeRequest.AddPartETags(uploadResponses); @@ -141,4 +143,4 @@ public static async Task CreateSampleObjUsingClientEncryptionKeyAsync( } // snippet-end:[S3.dotnetv3.SSECLowLevelMPUcopyObjectExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs b/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs index 446f3065754..12a8054a270 100644 --- a/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs +++ b/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs @@ -213,4 +213,4 @@ public static async Task CopyObjectAsync( } // snippet-end:[S3.dotnetv3.SSEClientEncryptionExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs b/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs index f15c4780ffe..ceb8cd06087 100644 --- a/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs +++ b/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs @@ -16,9 +16,9 @@ namespace ServerAccessLoggingExample using System; using System.IO; using System.Threading.Tasks; - using Microsoft.Extensions.Configuration; using Amazon.S3; using Amazon.S3.Model; + using Microsoft.Extensions.Configuration; public class ServerAccessLogging { @@ -42,11 +42,18 @@ public static async Task Main() try { // Update bucket policy for target bucket to allow delivery of logs to it. - await SetBucketPolicyToAllowLogDelivery(client, bucketName, logBucketName, - logObjectKeyPrefix, accountId); + await SetBucketPolicyToAllowLogDelivery( + client, + bucketName, + logBucketName, + logObjectKeyPrefix, + accountId); // Enable logging on the source bucket. - await EnableLoggingAsync(client, bucketName, logBucketName, + await EnableLoggingAsync( + client, + bucketName, + logBucketName, logObjectKeyPrefix); } catch (AmazonS3Exception e) @@ -151,4 +158,4 @@ public static void LoadConfig() } // snippet-end:[S3.dotnetv3.ServerAccessLoggingExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs b/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs index 6c5f8d889e0..90bd6828076 100644 --- a/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs +++ b/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs @@ -73,4 +73,4 @@ public static async Task WritingAnObjectAsync(IAmazonS3 client, string bucketNam } // snippet-end:[S3.dotnetv3.ServerSideEncryptionExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs b/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs index 800cf33c14c..cbe8640fc46 100644 --- a/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs +++ b/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs @@ -92,4 +92,4 @@ public static void UploadRequest_UploadPartProgressEvent(object sender, UploadPr } // snippet-end:[S3.dotnetv3.TrackMPUUsingHighLevelAPIExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs b/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs index 08251d41a83..8dd9c7e3afd 100644 --- a/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs +++ b/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// Amazon Simple Storage Service (Amazon S3) Transfer Acceleration is a @@ -16,7 +16,7 @@ namespace TransferAccelerationExample using Amazon.S3; using Amazon.S3.Model; - class TransferAcceleration + public class TransferAcceleration { /// /// The main method initializes the client object and sets the @@ -39,7 +39,7 @@ public static async Task Main() /// acceleration on an Amazon S3 bucket. /// The name of the Amazon S3 bucket for which the /// method will be enabling acceleration. - static async Task EnableAccelerationAsync(AmazonS3Client client, string bucketName) + private static async Task EnableAccelerationAsync(AmazonS3Client client, string bucketName) { try { @@ -69,4 +69,4 @@ static async Task EnableAccelerationAsync(AmazonS3Client client, string bucketNa } // snippet-end:[S3.dotnetv3.TransferAccelerationExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs b/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs index 9db0a805e00..87dcc190003 100644 --- a/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs +++ b/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs @@ -13,7 +13,6 @@ namespace UploadUsingPresignedURLExample using System; using System.IO; using System.Net; - using System.Threading.Tasks; using Amazon; using Amazon.S3; using Amazon.S3.Model; diff --git a/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs b/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs index 4043207bfaa..5f6057854c5 100644 --- a/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs +++ b/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs @@ -1,4 +1,4 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 /// @@ -67,6 +67,7 @@ public static async Task AddWebsiteConfigurationAsync( }, }; PutBucketWebsiteResponse response = await client.PutBucketWebsiteAsync(putRequest); + // snippet-end:[S3.dotnetv3.PutWebsiteConfigExample] // snippet-start:[S3.dotnetv3.GetWebsiteConfigExample] @@ -78,6 +79,7 @@ public static async Task AddWebsiteConfigurationAsync( GetBucketWebsiteResponse getResponse = await client.GetBucketWebsiteAsync(getRequest); Console.WriteLine($"Index document: {getResponse.WebsiteConfiguration.IndexDocumentSuffix}"); Console.WriteLine($"Error document: {getResponse.WebsiteConfiguration.ErrorDocument}"); + // snippet-end:[S3.dotnetv3.GetWebsiteConfigExample] } catch (AmazonS3Exception ex) @@ -88,4 +90,4 @@ public static async Task AddWebsiteConfigurationAsync( } // snippet-end:[S3.dotnetv3.WebsiteConfigExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs b/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs index 6fbf249175c..57e2e9ee27c 100644 --- a/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs +++ b/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs @@ -128,4 +128,4 @@ public static async Task> PutObjectsAsync(IAmazonS3 client, int } // snippet-end:[S3.dotnetv3.DeleteMultipleObjectsExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs b/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs index a10714e8394..003b933baf4 100644 --- a/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs +++ b/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// This example shows how to delete an object from a non-versioned Amazon @@ -65,4 +65,4 @@ public static async Task DeleteObjectNonVersionedBucketAsync(IAmazonS3 client, s } // snippet-end:[S3.dotnetv3.DeleteObjectExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/s3CORSExample/S3CORS.cs b/dotnetv3/S3/s3CORSExample/S3CORS.cs index 430904ee330..bf9bbd98499 100644 --- a/dotnetv3/S3/s3CORSExample/S3CORS.cs +++ b/dotnetv3/S3/s3CORSExample/S3CORS.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// This example shows how to configure your Amazon Simple Storage Service @@ -37,13 +37,13 @@ public static async Task Main() /// Create the Amazon S3 CORS configuration. /// /// The initialized Amazon S3 client object used - /// to create the CORS configuration + /// to create the CORS configuration. private static async Task CORSConfigTestAsync(AmazonS3Client client) { try { // Create a new configuration request and add two rules. - CORSConfiguration configuration = new() + CORSConfiguration configuration = new CORSConfiguration() { Rules = new List { @@ -112,7 +112,7 @@ private static async Task CORSConfigTestAsync(AmazonS3Client client) /// The CORS configuration to apply. private static async Task PutCORSConfigurationAsync(AmazonS3Client client, CORSConfiguration configuration) { - PutCORSConfigurationRequest request = new() + PutCORSConfigurationRequest request = new PutCORSConfigurationRequest() { BucketName = BucketName, Configuration = configuration, @@ -133,7 +133,7 @@ private static async Task PutCORSConfigurationAsync(AmazonS3Client client, CORSC /// The created CORS configuration object. private static async Task RetrieveCORSConfigurationAsync(AmazonS3Client client) { - GetCORSConfigurationRequest request = new() + GetCORSConfigurationRequest request = new GetCORSConfigurationRequest() { BucketName = BucketName, }; @@ -154,7 +154,7 @@ private static async Task RetrieveCORSConfigurationAsync(Amaz /// to delete the CORS configuration from the bucket. private static async Task DeleteCORSConfigurationAsync(AmazonS3Client client) { - DeleteCORSConfigurationRequest request = new() + DeleteCORSConfigurationRequest request = new DeleteCORSConfigurationRequest() { BucketName = BucketName, }; @@ -189,4 +189,4 @@ private static void PrintCORSRules(CORSConfiguration configuration) } } } -} +} \ No newline at end of file diff --git a/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/GlobalUsings.cs b/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/GlobalUsings.cs index 7eca4866c57..c6a85f75056 100644 --- a/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/GlobalUsings.cs +++ b/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/GlobalUsings.cs @@ -3,7 +3,6 @@ // snippet-start:[S3.dotnetv3.TransferUtilityBasics.GlobalUsings] global using System.Text; -global using Amazon; global using Amazon.S3; global using Amazon.S3.Model; global using Amazon.S3.Transfer; diff --git a/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/TransferMethods.cs b/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/TransferMethods.cs index 5d93a8beca3..17a29312e47 100644 --- a/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/TransferMethods.cs +++ b/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasics/TransferMethods.cs @@ -190,4 +190,4 @@ await transferUtil.UploadDirectoryAsync(new TransferUtilityUploadDirectoryReques // snippet-end:[S3.dotnetv3.TransferUtilityBasics.UploadFullDirectoryAsync] } -} +} \ No newline at end of file diff --git a/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasicsTests/GlobalUsings.cs b/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasicsTests/GlobalUsings.cs index 67b01ac18c9..033c400042c 100644 --- a/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasicsTests/GlobalUsings.cs +++ b/dotnetv3/S3/scenarios/TransferUtilityBasics/TransferUtilityBasicsTests/GlobalUsings.cs @@ -1,8 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -global using Xunit; global using Amazon.S3; global using Amazon.S3.Transfer; -global using TransferUtilityBasics; global using Microsoft.Extensions.Configuration; +global using Xunit; \ No newline at end of file diff --git a/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs b/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs index e89252dec67..57d9545753d 100644 --- a/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs +++ b/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs @@ -12,7 +12,6 @@ namespace DeleteMultipleObjectsExample using System; using System.Collections.Generic; using System.Threading.Tasks; - using Amazon; using Amazon.S3; using Amazon.S3.Model; @@ -71,7 +70,7 @@ public static async Task> DeleteObjectsAsync(IAmazonS3 clien // Upload the sample objects. var keysAndVersions2 = await PutObjectsAsync(client, bucketName, 3); - // Delete objects using only keys. Amazon S3 creates a delete marker and + // Delete objects using only keys. Amazon S3 creates a delete marker and // returns its version ID in the response. List deletedObjects = await NonVersionedDeleteAsync(client, bucketName, keysAndVersions2); return deletedObjects; @@ -80,6 +79,9 @@ public static async Task> DeleteObjectsAsync(IAmazonS3 clien /// /// This method creates several temporary objects and then deletes them. /// + /// The S3 client. + /// Name of the bucket. + /// Async task. public static async Task DeleteObjectVersionsAsync(IAmazonS3 client, string bucketName) { // Upload the sample objects. @@ -114,7 +116,7 @@ private static void DisplayDeletionErrors(DeleteObjectsException e) /// The name of the bucket from which to delete /// objects. /// A list of key names for the objects to delete. - static async Task VersionedDeleteAsync(IAmazonS3 client, string bucketName, List keys) + private static async Task VersionedDeleteAsync(IAmazonS3 client, string bucketName, List keys) { var multiObjectDeleteRequest = new DeleteObjectsRequest { @@ -144,7 +146,7 @@ static async Task VersionedDeleteAsync(IAmazonS3 client, string bucketName, List /// objects. /// A list of key names for the objects to delete. /// A list of the deleted objects. - static async Task> NonVersionedDeleteAsync(IAmazonS3 client, string bucketName, List keys) + private static async Task> NonVersionedDeleteAsync(IAmazonS3 client, string bucketName, List keys) { // Create a request that includes only the object key names. DeleteObjectsRequest multiObjectDeleteRequest = new DeleteObjectsRequest(); @@ -229,7 +231,7 @@ private static async Task RemoveDeleteMarkersAsync(IAmazonS3 client, string buck /// bucket where we will create the temporary objects. /// The number of temporary objects to create. /// A list of the KeyVersion objects. - static async Task> PutObjectsAsync(IAmazonS3 client, string bucketName, int number) + private static async Task> PutObjectsAsync(IAmazonS3 client, string bucketName, int number) { var keys = new List(); @@ -258,4 +260,4 @@ static async Task> PutObjectsAsync(IAmazonS3 client, string buc } // snippet-end:[S3.dotnetv3.DeleteMultipleVersionedObjectsExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs b/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs index bb67645d784..2ff2a3bf239 100644 --- a/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs +++ b/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// This example creates an object in an Amazon Simple Storage Service @@ -48,7 +48,7 @@ public static async Task CreateAndDeleteObjectVersionAsync(IAmazonS3 client, str string versionID = await PutAnObject(client, bucketName, keyName); // Delete the object by specifying an object key and a version ID. - DeleteObjectRequest request = new() + DeleteObjectRequest request = new DeleteObjectRequest() { BucketName = bucketName, Key = keyName, @@ -75,7 +75,7 @@ public static async Task CreateAndDeleteObjectVersionAsync(IAmazonS3 client, str /// The Version ID of the created object. public static async Task PutAnObject(IAmazonS3 client, string bucketName, string objectKey) { - PutObjectRequest request = new() + PutObjectRequest request = new PutObjectRequest() { BucketName = bucketName, Key = objectKey, @@ -88,4 +88,4 @@ public static async Task PutAnObject(IAmazonS3 client, string bucketName } // snippet-end:[S3.dotnetv3.DeleteObjectVersionExample] -} +} \ No newline at end of file diff --git a/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs b/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs index 7acb2a42cc4..c5ea2ac3bac 100644 --- a/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs +++ b/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 /// /// This example lists the versions of the objects in a version enabled @@ -46,7 +46,7 @@ public static async Task GetObjectListWithAllVersionsAsync(IAmazonS3 client, str // For this example we set a small limit in MaxKeys to return // a small list of versions. - ListVersionsRequest request = new() + ListVersionsRequest request = new ListVersionsRequest() { BucketName = bucketName, MaxKeys = 2, @@ -84,4 +84,4 @@ public static async Task GetObjectListWithAllVersionsAsync(IAmazonS3 client, str } // snippet-end:[S3.dotnetv3.ListObjectVersionsExample] -} +} \ No newline at end of file diff --git a/dotnetv3/SES/README.md b/dotnetv3/SES/README.md index 8d9c081b78e..bdfb49d8f92 100644 --- a/dotnetv3/SES/README.md +++ b/dotnetv3/SES/README.md @@ -1,4 +1,4 @@ - + # Amazon SES code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/SES/Tests/Usings.cs b/dotnetv3/SES/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/SES/Tests/Usings.cs +++ b/dotnetv3/SES/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/SNS/CreateSNSTopicExample/CreateSNSTopicExample/CreateSNSTopic.cs b/dotnetv3/SNS/CreateSNSTopicExample/CreateSNSTopicExample/CreateSNSTopic.cs index 6e99c4ac25d..7ef75063f2c 100644 --- a/dotnetv3/SNS/CreateSNSTopicExample/CreateSNSTopicExample/CreateSNSTopic.cs +++ b/dotnetv3/SNS/CreateSNSTopicExample/CreateSNSTopicExample/CreateSNSTopic.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace CreateSNSTopicExample { diff --git a/dotnetv3/SNS/GetTopicAttributesExample/GetTopicAttributesExample/GetTopicAttributes.cs b/dotnetv3/SNS/GetTopicAttributesExample/GetTopicAttributesExample/GetTopicAttributes.cs index 4e8e2482e8f..a54df384db3 100644 --- a/dotnetv3/SNS/GetTopicAttributesExample/GetTopicAttributesExample/GetTopicAttributes.cs +++ b/dotnetv3/SNS/GetTopicAttributesExample/GetTopicAttributesExample/GetTopicAttributes.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace GetTopicAttributesExample { @@ -8,7 +8,6 @@ namespace GetTopicAttributesExample using System.Collections.Generic; using System.Threading.Tasks; using Amazon.SimpleNotificationService; - using Amazon.SimpleNotificationService.Model; /// /// This example shows how to retrieve the attributes of an Amazon Simple diff --git a/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs b/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs index 736a3df46ab..67db3928b61 100644 --- a/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs +++ b/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace IsPhoneNumOptedOutExample { diff --git a/dotnetv3/SNS/ListSNSSubscriptionsExample/ListSNSSubscriptionsExample/ListSubscriptions.cs b/dotnetv3/SNS/ListSNSSubscriptionsExample/ListSNSSubscriptionsExample/ListSubscriptions.cs index f8e9c5579a1..024fc3d3135 100644 --- a/dotnetv3/SNS/ListSNSSubscriptionsExample/ListSNSSubscriptionsExample/ListSubscriptions.cs +++ b/dotnetv3/SNS/ListSNSSubscriptionsExample/ListSNSSubscriptionsExample/ListSubscriptions.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace ListSNSSubscriptionsExample { diff --git a/dotnetv3/SNS/ListSNSTopicsExample/ListSNSTopicsExample/ListSNSTopics.cs b/dotnetv3/SNS/ListSNSTopicsExample/ListSNSTopicsExample/ListSNSTopics.cs index c0727aa3873..85058bb1993 100644 --- a/dotnetv3/SNS/ListSNSTopicsExample/ListSNSTopicsExample/ListSNSTopics.cs +++ b/dotnetv3/SNS/ListSNSTopicsExample/ListSNSTopicsExample/ListSNSTopics.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace ListSNSTopicsExample { diff --git a/dotnetv3/SNS/PublishToSNSTopicExample/PublishToSNSTopicExample/PublishToSNSTopic.cs b/dotnetv3/SNS/PublishToSNSTopicExample/PublishToSNSTopicExample/PublishToSNSTopic.cs index 03c66d2412f..a20e515be59 100644 --- a/dotnetv3/SNS/PublishToSNSTopicExample/PublishToSNSTopicExample/PublishToSNSTopic.cs +++ b/dotnetv3/SNS/PublishToSNSTopicExample/PublishToSNSTopicExample/PublishToSNSTopic.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace PublishToSNSTopicExample { diff --git a/dotnetv3/SNS/README.md b/dotnetv3/SNS/README.md index 8bd47f89149..bb4355a3557 100644 --- a/dotnetv3/SNS/README.md +++ b/dotnetv3/SNS/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for .NET ## Overview @@ -58,7 +58,7 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. * [Building an Amazon SNS application](../cross_service/SubscribePublishTranslate) -* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Create a serverless application to manage photos](../cross-service/PhotoAssetManager) ## Run the examples diff --git a/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessage.cs b/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessage.cs index 26f4b1336ee..a08659879b1 100644 --- a/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessage.cs +++ b/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessage.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 // snippet-start:[SNS.dotnetv3.SNSMessageExample] namespace SNSMessageExample @@ -10,7 +10,7 @@ namespace SNSMessageExample using Amazon.SimpleNotificationService; using Amazon.SimpleNotificationService.Model; - class SNSMessage + public class SNSMessage { private AmazonSimpleNotificationServiceClient snsClient; @@ -60,4 +60,5 @@ public async Task SendTextMessageAsync(string phoneNum, string text) } } } + // snippet-end:[SNS.dotnetv3.SNSMessageExample] \ No newline at end of file diff --git a/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessageExample.cs b/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessageExample.cs index 9cfc77efe07..6b7765c125f 100644 --- a/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessageExample.cs +++ b/dotnetv3/SNS/SNSMessageExample/SNSMessageExample/SNSMessageExample.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace SNSMessageExample { diff --git a/dotnetv3/SNS/SNSMessageExample/SNSMessageExampleTest/SNSMessageTest.cs b/dotnetv3/SNS/SNSMessageExample/SNSMessageExampleTest/SNSMessageTest.cs index 59e8991e8d6..26971857631 100644 --- a/dotnetv3/SNS/SNSMessageExample/SNSMessageExampleTest/SNSMessageTest.cs +++ b/dotnetv3/SNS/SNSMessageExample/SNSMessageExampleTest/SNSMessageTest.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 using System; using System.Net; @@ -48,6 +48,7 @@ private AmazonSimpleNotificationServiceClient CreateMockSNSClient() } [Fact] + [Trait("Category", "Unit")] public async Task TestSendTextMessageAsync() { var MockSNSClient = CreateMockSNSClient(); diff --git a/dotnetv3/SQS/README.md b/dotnetv3/SQS/README.md index 93d2b69419f..a3d55dbf0d9 100644 --- a/dotnetv3/SQS/README.md +++ b/dotnetv3/SQS/README.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for .NET ## Overview @@ -42,7 +42,7 @@ Code excerpts that show you how to call individual service functions. * [Authorize a bucket to send messages to a queue](AuthorizeS3ToSendMessageExample/AuthorizeS3ToSendMessageExample/AuthorizeS3ToSendMessage.cs#L11) (`SendMessage`) * [Create a queue](../cross-service/TopicsAndQueues/Actions/SQSActions/SQSWrapper.cs#L28) (`CreateQueue`) * [Delete a batch of messages from a queue](../cross-service/TopicsAndQueues/Actions/SQSActions/SQSWrapper.cs#L154) (`DeleteMessageBatch`) -* [Delete a message from a queue](ReceiveDeleteExample/ReceiveDeleteExample/ReceiveDeleteExample.cs#L20) (`DeleteMessage`) +* [Delete a message from a queue](ReceiveDeleteExample/ReceiveDeleteExample/ReceiveDeleteExample.cs#L17) (`DeleteMessage`) * [Delete a queue](../cross-service/TopicsAndQueues/Actions/SQSActions/SQSWrapper.cs#L182) (`DeleteQueue`) * [Get attributes for a queue](../cross-service/TopicsAndQueues/Actions/SQSActions/SQSWrapper.cs#L74) (`GetQueueAttributes`) * [Get the URL of a queue](GetQueueUrlExample/GetQueueUrlExample/GetQueueUrl.cs#L10) (`GetQueueUrl`) diff --git a/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExample/ReceiveDeleteExample.cs b/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExample/ReceiveDeleteExample.cs index ba1367eb6c9..b5fd9e07a27 100644 --- a/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExample/ReceiveDeleteExample.cs +++ b/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExample/ReceiveDeleteExample.cs @@ -4,14 +4,11 @@ /// /// This example retrieves a single message from an Amazon Simple /// Queue Service (Amazon SQS) queue and then deletes the message. -/// This example was created using the AWS SDK for .NET version 3.x -/// and .NET 5.0. /// namespace ReceiveDeleteExample { using System; using System.Threading.Tasks; - using Amazon; using Amazon.SQS; using Amazon.SQS.Model; diff --git a/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExampleTests/ReceiveDeleteExampleTests.cs b/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExampleTests/ReceiveDeleteExampleTests.cs index ab46e974031..21c392de6f9 100644 --- a/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExampleTests/ReceiveDeleteExampleTests.cs +++ b/dotnetv3/SQS/ReceiveDeleteExample/ReceiveDeleteExampleTests/ReceiveDeleteExampleTests.cs @@ -1,4 +1,6 @@ -using System; +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + using System.Collections.Generic; using System.Net; using System.Threading; diff --git a/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRole.cs b/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRole.cs index f00e7a3569d..f6df58f71ab 100644 --- a/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRole.cs +++ b/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRole.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // snippet-start:[STS.dotnetv3.AssumeRoleMessage] using System; diff --git a/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleTests.cs b/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleTests.cs index 2eb29aec178..a81028bcdc4 100644 --- a/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleTests.cs +++ b/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleTests.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 using System.Net; using System.Threading; @@ -18,6 +18,7 @@ public class AssumeRoleTests private static readonly RegionEndpoint REGION = RegionEndpoint.USWest2; [Fact] + [Trait("Category", "Unit")] public async Task GetCallerIdentityAsyncTest() { var mockClient = new Mock(REGION); @@ -44,6 +45,7 @@ public async Task GetCallerIdentityAsyncTest() } [Fact] + [Trait("Category", "Unit")] public async Task AssumeRoleAsyncTest() { // Create the mock client object diff --git a/dotnetv3/STS/README.md b/dotnetv3/STS/README.md index 53531e50246..a02ddad92a5 100644 --- a/dotnetv3/STS/README.md +++ b/dotnetv3/STS/README.md @@ -1,4 +1,4 @@ - + # AWS STS code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/SageMaker/README.md b/dotnetv3/SageMaker/README.md index 11f71719ea0..054af9e8d2d 100644 --- a/dotnetv3/SageMaker/README.md +++ b/dotnetv3/SageMaker/README.md @@ -1,4 +1,4 @@ - + # SageMaker code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/SageMaker/Tests/Usings.cs b/dotnetv3/SageMaker/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/SageMaker/Tests/Usings.cs +++ b/dotnetv3/SageMaker/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValue.cs b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValue.cs index 51e75b95ddb..61f19120bd0 100644 --- a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValue.cs +++ b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValue.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace GetSecretValueExample { @@ -12,8 +12,7 @@ namespace GetSecretValueExample /// /// This example uses the Amazon Web Service Secrets Manager to retrieve - /// the secret value for the provided secret name. This example was created - /// using the AWS SDK for .NET v3.7 and .NET Core 5.0. + /// the secret value for the provided secret name. /// public class GetSecretValue { @@ -59,9 +58,11 @@ public static async Task GetSecretAsync( IAmazonSecretsManager client, string secretName) { - GetSecretValueRequest request = new(); - request.SecretId = secretName; - request.VersionStage = "AWSCURRENT"; // VersionStage defaults to AWSCURRENT if unspecified. + GetSecretValueRequest request = new GetSecretValueRequest() + { + SecretId = secretName, + VersionStage = "AWSCURRENT", // VersionStage defaults to AWSCURRENT if unspecified. + }; GetSecretValueResponse response = null; @@ -91,8 +92,6 @@ public static string DecodeString(GetSecretValueResponse response) // Decrypts secret using the associated AWS Key Management Service // Customer Master Key (CMK.) Depending on whether the secret is a // string or binary value, one of these fields will be populated. - MemoryStream memoryStream = new(); - if (response.SecretString is not null) { var secret = response.SecretString; @@ -100,7 +99,7 @@ public static string DecodeString(GetSecretValueResponse response) } else if (response.SecretBinary is not null) { - memoryStream = response.SecretBinary; + var memoryStream = response.SecretBinary; StreamReader reader = new StreamReader(memoryStream); string decodedBinarySecret = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(reader.ReadToEnd())); return decodedBinarySecret; diff --git a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValueExample.csproj b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValueExample.csproj index 585818b434d..8ea98c144e6 100644 --- a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValueExample.csproj +++ b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExample/GetSecretValueExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueExampleTests.csproj b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueExampleTests.csproj index 8d7b8da34f3..6ad6b8eeb2a 100644 --- a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueExampleTests.csproj +++ b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueExampleTests.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false diff --git a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueTests.cs b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueTests.cs index b0b978224ba..72a9a08535c 100644 --- a/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueTests.cs +++ b/dotnetv3/SecretsManager/GetSecretValue/GetSecretValueExampleTests/GetSecretValueTests.cs @@ -18,6 +18,7 @@ namespace GetSecretValueExampleTests public class GetSecretValueTests { [Fact] + [Trait("Category", "Unit")] public void TestGetSecretValueAsync() { var mockClient = new Mock(); @@ -46,6 +47,7 @@ public void TestGetSecretValueAsync() } [Fact] + [Trait("Category", "Unit")] public void TestDecodeStringNullSecretValue() { var secretValue = new GetSecretValueResponse(); @@ -55,6 +57,7 @@ public void TestDecodeStringNullSecretValue() } [Fact] + [Trait("Category", "Unit")] public void TestDecodeStringStringValue() { var secretValue = new GetSecretValueResponse @@ -68,6 +71,7 @@ public void TestDecodeStringStringValue() } [Fact] + [Trait("Category", "Unit")] public void TestDecodeStringBinaryValue() { var base64 = Convert.ToBase64String(Encoding.UTF8.GetBytes("SecretExample")); diff --git a/dotnetv3/SecretsManager/README.md b/dotnetv3/SecretsManager/README.md index d5686c3cca6..aa38a38fd52 100644 --- a/dotnetv3/SecretsManager/README.md +++ b/dotnetv3/SecretsManager/README.md @@ -1,4 +1,4 @@ - + # Secrets Manager code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/StepFunctions/Scenarios/StepFunctionsBasics.cs b/dotnetv3/StepFunctions/Scenarios/StepFunctionsBasics.cs index c987e10a808..92f3002e460 100644 --- a/dotnetv3/StepFunctions/Scenarios/StepFunctionsBasics.cs +++ b/dotnetv3/StepFunctions/Scenarios/StepFunctionsBasics.cs @@ -3,8 +3,6 @@ // snippet-start:[StepFunctions.dotnetv3.StepFunctionsBasics] -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using Amazon.IdentityManagement; using Amazon.IdentityManagement.Model; using Amazon.StepFunctions.Model; diff --git a/dotnetv3/StepFunctions/Scenarios/Usings.cs b/dotnetv3/StepFunctions/Scenarios/Usings.cs index c3d708084a0..35f9937cce4 100644 --- a/dotnetv3/StepFunctions/Scenarios/Usings.cs +++ b/dotnetv3/StepFunctions/Scenarios/Usings.cs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[StepFunctions.dotnetv3.StepFunctionsBasics.Usings] +global using System.Text.Json; global using Amazon.StepFunctions; global using Microsoft.Extensions.Configuration; global using Microsoft.Extensions.DependencyInjection; @@ -9,8 +10,7 @@ global using Microsoft.Extensions.Logging; global using Microsoft.Extensions.Logging.Console; global using Microsoft.Extensions.Logging.Debug; -global using LogLevel = Microsoft.Extensions.Logging.LogLevel; global using StepFunctionsActions; -global using System.Text.Json; +global using LogLevel = Microsoft.Extensions.Logging.LogLevel; // snippet-end:[StepFunctions.dotnetv3.StepFunctionsBasics.Usings] \ No newline at end of file diff --git a/dotnetv3/StepFunctions/Tests/Usings.cs b/dotnetv3/StepFunctions/Tests/Usings.cs index 0442353f4dc..faa359be2bd 100644 --- a/dotnetv3/StepFunctions/Tests/Usings.cs +++ b/dotnetv3/StepFunctions/Tests/Usings.cs @@ -1,9 +1,9 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -global using StepFunctionsActions; global using Amazon.StepFunctions; global using Microsoft.Extensions.Configuration; +global using StepFunctionsActions; global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/Support/README.md b/dotnetv3/Support/README.md index 68f0c0153e4..c841ae06d21 100644 --- a/dotnetv3/Support/README.md +++ b/dotnetv3/Support/README.md @@ -1,4 +1,4 @@ - + # Support code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Transcribe/README.md b/dotnetv3/Transcribe/README.md index cda34b3bfaa..18cc39a44cb 100644 --- a/dotnetv3/Transcribe/README.md +++ b/dotnetv3/Transcribe/README.md @@ -1,4 +1,4 @@ - + # Amazon Transcribe code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/Transcribe/Tests/Usings.cs b/dotnetv3/Transcribe/Tests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/Transcribe/Tests/Usings.cs +++ b/dotnetv3/Transcribe/Tests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs b/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs index 64b18bd540f..678a1b692a5 100644 --- a/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs +++ b/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs @@ -1,6 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 - /// /// This example shows how to use Amazon Translate to process the files in /// an Amazon Simple Storage Service (Amazon S3) bucket. The translated results diff --git a/dotnetv3/Translate/README.md b/dotnetv3/Translate/README.md index 5964e996a28..1aef37ec0a8 100644 --- a/dotnetv3/Translate/README.md +++ b/dotnetv3/Translate/README.md @@ -1,4 +1,4 @@ - + # Amazon Translate code examples for the SDK for .NET ## Overview @@ -36,7 +36,7 @@ Code excerpts that show you how to call individual service functions. * [Describe a translation job](DescribeTextTranslationExample/DescribeTextTranslation.cs#L11) (`DescribeTextTranslationJob`) * [List translation jobs](ListTranslationJobsExample/ListTranslationJobs.cs#L11) (`ListTextTranslationJobs`) -* [Start a translation job](BatchTranslateExample/BatchTranslate.cs#L13) (`StartTextTranslationJob`) +* [Start a translation job](BatchTranslateExample/BatchTranslate.cs#L12) (`StartTextTranslationJob`) * [Stop a translation job](StopTextTranslationJobExample/StopTextTranslationJob.cs#L11) (`StopTextTranslationJob`) * [Translate text](TranslateTextExample/TranslateText.cs#L11) (`TranslateText`) @@ -45,6 +45,7 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. * [Building an Amazon SNS application](../cross_service/SubscribePublishTranslate) +* [Create an application to analyze customer feedback](../cross-service/FeedbackSentimentAnalyzer) ## Run the examples diff --git a/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs b/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs index 3089a001e6e..4e2fc3acf22 100644 --- a/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs +++ b/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs @@ -14,7 +14,7 @@ namespace StopTextTranslationJobExample using Amazon.Translate; using Amazon.Translate.Model; - class StopTextTranslationJob + public class StopTextTranslationJob { public static async Task Main() { diff --git a/dotnetv3/cross-service/AuroraItemTracker/ItemTrackerTests/ReportServiceTests.cs b/dotnetv3/cross-service/AuroraItemTracker/ItemTrackerTests/ReportServiceTests.cs index 0026110736b..a65dc0fe0c3 100644 --- a/dotnetv3/cross-service/AuroraItemTracker/ItemTrackerTests/ReportServiceTests.cs +++ b/dotnetv3/cross-service/AuroraItemTracker/ItemTrackerTests/ReportServiceTests.cs @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 using System.Globalization; -using Amazon.RDSDataService.Model; using Amazon.SimpleEmailV2; using AuroraItemTracker; using CsvHelper; diff --git a/dotnetv3/cross-service/DynamoDbItemTracker/ItemTrackerTests/WorkItemServiceTests.cs b/dotnetv3/cross-service/DynamoDbItemTracker/ItemTrackerTests/WorkItemServiceTests.cs index 696e78274ab..21d2e7937b7 100644 --- a/dotnetv3/cross-service/DynamoDbItemTracker/ItemTrackerTests/WorkItemServiceTests.cs +++ b/dotnetv3/cross-service/DynamoDbItemTracker/ItemTrackerTests/WorkItemServiceTests.cs @@ -1,13 +1,9 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using System.Diagnostics; -using System.Net; using Amazon.DynamoDBv2; using Amazon.DynamoDBv2.DataModel; using Amazon.DynamoDBv2.DocumentModel; -using Amazon.DynamoDBv2.Model; -using Amazon.SimpleEmailV2.Model; using DynamoDbItemTracker; using Microsoft.Extensions.Configuration; using Moq; diff --git a/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaExtractText/ExtractTextFunction.cs b/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaExtractText/ExtractTextFunction.cs index 611d38cc001..98cfe084832 100644 --- a/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaExtractText/ExtractTextFunction.cs +++ b/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaExtractText/ExtractTextFunction.cs @@ -1,7 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using System.Text.Json; using Amazon.Lambda.Core; using Amazon.Textract; using AWS.Lambda.Powertools.Logging; diff --git a/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Models/SentimentDetails.cs b/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Models/SentimentDetails.cs index 988475cac9d..79d4420ac9d 100644 --- a/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Models/SentimentDetails.cs +++ b/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Models/SentimentDetails.cs @@ -1,8 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using Amazon.Comprehend; - namespace FsaServices.Models; /// diff --git a/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Services/SynthesizeService.cs b/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Services/SynthesizeService.cs index 3dfd01fdd05..e91a17f886a 100644 --- a/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Services/SynthesizeService.cs +++ b/dotnetv3/cross-service/FeedbackSentimentAnalyzer/FsaServices/Services/SynthesizeService.cs @@ -3,9 +3,7 @@ using Amazon.Polly; using Amazon.Polly.Model; -using Amazon.Runtime.Internal; using Amazon.S3; -using Amazon.S3.Model; using Amazon.S3.Transfer; using FsaServices.Models; diff --git a/dotnetv3/cross-service/PhotoAssetManager/PamApi/Controllers/ApiController.cs b/dotnetv3/cross-service/PhotoAssetManager/PamApi/Controllers/ApiController.cs index 435d0bacf1e..1b01141e479 100644 --- a/dotnetv3/cross-service/PhotoAssetManager/PamApi/Controllers/ApiController.cs +++ b/dotnetv3/cross-service/PhotoAssetManager/PamApi/Controllers/ApiController.cs @@ -1,7 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using Amazon.Lambda.Core; using AWS.Lambda.Powertools.Logging; using Microsoft.AspNetCore.Mvc; using PamServices; diff --git a/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/DownloadFunction.cs b/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/DownloadFunction.cs index 0342aa660b6..4d8f49010ac 100644 --- a/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/DownloadFunction.cs +++ b/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/DownloadFunction.cs @@ -1,7 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using System.Text.Json; using Amazon; using Amazon.DynamoDBv2; using Amazon.DynamoDBv2.DataModel; diff --git a/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Functions.cs b/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Functions.cs index d7163cc7e61..9a848224de4 100644 --- a/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Functions.cs +++ b/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Functions.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + using System.Net; using System.Text.Json; using Amazon.Lambda.Annotations; diff --git a/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Startup.cs b/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Startup.cs index ecb064572e1..6e46246835b 100644 --- a/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Startup.cs +++ b/dotnetv3/cross-service/PhotoAssetManager/PamApiAnnotations/Startup.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + using Amazon; using Amazon.DynamoDBv2; using Amazon.DynamoDBv2.DataModel; @@ -5,8 +8,6 @@ using Amazon.S3; using Amazon.SimpleNotificationService; using Amazon.Util; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; using PamServices; namespace PamApiAnnotations; diff --git a/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/LabelServiceTests.cs b/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/LabelServiceTests.cs index 1b9880214d3..bbcb538a437 100644 --- a/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/LabelServiceTests.cs +++ b/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/LabelServiceTests.cs @@ -3,7 +3,6 @@ using Amazon.DynamoDBv2.DataModel; using Amazon.DynamoDBv2.DocumentModel; -using Microsoft.Extensions.Configuration; using Moq; namespace PamServices.Test; diff --git a/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/Usings.cs b/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/Usings.cs index 8c927eb747a..92fe41799a7 100644 --- a/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/Usings.cs +++ b/dotnetv3/cross-service/PhotoAssetManager/PamServices.Test/Usings.cs @@ -1 +1,4 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; \ No newline at end of file diff --git a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/HomeController.cs b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/HomeController.cs index 0b2435fbd63..ff582dd6575 100644 --- a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/HomeController.cs +++ b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/HomeController.cs @@ -8,6 +8,7 @@ namespace SNSExample.Controllers using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using SNSExample.Models; + using SubscribePublishTranslate.Controllers; public class HomeController : Controller { @@ -66,4 +67,4 @@ public IActionResult Error() return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } -} +} \ No newline at end of file diff --git a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/SnsService.cs b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/SnsService.cs index fe090468e6d..3733f863f5c 100644 --- a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/SnsService.cs +++ b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Controllers/SnsService.cs @@ -1,7 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -namespace SNSExample.Controllers +namespace SubscribePublishTranslate.Controllers { using System.Collections.Generic; using System.Threading.Tasks; @@ -25,51 +25,6 @@ public static async Task RemoveSub(IAmazonSimpleNotificationService clie return string.Empty; } - public async Task UnSubEmail(string email) - { - var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); - var arnValue = await GetSubArn(client, email); - await RemoveSub(client, arnValue); - return $"{email} was successfully deleted!"; - } - - public async Task PubTopic(string body, string lang) - { - var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); - var message = string.Empty; - - switch (lang.ToLower()) - { - case "french": - message = this.TranslateBody(body, "fr"); - break; - case "spanish": - message = this.TranslateBody(body, "es"); - break; - default: - message = body; - break; - } - - var msgId = await PublishMessage(client, message); - return msgId; - } - - public async Task SubEmail(string email) - { - var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); - var subArn = await SubscribeEmail(client, email); - return subArn; - } - - public async Task GetSubs() - { - var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); - var subscriptions = await GetSubscriptionsListAsync(client); - var val = this.DisplaySubscriptionList(subscriptions); - return val; - } - public static async Task GetSubArn(IAmazonSimpleNotificationService client, string email) { var request = new ListSubscriptionsByTopicRequest(); @@ -126,6 +81,51 @@ public static async Task> GetSubscriptionsListAsync(IAmazonSi return response.Subscriptions; } + public async Task UnSubEmail(string email) + { + var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); + var arnValue = await GetSubArn(client, email); + await RemoveSub(client, arnValue); + return $"{email} was successfully deleted!"; + } + + public async Task PubTopic(string body, string lang) + { + var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); + var message = string.Empty; + + switch (lang.ToLower()) + { + case "french": + message = this.TranslateBody(body, "fr"); + break; + case "spanish": + message = this.TranslateBody(body, "es"); + break; + default: + message = body; + break; + } + + var msgId = await PublishMessage(client, message); + return msgId; + } + + public async Task SubEmail(string email) + { + var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); + var subArn = await SubscribeEmail(client, email); + return subArn; + } + + public async Task GetSubs() + { + var client = new AmazonSimpleNotificationServiceClient(RegionEndpoint.USEast2); + var subscriptions = await GetSubscriptionsListAsync(client); + var val = this.DisplaySubscriptionList(subscriptions); + return val; + } + public string DisplaySubscriptionList(List subscriptionList) { var email = string.Empty; diff --git a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Models/ErrorViewModel.cs b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Models/ErrorViewModel.cs index 7a89a8c7219..25a340b0985 100644 --- a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Models/ErrorViewModel.cs +++ b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Models/ErrorViewModel.cs @@ -1,7 +1,8 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + namespace SNSExample.Models { - using System; - public class ErrorViewModel { public string RequestId { get; set; } diff --git a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Program.cs b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Program.cs index dfe572f2cd7..b303c80e19d 100644 --- a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Program.cs +++ b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Program.cs @@ -3,14 +3,8 @@ namespace SNSExample { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; - using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; - using Microsoft.Extensions.Logging; public class Program { diff --git a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Startup.cs b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Startup.cs index 559d69e762f..f628b8f778d 100644 --- a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Startup.cs +++ b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/Startup.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + namespace SNSExample { using Microsoft.AspNetCore.Builder; diff --git a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/SubscribePublishTranslate.csproj b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/SubscribePublishTranslate.csproj index 1656b32d20d..c56474aef84 100644 --- a/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/SubscribePublishTranslate.csproj +++ b/dotnetv3/cross-service/SubscribePublishTranslate/SubscribePublishTranslate/SubscribePublishTranslate.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 diff --git a/dotnetv3/cross-service/TopicsAndQueues/Tests/TopicsAndQueuesTests/Usings.cs b/dotnetv3/cross-service/TopicsAndQueues/Tests/TopicsAndQueuesTests/Usings.cs index b0c0a3c9483..158ebd88747 100644 --- a/dotnetv3/cross-service/TopicsAndQueues/Tests/TopicsAndQueuesTests/Usings.cs +++ b/dotnetv3/cross-service/TopicsAndQueues/Tests/TopicsAndQueuesTests/Usings.cs @@ -1,3 +1,6 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; global using Xunit.Extensions.Ordering; diff --git a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs index edf2c458876..ba84cd7a5fa 100644 --- a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs +++ b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace CreateTablesLoadDataExample { diff --git a/dotnetv3/dynamodb/README.md b/dotnetv3/dynamodb/README.md index 3d5b1df982b..03ad9275c09 100644 --- a/dotnetv3/dynamodb/README.md +++ b/dotnetv3/dynamodb/README.md @@ -1,4 +1,4 @@ - + # DynamoDB code examples for the SDK for .NET ## Overview diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/ProductCatalog.cs b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Book.cs similarity index 95% rename from dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/ProductCatalog.cs rename to dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Book.cs index 6ab3cad752b..e352c5176b1 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/ProductCatalog.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Book.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelBatchWriteItemExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Forum.cs b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Forum.cs index 80f786a729e..5977c3be771 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Forum.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Forum.cs @@ -1,5 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 + namespace HighLevelBatchWriteItemExample { using System; diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItem.cs b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItem.cs index 5bd8e861dcb..cdea93072e8 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItem.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItem.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelBatchWriteItemExample { @@ -49,15 +49,6 @@ public static async Task SingleTableBatchWrite(IDynamoDBContext context) await bookBatch.ExecuteAsync(); } - private static async Task Main() - { - AmazonDynamoDBClient client = new AmazonDynamoDBClient(); - DynamoDBContext context = new DynamoDBContext(client); - - await SingleTableBatchWrite(context); - await MultiTableBatchWrite(context); - } - public static async Task MultiTableBatchWrite(IDynamoDBContext context) { // New Forum item. @@ -89,6 +80,15 @@ public static async Task MultiTableBatchWrite(IDynamoDBContext context) Console.WriteLine("Performing batch write in MultiTableBatchWrite()."); await superBatch.ExecuteAsync(); } + + public static async Task Main() + { + AmazonDynamoDBClient client = new AmazonDynamoDBClient(); + DynamoDBContext context = new DynamoDBContext(client); + + await SingleTableBatchWrite(context); + await MultiTableBatchWrite(context); + } } // snippet-end:[dynamodb.dotnetv3.HighLevelBatchWriteItemExample] diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Reply.cs b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Reply.cs index 7a86f94979c..e3eb55b140c 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Reply.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Reply.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelBatchWriteItemExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Thread.cs b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Thread.cs index 0a16e090b71..d10ef096a52 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Thread.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/Thread.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelBatchWriteItemExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/Book.cs b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/Book.cs index 99d033abb60..bc949f51bbc 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/Book.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/Book.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelItemCRUDExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs index d7a11e03daf..e00414ff8ff 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelItemCRUDExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/Book.cs b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/Book.cs index bec3f22bf63..b82b246af93 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/Book.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/Book.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelMappingArbitraryDataExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionType.cs b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionType.cs index 8bc5df3b833..fa998f7d60e 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionType.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionType.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelMappingArbitraryDataExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionTypeConverter.cs b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionTypeConverter.cs index c9f70fd184e..9a14c8bc76b 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionTypeConverter.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/DimensionTypeConverter.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelMappingArbitraryDataExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs index 7f5e023c5d6..6be7c0d8b4b 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelMappingArbitraryDataExample { @@ -57,7 +57,7 @@ public static async Task AddRetrieveUpdateBook(IDynamoDBContext context) await context.SaveAsync(bookRetrieved); } - private static async Task Main() + public static async Task Main() { var client = new AmazonDynamoDBClient(); DynamoDBContext context = new DynamoDBContext(client); diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Book.cs b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Book.cs index f6b3b36ccdc..e7cb6dfed1e 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Book.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Book.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelQueryAndScanExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Forum.cs b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Forum.cs index 2fdd2941ca7..81bc537f1db 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Forum.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Forum.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelQueryAndScanExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs index 69ac1d1b1e2..5be9033bdc4 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelQueryAndScanExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Reply.cs b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Reply.cs index 608ef6f2689..678ad70651d 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Reply.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Reply.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelQueryAndScanExample { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Thread.cs b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Thread.cs index 47fdf8c32f9..aa54e597214 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Thread.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/Thread.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace HighLevelQueryAndScanExample { diff --git a/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.cs b/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.cs index 07c881ba203..a746124e8d8 100644 --- a/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.cs +++ b/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // snippet-start:[dynamodb.dotnetv3.LowLevelBatchGetExample] using System; diff --git a/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs b/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs index 2ecd3bf2af9..3f93f154142 100644 --- a/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs +++ b/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs @@ -1,5 +1,5 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // snippet-start:[dynamodb.dotnetv3.LowLevelTableExample] using System; diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs b/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs index 3ef055dee7b..db11cabb74a 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace MidLevelBatchWriteItemExample { diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs b/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs index f436f2d9e9a..84e5a33ff98 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace MidLevelQueryAndScanExample { diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs b/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs index 278397f988e..b4a0f001e5c 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0. +// SPDX-License-Identifier: Apache-2.0 namespace MidLevelScanOnlyExample { diff --git a/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs b/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs index db908827225..a559bb0ca9d 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs @@ -1,5 +1,5 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX - License - Identifier: Apache - 2.0 +// SPDX-License-Identifier: Apache-2.0 namespace MidlevelItemCRUDExample { diff --git a/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/DynamoDB_Basics.cs b/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/DynamoDB_Basics.cs index ec96e0892d3..a2a091d7f8b 100644 --- a/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/DynamoDB_Basics.cs +++ b/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/DynamoDB_Basics.cs @@ -1,6 +1,8 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 +namespace DynamoDB_Basics_Scenario; + // snippet-start:[DynamoDB.dotnetv3.DynamoDB_Basics_Scenario] // This example application performs the following basic Amazon DynamoDB // functions: @@ -19,198 +21,196 @@ // Before you run this example, download 'movies.json' from // https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/resources/sample_files, // and put it in the same folder as the example. -namespace DynamoDB_Basics_Scenario +using Amazon.DynamoDBv2; +using DynamoDB_Actions; + +public class DynamoDB_Basics { - using DynamoDB_Actions; + // Separator for the console display. + private static readonly string SepBar = new string('-', 80); - public class DynamoDB_Basics + public static async Task Main() { - // Separator for the console display. - private static readonly string SepBar = new string('-', 80); - - public static async Task Main() - { - var client = new AmazonDynamoDBClient(); - - var tableName = "movie_table"; - - // Relative path to moviedata.json in the local repository. - var movieFileName = @"..\..\..\..\..\..\..\..\resources\sample_files\movies.json"; - - DisplayInstructions(); - - // Create a new table and wait for it to be active. - Console.WriteLine($"Creating the new table: {tableName}"); - - var success = await DynamoDbMethods.CreateMovieTableAsync(client, tableName); - - if (success) - { - Console.WriteLine($"\nTable: {tableName} successfully created."); - } - else - { - Console.WriteLine($"\nCould not create {tableName}."); - } - - WaitForEnter(); - - // Add a single new movie to the table. - var newMovie = new Movie - { - Year = 2021, - Title = "Spider-Man: No Way Home", - }; - - success = await DynamoDbMethods.PutItemAsync(client, newMovie, tableName); - if (success) - { - Console.WriteLine($"Added {newMovie.Title} to the table."); - } - else - { - Console.WriteLine("Could not add movie to table."); - } - - WaitForEnter(); - - // Update the new movie by adding a plot and rank. - var newInfo = new MovieInfo - { - Plot = "With Spider-Man's identity now revealed, Peter asks" + - "Doctor Strange for help. When a spell goes wrong, dangerous" + - "foes from other worlds start to appear, forcing Peter to" + - "discover what it truly means to be Spider-Man.", - Rank = 9, - }; - - success = await DynamoDbMethods.UpdateItemAsync(client, newMovie, newInfo, tableName); - if (success) - { - Console.WriteLine($"Successfully updated the movie: {newMovie.Title}"); - } - else - { - Console.WriteLine("Could not update the movie."); - } - - WaitForEnter(); - - // Add a batch of movies to the DynamoDB table from a list of - // movies in a JSON file. - var itemCount = await DynamoDbMethods.BatchWriteItemsAsync(client, movieFileName); - Console.WriteLine($"Added {itemCount} movies to the table."); - - WaitForEnter(); - - // Get a movie by key. (partition + sort) - var lookupMovie = new Movie - { - Title = "Jurassic Park", - Year = 1993, - }; - - Console.WriteLine("Looking for the movie \"Jurassic Park\"."); - var item = await DynamoDbMethods.GetItemAsync(client, lookupMovie, tableName); - if (item.Count > 0) - { - DynamoDbMethods.DisplayItem(item); - } - else - { - Console.WriteLine($"Couldn't find {lookupMovie.Title}"); - } - - WaitForEnter(); - - // Delete a movie. - var movieToDelete = new Movie - { - Title = "The Town", - Year = 2010, - }; - - success = await DynamoDbMethods.DeleteItemAsync(client, tableName, movieToDelete); - - if (success) - { - Console.WriteLine($"Successfully deleted {movieToDelete.Title}."); - } - else - { - Console.WriteLine($"Could not delete {movieToDelete.Title}."); - } - - WaitForEnter(); - - // Use Query to find all the movies released in 2010. - int findYear = 2010; - Console.WriteLine($"Movies released in {findYear}"); - var queryCount = await DynamoDbMethods.QueryMoviesAsync(client, tableName, findYear); - Console.WriteLine($"Found {queryCount} movies released in {findYear}"); - - WaitForEnter(); - - // Use Scan to get a list of movies from 2001 to 2011. - int startYear = 2001; - int endYear = 2011; - var scanCount = await DynamoDbMethods.ScanTableAsync(client, tableName, startYear, endYear); - Console.WriteLine($"Found {scanCount} movies released between {startYear} and {endYear}"); - - WaitForEnter(); - - // Delete the table. - success = await DynamoDbMethods.DeleteTableAsync(client, tableName); - - if (success) - { - Console.WriteLine($"Successfully deleted {tableName}"); - } - else - { - Console.WriteLine($"Could not delete {tableName}"); - } - - Console.WriteLine("The DynamoDB Basics example application is done."); - - WaitForEnter(); + var client = new AmazonDynamoDBClient(); + + var tableName = "movie_table"; + + // Relative path to moviedata.json in the local repository. + var movieFileName = @"..\..\..\..\..\..\..\..\resources\sample_files\movies.json"; + + DisplayInstructions(); + + // Create a new table and wait for it to be active. + Console.WriteLine($"Creating the new table: {tableName}"); + + var success = await DynamoDbMethods.CreateMovieTableAsync(client, tableName); + + if (success) + { + Console.WriteLine($"\nTable: {tableName} successfully created."); + } + else + { + Console.WriteLine($"\nCould not create {tableName}."); + } + + WaitForEnter(); + + // Add a single new movie to the table. + var newMovie = new Movie + { + Year = 2021, + Title = "Spider-Man: No Way Home", + }; + + success = await DynamoDbMethods.PutItemAsync(client, newMovie, tableName); + if (success) + { + Console.WriteLine($"Added {newMovie.Title} to the table."); + } + else + { + Console.WriteLine("Could not add movie to table."); } - /// - /// Displays the description of the application on the console. - /// - private static void DisplayInstructions() - { - Console.Clear(); - Console.WriteLine(); - Console.Write(new string(' ', 28)); - Console.WriteLine("DynamoDB Basics Example"); - Console.WriteLine(SepBar); - Console.WriteLine("This demo application shows the basics of using DynamoDB with the AWS SDK for"); - Console.WriteLine(".NET version 3.7 and .NET Core 5."); - Console.WriteLine(SepBar); - Console.WriteLine("The application does the following:"); - Console.WriteLine("\t1. Creates a table with partition: year and sort:title."); - Console.WriteLine("\t2. Adds a single movie to the table."); - Console.WriteLine("\t3. Adds movies to the table from moviedata.json."); - Console.WriteLine("\t4. Updates the rating and plot of the movie that was just added."); - Console.WriteLine("\t5. Gets a movie using its key (partition + sort)."); - Console.WriteLine("\t6. Deletes a movie."); - Console.WriteLine("\t7. Uses QueryAsync to return all movies released in a given year."); - Console.WriteLine("\t8. Uses ScanAsync to return all movies released within a range of years."); - Console.WriteLine("\t9. Finally, it deletes the table that was just created."); - WaitForEnter(); + WaitForEnter(); + + // Update the new movie by adding a plot and rank. + var newInfo = new MovieInfo + { + Plot = "With Spider-Man's identity now revealed, Peter asks" + + "Doctor Strange for help. When a spell goes wrong, dangerous" + + "foes from other worlds start to appear, forcing Peter to" + + "discover what it truly means to be Spider-Man.", + Rank = 9, + }; + + success = await DynamoDbMethods.UpdateItemAsync(client, newMovie, newInfo, tableName); + if (success) + { + Console.WriteLine($"Successfully updated the movie: {newMovie.Title}"); } + else + { + Console.WriteLine("Could not update the movie."); + } + + WaitForEnter(); + + // Add a batch of movies to the DynamoDB table from a list of + // movies in a JSON file. + var itemCount = await DynamoDbMethods.BatchWriteItemsAsync(client, movieFileName); + Console.WriteLine($"Added {itemCount} movies to the table."); + + WaitForEnter(); - /// - /// Simple method to wait for the Enter key to be pressed. - /// - private static void WaitForEnter() + // Get a movie by key. (partition + sort) + var lookupMovie = new Movie { - Console.WriteLine("\nPress to continue."); - Console.WriteLine(SepBar); - _ = Console.ReadLine(); + Title = "Jurassic Park", + Year = 1993, + }; + + Console.WriteLine("Looking for the movie \"Jurassic Park\"."); + var item = await DynamoDbMethods.GetItemAsync(client, lookupMovie, tableName); + if (item.Count > 0) + { + DynamoDbMethods.DisplayItem(item); } + else + { + Console.WriteLine($"Couldn't find {lookupMovie.Title}"); + } + + WaitForEnter(); + + // Delete a movie. + var movieToDelete = new Movie + { + Title = "The Town", + Year = 2010, + }; + + success = await DynamoDbMethods.DeleteItemAsync(client, tableName, movieToDelete); + + if (success) + { + Console.WriteLine($"Successfully deleted {movieToDelete.Title}."); + } + else + { + Console.WriteLine($"Could not delete {movieToDelete.Title}."); + } + + WaitForEnter(); + + // Use Query to find all the movies released in 2010. + int findYear = 2010; + Console.WriteLine($"Movies released in {findYear}"); + var queryCount = await DynamoDbMethods.QueryMoviesAsync(client, tableName, findYear); + Console.WriteLine($"Found {queryCount} movies released in {findYear}"); + + WaitForEnter(); + + // Use Scan to get a list of movies from 2001 to 2011. + int startYear = 2001; + int endYear = 2011; + var scanCount = await DynamoDbMethods.ScanTableAsync(client, tableName, startYear, endYear); + Console.WriteLine($"Found {scanCount} movies released between {startYear} and {endYear}"); + + WaitForEnter(); + + // Delete the table. + success = await DynamoDbMethods.DeleteTableAsync(client, tableName); + + if (success) + { + Console.WriteLine($"Successfully deleted {tableName}"); + } + else + { + Console.WriteLine($"Could not delete {tableName}"); + } + + Console.WriteLine("The DynamoDB Basics example application is done."); + + WaitForEnter(); + } + + /// + /// Displays the description of the application on the console. + /// + private static void DisplayInstructions() + { + Console.Clear(); + Console.WriteLine(); + Console.Write(new string(' ', 28)); + Console.WriteLine("DynamoDB Basics Example"); + Console.WriteLine(SepBar); + Console.WriteLine("This demo application shows the basics of using DynamoDB with the AWS SDK for"); + Console.WriteLine(".NET version 3.7 and .NET Core 5."); + Console.WriteLine(SepBar); + Console.WriteLine("The application does the following:"); + Console.WriteLine("\t1. Creates a table with partition: year and sort:title."); + Console.WriteLine("\t2. Adds a single movie to the table."); + Console.WriteLine("\t3. Adds movies to the table from moviedata.json."); + Console.WriteLine("\t4. Updates the rating and plot of the movie that was just added."); + Console.WriteLine("\t5. Gets a movie using its key (partition + sort)."); + Console.WriteLine("\t6. Deletes a movie."); + Console.WriteLine("\t7. Uses QueryAsync to return all movies released in a given year."); + Console.WriteLine("\t8. Uses ScanAsync to return all movies released within a range of years."); + Console.WriteLine("\t9. Finally, it deletes the table that was just created."); + WaitForEnter(); + } + + /// + /// Simple method to wait for the Enter key to be pressed. + /// + private static void WaitForEnter() + { + Console.WriteLine("\nPress to continue."); + Console.WriteLine(SepBar); + _ = Console.ReadLine(); } } diff --git a/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/GlobalUsings.cs b/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/GlobalUsings.cs deleted file mode 100644 index 6e942fc15dd..00000000000 --- a/dotnetv3/dynamodb/scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/GlobalUsings.cs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -global using Amazon.DynamoDBv2; -global using Amazon.DynamoDBv2.DataModel; -global using Amazon.DynamoDBv2.DocumentModel; -global using Amazon.DynamoDBv2.Model; -global using Newtonsoft.Json; diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/GlobalUsings.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/GlobalUsings.cs index 339d7f9d917..a34d8ab7376 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/GlobalUsings.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/GlobalUsings.cs @@ -1,4 +1,7 @@ -global using Amazon.DynamoDBv2; +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +global using Amazon.DynamoDBv2; global using Amazon.DynamoDBv2.Model; global using Newtonsoft.Json; global using PartiQL_Basics_Scenario; \ No newline at end of file diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PartiQLMethodsTests.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PartiQLMethodsTests.cs index 26bf31532cf..ccb75d5a97b 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PartiQLMethodsTests.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PartiQLMethodsTests.cs @@ -1,8 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using System.Runtime.CompilerServices; - namespace PartiQL_Basics_Tests { [TestCaseOrderer("PartiQL_Basics_Tests.PriorityOrderer", "PartiQL_Basics_Tests")] diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/TestPriorityAttribute.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/TestPriorityAttribute.cs index 0a22ab9c5c7..9c1fc7ee0f6 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/TestPriorityAttribute.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/TestPriorityAttribute.cs @@ -1,8 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -using System; - namespace PartiQL_Basics_Scenario_Tests { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/Usings.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/Usings.cs index b93f2acbc28..9c23415f7eb 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/Usings.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/Usings.cs @@ -1,6 +1,7 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Amazon.DynamoDBv2; -global using Amazon.DynamoDBv2.Model; -global using Newtonsoft.Json; global using PartiQL_Basics_Scenario; global using PartiQL_Basics_Scenario_Tests; global using Xunit; \ No newline at end of file diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PartiQLBatchMethodsTests.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PartiQLBatchMethodsTests.cs index bccd021df70..06c86298b9e 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PartiQLBatchMethodsTests.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PartiQLBatchMethodsTests.cs @@ -13,12 +13,6 @@ public PartiQLBatchMethodsTests() _ = DynamoDBMethods.CreateMovieTableAsync(tableName); } - [Fact(Skip = "Quarantined test.")] - public void Dispose() - { - _ = DynamoDBMethods.DeleteTableAsync(tableName); - } - [Fact(Skip = "Quarantined test."), TestPriority(1)] [Trait("Category", "Integration")] public async Task InsertMoviesTest() diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/Usings.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/Usings.cs index 4eb2238f560..92fe41799a7 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/Usings.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/Usings.cs @@ -1,5 +1,4 @@ -global using Amazon.DynamoDBv2; -global using Amazon.DynamoDBv2.Model; -global using PartiQL_Batch_Scenario; -global using PartiQL_Batch_Scenario.Tests; +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + global using Xunit; \ No newline at end of file diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/GlobalUsings.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/GlobalUsings.cs index acba9bb70b9..2271015ca24 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/GlobalUsings.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/GlobalUsings.cs @@ -1,4 +1,7 @@ -global using Amazon.DynamoDBv2; +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +global using Amazon.DynamoDBv2; global using Amazon.DynamoDBv2.Model; global using Newtonsoft.Json; global using PartiQL_Batch_Scenario; \ No newline at end of file diff --git a/javascriptv3/package-lock.json b/javascriptv3/package-lock.json index 26c901dc255..666ef9396d6 100644 --- a/javascriptv3/package-lock.json +++ b/javascriptv3/package-lock.json @@ -46171,20 +46171,23 @@ } }, "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz", + "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==", "dev": true, "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.4", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.6", + "readable-stream": "^3.6.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 4" } }, "node_modules/browserify-zlib": { @@ -57744,8 +57747,9 @@ } }, "node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1",