From 671a1a94e0d973ee0ac4f6f7650e9c46db141ab1 Mon Sep 17 00:00:00 2001 From: Rachel Hagerman <110480692+rlhagerm@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:09:53 -0600 Subject: [PATCH] .NET v3: Update to .NET 6 and enable Weathertop tests (#5902) --- .github/workflows/super-linter.yml | 1 - dotnetv3/.editorconfig | 4 ++ .../DescribeCertificate.cs | 4 +- .../DescribeCertificate.csproj | 2 +- .../DescribeCertificateTest.csproj | 2 +- .../ListCertificates/ListCertificates.cs | 2 +- .../ListCertificates/ListCertificates.csproj | 2 +- .../ListCertificatesTest.csproj | 2 +- .../Tests/AutoScalingWrapperTests.cs | 31 ++++++++++++- dotnetv3/Bedrock/Tests/BedrockTest.cs | 1 + .../CloudWatch/Actions/CloudWatchClasses.cs | 2 +- .../CloudWatch/Actions/CloudWatchWrapper.cs | 2 +- dotnetv3/CloudWatch/Tests/CloudWatchTests.cs | 22 +++++++++- .../AssociateKmsKeyExample/AssociateKmsKey.cs | 3 +- .../AssociateKmsKeyExample.csproj | 2 +- .../CancelExportTask.cs | 3 +- .../CancelExportTaskExample.csproj | 2 +- .../CreateExportTask.cs | 3 +- .../CreateExportTaskExample.csproj | 2 +- .../CreateLogGroupExample/CreateLogGroup.cs | 3 +- .../CreateLogGroupExample.csproj | 2 +- .../CreateLogStreamExample/CreateLogStream.cs | 3 +- .../CreateLogStreamExample.csproj | 2 +- .../DeleteLogGroupExample/DeleteLogGroup.cs | 3 +- .../DeleteLogGroupExample.csproj | 2 +- .../DescribeExportTasks.cs | 3 +- .../DescribeExportTasksExample.csproj | 2 +- .../DescribeLogGroups.cs | 5 +-- .../DescribeLogGroupsExample.csproj | 2 +- .../Scenarios/Cognito_Basics/CognitoBasics.cs | 12 +++--- dotnetv3/Cognito/Tests/CognitoWrapperTests.cs | 14 +++--- .../DetectDominantLanguage.cs | 3 +- .../DetectDominantLanguageExample.csproj | 2 +- .../DetectEntitiesExample/DetectEntities.cs | 3 +- .../DetectEntitiesExample.csproj | 2 +- .../DetectKeyPhraseExample/DetectKeyPhrase.cs | 3 +- .../DetectKeyPhraseExample.csproj | 2 +- .../DetectSentimentExample/DetectSentiment.cs | 3 +- .../DetectSentimentExample.csproj | 2 +- .../DetectingPIIExample/DetectingPII.cs | 3 +- .../DetectingPIIExample.csproj | 2 +- .../DetectingSyntaxExample/DetectingSyntax.cs | 3 +- .../DetectingSyntaxExample.csproj | 2 +- .../TopicModelingExample.csproj | 2 +- dotnetv3/Directory.Build.props | 9 ++++ dotnetv3/Dockerfile | 8 ++-- .../EC2/Scenarios/EC2_Basics/EC2Basics.cs | 2 +- dotnetv3/EC2/Tests/EC2WrapperTests.cs | 10 ++--- .../CreateVPCExample/CreateVPC.cs | 2 +- .../EventBridge/Tests/EventBridgeTests.cs | 12 ++++++ dotnetv3/Glacier/Actions/GlacierWrapper.cs | 2 +- .../Glue/Scenarios/Glue_Basics/GlueBasics.cs | 20 ++++----- dotnetv3/Glue/Tests/GlueTests.cs | 4 +- dotnetv3/IAM/Scenarios/IAMBasics/IAMBasics.cs | 6 +-- dotnetv3/IAM/Tests/IamWrapperTests.cs | 16 ------- .../KMS/CreateAliasExample/CreateAlias.cs | 7 ++- .../CreateAliasExample.csproj | 2 +- .../KMS/CreateGrantExample/CreateGrant.cs | 7 ++- .../CreateGrantExample.csproj | 2 +- dotnetv3/KMS/CreateKeyExample/CreateKey.cs | 8 ++-- .../CreateKeyExample/CreateKeyExample.csproj | 2 +- .../KMS/DescribeKeyExample/DescribeKey.cs | 11 +++-- .../DescribeKeyExample.csproj | 2 +- dotnetv3/KMS/DisableKeyExample/DisableKey.cs | 9 ++-- .../DisableKeyExample.csproj | 2 +- dotnetv3/KMS/EnableKeyExample/EnableKey.cs | 7 ++- .../EnableKeyExample/EnableKeyExample.csproj | 2 +- .../KMS/ListAliasesExample/ListAliases.cs | 13 +++--- .../ListAliasesExample.csproj | 2 +- dotnetv3/KMS/ListGrantsExample/ListGrants.cs | 9 ++-- .../ListGrantsExample.csproj | 2 +- dotnetv3/KMS/ListKeysExample/ListKeys.cs | 11 +++-- .../ListKeysExample/ListKeysExample.csproj | 2 +- dotnetv3/KMS/README.md | 18 ++++---- .../Keyspaces/Scenarios/CassandraWrapper.cs | 24 +++++++---- dotnetv3/Keyspaces/Scenarios/Movie.cs | 4 +- dotnetv3/Keyspaces/Scenarios/MovieInfo.cs | 10 ++--- .../Keyspaces/Tests/CassandraWrapperTests.cs | 8 ++-- .../Keyspaces/Tests/KeyspacesWrapperTests.cs | 6 +-- .../CreateStreamExample/CreateStream.cs | 3 +- .../CreateStreamExample.csproj | 2 +- .../DeleteStreamExample/DeleteStream.cs | 3 +- .../DeleteStreamExample.csproj | 2 +- .../DeregisterConsumer.cs | 3 +- .../DeregisterConsumerExample.csproj | 2 +- .../ListConsumersExample/ListConsumers.cs | 3 +- .../ListConsumersExample.csproj | 2 +- .../ListStreamsExample/ListStreams.cs | 3 +- .../ListStreamsExample.csproj | 2 +- .../ListTagsExample/ListTags.cs | 3 +- .../ListTagsExample/ListTagsExample.csproj | 2 +- .../RegisterConsumer.cs | 3 +- .../RegisterConsumerExample.csproj | 2 +- .../TagStreamExample/TagStream.cs | 3 +- .../TagStreamExample/TagStreamExample.csproj | 2 +- .../Scenarios/LambdaBasics/LambdaBasics.cs | 4 +- .../Properties/launchSettings.json | 8 ++++ .../AttachPolicyExample.csproj | 2 +- .../CreateAccountExample/CreateAccount.cs | 3 +- .../CreateAccountExample.csproj | 2 +- .../CreateOrganization.cs | 3 +- .../CreateOrganizationExample.csproj | 2 +- .../CreateOrganizationalUnit.cs | 3 +- .../CreateOrganizationalUnitExample.csproj | 2 +- .../CreatePolicyExample/CreatePolicy.cs | 3 +- .../CreatePolicyExample.csproj | 2 +- .../DeleteOrganization.cs | 3 +- .../DeleteOrganizationExample.csproj | 2 +- .../DeleteOrganizationalUnit.cs | 2 - .../DeleteOrganizationalUnitExample.csproj | 2 +- .../DeletePolicyExample/DeletePolicy.cs | 3 +- .../DeletePolicyExample.csproj | 2 +- .../DetachPolicyExample/DetachPolicy.cs | 3 +- .../DetachPolicyExample.csproj | 2 +- .../ListAccountsExample/ListAccounts.cs | 3 +- .../ListAccountsExample.csproj | 2 +- .../ListOrganizationalUnitsForParent.cs | 3 +- ...OrganizationalUnitsForParentExample.csproj | 2 +- .../ListPoliciesExample/ListPolicies.cs | 3 +- .../ListPoliciesExample.csproj | 2 +- .../DeleteLexiconExample/DeleteLexicon.cs | 7 ++- .../DeleteLexiconExample.csproj | 2 +- .../DescribeVoicesExample.csproj | 2 +- .../Polly/GetLexiconExample/GetLexicon.cs | 7 ++- .../GetLexiconExample.csproj | 2 +- .../Polly/ListLexiconsExample/ListLexicons.cs | 15 +++---- .../ListLexiconsExample.csproj | 2 +- .../Polly/PutLexiconExample/PutLexicon.cs | 7 ++- .../PutLexiconExample.csproj | 2 +- dotnetv3/Polly/README.md | 8 ++-- .../SynthesizeSpeechExample.csproj | 2 +- .../SynthesizeSpeechMarksExample.csproj | 2 +- .../Rekognition/AddFacesExample/AddFaces.cs | 3 +- .../AddFacesExample/AddFacesExample.csproj | 2 +- .../CelebritiesInImage.cs | 2 - .../CelebritiesInImageExample.csproj | 2 +- .../CelebrityInfoExample/CelebrityInfo.cs | 3 +- .../CelebrityInfoExample.csproj | 2 +- .../CompareFacesExample/CompareFaces.cs | 1 - .../CompareFacesExample.csproj | 2 +- .../CreateCollection.cs | 3 +- .../CreateCollectionExample.csproj | 2 +- .../DeleteCollection.cs | 2 - .../DeleteCollectionExample.csproj | 2 +- .../DeleteFacesExample/DeleteFaces.cs | 3 +- .../DeleteFacesExample.csproj | 2 +- .../DescribeCollection.cs | 3 +- .../DescribeCollectionExample.csproj | 2 +- .../DetectFacesExample/DetectFaces.cs | 3 +- .../DetectFacesExample.csproj | 2 +- .../DetectLabelsExample/DetectLabels.cs | 3 +- .../DetectLabelsExample.csproj | 2 +- .../DetectLabelsLocalFile.cs | 3 +- .../DetectLabelsLocalFileExample.csproj | 2 +- .../DetectModerationLabels.cs | 3 +- .../DetectModerationLabelsExample.csproj | 2 +- .../DetectTextExample.csproj | 2 +- .../FaceRekognitionExample.csproj | 6 +-- .../FaceRekognitionExampleTests.csproj | 4 +- .../ImageOrientationBoundingBox.cs | 3 +- .../ImageOrientationBoundingBoxExample.csproj | 2 +- .../ListCollectionsExample/ListCollections.cs | 3 +- .../ListCollectionsExample.csproj | 2 +- .../Rekognition/ListFacesExample/ListFaces.cs | 3 +- .../ListFacesExample/ListFacesExample.csproj | 2 +- .../SearchFacesMatchingId.cs | 3 +- .../SearchFacesMatchingIdExample.csproj | 2 +- .../SearchFacesMatchingImage.cs | 3 +- .../SearchFacesMatchingImageExample.csproj | 2 +- dotnetv3/S3/AbortMPUExample/AbortMPU.cs | 11 +++-- .../S3/AbortMPUExample/AbortMPUExample.csproj | 12 +++++- dotnetv3/S3/BucketACLExample/BucketACL.cs | 9 ++-- .../BucketACLExample/BucketACLExample.csproj | 2 +- .../CopyObjectExample.csproj | 2 +- .../EnableNotifications.cs | 9 ++-- .../EnableNotificationsExample.csproj | 2 +- dotnetv3/S3/LifecycleExample/Lifecycle.cs | 9 ++-- .../LifecycleExample/LifecycleExample.csproj | 2 +- dotnetv3/S3/ListBucketsExample/ListBuckets.cs | 10 ++--- .../ListBucketsExample.csproj | 2 +- .../ListObjectsPaginator.cs | 3 +- .../ListObjectsPaginatorExample.csproj | 2 +- .../S3/MPUapiCopyObjExample/MPUapiCopyObj.cs | 9 ++-- .../MPUapiCopyObjExample.csproj | 2 +- dotnetv3/S3/ManageACLsExample/ManageACLs.cs | 13 +++--- .../ManageACLsExample.csproj | 2 +- dotnetv3/S3/ObjectTagExample/ObjectTag.cs | 9 ++-- .../ObjectTagExample/ObjectTagExample.csproj | 2 +- dotnetv3/S3/README.md | 34 +++++++-------- .../RestoreArchivedObject.cs | 9 ++-- .../RestoreArchivedObjectExample.csproj | 2 +- .../S3_BasicsScenarioTests/S3BucketTests.cs | 1 - .../SSECLowLevelMPUcopyObject.cs | 9 ++-- .../SSECLowLevelMPUcopyObjectExample.csproj | 2 +- .../SSEClientEncryption.cs | 9 ++-- .../SSEClientEncryptionExample.csproj | 2 +- .../ServerAccessLogging.cs | 16 +++---- .../ServerAccessLoggingExample.csproj | 2 +- .../ServerSideEncryption.cs | 10 ++--- .../ServerSideEncryptionExample.csproj | 2 +- .../TrackMPUUsingHighLevelAPI.cs | 11 +++-- .../TrackMPUUsingHighLevelAPIExample.csproj | 2 +- .../TransferAcceleration.cs | 13 +++--- .../TransferAccelerationExample.csproj | 2 +- .../UploadUsingPresignedURL.cs | 43 ++++++++----------- .../S3/WebsiteConfigExample/WebsiteConfig.cs | 9 ++-- .../WebsiteConfigExample.csproj | 2 +- .../DeleteMultipleObjects.cs | 9 ++-- .../DeleteMultipleObjectsExample.csproj | 2 +- .../DeleteObjectExample/DeleteObject.cs | 9 ++-- .../DeleteObjectExample.csproj | 2 +- dotnetv3/S3/s3CORSExample/S3CORS.cs | 17 ++++---- .../S3/s3CORSExample/S3CORSExample.csproj | 2 +- .../DeleteMultipleObjects.cs | 9 ++-- .../DeleteMultipleObjectsExample.csproj | 2 +- .../DeleteObjectVersion.cs | 11 +++-- .../DeleteObjectVersionExample.csproj | 2 +- .../ListObjectVersions.cs | 9 ++-- .../ListObjectVersionsExample.csproj | 2 +- .../IsPhoneNumOptedOut.cs | 4 +- .../AssumeRoleExample.csproj | 2 +- .../AssumeRoleExampleTest.csproj | 2 +- .../Lambdas/SageMakerLambdaFunction.cs | 2 +- .../BatchTranslateExample/BatchTranslate.cs | 11 +++-- .../BatchTranslateExample.csproj | 2 +- .../DescribeTextTranslation.cs | 9 ++-- .../DescribeTextTranslationExample.csproj | 2 +- .../ListTranslationJobs.cs | 8 ++-- .../ListTranslationJobsExample.csproj | 2 +- dotnetv3/Translate/README.md | 10 ++--- .../StopTextTranslationJob.cs | 9 ++-- .../StopTextTranslationJobExample.csproj | 2 +- .../TranslateTextExample/TranslateText.cs | 9 ++-- .../TranslateTextExample.csproj | 2 +- .../CreateTablesLoadData.cs | 3 +- .../CreateTablesLoadDataExample.csproj | 2 +- .../HighLevelBatchWriteItemExample.csproj | 2 +- .../HighLevelItemCRUD.cs | 3 +- .../HighLevelItemCRUDExample.csproj | 2 +- .../HighLevelMappingArbitraryData.cs | 3 +- ...ighLevelMappingArbitraryDataExample.csproj | 2 +- .../HighLevelQueryAndScan.cs | 3 +- .../HighLevelQueryAndScanExample.csproj | 2 +- .../LowLevelBatchGet/LowLevelBatchGet.csproj | 2 +- .../LowLevelTableExample.cs | 4 +- .../MidLevelBatchWriteItem.cs | 3 +- .../MidLevelBatchWriteItemExample.csproj | 2 +- .../MidLevelQueryAndScan.cs | 3 +- .../MidLevelQueryAndScanExample.csproj | 2 +- .../MidLevelScanOnly.cs | 3 +- .../MidLevelScanOnlyExample.csproj | 2 +- .../MidlevelItemCRUD.cs | 3 +- .../MidlevelItemCRUDExample.csproj | 2 +- .../PartiQL_Basics_Scenario/Movie.cs | 4 +- .../PartiQL_Basics_Scenario/MovieInfo.cs | 10 ++--- .../PartiQL_Basics_Scenario/PartiQLMethods.cs | 4 +- .../PartiQL_Basics_Tests/PriorityOrderer.cs | 2 +- .../PartiQLBatch_Tests/PriorityOrderer.cs | 2 +- .../PartiQL_Batch_Scenario/Movie.cs | 4 +- .../PartiQL_Batch_Scenario/MovieInfo.cs | 10 ++--- .../PartiQLBatchMethods.cs | 4 +- 261 files changed, 595 insertions(+), 634 deletions(-) create mode 100644 dotnetv3/Directory.Build.props create mode 100644 dotnetv3/Lambda/Scenarios/LambdaBasics/Properties/launchSettings.json diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index a5a1c100384..2f1c871501f 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -36,5 +36,4 @@ jobs: VALIDATE_PYTHON_BLACK: true VALIDATE_RUBY: true VALIDATE_KOTLIN: true - VALIDATE_EDITORCONFIG: true VALIDATE_BASH: true diff --git a/dotnetv3/.editorconfig b/dotnetv3/.editorconfig index 96f5495f94c..ee74088424c 100644 --- a/dotnetv3/.editorconfig +++ b/dotnetv3/.editorconfig @@ -129,6 +129,8 @@ csharp_space_between_square_brackets = false ############################### # File header. file_header_template = Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. \nSPDX-License-Identifier: Apache-2.0 +# SA0001: XML comment disable is allowed. +dotnet_diagnostic.SA0001.severity = none # SA1600: Elements must be documented is disabled. dotnet_diagnostic.SA1600.severity = none dotnet_diagnostic.SA1615.severity = none @@ -151,3 +153,5 @@ dotnet_diagnostic.SA1309.severity = none dotnet_diagnostic.IDE2000.severity = error # IDE0073: Require a file header. dotnet_diagnostic.IDE0073.severity = error +# CA1416: Disable system.drawing warnings. +dotnet_diagnostic.CA1416.severity = none diff --git a/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs b/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs index f1662c817e7..e44a3b4aff2 100644 --- a/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs +++ b/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.cs @@ -12,7 +12,7 @@ namespace DescribeCertificate { class DescribeCertificate { - // The following example retrieves and displays the metadate for a + // The following example retrieves and displays the metadata for a // certificate using the AWS Certificate Manager (ACM) service. // Specify your AWS Region (an example Region is shown). @@ -21,7 +21,7 @@ class DescribeCertificate static void Main(string[] args) { - var _client = new Amazon.CertificateManager.AmazonCertificateManagerClient(ACMRegion); + _client = new Amazon.CertificateManager.AmazonCertificateManagerClient(ACMRegion); var describeCertificateReq = new DescribeCertificateRequest(); // The ARN used here is just an example. Replace it with the ARN of diff --git a/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.csproj b/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.csproj index b33e9e3470a..1df53ede943 100644 --- a/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.csproj +++ b/dotnetv3/ACM/DescribeCertificates/DescribeCertificate/DescribeCertificate.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.csproj b/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.csproj index f8155988267..b530a533e87 100644 --- a/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.csproj +++ b/dotnetv3/ACM/DescribeCertificates/DescribeCertificateTest/DescribeCertificateTest.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false diff --git a/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs b/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs index bf1d1e1499b..6925cc2237c 100644 --- a/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs +++ b/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.cs @@ -23,7 +23,7 @@ class ListCertificates static void Main(string[] args) { - var _client = new AmazonCertificateManagerClient(ACMRegion); + _client = new AmazonCertificateManagerClient(ACMRegion); var certificateList = ListCertificatesResponseAsync(client: _client); Console.WriteLine("Certificate Summary List\n"); diff --git a/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.csproj b/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.csproj index 4e14c6a7864..778af86c215 100644 --- a/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.csproj +++ b/dotnetv3/ACM/ListCertificates/ListCertificates/ListCertificates.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.csproj b/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.csproj index 9ec118a9b89..3782bc6f550 100644 --- a/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.csproj +++ b/dotnetv3/ACM/ListCertificates/ListCertificatesTest/ListCertificatesTest.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false diff --git a/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs b/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs index 38e242ba5b4..d9f3644c65e 100644 --- a/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs +++ b/dotnetv3/AutoScaling/Tests/AutoScalingWrapperTests.cs @@ -70,6 +70,7 @@ public AutoScalingWrapperTests() [Fact()] [Order(1)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task CreateLaunchTemplateAsyncTest() { _launchTemplateId = await _ec2Wrapper.CreateLaunchTemplateAsync(_imageId!, _instanceType!, _launchTemplateName!); @@ -83,6 +84,7 @@ public async Task CreateLaunchTemplateAsyncTest() [Fact()] [Order(2)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeLaunchTemplateAsyncTest() { var success = await _ec2Wrapper.DescribeLaunchTemplateAsync(_launchTemplateName!); @@ -97,6 +99,7 @@ public async Task DescribeLaunchTemplateAsyncTest() [Fact()] [Order(3)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task CreateAutoScalingGroupTest() { var availabilityZone = @@ -114,6 +117,7 @@ public async Task CreateAutoScalingGroupTest() [Fact()] [Order(4)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAutoScalingInstancesAsyncTest() { var instanceDetails = await _autoScalingWrapper.DescribeAutoScalingInstancesAsync(_groupName!); @@ -127,6 +131,7 @@ public async Task DescribeAutoScalingInstancesAsyncTest() [Fact()] [Order(5)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task EnableMetricsCollectionAsyncTest() { var success = await _autoScalingWrapper.EnableMetricsCollectionAsync(_groupName!); @@ -143,6 +148,7 @@ public async Task EnableMetricsCollectionAsyncTest() [Fact()] [Order(6)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task SetDesiredCapacityAsyncTest() { var newMax = 3; @@ -167,6 +173,7 @@ public async Task SetDesiredCapacityAsyncTest() [Fact()] [Order(7)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task UpdateAutoScalingGroupTest() { var newMax = 3; @@ -189,6 +196,7 @@ public async Task UpdateAutoScalingGroupTest() [Fact()] [Order(8)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAutoScalingGroupsAsyncTest() { var details = await _autoScalingWrapper.DescribeAutoScalingGroupsAsync(_groupName!); @@ -203,6 +211,7 @@ public async Task DescribeAutoScalingGroupsAsyncTest() [Fact()] [Order(9)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeScalingActivitiesAsyncTest() { var activities = await _autoScalingWrapper.DescribeScalingActivitiesAsync(_groupName!); @@ -217,6 +226,7 @@ public async Task DescribeScalingActivitiesAsyncTest() [Fact()] [Order(10)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task GetCloudWatchMetricsAsyncTest() { var metrics = await _cloudWatchWrapper.GetCloudWatchMetricsAsync(_groupName!); @@ -231,6 +241,7 @@ public async Task GetCloudWatchMetricsAsyncTest() [Fact()] [Order(11)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task GetMetricStatisticsAsyncTest() { var dataPoints = await _cloudWatchWrapper.GetMetricStatisticsAsync(_groupName!); @@ -245,6 +256,7 @@ public async Task GetMetricStatisticsAsyncTest() [Fact()] [Order(12)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DisableMetricsCollectionAsyncTest() { var success = await _autoScalingWrapper.DisableMetricsCollectionAsync(_groupName!); @@ -260,6 +272,7 @@ public async Task DisableMetricsCollectionAsyncTest() [Fact()] [Order(13)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task TerminateInstanceInAutoScalingGroupAsyncTest() { foreach (var group in _groups!) @@ -268,7 +281,20 @@ public async Task TerminateInstanceInAutoScalingGroupAsyncTest() { foreach (Amazon.AutoScaling.Model.Instance instance in group.Instances) { - var success = await _autoScalingWrapper.TerminateInstanceInAutoScalingGroupAsync(instance.InstanceId); + var retries = 3; + var success = false; + while (retries > 0 && !success) + try + { + success = + await _autoScalingWrapper + .TerminateInstanceInAutoScalingGroupAsync( + instance.InstanceId); + } + catch (ScalingActivityInProgressException) + { + retries--; + } Assert.True(success, "Could not terminate the instance."); } } @@ -283,6 +309,7 @@ public async Task TerminateInstanceInAutoScalingGroupAsyncTest() [Fact()] [Order(14)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DeleteAutoScalingGroupTest() { var success = await _autoScalingWrapper.DeleteAutoScalingGroupAsync(_groupName!); @@ -299,6 +326,7 @@ public async Task DeleteAutoScalingGroupTest() [Fact()] [Order(15)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DeleteLaunchTemplateAsyncTest() { var templateName = await _ec2Wrapper.DeleteLaunchTemplateAsync(_launchTemplateId!); @@ -313,6 +341,7 @@ public async Task DeleteLaunchTemplateAsyncTest() /// Async Task. [Fact()] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAccountLimitsTest() { var success = await _autoScalingWrapper.DescribeAccountLimitsAsync(); diff --git a/dotnetv3/Bedrock/Tests/BedrockTest.cs b/dotnetv3/Bedrock/Tests/BedrockTest.cs index d21612b9ec2..c8b90ca2e64 100644 --- a/dotnetv3/Bedrock/Tests/BedrockTest.cs +++ b/dotnetv3/Bedrock/Tests/BedrockTest.cs @@ -28,6 +28,7 @@ public BedrockTest() [Fact] [Order(1)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task ListFoundationModelsAsync_ShouldNotBeNull() { var result = await bedrockClient.ListFoundationModelsAsync(new ListFoundationModelsRequest()); diff --git a/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs b/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs index 546b62a45ea..cbba6ed8a8c 100644 --- a/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs +++ b/dotnetv3/CloudWatch/Actions/CloudWatchClasses.cs @@ -83,7 +83,7 @@ public class Widget public int Height { get; set; } [JsonPropertyName("properties")] - public Properties Properties { get; set; } + public Properties Properties { get; set; } = null!; } public class YAxis diff --git a/dotnetv3/CloudWatch/Actions/CloudWatchWrapper.cs b/dotnetv3/CloudWatch/Actions/CloudWatchWrapper.cs index c537160a66f..d78188bc8fe 100644 --- a/dotnetv3/CloudWatch/Actions/CloudWatchWrapper.cs +++ b/dotnetv3/CloudWatch/Actions/CloudWatchWrapper.cs @@ -275,7 +275,7 @@ public async Task> GetMetricData(int minutesOfData, bool /// Optional actions to execute when in an alarm state. /// True if successful. public async Task PutMetricEmailAlarm(string alarmDescription, string alarmName, ComparisonOperator comparison, - string metricName, string metricNamespace, double threshold, List alarmActions = null) + string metricName, string metricNamespace, double threshold, List alarmActions = null!) { try { diff --git a/dotnetv3/CloudWatch/Tests/CloudWatchTests.cs b/dotnetv3/CloudWatch/Tests/CloudWatchTests.cs index f77aee86224..ff0da42127b 100644 --- a/dotnetv3/CloudWatch/Tests/CloudWatchTests.cs +++ b/dotnetv3/CloudWatch/Tests/CloudWatchTests.cs @@ -51,6 +51,7 @@ public CloudWatchTests() [Fact] [Order(1)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task ListMetrics_ShouldNotBeNull() { var result = await _cloudWatchWrapper.ListMetrics("AWS/Billing"); @@ -65,6 +66,7 @@ public async Task ListMetrics_ShouldNotBeNull() [Fact] [Order(2)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task GetMetricStatistics_ShouldNotBeNull() { var result = await _cloudWatchWrapper.GetMetricStatistics( @@ -85,6 +87,7 @@ public async Task GetMetricStatistics_ShouldNotBeNull() [Fact] [Order(3)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task PutDashboard_ShouldNotBeNull() { var dashboardName = _configuration["dashboardName"]; @@ -109,6 +112,7 @@ public async Task PutDashboard_ShouldNotBeNull() [Fact] [Order(4)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task GetDashboard_ShouldNotBeNull() { var dashboardName = _configuration["dashboardName"]; @@ -126,6 +130,7 @@ public async Task GetDashboard_ShouldNotBeNull() [Fact] [Order(5)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task ListDashboard_ShouldIncludeDashboard() { var dashboardName = _configuration["dashboardName"]; @@ -141,6 +146,7 @@ public async Task ListDashboard_ShouldIncludeDashboard() [Fact] [Order(6)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task PutMetricData_ShouldSucceed() { var customMetricNamespace = _configuration["customMetricNamespace"]; @@ -166,6 +172,7 @@ public async Task PutMetricData_ShouldSucceed() [Fact] [Order(7)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task GetMetricImage_ShouldSucceed() { var customMetricNamespace = _configuration["customMetricNamespace"]; @@ -252,7 +259,7 @@ public async Task GetMetricData_ShouldSucceed() 20, query); - Assert.NotEmpty(metricData); + Assert.NotNull(metricData); } /// @@ -262,6 +269,7 @@ public async Task GetMetricData_ShouldSucceed() [Fact] [Order(10)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task PutMetricEmailAlarm_ShouldSucceed() { var customMetricNamespace = _configuration["customMetricNamespace"]; @@ -287,6 +295,7 @@ public async Task PutMetricEmailAlarm_ShouldSucceed() [Fact] [Order(11)] [Trait("Category", "Unit")] + [Trait("Category", "Weathertop")] public void AddEmailAlarmAction_ShouldIncludeAction() { var accountId = _configuration["accountId"]; @@ -306,6 +315,7 @@ public void AddEmailAlarmAction_ShouldIncludeAction() [Fact] [Order(12)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAlarms_ShouldIncludeAlarm() { var alarmName = _configuration["exampleAlarmName"]; @@ -321,6 +331,7 @@ public async Task DescribeAlarms_ShouldIncludeAlarm() [Fact] [Order(13)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAlarmsForMetric_ShouldIncludeAlarm() { var alarmName = _configuration["exampleAlarmName"]; @@ -338,6 +349,7 @@ public async Task DescribeAlarmsForMetric_ShouldIncludeAlarm() [Fact] [Order(14)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAlarmsForMetric_ShouldNotIncludeAlarm() { var alarmName = _configuration["exampleAlarmName"]; @@ -353,6 +365,7 @@ public async Task DescribeAlarmsForMetric_ShouldNotIncludeAlarm() [Fact] [Order(15)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAlarmHistory_ShouldNotBeNull() { var customMetricName = _configuration["customMetricName"]; @@ -368,6 +381,7 @@ public async Task DescribeAlarmHistory_ShouldNotBeNull() [Fact] [Order(16)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task EnableAlarmActions_ShouldSucceed() { var alarmName = _configuration["exampleAlarmName"]; @@ -383,6 +397,7 @@ public async Task EnableAlarmActions_ShouldSucceed() [Fact] [Order(17)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DisableAlarmActions_ShouldSucceed() { var alarmName = _configuration["exampleAlarmName"]; @@ -398,6 +413,7 @@ public async Task DisableAlarmActions_ShouldSucceed() [Fact] [Order(18)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DeleteAlarms_ShouldSucceed() { var alarmName = _configuration["exampleAlarmName"]; @@ -413,6 +429,7 @@ public async Task DeleteAlarms_ShouldSucceed() [Fact] [Order(19)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task PutAnomalyDetector_ShouldSucceed() { var customMetricNamespace = _configuration["customMetricNamespace"]; @@ -436,6 +453,7 @@ public async Task PutAnomalyDetector_ShouldSucceed() [Fact] [Order(20)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DescribeAnomalyDetectors_ShouldNotBeEmpty() { var customMetricNamespace = _configuration["customMetricNamespace"]; @@ -452,6 +470,7 @@ public async Task DescribeAnomalyDetectors_ShouldNotBeEmpty() [Fact] [Order(21)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DeleteAnomalyDetector_ShouldSucceed() { var customMetricNamespace = _configuration["customMetricNamespace"]; @@ -475,6 +494,7 @@ public async Task DeleteAnomalyDetector_ShouldSucceed() [Fact] [Order(22)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DeleteDashboard_ShouldSucceed() { var dashboardName = _configuration["dashboardName"]; diff --git a/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKey.cs b/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKey.cs index d4eae83598d..b45ea127c24 100644 --- a/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKey.cs +++ b/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKey.cs @@ -11,8 +11,7 @@ namespace AssociateKmsKeyExample /// /// Shows how to associate an AWS Key Management Service (AWS KMS) key with - /// an Amazon CloudWatch Logs log group. The example was created using the - /// AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// an Amazon CloudWatch Logs log group. /// public class AssociateKmsKey { diff --git a/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKeyExample.csproj b/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKeyExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKeyExample.csproj +++ b/dotnetv3/CloudWatchLogs/AssociateKmsKeyExample/AssociateKmsKeyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTask.cs b/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTask.cs index 8b4c9f996c6..63875bb3152 100644 --- a/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTask.cs +++ b/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTask.cs @@ -10,8 +10,7 @@ namespace CancelExportTaskExample using Amazon.CloudWatchLogs.Model; /// - /// Shows how to cancel an Amazon CloudWatch Logs export task. The example - /// uses the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Shows how to cancel an Amazon CloudWatch Logs export task. /// public class CancelExportTask { diff --git a/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTaskExample.csproj b/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTaskExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTaskExample.csproj +++ b/dotnetv3/CloudWatchLogs/CancelExportTaskExample/CancelExportTaskExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTask.cs b/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTask.cs index 3f619390096..dec98cac236 100644 --- a/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTask.cs +++ b/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTask.cs @@ -12,8 +12,7 @@ namespace CreateExportTaskExample /// /// Shows how to create an Export Task to export the contents of the Amazon /// CloudWatch Logs to the specified Amazon Simple Storage Service (Amazon S3) - /// bucket. The example was created with the AWS SDK for .NET version 3.7 and - /// .NET Core 5.0. + /// bucket. /// public class CreateExportTask { diff --git a/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTaskExample.csproj b/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTaskExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTaskExample.csproj +++ b/dotnetv3/CloudWatchLogs/CreateExportTaskExample/CreateExportTaskExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroup.cs b/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroup.cs index 2549480511a..8083be7680a 100644 --- a/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroup.cs +++ b/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroup.cs @@ -10,8 +10,7 @@ namespace CreateLogGroupExample using Amazon.CloudWatchLogs.Model; /// - /// Shows how to create an Amazon CloudWatch Logs log group. The example - /// was created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Shows how to create an Amazon CloudWatch Logs log group. /// public class CreateLogGroup { diff --git a/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroupExample.csproj b/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroupExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroupExample.csproj +++ b/dotnetv3/CloudWatchLogs/CreateLogGroupExample/CreateLogGroupExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStream.cs b/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStream.cs index 0318ac5d266..31ee442de20 100644 --- a/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStream.cs +++ b/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStream.cs @@ -11,8 +11,7 @@ namespace CreateLogStreamExample /// /// Shows how to create an Amazon CloudWatch Logs stream for a CloudWatch - /// log group. The example was created using the AWS SDK for .NET version - /// 3.7 and .NET Core 5.0. + /// log group. /// public class CreateLogStream { diff --git a/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStreamExample.csproj b/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStreamExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStreamExample.csproj +++ b/dotnetv3/CloudWatchLogs/CreateLogStreamExample/CreateLogStreamExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroup.cs b/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroup.cs index 22a8ef70690..0581c0169d8 100644 --- a/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroup.cs +++ b/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroup.cs @@ -11,8 +11,7 @@ namespace DeleteLogGroupExample /// /// Uses the Amazon CloudWatch Logs Service to delete an existing - /// CloudWatch Logs log group. The example was created using the - /// AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// CloudWatch Logs log group. /// public class DeleteLogGroup { diff --git a/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroupExample.csproj b/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroupExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroupExample.csproj +++ b/dotnetv3/CloudWatchLogs/DeleteLogGroupExample/DeleteLogGroupExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasks.cs b/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasks.cs index e915750b835..d8ab508fffb 100644 --- a/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasks.cs +++ b/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasks.cs @@ -11,8 +11,7 @@ namespace DescribeExportTasksExample /// /// Shows how to retrieve a list of information about Amazon CloudWatch - /// Logs export tasks. The example was created using the AWS SDK for .NET - /// version 3.7 and .NET Core 5.0. + /// Logs export tasks. /// public class DescribeExportTasks { diff --git a/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasksExample.csproj b/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasksExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasksExample.csproj +++ b/dotnetv3/CloudWatchLogs/DescribeExportTasksExample/DescribeExportTasksExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroups.cs b/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroups.cs index b1c1f4ede30..accf6d01ae4 100644 --- a/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroups.cs +++ b/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroups.cs @@ -11,8 +11,7 @@ namespace DescribeLogGroupsExample /// /// Retrieves information about existing Amazon CloudWatch Logs log groups - /// and displays the information on the console. The example was created - /// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// and displays the information on the console. /// public class DescribeLogGroups { @@ -25,7 +24,7 @@ public static async Task Main() var client = new AmazonCloudWatchLogsClient(); bool done = false; - string? newToken = null; + string newToken = null; var request = new DescribeLogGroupsRequest { diff --git a/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroupsExample.csproj b/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroupsExample.csproj index 6ba40399e5d..5d537be0cfd 100644 --- a/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroupsExample.csproj +++ b/dotnetv3/CloudWatchLogs/DescribeLogGroupsExample/DescribeLogGroupsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Cognito/Scenarios/Cognito_Basics/CognitoBasics.cs b/dotnetv3/Cognito/Scenarios/Cognito_Basics/CognitoBasics.cs index 6969c3c1cf6..75ade90fa19 100644 --- a/dotnetv3/Cognito/Scenarios/Cognito_Basics/CognitoBasics.cs +++ b/dotnetv3/Cognito/Scenarios/Cognito_Basics/CognitoBasics.cs @@ -39,10 +39,10 @@ static async Task Main(string[] args) Console.WriteLine(new string('-', 80)); // clientId - The app client Id value that you get from the AWS CDK script. - string clientId = configuration["ClientId"]; // "*** REPLACE WITH CLIENT ID VALUE FROM CDK SCRIPT"; + var clientId = configuration["ClientId"]; // "*** REPLACE WITH CLIENT ID VALUE FROM CDK SCRIPT"; // poolId - The pool Id that you get from the AWS CDK script. - string poolId = configuration["PoolId"]; // "*** REPLACE WITH POOL ID VALUE FROM CDK SCRIPT"; + var poolId = configuration["PoolId"]!; // "*** REPLACE WITH POOL ID VALUE FROM CDK SCRIPT"; var userName = configuration["UserName"]; var password = configuration["Password"]; var email = configuration["Email"]; @@ -96,14 +96,14 @@ static async Task Main(string[] args) Console.Write("Would you like to send a new code? (Y/N) "); var answer = Console.ReadLine(); - if (answer.ToLower() == "y") + if (answer!.ToLower() == "y") { await cognitoWrapper.ResendConfirmationCodeAsync(clientId, userName); Console.WriteLine("Sending a new confirmation code"); } Console.Write("Enter confirmation code (from Email): "); - string code = Console.ReadLine(); + var code = Console.ReadLine(); await cognitoWrapper.ConfirmSignupAsync(clientId, code, userName); @@ -116,7 +116,7 @@ static async Task Main(string[] args) var setupSession = await cognitoWrapper.AssociateSoftwareTokenAsync(setupResponse.Session); Console.Write("Enter the 6-digit code displayed in Google Authenticator: "); - string setupCode = Console.ReadLine(); + var setupCode = Console.ReadLine(); var setupResult = await cognitoWrapper.VerifySoftwareTokenAsync(setupSession, setupCode); Console.WriteLine($"Setup status: {setupResult}"); @@ -125,7 +125,7 @@ static async Task Main(string[] args) var authSession = await cognitoWrapper.AdminInitiateAuthAsync(clientId, poolId, userName, password); Console.Write("Enter a new 6-digit code displayed in Google Authenticator: "); - string authCode = Console.ReadLine(); + var authCode = Console.ReadLine(); var authResult = await cognitoWrapper.AdminRespondToAuthChallengeAsync(userName, clientId, authCode, authSession, poolId); Console.WriteLine($"Authenticated and received access token: {authResult.AccessToken}"); diff --git a/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs b/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs index 04f2e7d7fcd..0ecf65211c3 100644 --- a/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs +++ b/dotnetv3/Cognito/Tests/CognitoWrapperTests.cs @@ -16,8 +16,8 @@ public class CognitoWrapperTests private readonly string _email; private readonly string _clientId; private readonly string _userPoolId; - private static string _mfaToken; - private static string _session; + private static string _mfaToken = null!; + private static string _session = null!; /// /// Constructor for the test class. @@ -34,11 +34,11 @@ public CognitoWrapperTests() _client = new AmazonCognitoIdentityProviderClient(); _wrapper = new CognitoWrapper(_client); - _userName = _configuration["UserName"]; - _email = _configuration["Email"]; - _password = _configuration["Password"]; - _clientId = _configuration["ClientId"]; - _userPoolId = _configuration["UserPoolId"]; + _userName = _configuration["UserName"]!; + _email = _configuration["Email"]!; + _password = _configuration["Password"]!; + _clientId = _configuration["ClientId"]!; + _userPoolId = _configuration["UserPoolId"]!; } [Fact(Skip = "Requires user intervention.")] diff --git a/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguage.cs b/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguage.cs index ed8932a3bb9..e1b2eac7615 100644 --- a/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguage.cs +++ b/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguage.cs @@ -11,8 +11,7 @@ namespace DetectDominantLanguageExample /// /// This example calls the Amazon Comprehend service to determine the - /// dominant language. The example was created using the AWS SDK for .NET - /// 3.7 and .NET Core 5.0. + /// dominant language. /// public static class DetectDominantLanguage { diff --git a/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguageExample.csproj b/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguageExample.csproj index b4ec909414b..4987ca600aa 100644 --- a/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguageExample.csproj +++ b/dotnetv3/Comprehend/DetectDominantLanguageExample/DetectDominantLanguageExample/DetectDominantLanguageExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntities.cs b/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntities.cs index 62adb4f0404..c7a4075d046 100644 --- a/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntities.cs +++ b/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntities.cs @@ -11,8 +11,7 @@ namespace DetectEntitiesExample /// /// This example shows how to use the AmazonComprehend service detect any - /// entities in submitted text. This example was created using the AWS SDK - /// for .NET 3.7 and .NET Core 5.0. + /// entities in submitted text. /// public static class DetectEntities { diff --git a/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntitiesExample.csproj b/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntitiesExample.csproj index b4ec909414b..4987ca600aa 100644 --- a/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntitiesExample.csproj +++ b/dotnetv3/Comprehend/DetectEntitiesExample/DetectEntitiesExample/DetectEntitiesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhrase.cs b/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhrase.cs index c264dfaa09f..bfa4d177eaf 100644 --- a/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhrase.cs +++ b/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhrase.cs @@ -11,8 +11,7 @@ namespace DetectKeyPhraseExample /// /// This example shows how to use the Amazon Comprehend service to - /// search text for key phrases. It was created using the AWS SDK for - /// .NET version 3.7 and .NET Core 5.0. + /// search text for key phrases. /// public static class DetectKeyPhrase { diff --git a/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhraseExample.csproj b/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhraseExample.csproj index b4ec909414b..4987ca600aa 100644 --- a/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhraseExample.csproj +++ b/dotnetv3/Comprehend/DetectKeyPhraseExample/DetectKeyPhraseExample/DetectKeyPhraseExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentiment.cs b/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentiment.cs index a98d5a8bc02..f37e0c5421c 100644 --- a/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentiment.cs +++ b/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentiment.cs @@ -11,8 +11,7 @@ namespace DetectSentimentExample /// /// This example shows how to detect the overall sentiment of the supplied - /// text using the Amazon Comprehend service. The example was writing using - /// the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// text using the Amazon Comprehend service. /// public static class DetectSentiment { diff --git a/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentimentExample.csproj b/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentimentExample.csproj index b4ec909414b..4987ca600aa 100644 --- a/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentimentExample.csproj +++ b/dotnetv3/Comprehend/DetectSentimentExample/DetectSentimentExample/DetectSentimentExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPII.cs b/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPII.cs index e9a3d4643a7..074a1db7ae2 100644 --- a/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPII.cs +++ b/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPII.cs @@ -12,8 +12,7 @@ namespace DetectingPIIExample /// /// This example shows how to use the Amazon Comprehend service to find /// personally identifiable information (PII) within text submitted to the - /// DetectPiiEntitiesAsync method. The example was created using the AWS - /// SDK for .NET version 3.7 and .NET Core 5.0. + /// DetectPiiEntitiesAsync method. /// public class DetectingPII { diff --git a/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPIIExample.csproj b/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPIIExample.csproj index b4ec909414b..4987ca600aa 100644 --- a/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPIIExample.csproj +++ b/dotnetv3/Comprehend/DetectingPIIExample/DetectingPIIExample/DetectingPIIExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntax.cs b/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntax.cs index 11436c1b5a3..4927bd2d8ff 100644 --- a/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntax.cs +++ b/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntax.cs @@ -11,8 +11,7 @@ namespace DetectingSyntaxExample /// /// This example shows how to use Amazon Comprehend to detect syntax - /// elements by calling the DetectSyntaxAsync method. This example was - /// created using the AWS SDK for .NET 3.7 and .NET Core 5.0. + /// elements by calling the DetectSyntaxAsync method. /// public class DetectingSyntax { diff --git a/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntaxExample.csproj b/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntaxExample.csproj index b4ec909414b..4987ca600aa 100644 --- a/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntaxExample.csproj +++ b/dotnetv3/Comprehend/DetectingSyntaxExample/DetectingSyntaxExample/DetectingSyntaxExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Comprehend/TopicModelingExample/TopicModelingExample/TopicModelingExample.csproj b/dotnetv3/Comprehend/TopicModelingExample/TopicModelingExample/TopicModelingExample.csproj index b4ec909414b..4987ca600aa 100644 --- a/dotnetv3/Comprehend/TopicModelingExample/TopicModelingExample/TopicModelingExample.csproj +++ b/dotnetv3/Comprehend/TopicModelingExample/TopicModelingExample/TopicModelingExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Directory.Build.props b/dotnetv3/Directory.Build.props new file mode 100644 index 00000000000..3ce268767ed --- /dev/null +++ b/dotnetv3/Directory.Build.props @@ -0,0 +1,9 @@ + + + 1701;1702;SA0001 + + + + 1701;1702;SA0001;CA1416 + + \ No newline at end of file diff --git a/dotnetv3/Dockerfile b/dotnetv3/Dockerfile index 80d990651a6..72fb7389b6c 100644 --- a/dotnetv3/Dockerfile +++ b/dotnetv3/Dockerfile @@ -1,9 +1,9 @@ # syntax=docker/dockerfile:1 FROM mcr.microsoft.com/dotnet/sdk:6.0 -# Enable the .NET 5.0 SDK if running 5.0 examples: -COPY --from=mcr.microsoft.com/dotnet/sdk:5.0 /usr/share/dotnet/sdk /usr/share/dotnet/sdk -COPY --from=mcr.microsoft.com/dotnet/sdk:5.0 /usr/share/dotnet/shared /usr/share/dotnet/shared +# Add the dotnet 8 runtime +COPY --from=mcr.microsoft.com/dotnet/sdk:8.0 /usr/share/dotnet/sdk /usr/share/dotnet/sdk +COPY --from=mcr.microsoft.com/dotnet/sdk:8.0 /usr/share/dotnet/shared /usr/share/dotnet/shared # Copy the dotnetv3 folder and run unit tests from the top level solution. # Or navigate to a service folder or a scenario folder, @@ -12,4 +12,4 @@ COPY . /dotnetv3 RUN cd /dotnetv3 && dotnet build -v=q --property WarningLevel=0 /clp:ErrorsOnly --nologo -CMD ["dotnet", "test", "dotnetv3", "--filter", "Category=Unit", "--verbosity=quiet", "/clp:ErrorsOnly", "--nologo"] \ No newline at end of file +CMD ["dotnet", "test", "dotnetv3", "--filter", "Category=Unit|Category=Weathertop", "--verbosity=quiet", "/clp:ErrorsOnly", "--nologo"] \ No newline at end of file diff --git a/dotnetv3/EC2/Scenarios/EC2_Basics/EC2Basics.cs b/dotnetv3/EC2/Scenarios/EC2_Basics/EC2Basics.cs index 9b42fa3bf97..644d5b9dd71 100644 --- a/dotnetv3/EC2/Scenarios/EC2_Basics/EC2Basics.cs +++ b/dotnetv3/EC2/Scenarios/EC2_Basics/EC2Basics.cs @@ -58,7 +58,7 @@ static async Task Main(string[] args) { Console.Write("Would you like to list your existing key pairs? "); answer = Console.ReadLine(); - } while (answer.ToLower() != "y" && answer.ToLower() != "n"); + } while (answer!.ToLower() != "y" && answer.ToLower() != "n"); if (answer == "y") { diff --git a/dotnetv3/EC2/Tests/EC2WrapperTests.cs b/dotnetv3/EC2/Tests/EC2WrapperTests.cs index 09da7e47d39..e0631f89684 100644 --- a/dotnetv3/EC2/Tests/EC2WrapperTests.cs +++ b/dotnetv3/EC2/Tests/EC2WrapperTests.cs @@ -13,7 +13,7 @@ public class EC2WrapperTests private readonly EC2Wrapper _ec2Wrapper; private readonly SsmWrapper _ssmWrapper; - private readonly string _ciderBlock; + private readonly string _ciderBlock = null!; private readonly string _groupName; private readonly string _groupDescription; private readonly string _keyPairName; @@ -43,10 +43,10 @@ public EC2WrapperTests() .Build(); _ciderBlock = _configuration["CidrBlock"]; - _groupName = _configuration["GroupName"]; - _groupDescription = _configuration["GroupDescription"]; + _groupName = _configuration["GroupName"]!; + _groupDescription = _configuration["GroupDescription"]!; _instanceType = _configuration["InstanceType"]; - _keyPairName = _configuration["KeyPairName"]; + _keyPairName = _configuration["KeyPairName"]!; _client = new AmazonEC2Client(); @@ -374,7 +374,7 @@ public async Task DeleteSecurityGroupTest() [Trait("Category", "Integration")] public async Task DeleteKeyPairTest() { - var success = await _ec2Wrapper.DeleteKeyPair(_keyPair.KeyName); + var success = await _ec2Wrapper.DeleteKeyPair(_keyPair!.KeyName); Assert.True(success, "Could not delete the key pair."); } diff --git a/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCExample/CreateVPC.cs b/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCExample/CreateVPC.cs index d20f65b39cf..0c754f103a8 100644 --- a/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCExample/CreateVPC.cs +++ b/dotnetv3/EC2/VirtualPrivateCloudExamples/CreateVPCExample/CreateVPC.cs @@ -10,7 +10,7 @@ namespace CreateVPCExample /// /// Shows how to create an Amazon Elastic Compute Cloud (Amazon EC2) VPC - /// using the AWS SDK for .NET and .NET Core 5.0. + /// using the AWS SDK for .NET. /// public class CreateVPC { diff --git a/dotnetv3/EventBridge/Tests/EventBridgeTests.cs b/dotnetv3/EventBridge/Tests/EventBridgeTests.cs index 2da52157451..4b13891b236 100644 --- a/dotnetv3/EventBridge/Tests/EventBridgeTests.cs +++ b/dotnetv3/EventBridge/Tests/EventBridgeTests.cs @@ -47,6 +47,7 @@ public EventBridgeTests() [Fact] [Order(1)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task AddRuleToEventBus_ShouldReturnNonEmptyArn() { // Arrange. @@ -68,6 +69,7 @@ public async Task AddRuleToEventBus_ShouldReturnNonEmptyArn() [Fact] [Order(2)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task GetRuleStateByRuleName_ShouldReturnEnabled() { // Arrange. @@ -87,6 +89,7 @@ public async Task GetRuleStateByRuleName_ShouldReturnEnabled() [Fact] [Order(3)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DisableRuleByName_ShouldReturnTrue() { // Arrange. @@ -106,6 +109,7 @@ public async Task DisableRuleByName_ShouldReturnTrue() [Fact] [Order(4)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task EnableRuleByName_ShouldReturnTrue() { // Arrange. @@ -124,6 +128,7 @@ public async Task EnableRuleByName_ShouldReturnTrue() [Fact] [Order(5)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task AddSnsTargetToRule_ReturnsSuccessfulResult() { // Arrange. @@ -143,6 +148,7 @@ public async Task AddSnsTargetToRule_ReturnsSuccessfulResult() [Fact] [Order(6)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task ListAllTargetsOnRule_ReturnsSuccessfulResult() { // Arrange. @@ -162,6 +168,7 @@ public async Task ListAllTargetsOnRule_ReturnsSuccessfulResult() [Fact] [Order(7)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task ListAllRuleNamesByTarget_ReturnsSuccessfulResult() { // Arrange. @@ -181,6 +188,7 @@ public async Task ListAllRuleNamesByTarget_ReturnsSuccessfulResult() [Fact] [Order(8)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task UpdateS3UploadRuleTargetWithTransform_ReturnsSuccessfulResult() { // Arrange. @@ -201,6 +209,7 @@ public async Task UpdateS3UploadRuleTargetWithTransform_ReturnsSuccessfulResult( [Fact] [Order(9)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task UpdateCustomEventPattern_ReturnsNonEmptyArn() { // Arrange. @@ -219,6 +228,7 @@ public async Task UpdateCustomEventPattern_ReturnsNonEmptyArn() [Fact] [Order(10)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task PutEvents_ReturnsSuccessfulResult() { // Arrange. @@ -237,6 +247,7 @@ public async Task PutEvents_ReturnsSuccessfulResult() [Fact] [Order(11)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task RemoveTargets_ReturnsSuccessfulResult() { // Arrange. @@ -255,6 +266,7 @@ public async Task RemoveTargets_ReturnsSuccessfulResult() [Fact] [Order(12)] [Trait("Category", "Integration")] + [Trait("Category", "Weathertop")] public async Task DeleteEventRule_ReturnsSuccessfulResult() { // Arrange. diff --git a/dotnetv3/Glacier/Actions/GlacierWrapper.cs b/dotnetv3/Glacier/Actions/GlacierWrapper.cs index 7d08f862808..8839bc115d5 100644 --- a/dotnetv3/Glacier/Actions/GlacierWrapper.cs +++ b/dotnetv3/Glacier/Actions/GlacierWrapper.cs @@ -127,7 +127,7 @@ public async Task DownloadArchiveWithArchiveManagerAsync(string vaultName, var options = new DownloadOptions { - StreamTransferProgress = Progress, + StreamTransferProgress = Progress!, }; // Download an archive. diff --git a/dotnetv3/Glue/Scenarios/Glue_Basics/GlueBasics.cs b/dotnetv3/Glue/Scenarios/Glue_Basics/GlueBasics.cs index 8b06972f72b..e23fce8226f 100644 --- a/dotnetv3/Glue/Scenarios/Glue_Basics/GlueBasics.cs +++ b/dotnetv3/Glue/Scenarios/Glue_Basics/GlueBasics.cs @@ -12,7 +12,7 @@ namespace GlueBasics; public class GlueBasics { private static ILogger logger = null!; - private static IConfiguration _configuration; + private static IConfiguration _configuration = null!; static async Task Main(string[] args) { @@ -44,15 +44,15 @@ static async Task Main(string[] args) // edit the file to set "BucketName", "RoleName", and "ScriptURL" // to the appropriate values. Also set "CrawlerName" to the name // you want to give the crawler when it is created. - string bucketName = _configuration["BucketName"]; - string bucketUrl = _configuration["BucketUrl"]; - string crawlerName = _configuration["CrawlerName"]; - string roleName = _configuration["RoleName"]; - string sourceData = _configuration["SourceData"]; - string dbName = _configuration["DbName"]; - string cron = _configuration["Cron"]; - string scriptUrl = _configuration["ScriptURL"]; - string jobName = _configuration["JobName"]; + string bucketName = _configuration["BucketName"]!; + string bucketUrl = _configuration["BucketUrl"]!; + string crawlerName = _configuration["CrawlerName"]!; + string roleName = _configuration["RoleName"]!; + string sourceData = _configuration["SourceData"]!; + string dbName = _configuration["DbName"]!; + string cron = _configuration["Cron"]!; + string scriptUrl = _configuration["ScriptURL"]!; + string jobName = _configuration["JobName"]!; var wrapper = host.Services.GetRequiredService(); var uiWrapper = host.Services.GetRequiredService(); diff --git a/dotnetv3/Glue/Tests/GlueTests.cs b/dotnetv3/Glue/Tests/GlueTests.cs index 47de01c572e..a13f3cb0c7b 100644 --- a/dotnetv3/Glue/Tests/GlueTests.cs +++ b/dotnetv3/Glue/Tests/GlueTests.cs @@ -23,8 +23,8 @@ public class GlueTests private readonly string _scriptUrl; private readonly string _jobName; private readonly string _description; - private static string _jobRunId; - private static List _tables; + private static string _jobRunId = null!; + private static List
_tables = null!; /// /// Constructor for the test class. diff --git a/dotnetv3/IAM/Scenarios/IAMBasics/IAMBasics.cs b/dotnetv3/IAM/Scenarios/IAMBasics/IAMBasics.cs index 82cfc2d3097..501e08177d6 100644 --- a/dotnetv3/IAM/Scenarios/IAMBasics/IAMBasics.cs +++ b/dotnetv3/IAM/Scenarios/IAMBasics/IAMBasics.cs @@ -38,9 +38,9 @@ static async Task Main(string[] args) .Build(); // Values needed for user, role, and policies. - string userName = configuration["UserName"]; - string s3PolicyName = configuration["S3PolicyName"]; - string roleName = configuration["RoleName"]; + string userName = configuration["UserName"]!; + string s3PolicyName = configuration["S3PolicyName"]!; + string roleName = configuration["RoleName"]!; var iamWrapper = host.Services.GetRequiredService(); diff --git a/dotnetv3/IAM/Tests/IamWrapperTests.cs b/dotnetv3/IAM/Tests/IamWrapperTests.cs index bcd9d473113..b832eb7daf5 100644 --- a/dotnetv3/IAM/Tests/IamWrapperTests.cs +++ b/dotnetv3/IAM/Tests/IamWrapperTests.cs @@ -17,16 +17,12 @@ public class IamWrapperTests private readonly string? _rolePolicyName; // Values for tests related to the IAM Groups scenario. - private readonly string? _groupUserName; private readonly string? _groupPolicyName; private readonly string? _groupName; - private readonly string? _s3FullAccessPolicyName; private readonly string? _listBucketsPolicyDocument; - private readonly string? _s3FullAccessPolicyDocument; private readonly string? _roleName; - private readonly string? _assumePolicyName; private readonly string? _userName; private readonly string? _userPolicyName; @@ -48,12 +44,10 @@ public IamWrapperTests() true) // Optionally load local settings. .Build(); - _groupUserName = _configuration["GroupUserName"]; _groupPolicyName = _configuration["GroupPolicyName"]; _groupName = _configuration["GroupName"]; _s3ListBucketsPolicyName = _configuration["S3ListBucketsPolicyName"]; - _s3FullAccessPolicyName = _configuration["S3FullAccessPolicyName"]; _roleName = _configuration["RoleName"]; _rolePolicyName = _configuration["RolePolicyName"]; @@ -73,16 +67,6 @@ public IamWrapperTests() " \"Resource\" : \"*\"" + "}]" + "}"; - - // Permissions for full access to Amazon Simple Storage Service - // (Amazon S3). - _s3FullAccessPolicyDocument = "{" + - " \"Statement\" : [{" + - " \"Action\" : [\"s3:*\"]," + - " \"Effect\" : \"Allow\"," + - " \"Resource\" : \"*\"" + - "}]" + - "}"; } /// diff --git a/dotnetv3/KMS/CreateAliasExample/CreateAlias.cs b/dotnetv3/KMS/CreateAliasExample/CreateAlias.cs index fc87d4574e9..611e5e2abbe 100644 --- a/dotnetv3/KMS/CreateAliasExample/CreateAlias.cs +++ b/dotnetv3/KMS/CreateAliasExample/CreateAlias.cs @@ -1,10 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Creates an alias for an AWS Key Management Service (AWS KMS) key. This -/// example was created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace CreateAliasExample { // snippet-start:[kms.dotnetv3.CreateAliasExample] @@ -13,6 +9,9 @@ namespace CreateAliasExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// Creates an alias for an AWS Key Management Service (AWS KMS) key. + /// public class CreateAlias { public static async Task Main() diff --git a/dotnetv3/KMS/CreateAliasExample/CreateAliasExample.csproj b/dotnetv3/KMS/CreateAliasExample/CreateAliasExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/CreateAliasExample/CreateAliasExample.csproj +++ b/dotnetv3/KMS/CreateAliasExample/CreateAliasExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/CreateGrantExample/CreateGrant.cs b/dotnetv3/KMS/CreateGrantExample/CreateGrant.cs index 9e41cefb9f8..77937e919ec 100644 --- a/dotnetv3/KMS/CreateGrantExample/CreateGrant.cs +++ b/dotnetv3/KMS/CreateGrantExample/CreateGrant.cs @@ -1,10 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Create a new AWS Key Management Service grant (AWS KMS). This example -/// was created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace CreateGrantExample { using System; @@ -13,6 +9,9 @@ namespace CreateGrantExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// Create a new AWS Key Management Service grant (AWS KMS). + /// public class CreateGrant { // snippet-start:[KMS.dotnetv3.CreateGrantExample] diff --git a/dotnetv3/KMS/CreateGrantExample/CreateGrantExample.csproj b/dotnetv3/KMS/CreateGrantExample/CreateGrantExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/CreateGrantExample/CreateGrantExample.csproj +++ b/dotnetv3/KMS/CreateGrantExample/CreateGrantExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/CreateKeyExample/CreateKey.cs b/dotnetv3/KMS/CreateKeyExample/CreateKey.cs index 73a3bf39517..1f874b1958b 100644 --- a/dotnetv3/KMS/CreateKeyExample/CreateKey.cs +++ b/dotnetv3/KMS/CreateKeyExample/CreateKey.cs @@ -1,10 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Shows how to create a new AWS Key Management Service (AWS KMS) -/// key. It uses the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace CreateKeyExample { // snippet-start:[KMS.dotnetv3.CreateKeyExample] @@ -13,6 +9,10 @@ namespace CreateKeyExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// Shows how to create a new AWS Key Management Service (AWS KMS) + /// key. + /// public class CreateKey { public static async Task Main() diff --git a/dotnetv3/KMS/CreateKeyExample/CreateKeyExample.csproj b/dotnetv3/KMS/CreateKeyExample/CreateKeyExample.csproj index 76dd2cb6617..7f277279a13 100644 --- a/dotnetv3/KMS/CreateKeyExample/CreateKeyExample.csproj +++ b/dotnetv3/KMS/CreateKeyExample/CreateKeyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/DescribeKeyExample/DescribeKey.cs b/dotnetv3/KMS/DescribeKeyExample/DescribeKey.cs index 88259cd53c3..d3ea2f6f19c 100644 --- a/dotnetv3/KMS/DescribeKeyExample/DescribeKey.cs +++ b/dotnetv3/KMS/DescribeKeyExample/DescribeKey.cs @@ -1,12 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Retrieve information about an AWS Key Management Service (AWS KMS) key. -/// You can supply either the key Id or the key Amazon Resource Name (ARN) -/// to the DescribeKeyRequest KeyId property. The example was created using the -/// AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace DescribeKeyExample { // snippet-start:[KMS.dotnetv3.DescribeKeyExample] @@ -15,6 +9,11 @@ namespace DescribeKeyExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// Retrieve information about an AWS Key Management Service (AWS KMS) key. + /// You can supply either the key Id or the key Amazon Resource Name (ARN) + /// to the DescribeKeyRequest KeyId property. + /// public class DescribeKey { public static async Task Main() diff --git a/dotnetv3/KMS/DescribeKeyExample/DescribeKeyExample.csproj b/dotnetv3/KMS/DescribeKeyExample/DescribeKeyExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/DescribeKeyExample/DescribeKeyExample.csproj +++ b/dotnetv3/KMS/DescribeKeyExample/DescribeKeyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/DisableKeyExample/DisableKey.cs b/dotnetv3/KMS/DisableKeyExample/DisableKey.cs index 6868e88a770..f5e29a22853 100644 --- a/dotnetv3/KMS/DisableKeyExample/DisableKey.cs +++ b/dotnetv3/KMS/DisableKeyExample/DisableKey.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Disable an AWS Key Management Service (AWS KMS) key and then retrieve -/// the key's status to show that it has been disabled. This example was -/// created using the AWS SDK for .NET and .NET Core 5.0. -/// namespace DisableKeyExample { // snippet-start:[KMS.dotnetv3.DisableKeyExample] @@ -14,6 +9,10 @@ namespace DisableKeyExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// Disable an AWS Key Management Service (AWS KMS) key and then retrieve + /// the key's status to show that it has been disabled. + /// public class DisableKey { public static async Task Main() diff --git a/dotnetv3/KMS/DisableKeyExample/DisableKeyExample.csproj b/dotnetv3/KMS/DisableKeyExample/DisableKeyExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/DisableKeyExample/DisableKeyExample.csproj +++ b/dotnetv3/KMS/DisableKeyExample/DisableKeyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/EnableKeyExample/EnableKey.cs b/dotnetv3/KMS/EnableKeyExample/EnableKey.cs index 137e2e6e011..588e2fd7ecf 100644 --- a/dotnetv3/KMS/EnableKeyExample/EnableKey.cs +++ b/dotnetv3/KMS/EnableKeyExample/EnableKey.cs @@ -1,10 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Enable an AWS Key Management Service (AWS KMS) key. This example uses -/// the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace EnableKeyExample { // snippet-start:[KMS.dotnetv3.EnableKeyExample] @@ -13,6 +9,9 @@ namespace EnableKeyExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// Enable an AWS Key Management Service (AWS KMS) key. + /// public class EnableKey { public static async Task Main() diff --git a/dotnetv3/KMS/EnableKeyExample/EnableKeyExample.csproj b/dotnetv3/KMS/EnableKeyExample/EnableKeyExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/EnableKeyExample/EnableKeyExample.csproj +++ b/dotnetv3/KMS/EnableKeyExample/EnableKeyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/ListAliasesExample/ListAliases.cs b/dotnetv3/KMS/ListAliasesExample/ListAliases.cs index 8affe29642c..cb4a6bcfac7 100644 --- a/dotnetv3/KMS/ListAliasesExample/ListAliases.cs +++ b/dotnetv3/KMS/ListAliasesExample/ListAliases.cs @@ -1,13 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// List the AWS Key Management Service (AWS KMS) aliases that have been defined for -/// the keys in the same AWS Region as the default user. If you want to list -/// the aliases in a different Region, pass the Region to the client -/// constructor. This example was created using the AWS SDK for .NET version -/// 3.7 and .NET Core 5.0. -/// namespace ListAliasesExample { // snippet-start:[KMS.dotnetv3.ListAliasesExample] @@ -16,6 +9,12 @@ namespace ListAliasesExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// List the AWS Key Management Service (AWS KMS) aliases that have been defined for + /// the keys in the same AWS Region as the default user. If you want to list + /// the aliases in a different Region, pass the Region to the client + /// constructor. + /// public class ListAliases { public static async Task Main() diff --git a/dotnetv3/KMS/ListAliasesExample/ListAliasesExample.csproj b/dotnetv3/KMS/ListAliasesExample/ListAliasesExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/ListAliasesExample/ListAliasesExample.csproj +++ b/dotnetv3/KMS/ListAliasesExample/ListAliasesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/ListGrantsExample/ListGrants.cs b/dotnetv3/KMS/ListGrantsExample/ListGrants.cs index 4ef915ca909..a9a9f6314a7 100644 --- a/dotnetv3/KMS/ListGrantsExample/ListGrants.cs +++ b/dotnetv3/KMS/ListGrantsExample/ListGrants.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// List the AWS Key Management Service (AWS KMS) grants that are associated with -/// a specific key. This example was created using the AWS SDK for .NET version -/// 3.7 and .NET Core 5.0. -/// namespace ListGrantsExample { // snippet-start:[KMS.dotnetv3.ListGrantsExample] @@ -14,6 +9,10 @@ namespace ListGrantsExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// List the AWS Key Management Service (AWS KMS) grants that are associated with + /// a specific key. + /// public class ListGrants { public static async Task Main() diff --git a/dotnetv3/KMS/ListGrantsExample/ListGrantsExample.csproj b/dotnetv3/KMS/ListGrantsExample/ListGrantsExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/ListGrantsExample/ListGrantsExample.csproj +++ b/dotnetv3/KMS/ListGrantsExample/ListGrantsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/ListKeysExample/ListKeys.cs b/dotnetv3/KMS/ListKeysExample/ListKeys.cs index 77ba8ea8e42..914da7021f6 100644 --- a/dotnetv3/KMS/ListKeysExample/ListKeys.cs +++ b/dotnetv3/KMS/ListKeysExample/ListKeys.cs @@ -1,12 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// List the AWS Key Managements Service (AWS KMS) keys for the AWS Region -/// of the default user. To list keys in another AWS Region, supply the Region -/// as a parameter to the client constructor. This example was created using -/// the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace ListKeysExample { // snippet-start:[KMS.dotnetv3.ListKeysExample] @@ -15,6 +9,11 @@ namespace ListKeysExample using Amazon.KeyManagementService; using Amazon.KeyManagementService.Model; + /// + /// List the AWS Key Managements Service (AWS KMS) keys for the AWS Region + /// of the default user. To list keys in another AWS Region, supply the Region + /// as a parameter to the client constructor. + /// public class ListKeys { public static async Task Main() diff --git a/dotnetv3/KMS/ListKeysExample/ListKeysExample.csproj b/dotnetv3/KMS/ListKeysExample/ListKeysExample.csproj index 72ca14bc05f..8f5de3c4c4c 100644 --- a/dotnetv3/KMS/ListKeysExample/ListKeysExample.csproj +++ b/dotnetv3/KMS/ListKeysExample/ListKeysExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/KMS/README.md b/dotnetv3/KMS/README.md index 21c429659ca..a277e06563e 100644 --- a/dotnetv3/KMS/README.md +++ b/dotnetv3/KMS/README.md @@ -33,15 +33,15 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv3 Code excerpts that show you how to call individual service functions. -- [Create a grant for a key](CreateGrantExample/CreateGrant.cs#L18) (`CreateGrant`) -- [Create a key](CreateKeyExample/CreateKey.cs#L10) (`CreateKey`) -- [Create an alias for a key](CreateAliasExample/CreateAlias.cs#L10) (`CreateAlias`) -- [Describe a key](DescribeKeyExample/DescribeKey.cs#L12) (`DescribeKey`) -- [Disable a key](DisableKeyExample/DisableKey.cs#L11) (`DisableKey`) -- [Enable a key](EnableKeyExample/EnableKey.cs#L10) (`EnableKey`) -- [List aliases for a key](ListAliasesExample/ListAliases.cs#L13) (`ListAliases`) -- [List grants for a key](ListGrantsExample/ListGrants.cs#L11) (`ListGrants`) -- [List keys](ListKeysExample/ListKeys.cs#L12) (`ListKeys`) +- [Create a grant for a key](CreateGrantExample/CreateGrant.cs#L17) (`CreateGrant`) +- [Create a key](CreateKeyExample/CreateKey.cs#L6) (`CreateKey`) +- [Create an alias for a key](CreateAliasExample/CreateAlias.cs#L6) (`CreateAlias`) +- [Describe a key](DescribeKeyExample/DescribeKey.cs#L6) (`DescribeKey`) +- [Disable a key](DisableKeyExample/DisableKey.cs#L6) (`DisableKey`) +- [Enable a key](EnableKeyExample/EnableKey.cs#L6) (`EnableKey`) +- [List aliases for a key](ListAliasesExample/ListAliases.cs#L6) (`ListAliases`) +- [List grants for a key](ListGrantsExample/ListGrants.cs#L6) (`ListGrants`) +- [List keys](ListKeysExample/ListKeys.cs#L6) (`ListKeys`) diff --git a/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs b/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs index 485c6c7f798..ceb5b5557c9 100644 --- a/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs +++ b/dotnetv3/Keyspaces/Scenarios/CassandraWrapper.cs @@ -24,8 +24,8 @@ public class CassandraWrapper private Cluster _cluster; // User name and password for the service. - private string _userName; - private string _pwd; + private string _userName = null!; + private string _pwd = null!; public CassandraWrapper() { @@ -42,12 +42,18 @@ public CassandraWrapper() var client = new WebClient(); client.DownloadFile(_certLocation, $"{_localPathToFile}/{_certFileName}"); + //var httpClient = new HttpClient(); + //var httpResult = httpClient.Get(fileUrl); + //using var resultStream = await httpResult.Content.ReadAsStreamAsync(); + //using var fileStream = File.Create(pathToSave); + //resultStream.CopyTo(fileStream); + _certCollection = new X509Certificate2Collection(); _amazoncert = new X509Certificate2($"{_localPathToFile}/{_certFileName}"); // Get the user name and password stored in the configuration file. - _userName = _configuration["UserName"]; - _pwd = _configuration["Password"]; + _userName = _configuration["UserName"]!; + _pwd = _configuration["Password"]!; // For a list of Service Endpoints for Amazon Keyspaces, see: // https://docs.aws.amazon.com/keyspaces/latest/devguide/programmatic.endpoints.html @@ -75,7 +81,7 @@ public List ImportMoviesFromJson(string movieFileName, int numToImport = { if (!File.Exists(movieFileName)) { - return null; + return null!; } using var sr = new StreamReader(movieFileName); @@ -116,12 +122,12 @@ public async Task InsertIntoMovieTable(string keyspaceName, string movieTa RowSet rs; // Now we insert the numToImport movies into the table. - movies.ForEach(async movie => + foreach (var movie in movies) { // Escape single quote characters in the plot. insertCql = $"INSERT INTO {keyspaceName}.{movieTableName} (title, year, release_date, plot) values($${movie.Title}$$, {movie.Year}, '{movie.Info.Release_Date.ToString("yyyy-MM-dd")}', $${movie.Info.Plot}$$)"; rs = await session.ExecuteAsync(new SimpleStatement(insertCql)); - }); + } return true; } @@ -147,7 +153,7 @@ public async Task> GetMovies(string keyspaceName, string tableName) catch (Exception ex) { Console.WriteLine(ex.Message); - return null; + return null!; } } @@ -190,7 +196,7 @@ public async Task> GetWatchedMovies(string keyspaceName, string tableN catch (Exception ex) { Console.WriteLine(ex.Message); - return null; + return null!; } } } diff --git a/dotnetv3/Keyspaces/Scenarios/Movie.cs b/dotnetv3/Keyspaces/Scenarios/Movie.cs index fcdbaceebbd..4da517793b7 100644 --- a/dotnetv3/Keyspaces/Scenarios/Movie.cs +++ b/dotnetv3/Keyspaces/Scenarios/Movie.cs @@ -8,6 +8,6 @@ namespace KeyspacesScenario; public class Movie { public int Year { get; set; } - public string Title { get; set; } - public MovieInfo Info { get; set; } + public string Title { get; set; } = null!; + public MovieInfo Info { get; set; } = null!; } \ No newline at end of file diff --git a/dotnetv3/Keyspaces/Scenarios/MovieInfo.cs b/dotnetv3/Keyspaces/Scenarios/MovieInfo.cs index 4b04cdaacec..278f1de6fb8 100644 --- a/dotnetv3/Keyspaces/Scenarios/MovieInfo.cs +++ b/dotnetv3/Keyspaces/Scenarios/MovieInfo.cs @@ -8,13 +8,13 @@ namespace KeyspacesScenario; /// public class MovieInfo { - public string[] Directors { get; set; } + public string[] Directors { get; set; } = null!; public DateTime Release_Date { get; set; } public float Rating { get; set; } - public string[] Genres { get; set; } - public string Image_Url { get; set; } - public string Plot { get; set; } + public string[] Genres { get; set; } = null!; + public string Image_Url { get; set; } = null!; + public string Plot { get; set; } = null!; public int Rank { get; set; } public int RunningTimeSecs { get; set; } - public string[] Actors { get; set; } + public string[] Actors { get; set; } = null!; } \ No newline at end of file diff --git a/dotnetv3/Keyspaces/Tests/CassandraWrapperTests.cs b/dotnetv3/Keyspaces/Tests/CassandraWrapperTests.cs index 71eb2d27fe8..f6aa086f102 100644 --- a/dotnetv3/Keyspaces/Tests/CassandraWrapperTests.cs +++ b/dotnetv3/Keyspaces/Tests/CassandraWrapperTests.cs @@ -15,7 +15,7 @@ public class CassandraWrapperTests private readonly string _tableName; private readonly string _movieFileName; private readonly int _moviesToInsert = 5; - private static string _movieToUpdate; + private static string _movieToUpdate = null!; private static int _movieToUpdateYear; /// @@ -33,10 +33,10 @@ public CassandraWrapperTests() _client = new AmazonKeyspacesClient(); _wrapper = new CassandraWrapper(); - _keyspaceName = _configuration["KeyspaceName"]; - _tableName = _configuration["TableName"]; + _keyspaceName = _configuration["KeyspaceName"]!; + _tableName = _configuration["TableName"]!; - _movieFileName = _configuration["MovieFile"]; + _movieFileName = _configuration["MovieFile"]!; } diff --git a/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs b/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs index 5e271e29ace..1d92891b278 100644 --- a/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs +++ b/dotnetv3/Keyspaces/Tests/KeyspacesWrapperTests.cs @@ -9,7 +9,7 @@ public class KeyspacesWrapperTests private readonly IAmazonKeyspaces _client; private readonly KeyspacesWrapper _wrapper; private readonly string _keyspaceName; - private static string _keyspaceArn; + private static string _keyspaceArn = null!; private readonly string _tableName; private readonly SchemaDefinition _schemaDefinition; private static DateTime _timeChanged; @@ -29,8 +29,8 @@ public KeyspacesWrapperTests() _client = new AmazonKeyspacesClient(); _wrapper = new KeyspacesWrapper(_client); - _keyspaceName = _configuration["KeyspaceName"]; - _tableName = _configuration["TableName"]; + _keyspaceName = _configuration["KeyspaceName"]!; + _tableName = _configuration["TableName"]!; // Define the schema for the test table. var allColumns = new List diff --git a/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStream.cs b/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStream.cs index c1d3aa3b430..d5c818226b3 100644 --- a/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStream.cs +++ b/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStream.cs @@ -10,8 +10,7 @@ namespace CreateStreamExample using Amazon.Kinesis.Model; /// - /// This example shows how to create a new Amazon Kinesis stream. The - /// example was created using AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// This example shows how to create a new Amazon Kinesis stream. /// public class CreateStream { diff --git a/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStreamExample.csproj b/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStreamExample.csproj index bae66864ffd..a277e98a011 100644 --- a/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStreamExample.csproj +++ b/dotnetv3/Kinesis/CreateStreamExample/CreateStreamExample/CreateStreamExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStream.cs b/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStream.cs index 45bcc32b4d7..cd0b8e28ce8 100644 --- a/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStream.cs +++ b/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStream.cs @@ -10,8 +10,7 @@ namespace DeleteStreamExample using Amazon.Kinesis.Model; /// - /// Shows how to delete an Amazon Kinesis stream. The example was created - /// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Shows how to delete an Amazon Kinesis stream. /// public class DeleteStream { diff --git a/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStreamExample.csproj b/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStreamExample.csproj index bae66864ffd..a277e98a011 100644 --- a/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStreamExample.csproj +++ b/dotnetv3/Kinesis/DeleteStreamExample/DeleteStreamExample/DeleteStreamExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumer.cs b/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumer.cs index ad17042708b..c941f97976d 100644 --- a/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumer.cs +++ b/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumer.cs @@ -10,8 +10,7 @@ namespace DeregisterConsumerExample using Amazon.Kinesis.Model; /// - /// Shows how to deregister a consumer from an Amazon Kinesis stream. The - /// example was written using the AWS SDK for .NET 3.7 and .NET Core 5.0. + /// Shows how to deregister a consumer from an Amazon Kinesis stream. /// public class DeregisterConsumer { diff --git a/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumerExample.csproj b/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumerExample.csproj index bae66864ffd..a277e98a011 100644 --- a/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumerExample.csproj +++ b/dotnetv3/Kinesis/DeregisterConsumerExample/DeregisterConsumerExample/DeregisterConsumerExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumers.cs b/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumers.cs index 539ffb2d517..0bb9afc44ab 100644 --- a/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumers.cs +++ b/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumers.cs @@ -11,8 +11,7 @@ namespace ListConsumersExample using Amazon.Kinesis.Model; /// - /// List the consumers of an Amazon Kinesis stream. This example was - /// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// List the consumers of an Amazon Kinesis stream. /// public class ListConsumers { diff --git a/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumersExample.csproj b/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumersExample.csproj index 2bd7053ad03..5b413953ec8 100644 --- a/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumersExample.csproj +++ b/dotnetv3/Kinesis/ListConsumersExample/ListConsumersExample/ListConsumersExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreams.cs b/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreams.cs index 007e8e51ff9..ffb8c5da2e3 100644 --- a/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreams.cs +++ b/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreams.cs @@ -11,8 +11,7 @@ namespace ListStreamsExample using Amazon.Kinesis.Model; /// - /// Retrieves and displays a list of existing Amazon Kinesis streams. The - /// example uses the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Retrieves and displays a list of existing Amazon Kinesis streams. /// public class ListStreams { diff --git a/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreamsExample.csproj b/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreamsExample.csproj index bae66864ffd..a277e98a011 100644 --- a/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreamsExample.csproj +++ b/dotnetv3/Kinesis/ListStreamsExample/ListStreamsExample/ListStreamsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTags.cs b/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTags.cs index d18a9fa8b2a..0df873ecd2e 100644 --- a/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTags.cs +++ b/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTags.cs @@ -12,8 +12,7 @@ namespace ListTagsExample /// /// Shows how to list the tags that have been attached to an Amazon Kinesis - /// stream. The example was created using the AWS SDK for .NET version 3.7 - /// and .NET Core 5.0. + /// stream. /// public class ListTags { diff --git a/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTagsExample.csproj b/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTagsExample.csproj index 2bd7053ad03..5b413953ec8 100644 --- a/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTagsExample.csproj +++ b/dotnetv3/Kinesis/ListTagsExample/ListTagsExample/ListTagsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumer.cs b/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumer.cs index 788e0f4a7fd..7c0eb08f07b 100644 --- a/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumer.cs +++ b/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumer.cs @@ -11,8 +11,7 @@ namespace RegisterConsumerExample /// /// This example shows how to register a consumer to an Amazon Kinesis - /// stream. The example was written using the AWS SDK for .NET version 3.7 - /// and .NET Core 5.0. + /// stream. /// public class RegisterConsumer { diff --git a/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumerExample.csproj b/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumerExample.csproj index bae66864ffd..a277e98a011 100644 --- a/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumerExample.csproj +++ b/dotnetv3/Kinesis/RegisterConsumerExample/RegisterConsumerExample/RegisterConsumerExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStream.cs b/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStream.cs index 4a666c414bc..c841e861f92 100644 --- a/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStream.cs +++ b/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStream.cs @@ -12,8 +12,7 @@ namespace TagStreamExample /// /// This example shows how to apply key/value pairs to an Amazon Kinesis - /// stream. The example was created using the AWS SDK for .NET version 3.7 - /// and .NET Core 5.0. + /// stream. /// public class TagStream { diff --git a/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStreamExample.csproj b/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStreamExample.csproj index bae66864ffd..a277e98a011 100644 --- a/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStreamExample.csproj +++ b/dotnetv3/Kinesis/TagStreamExample/TagStreamExample/TagStreamExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs b/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs index 2061229f640..1573be7c141 100644 --- a/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs +++ b/dotnetv3/Lambda/Scenarios/LambdaBasics/LambdaBasics.cs @@ -43,8 +43,8 @@ static async Task Main(string[] args) var lambdaRoleWrapper = host.Services.GetRequiredService(); var uiWrapper = host.Services.GetRequiredService(); - string functionName = configuration["FunctionName"]; - string roleName = configuration["RoleName"]; + string functionName = configuration["FunctionName"]!; + string roleName = configuration["RoleName"]!; string policyDocument = "{" + " \"Version\": \"2012-10-17\"," + " \"Statement\": [ " + diff --git a/dotnetv3/Lambda/Scenarios/LambdaBasics/Properties/launchSettings.json b/dotnetv3/Lambda/Scenarios/LambdaBasics/Properties/launchSettings.json new file mode 100644 index 00000000000..33504c948ad --- /dev/null +++ b/dotnetv3/Lambda/Scenarios/LambdaBasics/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "WSL": { + "commandName": "WSL2", + "distributionName": "" + } + } +} \ No newline at end of file diff --git a/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicyExample.csproj b/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicyExample.csproj index 69783cdb864..2910eadbda3 100644 --- a/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicyExample.csproj +++ b/dotnetv3/Organizations/AttachPolicyExample/AttachPolicyExample/AttachPolicyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs b/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs index 8bb2a0b293a..9d415f451b3 100644 --- a/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs +++ b/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccount.cs @@ -10,8 +10,7 @@ namespace CreateAccountExample using Amazon.Organizations.Model; /// - /// Creates a new AWS Organizations account. The example was created - /// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Creates a new AWS Organizations account. /// public class CreateAccount { diff --git a/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccountExample.csproj b/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccountExample.csproj index 6059ac9cf69..1af16ad8a54 100644 --- a/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccountExample.csproj +++ b/dotnetv3/Organizations/CreateAccountExample/CreateAccountExample/CreateAccountExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs b/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs index 935c1b21b2b..dd5d92ae8df 100644 --- a/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs +++ b/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganization.cs @@ -10,8 +10,7 @@ namespace CreateOrganizationExample using Amazon.Organizations.Model; /// - /// Creates an organization in AWS Organizations. The example was created - /// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Creates an organization in AWS Organizations. /// public class CreateOrganization { diff --git a/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganizationExample.csproj b/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganizationExample.csproj index 6059ac9cf69..1af16ad8a54 100644 --- a/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganizationExample.csproj +++ b/dotnetv3/Organizations/CreateOrganizationExample/CreateOrganizationExample/CreateOrganizationExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs b/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs index b70b94fb9e2..c46a46fd7e5 100644 --- a/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs +++ b/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnit.cs @@ -10,8 +10,7 @@ namespace CreateOrganizationalUnitExample using Amazon.Organizations.Model; /// - /// Creates a new organizational unit in AWS Organizations. The example was - /// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Creates a new organizational unit in AWS Organizations. /// public class CreateOrganizationalUnit { diff --git a/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample.csproj b/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample.csproj index 69783cdb864..2910eadbda3 100644 --- a/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample.csproj +++ b/dotnetv3/Organizations/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample/CreateOrganizationalUnitExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs b/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs index 3ccdbf9ce17..a99b2d80bbf 100644 --- a/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs +++ b/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicy.cs @@ -10,8 +10,7 @@ namespace CreatePolicyExample using Amazon.Organizations.Model; /// - /// Creates a new AWS Organizations Policy. The example was created - /// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Creates a new AWS Organizations Policy. /// public class CreatePolicy { diff --git a/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicyExample.csproj b/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicyExample.csproj index 6059ac9cf69..1af16ad8a54 100644 --- a/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicyExample.csproj +++ b/dotnetv3/Organizations/CreatePolicyExample/CreatePolicyExample/CreatePolicyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs b/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs index e36b3af5a70..89622b7131e 100644 --- a/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs +++ b/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganization.cs @@ -11,8 +11,7 @@ namespace DeleteOrganizationExample /// /// Shows how to delete an existing organization using the AWS - /// Organizations Service. This example was created using the AWS SDK for - /// .NET version 3.7 and .NET Core 5.0. + /// Organizations Service. /// public class DeleteOrganization { diff --git a/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganizationExample.csproj b/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganizationExample.csproj index 05966d6db15..d823dc60fd2 100644 --- a/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganizationExample.csproj +++ b/dotnetv3/Organizations/DeleteOrganizationExample/DeleteOrganizationExample/DeleteOrganizationExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs b/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs index 68d5ac6d12b..6a53a2fa012 100644 --- a/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs +++ b/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnit.cs @@ -11,8 +11,6 @@ namespace DeleteOrganizationalUnitExample /// /// Shows how to delete an existing AWS Organizations organizational unit. - /// This example was created using the AWS SDK for .NET version 3.7 and - /// .NET Core 5.0. /// public class DeleteOrganizationalUnit { diff --git a/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample.csproj b/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample.csproj index 05966d6db15..d823dc60fd2 100644 --- a/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample.csproj +++ b/dotnetv3/Organizations/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample/DeleteOrganizationalUnitExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs b/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs index 53ca3f83b53..f2e92f69825 100644 --- a/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs +++ b/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicy.cs @@ -10,8 +10,7 @@ namespace DeletePolicyExample using Amazon.Organizations.Model; /// - /// Deletes an existing AWS Organizations policy. This example was - /// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Deletes an existing AWS Organizations policy. /// public class DeletePolicy { diff --git a/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicyExample.csproj b/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicyExample.csproj index 69783cdb864..2910eadbda3 100644 --- a/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicyExample.csproj +++ b/dotnetv3/Organizations/DeletePolicyExample/DeletePolicyExample/DeletePolicyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs b/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs index b80d96b5fda..7e3df109b1d 100644 --- a/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs +++ b/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicy.cs @@ -11,8 +11,7 @@ namespace DetachPolicyExample /// /// Shows how to detach a policy from an AWS Organizations organization, - /// organizational unit, or account. The example was creating using the - /// AWS SDK for .NET 3.7 and .NET Core 5.0. + /// organizational unit, or account. /// public class DetachPolicy { diff --git a/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicyExample.csproj b/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicyExample.csproj index 69783cdb864..2910eadbda3 100644 --- a/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicyExample.csproj +++ b/dotnetv3/Organizations/DetachPolicyExample/DetachPolicyExample/DetachPolicyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs b/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs index fda82f0abb0..8e7d0534247 100644 --- a/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs +++ b/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccounts.cs @@ -11,8 +11,7 @@ namespace ListAccountsExample /// /// Uses the AWS Organizations service to list the accounts associated - /// with the default account. The example was created using the AWS SDK for - /// .NET and .NET Core 5.0. + /// with the default account. /// public class ListAccounts { diff --git a/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccountsExample.csproj b/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccountsExample.csproj index 6059ac9cf69..1af16ad8a54 100644 --- a/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccountsExample.csproj +++ b/dotnetv3/Organizations/ListAccountsExample/ListAccountsExample/ListAccountsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs b/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs index 63bed2e7816..2a771e278fb 100644 --- a/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs +++ b/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParent.cs @@ -11,8 +11,7 @@ namespace ListOrganizationalUnitsForParentExample /// /// Lists the AWS Organizations organizational units that belong to an - /// organization. The example was created using the AWS SDK for .NET - /// version 3.7 and .NET Core 5.0. + /// organization. /// public class ListOrganizationalUnitsForParent { diff --git a/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample.csproj b/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample.csproj index 69783cdb864..2910eadbda3 100644 --- a/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample.csproj +++ b/dotnetv3/Organizations/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample/ListOrganizationalUnitsForParentExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs b/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs index b6935c74686..b2ff546850f 100644 --- a/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs +++ b/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPolicies.cs @@ -11,8 +11,7 @@ namespace ListPoliciesExample /// /// Shows how to list the AWS Organizations policies associated with an - /// organization. The example was created with the AWS SDK for .NET version - /// 3.7 and .NET Core 5.0. + /// organization. /// public class ListPolicies { diff --git a/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPoliciesExample.csproj b/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPoliciesExample.csproj index 69783cdb864..2910eadbda3 100644 --- a/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPoliciesExample.csproj +++ b/dotnetv3/Organizations/ListPoliciesExample/ListPoliciesExample/ListPoliciesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Polly/DeleteLexiconExample/DeleteLexicon.cs b/dotnetv3/Polly/DeleteLexiconExample/DeleteLexicon.cs index e2624928574..456059b2b8b 100644 --- a/dotnetv3/Polly/DeleteLexiconExample/DeleteLexicon.cs +++ b/dotnetv3/Polly/DeleteLexiconExample/DeleteLexicon.cs @@ -1,10 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Deletes an existing Amazon Polly lexicon using the AWS SDK for .NET -/// version 3.7 and .NET Core 5.0. -/// namespace DeleteLexiconExample { // snippet-start:[Polly.dotnetv3.DeleteLexiconExample] @@ -13,6 +9,9 @@ namespace DeleteLexiconExample using Amazon.Polly; using Amazon.Polly.Model; + /// + /// Deletes an existing Amazon Polly lexicon using the AWS SDK for .NET. + /// public class DeleteLexicon { public static async Task Main() diff --git a/dotnetv3/Polly/DeleteLexiconExample/DeleteLexiconExample.csproj b/dotnetv3/Polly/DeleteLexiconExample/DeleteLexiconExample.csproj index 1854e640358..1cbe26e1960 100644 --- a/dotnetv3/Polly/DeleteLexiconExample/DeleteLexiconExample.csproj +++ b/dotnetv3/Polly/DeleteLexiconExample/DeleteLexiconExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Polly/DescribeVoicesExample/DescribeVoicesExample.csproj b/dotnetv3/Polly/DescribeVoicesExample/DescribeVoicesExample.csproj index d69c1df0b3b..44d606c3fdf 100644 --- a/dotnetv3/Polly/DescribeVoicesExample/DescribeVoicesExample.csproj +++ b/dotnetv3/Polly/DescribeVoicesExample/DescribeVoicesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Polly/GetLexiconExample/GetLexicon.cs b/dotnetv3/Polly/GetLexiconExample/GetLexicon.cs index 4cb264610ea..c63c848c785 100644 --- a/dotnetv3/Polly/GetLexiconExample/GetLexicon.cs +++ b/dotnetv3/Polly/GetLexiconExample/GetLexicon.cs @@ -1,10 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Retrieves information about a specific Amazon Polly lexicon using the -/// AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace GetLexiconExample { // snippet-start:[Polly.dotnetv3.GetLexiconExample] @@ -13,6 +9,9 @@ namespace GetLexiconExample using Amazon.Polly; using Amazon.Polly.Model; + /// + /// Retrieves information about a specific Amazon Polly lexicon. + /// public class GetLexicon { public static async Task Main(string[] args) diff --git a/dotnetv3/Polly/GetLexiconExample/GetLexiconExample.csproj b/dotnetv3/Polly/GetLexiconExample/GetLexiconExample.csproj index d69c1df0b3b..44d606c3fdf 100644 --- a/dotnetv3/Polly/GetLexiconExample/GetLexiconExample.csproj +++ b/dotnetv3/Polly/GetLexiconExample/GetLexiconExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Polly/ListLexiconsExample/ListLexicons.cs b/dotnetv3/Polly/ListLexiconsExample/ListLexicons.cs index 08d02c28cc4..3e9dfd8a076 100644 --- a/dotnetv3/Polly/ListLexiconsExample/ListLexicons.cs +++ b/dotnetv3/Polly/ListLexiconsExample/ListLexicons.cs @@ -1,15 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Lists the Amazon Polly lexicons that have been defined. By default, -/// lists the lexicons that are defined in the same AWS Region as the default -/// user. To view Amazon Polly lexicons that are defined in a different AWS -/// Region, supply it as a parameter to the Amazon Polly constructor. -/// -/// This example was created using the AWS SDK for .NET version 3.7 and -/// .NET Core 5.0. -/// namespace ListLexiconsExample { // snippet-start:[Polly.dotnetv3.ListLexiconsExample] @@ -18,6 +9,12 @@ namespace ListLexiconsExample using Amazon.Polly; using Amazon.Polly.Model; + /// + /// Lists the Amazon Polly lexicons that have been defined. By default, + /// lists the lexicons that are defined in the same AWS Region as the default + /// user. To view Amazon Polly lexicons that are defined in a different AWS + /// Region, supply it as a parameter to the Amazon Polly constructor. + /// public class ListLexicons { public static async Task Main() diff --git a/dotnetv3/Polly/ListLexiconsExample/ListLexiconsExample.csproj b/dotnetv3/Polly/ListLexiconsExample/ListLexiconsExample.csproj index 700515ff561..99711281622 100644 --- a/dotnetv3/Polly/ListLexiconsExample/ListLexiconsExample.csproj +++ b/dotnetv3/Polly/ListLexiconsExample/ListLexiconsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Polly/PutLexiconExample/PutLexicon.cs b/dotnetv3/Polly/PutLexiconExample/PutLexicon.cs index 46bd60a4eed..2aead5c818f 100644 --- a/dotnetv3/Polly/PutLexiconExample/PutLexicon.cs +++ b/dotnetv3/Polly/PutLexiconExample/PutLexicon.cs @@ -1,10 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Creates a new Amazon Polly lexicon using the AWS SDK for .NET version 3.7 -/// and .NET Core 5.0. -/// namespace PutLexiconExample { // snippet-start:[Polly.dotnetv3.PutLexiconExample] @@ -13,6 +9,9 @@ namespace PutLexiconExample using Amazon.Polly; using Amazon.Polly.Model; + /// + /// Creates a new Amazon Polly lexicon using the AWS SDK for .NET. + /// public class PutLexicon { public static async Task Main() diff --git a/dotnetv3/Polly/PutLexiconExample/PutLexiconExample.csproj b/dotnetv3/Polly/PutLexiconExample/PutLexiconExample.csproj index d69c1df0b3b..44d606c3fdf 100644 --- a/dotnetv3/Polly/PutLexiconExample/PutLexiconExample.csproj +++ b/dotnetv3/Polly/PutLexiconExample/PutLexiconExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Polly/README.md b/dotnetv3/Polly/README.md index 59ddaa3da9e..1969747cdd4 100644 --- a/dotnetv3/Polly/README.md +++ b/dotnetv3/Polly/README.md @@ -33,11 +33,11 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv3 Code excerpts that show you how to call individual service functions. -- [Delete a lexicon](DeleteLexiconExample/DeleteLexicon.cs#L10) (`DeleteLexicon`) -- [Get a lexicon](GetLexiconExample/GetLexicon.cs#L10) (`GetLexicon`) +- [Delete a lexicon](DeleteLexiconExample/DeleteLexicon.cs#L6) (`DeleteLexicon`) +- [Get a lexicon](GetLexiconExample/GetLexicon.cs#L6) (`GetLexicon`) - [Get voices available for synthesis](DescribeVoicesExample/DescribeVoices.cs#L10) (`DescribeVoices`) -- [List pronunciation lexicons](ListLexiconsExample/ListLexicons.cs#L15) (`ListLexicons`) -- [Store a pronunciation lexicon](PutLexiconExample/PutLexicon.cs#L10) (`PutLexicon`) +- [List pronunciation lexicons](ListLexiconsExample/ListLexicons.cs#L6) (`ListLexicons`) +- [Store a pronunciation lexicon](PutLexiconExample/PutLexicon.cs#L6) (`PutLexicon`) - [Synthesize speech from text](SynthesizeSpeechExample/SynthesizeSpeech.cs#L11) (`SynthesizeSpeech`) ### Cross-service examples diff --git a/dotnetv3/Polly/SynthesizeSpeechExample/SynthesizeSpeechExample.csproj b/dotnetv3/Polly/SynthesizeSpeechExample/SynthesizeSpeechExample.csproj index 298dc88cc7f..c1e12c1a568 100644 --- a/dotnetv3/Polly/SynthesizeSpeechExample/SynthesizeSpeechExample.csproj +++ b/dotnetv3/Polly/SynthesizeSpeechExample/SynthesizeSpeechExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Polly/SynthesizeSpeechMarksExample/SynthesizeSpeechMarksExample.csproj b/dotnetv3/Polly/SynthesizeSpeechMarksExample/SynthesizeSpeechMarksExample.csproj index 1854e640358..1cbe26e1960 100644 --- a/dotnetv3/Polly/SynthesizeSpeechMarksExample/SynthesizeSpeechMarksExample.csproj +++ b/dotnetv3/Polly/SynthesizeSpeechMarksExample/SynthesizeSpeechMarksExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/AddFacesExample/AddFaces.cs b/dotnetv3/Rekognition/AddFacesExample/AddFaces.cs index 8b1c795aece..3ef011dc965 100644 --- a/dotnetv3/Rekognition/AddFacesExample/AddFaces.cs +++ b/dotnetv3/Rekognition/AddFacesExample/AddFaces.cs @@ -13,8 +13,7 @@ namespace AddFacesExample /// /// Uses the Amazon Rekognition Service to detect faces in an image /// that has been uploaded to an Amazon Simple Storage Service (Amazon S3) - /// bucket and then adds the information to a collection. The example was - /// created using the AWS SDK for .NET and .NET Core 5.0. + /// bucket and then adds the information to a collection. /// public class AddFaces { diff --git a/dotnetv3/Rekognition/AddFacesExample/AddFacesExample.csproj b/dotnetv3/Rekognition/AddFacesExample/AddFacesExample.csproj index a2d0728ef22..16ac905fc9e 100644 --- a/dotnetv3/Rekognition/AddFacesExample/AddFacesExample.csproj +++ b/dotnetv3/Rekognition/AddFacesExample/AddFacesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImage.cs b/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImage.cs index 9b6b4b03c8f..54d21289e0b 100644 --- a/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImage.cs +++ b/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImage.cs @@ -12,8 +12,6 @@ namespace CelebritiesInImageExample /// /// Shows how to use Amazon Rekognition to identify celebrities in a photo. - /// This example was created using the AWS SDK for .NET version 3.7 and - /// .NET Core 5.0. /// public class CelebritiesInImage { diff --git a/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImageExample.csproj b/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImageExample.csproj index a2d0728ef22..16ac905fc9e 100644 --- a/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImageExample.csproj +++ b/dotnetv3/Rekognition/CelebritiesInImageExample/CelebritiesInImageExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfo.cs b/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfo.cs index 454fe41088b..9e5facb927f 100644 --- a/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfo.cs +++ b/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfo.cs @@ -11,8 +11,7 @@ namespace CelebrityInfoExample /// /// Shows how to use Amazon Rekognition to retrieve information about the - /// celebrity identified by the supplied celebrity Id. This example was - /// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// celebrity identified by the supplied celebrity Id. /// public class CelebrityInfo { diff --git a/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfoExample.csproj b/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfoExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfoExample.csproj +++ b/dotnetv3/Rekognition/CelebrityInfoExample/CelebrityInfoExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/CompareFacesExample/CompareFaces.cs b/dotnetv3/Rekognition/CompareFacesExample/CompareFaces.cs index fec1800298a..eaa19f9b5fd 100644 --- a/dotnetv3/Rekognition/CompareFacesExample/CompareFaces.cs +++ b/dotnetv3/Rekognition/CompareFacesExample/CompareFaces.cs @@ -12,7 +12,6 @@ namespace CompareFacesExample /// /// Uses the Amazon Rekognition Service to compare faces in two images. - /// The example uses the AWS SDK for .NET 3.7 and .NET Core 5.0. /// public class CompareFaces { diff --git a/dotnetv3/Rekognition/CompareFacesExample/CompareFacesExample.csproj b/dotnetv3/Rekognition/CompareFacesExample/CompareFacesExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/CompareFacesExample/CompareFacesExample.csproj +++ b/dotnetv3/Rekognition/CompareFacesExample/CompareFacesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/CreateCollectionExample/CreateCollection.cs b/dotnetv3/Rekognition/CreateCollectionExample/CreateCollection.cs index 0d0a78df9a5..aa759eebcf6 100644 --- a/dotnetv3/Rekognition/CreateCollectionExample/CreateCollection.cs +++ b/dotnetv3/Rekognition/CreateCollectionExample/CreateCollection.cs @@ -11,8 +11,7 @@ namespace CreateCollectionExample /// /// Uses Amazon Rekognition to create a collection to which you can add - /// faces using the IndexFaces operation. The example was created using - /// the AWS SDK for .NET 3.7 and .NET Core 5.0. + /// faces using the IndexFaces operation. /// public class CreateCollection { diff --git a/dotnetv3/Rekognition/CreateCollectionExample/CreateCollectionExample.csproj b/dotnetv3/Rekognition/CreateCollectionExample/CreateCollectionExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/CreateCollectionExample/CreateCollectionExample.csproj +++ b/dotnetv3/Rekognition/CreateCollectionExample/CreateCollectionExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollection.cs b/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollection.cs index f14b5abdbb5..ed8f4c7296d 100644 --- a/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollection.cs +++ b/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollection.cs @@ -11,8 +11,6 @@ namespace DeleteCollectionExample /// /// Uses the Amazon Rekognition Service to delete an existing collection. - /// The example was created using the AWS SDK for .NET version 3.7 and - /// .NET Core 5.0. /// public class DeleteCollection { diff --git a/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollectionExample.csproj b/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollectionExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollectionExample.csproj +++ b/dotnetv3/Rekognition/DeleteCollectionExample/DeleteCollectionExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DeleteFacesExample/DeleteFaces.cs b/dotnetv3/Rekognition/DeleteFacesExample/DeleteFaces.cs index f9948ac0996..21f99c31858 100644 --- a/dotnetv3/Rekognition/DeleteFacesExample/DeleteFaces.cs +++ b/dotnetv3/Rekognition/DeleteFacesExample/DeleteFaces.cs @@ -12,8 +12,7 @@ namespace DeleteFacesExample /// /// Uses the Amazon Rekognition Service to delete one or more faces from - /// a Rekognition collection. This example was created using the AWS SDK - /// for .NET version 3.7 and .NET Core 5.0. + /// a Rekognition collection. /// public class DeleteFaces { diff --git a/dotnetv3/Rekognition/DeleteFacesExample/DeleteFacesExample.csproj b/dotnetv3/Rekognition/DeleteFacesExample/DeleteFacesExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DeleteFacesExample/DeleteFacesExample.csproj +++ b/dotnetv3/Rekognition/DeleteFacesExample/DeleteFacesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollection.cs b/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollection.cs index ea0ca620071..860f3d8bc86 100644 --- a/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollection.cs +++ b/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollection.cs @@ -11,8 +11,7 @@ namespace DescribeCollectionExample /// /// Uses the Amazon Rekognition Service to describe the contents of a - /// collection. The example was created using the AWS SDK for .NET version - /// 3.7 and .NET Core 5.0. + /// collection. /// public class DescribeCollection { diff --git a/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollectionExample.csproj b/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollectionExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollectionExample.csproj +++ b/dotnetv3/Rekognition/DescribeCollectionExample/DescribeCollectionExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs b/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs index b86098619e3..bfb4dc3cbf9 100644 --- a/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs +++ b/dotnetv3/Rekognition/DetectFacesExample/DetectFaces.cs @@ -12,8 +12,7 @@ namespace DetectFacesExample /// /// Uses the Amazon Rekognition Service to detect faces within an image - /// stored in an Amazon Simple Storage Service (Amazon S3) bucket. This - /// example uses the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// stored in an Amazon Simple Storage Service (Amazon S3) bucket. /// public class DetectFaces { diff --git a/dotnetv3/Rekognition/DetectFacesExample/DetectFacesExample.csproj b/dotnetv3/Rekognition/DetectFacesExample/DetectFacesExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DetectFacesExample/DetectFacesExample.csproj +++ b/dotnetv3/Rekognition/DetectFacesExample/DetectFacesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DetectLabelsExample/DetectLabels.cs b/dotnetv3/Rekognition/DetectLabelsExample/DetectLabels.cs index 005f2918df9..e33c34e9646 100644 --- a/dotnetv3/Rekognition/DetectLabelsExample/DetectLabels.cs +++ b/dotnetv3/Rekognition/DetectLabelsExample/DetectLabels.cs @@ -11,8 +11,7 @@ namespace DetectLabelsExample /// /// Uses the Amazon Rekognition Service to detect labels within an image - /// stored in an Amazon Simple Storage Service (Amazon S3) bucket. This - /// example was created using the AWS SDK for .NET and .NET Core 5.0. + /// stored in an Amazon Simple Storage Service (Amazon S3) bucket. /// public class DetectLabels { diff --git a/dotnetv3/Rekognition/DetectLabelsExample/DetectLabelsExample.csproj b/dotnetv3/Rekognition/DetectLabelsExample/DetectLabelsExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DetectLabelsExample/DetectLabelsExample.csproj +++ b/dotnetv3/Rekognition/DetectLabelsExample/DetectLabelsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFile.cs b/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFile.cs index 2f3622089af..86f4093624b 100644 --- a/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFile.cs +++ b/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFile.cs @@ -12,8 +12,7 @@ namespace DetectLabelsLocalFileExample /// /// Uses the Amazon Rekognition Service to detect labels within an image - /// stored locally. This example was created using the AWS SDK for .NET - /// and .NET Core 5.0. + /// stored locally. /// public class DetectLabelsLocalFile { diff --git a/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFileExample.csproj b/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFileExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFileExample.csproj +++ b/dotnetv3/Rekognition/DetectLabelsLocalFileExample/DetectLabelsLocalFileExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabels.cs b/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabels.cs index 1b62fff4fc4..4bbad311cb9 100644 --- a/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabels.cs +++ b/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabels.cs @@ -11,8 +11,7 @@ namespace DetectModerationLabelsExample /// /// Uses the Amazon Rekognition Service to detect unsafe content in a - /// JPEG or PNG format image. This example was created using the AWS SDK - /// for .NET version 3.7 and .NET Core 5.0. + /// JPEG or PNG format image. /// public class DetectModerationLabels { diff --git a/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabelsExample.csproj b/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabelsExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabelsExample.csproj +++ b/dotnetv3/Rekognition/DetectModerationLabelsExample/DetectModerationLabelsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/DetectTextExample/DetectTextExample.csproj b/dotnetv3/Rekognition/DetectTextExample/DetectTextExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/DetectTextExample/DetectTextExample.csproj +++ b/dotnetv3/Rekognition/DetectTextExample/DetectTextExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExample/FaceRekognitionExample.csproj b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExample/FaceRekognitionExample.csproj index 7b13e9b9f36..f36dd212846 100644 --- a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExample/FaceRekognitionExample.csproj +++ b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExample/FaceRekognitionExample.csproj @@ -1,8 +1,8 @@ - + Exe - net5.0 + net6.0 @@ -12,7 +12,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionExampleTests.csproj b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionExampleTests.csproj index 37e11f57672..b2f9c64431d 100644 --- a/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionExampleTests.csproj +++ b/dotnetv3/Rekognition/FaceRekognitionExample/FaceRekognitionExampleTests/FaceRekognitionExampleTests.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -15,7 +15,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBox.cs b/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBox.cs index 9e33a29fc83..5dfd8dc673c 100644 --- a/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBox.cs +++ b/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBox.cs @@ -14,8 +14,7 @@ namespace ImageOrientationBoundingBoxExample /// /// Uses the Amazon Rekognition Service to display the details of the - /// bounding boxes around the faces detected in an image. This example was - /// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// bounding boxes around the faces detected in an image. /// public class ImageOrientationBoundingBox { diff --git a/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBoxExample.csproj b/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBoxExample.csproj index 8e20ccad7da..bf029bbedeb 100644 --- a/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBoxExample.csproj +++ b/dotnetv3/Rekognition/ImageOrientationBoundingBoxExample/ImageOrientationBoundingBoxExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/ListCollectionsExample/ListCollections.cs b/dotnetv3/Rekognition/ListCollectionsExample/ListCollections.cs index 64b95e074dc..a9184a07b8d 100644 --- a/dotnetv3/Rekognition/ListCollectionsExample/ListCollections.cs +++ b/dotnetv3/Rekognition/ListCollectionsExample/ListCollections.cs @@ -11,8 +11,7 @@ namespace ListCollectionsExample /// /// Uses Amazon Rekognition to list the collection IDs in the - /// current account. This example was created using the AWS SDK for - /// .NET version 3.7 and .NET Core 5.0. + /// current account. /// public class ListCollections { diff --git a/dotnetv3/Rekognition/ListCollectionsExample/ListCollectionsExample.csproj b/dotnetv3/Rekognition/ListCollectionsExample/ListCollectionsExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/ListCollectionsExample/ListCollectionsExample.csproj +++ b/dotnetv3/Rekognition/ListCollectionsExample/ListCollectionsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/ListFacesExample/ListFaces.cs b/dotnetv3/Rekognition/ListFacesExample/ListFaces.cs index 9b41c99298a..08b0531ad74 100644 --- a/dotnetv3/Rekognition/ListFacesExample/ListFaces.cs +++ b/dotnetv3/Rekognition/ListFacesExample/ListFaces.cs @@ -11,8 +11,7 @@ namespace ListFacesExample /// /// Uses the Amazon Rekognition Service to retrieve the list of faces - /// stored in a collection. The example was created using AWS SDK for - /// .NET version 3.7 and .NET Core 5.0. + /// stored in a collection. /// public class ListFaces { diff --git a/dotnetv3/Rekognition/ListFacesExample/ListFacesExample.csproj b/dotnetv3/Rekognition/ListFacesExample/ListFacesExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/ListFacesExample/ListFacesExample.csproj +++ b/dotnetv3/Rekognition/ListFacesExample/ListFacesExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingId.cs b/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingId.cs index 6738ad6f21e..bdc6bb2dede 100644 --- a/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingId.cs +++ b/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingId.cs @@ -11,8 +11,7 @@ namespace SearchFacesMatchingIdExample /// /// Uses the Amazon Rekognition Service to find faces in an image that - /// match the face Id provided in the method request. This example was - /// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// match the face Id provided in the method request. /// public class SearchFacesMatchingId { diff --git a/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingIdExample.csproj b/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingIdExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingIdExample.csproj +++ b/dotnetv3/Rekognition/SearchFacesMatchingIdExample/SearchFacesMatchingIdExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImage.cs b/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImage.cs index cd745844a56..876e5329109 100644 --- a/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImage.cs +++ b/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImage.cs @@ -11,8 +11,7 @@ namespace SearchFacesMatchingImageExample /// /// Uses the Amazon Rekognition Service to search for images matching those - /// in a collection. The example was created using the AWS SDK for .NET - /// version 3.7 and .NET Core 5.0. + /// in a collection. /// public class SearchFacesMatchingImage { diff --git a/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImageExample.csproj b/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImageExample.csproj index 663d54fd87d..e6b88153d66 100644 --- a/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImageExample.csproj +++ b/dotnetv3/Rekognition/SearchFacesMatchingImageExample/SearchFacesMatchingImageExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/AbortMPUExample/AbortMPU.cs b/dotnetv3/S3/AbortMPUExample/AbortMPU.cs index adcad84aa35..802fc8da309 100644 --- a/dotnetv3/S3/AbortMPUExample/AbortMPU.cs +++ b/dotnetv3/S3/AbortMPUExample/AbortMPU.cs @@ -1,12 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to use the Amazon Simple Storage Service -/// (Amazon S3) to stop a multi-part upload process using the Amazon S3 -/// TransferUtility. The example was created using the AWS SDK for .NET -/// version 3.7 and .NET Core 5.0. -/// namespace AbortMPUExample { // snippet-start:[S3.dotnetv3.AbortMPUExample] @@ -15,6 +9,11 @@ namespace AbortMPUExample using Amazon.S3; using Amazon.S3.Transfer; + /// + /// This example shows how to use the Amazon Simple Storage Service + /// (Amazon S3) to stop a multi-part upload process using the Amazon S3 + /// TransferUtility. + /// public class AbortMPU { public static async Task Main() diff --git a/dotnetv3/S3/AbortMPUExample/AbortMPUExample.csproj b/dotnetv3/S3/AbortMPUExample/AbortMPUExample.csproj index c7432fc55f4..10b6485b24c 100644 --- a/dotnetv3/S3/AbortMPUExample/AbortMPUExample.csproj +++ b/dotnetv3/S3/AbortMPUExample/AbortMPUExample.csproj @@ -1,8 +1,16 @@ - + Exe - net5.0 + net6.0 + + + + 1701;1702;SA0001 + + + + 1701;1702;SA0001 diff --git a/dotnetv3/S3/BucketACLExample/BucketACL.cs b/dotnetv3/S3/BucketACLExample/BucketACL.cs index 06c5f406272..998d887b505 100644 --- a/dotnetv3/S3/BucketACLExample/BucketACL.cs +++ b/dotnetv3/S3/BucketACLExample/BucketACL.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to work with access control lists (ACLs) in an -/// Amazon Simple Storage Service (Amazon S3) bucket. The example was -/// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace BucketACLExample { // snippet-start:[S3.dotnetv3.BucketACLExample] @@ -14,6 +9,10 @@ namespace BucketACLExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to work with access control lists (ACLs) in an + /// Amazon Simple Storage Service (Amazon S3) bucket. + /// public class BucketACL { public static async Task Main() diff --git a/dotnetv3/S3/BucketACLExample/BucketACLExample.csproj b/dotnetv3/S3/BucketACLExample/BucketACLExample.csproj index c7432fc55f4..94a956e67df 100644 --- a/dotnetv3/S3/BucketACLExample/BucketACLExample.csproj +++ b/dotnetv3/S3/BucketACLExample/BucketACLExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/CopyObjectExample/CopyObjectExample.csproj b/dotnetv3/S3/CopyObjectExample/CopyObjectExample.csproj index c7432fc55f4..94a956e67df 100644 --- a/dotnetv3/S3/CopyObjectExample/CopyObjectExample.csproj +++ b/dotnetv3/S3/CopyObjectExample/CopyObjectExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs b/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs index 5123a80ce5c..f3ac0d6d873 100644 --- a/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs +++ b/dotnetv3/S3/EnableNotificationsExample/EnableNotifications.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to enable notifications for an Amazon Simple -/// Storage Service (Amazon S3) bucket. The examples use the AWS SDK for -/// .NET version 3.7, and .NET Core 5.0. -/// namespace EnableNotificationsExample { // snippet-start:[S3.dotnetv3.EnableNotificationsExample] @@ -15,6 +10,10 @@ namespace EnableNotificationsExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to enable notifications for an Amazon Simple + /// Storage Service (Amazon S3) bucket. + /// public class EnableNotifications { public static async Task Main() diff --git a/dotnetv3/S3/EnableNotificationsExample/EnableNotificationsExample.csproj b/dotnetv3/S3/EnableNotificationsExample/EnableNotificationsExample.csproj index 53e2de1bab7..5743c216c12 100644 --- a/dotnetv3/S3/EnableNotificationsExample/EnableNotificationsExample.csproj +++ b/dotnetv3/S3/EnableNotificationsExample/EnableNotificationsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/LifecycleExample/Lifecycle.cs b/dotnetv3/S3/LifecycleExample/Lifecycle.cs index 15d6f9926ad..9c0f1e99cb1 100644 --- a/dotnetv3/S3/LifecycleExample/Lifecycle.cs +++ b/dotnetv3/S3/LifecycleExample/Lifecycle.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to work with Amazon Simple Storage Service -/// (Amazon S3) bucket lifecycle settings. It was created with the AWS SDK -/// for .NET version 3.7 and .NET Core 5.0. -/// namespace LifecycleExample { // snippet-start:[S3.dotnetv3.LifecycleExample] @@ -15,6 +10,10 @@ namespace LifecycleExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to work with Amazon Simple Storage Service + /// (Amazon S3) bucket lifecycle settings. + /// public class Lifecycle { public static async Task Main() diff --git a/dotnetv3/S3/LifecycleExample/LifecycleExample.csproj b/dotnetv3/S3/LifecycleExample/LifecycleExample.csproj index 53e2de1bab7..5743c216c12 100644 --- a/dotnetv3/S3/LifecycleExample/LifecycleExample.csproj +++ b/dotnetv3/S3/LifecycleExample/LifecycleExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/ListBucketsExample/ListBuckets.cs b/dotnetv3/S3/ListBucketsExample/ListBuckets.cs index 3de3693a5cf..b14d4bcc72b 100644 --- a/dotnetv3/S3/ListBucketsExample/ListBuckets.cs +++ b/dotnetv3/S3/ListBucketsExample/ListBuckets.cs @@ -2,12 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // snippet-start:[S3.dotnetv3.ListBuckets] - -/// -/// This example uses the AWS SDK for .NET to list the Amazon Simple Storage -/// Service (Amazon S3) buckets belonging to the default account. This code -/// was written using AWS SDK for .NET v3.5 and .NET Core 5.0. -/// namespace ListBucketsExample { using System; @@ -16,6 +10,10 @@ namespace ListBucketsExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example uses the AWS SDK for .NET to list the Amazon Simple Storage + /// Service (Amazon S3) buckets belonging to the default account. + /// public class ListBuckets { private static IAmazonS3 _s3Client; diff --git a/dotnetv3/S3/ListBucketsExample/ListBucketsExample.csproj b/dotnetv3/S3/ListBucketsExample/ListBucketsExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/ListBucketsExample/ListBucketsExample.csproj +++ b/dotnetv3/S3/ListBucketsExample/ListBucketsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs b/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs index 72578904de2..df3141fe10b 100644 --- a/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs +++ b/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginator.cs @@ -11,8 +11,7 @@ namespace ListObjectsPaginatorExample /// /// The following example lists objects in an Amazon Simple Storage - /// Service (Amazon S3) bucket. It was created using AWS SDK for .NET 3.5 - /// and .NET Core 5.0. + /// Service (Amazon S3) bucket. /// public class ListObjectsPaginator { diff --git a/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginatorExample.csproj b/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginatorExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginatorExample.csproj +++ b/dotnetv3/S3/ListObjectsPaginatorExample/ListObjectsPaginatorExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs b/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs index 29ca7606674..4b4b004f65a 100644 --- a/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs +++ b/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObj.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to perform a multi-part copy from one Amazon -/// Simple Storage Service (Amazon S3) bucket to another. The example uses -/// the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace MPUapiCopyObjectExample { // snippet-start:[S3.dotnetv3.MPUapiCopyObjectExample] @@ -15,6 +10,10 @@ namespace MPUapiCopyObjectExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to perform a multi-part copy from one Amazon + /// Simple Storage Service (Amazon S3) bucket to another. + /// public class MPUapiCopyObj { private const string SourceBucket = "doc-example-bucket1"; diff --git a/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObjExample.csproj b/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObjExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObjExample.csproj +++ b/dotnetv3/S3/MPUapiCopyObjExample/MPUapiCopyObjExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/ManageACLsExample/ManageACLs.cs b/dotnetv3/S3/ManageACLsExample/ManageACLs.cs index d96f4f7292b..8022642678c 100644 --- a/dotnetv3/S3/ManageACLsExample/ManageACLs.cs +++ b/dotnetv3/S3/ManageACLsExample/ManageACLs.cs @@ -1,12 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to manage Amazon Simple Storage Service -/// (Amazon S3) access control lists (ACLs) to control Amazon S3 bucket -/// access. The example was created with the AWS SDK for .NET version 3.7 -/// and .NET Core 5.0. -/// namespace ManageACLsExample { // snippet-start:[S3.dotnetv3.ManageACLsExample] @@ -16,6 +10,11 @@ namespace ManageACLsExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to manage Amazon Simple Storage Service + /// (Amazon S3) access control lists (ACLs) to control Amazon S3 bucket + /// access. + /// public class ManageACLs { public static async Task Main() @@ -88,7 +87,7 @@ public static async Task CreateBucketWithCannedACLAsync(IAmazonS3 client, var request = new PutBucketRequest() { BucketName = newBucketName, - BucketRegion = S3Region.EUW1, + BucketRegion = S3Region.EUWest1, // Add a canned ACL. CannedACL = S3CannedACL.LogDeliveryWrite, diff --git a/dotnetv3/S3/ManageACLsExample/ManageACLsExample.csproj b/dotnetv3/S3/ManageACLsExample/ManageACLsExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/ManageACLsExample/ManageACLsExample.csproj +++ b/dotnetv3/S3/ManageACLsExample/ManageACLsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/ObjectTagExample/ObjectTag.cs b/dotnetv3/S3/ObjectTagExample/ObjectTag.cs index adb63147576..6636cece08a 100644 --- a/dotnetv3/S3/ObjectTagExample/ObjectTag.cs +++ b/dotnetv3/S3/ObjectTagExample/ObjectTag.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to work with tags in Amazon Simple Storage -/// Service (Amazon S3) objects. The example was created using the AWS SDK -/// for .NET version 3.7 and .NET Core 5.0. -/// namespace ObjectTagExample { // snippet-start:[S3.dotnetv3.ObjectTagExample] @@ -16,6 +11,10 @@ namespace ObjectTagExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to work with tags in Amazon Simple Storage + /// Service (Amazon S3) objects. + /// public class ObjectTag { public static async Task Main() diff --git a/dotnetv3/S3/ObjectTagExample/ObjectTagExample.csproj b/dotnetv3/S3/ObjectTagExample/ObjectTagExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/ObjectTagExample/ObjectTagExample.csproj +++ b/dotnetv3/S3/ObjectTagExample/ObjectTagExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/README.md b/dotnetv3/S3/README.md index 6d69542845a..08be16cd94b 100644 --- a/dotnetv3/S3/README.md +++ b/dotnetv3/S3/README.md @@ -33,30 +33,30 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv3 Code excerpts that show you how to call individual service functions. -- [Add CORS rules to a bucket](s3CORSExample/S3CORS.cs#L105) (`PutBucketCors`) -- [Add a lifecycle configuration to a bucket](LifecycleExample/Lifecycle.cs#L146) (`PutBucketLifecycleConfiguration`) -- [Cancel multipart uploads](AbortMPUExample/AbortMPU.cs#L12) (`AbortMultipartUploads`) +- [Add CORS rules to a bucket](s3CORSExample/S3CORS.cs#L104) (`PutBucketCors`) +- [Add a lifecycle configuration to a bucket](LifecycleExample/Lifecycle.cs#L145) (`PutBucketLifecycleConfiguration`) +- [Cancel multipart uploads](AbortMPUExample/AbortMPU.cs#L6) (`AbortMultipartUploads`) - [Copy an object from one bucket to another](CopyObjectExample/CopyObject.cs#L11) (`CopyObject`) - [Create a bucket](S3_Basics/S3Bucket.cs#L12) (`CreateBucket`) -- [Delete CORS rules from a bucket](s3CORSExample/S3CORS.cs#L148) (`DeleteBucketCors`) +- [Delete CORS rules from a bucket](s3CORSExample/S3CORS.cs#L147) (`DeleteBucketCors`) - [Delete an empty bucket](S3_Basics/S3Bucket.cs#L266) (`DeleteBucket`) -- [Delete an object](non-versioned-examples/DeleteObjectExample/DeleteObject.cs#L11) (`DeleteObject`) +- [Delete an object](non-versioned-examples/DeleteObjectExample/DeleteObject.cs#L6) (`DeleteObject`) - [Delete multiple objects](S3_Basics/S3Bucket.cs#L221) (`DeleteObjects`) -- [Delete the lifecycle configuration of a bucket](LifecycleExample/Lifecycle.cs#L193) (`DeleteBucketLifecycle`) -- [Enable logging](ServerAccessLoggingExample/ServerAccessLogging.cs#L15) (`PutBucketLogging`) -- [Enable notifications](EnableNotificationsExample/EnableNotifications.cs#L11) (`PutBucketNotificationConfiguration`) -- [Enable transfer acceleration](TransferAccelerationExample/TransferAcceleration.cs#L13) (`PutBucketAccelerateConfiguration`) -- [Get CORS rules for a bucket](s3CORSExample/S3CORS.cs#L126) (`GetBucketCors`) +- [Delete the lifecycle configuration of a bucket](LifecycleExample/Lifecycle.cs#L192) (`DeleteBucketLifecycle`) +- [Enable logging](ServerAccessLoggingExample/ServerAccessLogging.cs#L6) (`PutBucketLogging`) +- [Enable notifications](EnableNotificationsExample/EnableNotifications.cs#L6) (`PutBucketNotificationConfiguration`) +- [Enable transfer acceleration](TransferAccelerationExample/TransferAcceleration.cs#L6) (`PutBucketAccelerateConfiguration`) +- [Get CORS rules for a bucket](s3CORSExample/S3CORS.cs#L125) (`GetBucketCors`) - [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#L73) (`GetBucketWebsite`) +- [Get the ACL of a bucket](BucketACLExample/BucketACL.cs#L75) (`GetBucketAcl`) +- [Get the lifecycle configuration of a bucket](LifecycleExample/Lifecycle.cs#L169) (`GetBucketLifecycleConfiguration`) +- [Get the website configuration for a bucket](WebsiteConfigExample/WebsiteConfig.cs#L72) (`GetBucketWebsite`) - [List buckets](ListBucketsExample/ListBuckets.cs#L4) (`ListBuckets`) -- [List object versions in a bucket](versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs#L11) (`ListObjectVersions`) +- [List object versions in a bucket](versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs#L6) (`ListObjectVersions`) - [List objects in a bucket](S3_Basics/S3Bucket.cs#L171) (`ListObjectsV2`) -- [Restore an archived copy of an object](RestoreArchivedObjectExample/RestoreArchivedObject.cs#L11) (`RestoreObject`) -- [Set a new ACL for a bucket](BucketACLExample/BucketACL.cs#L38) (`PutBucketAcl`) -- [Set the website configuration for a bucket](WebsiteConfigExample/WebsiteConfig.cs#L58) (`PutBucketWebsite`) +- [Restore an archived copy of an object](RestoreArchivedObjectExample/RestoreArchivedObject.cs#L6) (`RestoreObject`) +- [Set a new ACL for a bucket](BucketACLExample/BucketACL.cs#L37) (`PutBucketAcl`) +- [Set the website configuration for a bucket](WebsiteConfigExample/WebsiteConfig.cs#L57) (`PutBucketWebsite`) - [Upload an object to a bucket](S3_Basics/S3Bucket.cs#L43) (`PutObject`) ### Scenarios diff --git a/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs b/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs index d4a4c53af5e..5bcd88c1a79 100644 --- a/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs +++ b/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObject.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to restore an archived object in an Amazon -/// Simple Storage Service (Amazon S3) bucket. The example was created -/// using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace RestoreArchivedObjectExample { // snippet-start:[S3.dotnetv3.RestoreArchivedObjectExample] @@ -15,6 +10,10 @@ namespace RestoreArchivedObjectExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to restore an archived object in an Amazon + /// Simple Storage Service (Amazon S3) bucket. + /// public class RestoreArchivedObject { public static void Main() diff --git a/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObjectExample.csproj b/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObjectExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObjectExample.csproj +++ b/dotnetv3/S3/RestoreArchivedObjectExample/RestoreArchivedObjectExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/S3_BasicsScenarioTests/S3BucketTests.cs b/dotnetv3/S3/S3_BasicsScenarioTests/S3BucketTests.cs index 4a15ae93b86..8ed3537f2b5 100644 --- a/dotnetv3/S3/S3_BasicsScenarioTests/S3BucketTests.cs +++ b/dotnetv3/S3/S3_BasicsScenarioTests/S3BucketTests.cs @@ -8,7 +8,6 @@ public class S3BucketTests private string newBucket = ""; private string keyName = "sample.txt"; private string destinationFolderName = "saved_pictures"; - private string sourceFolderPath = "~/pictures"; public IAmazonS3 CreateMockS3Client() { diff --git a/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs b/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs index 9ebe14e9910..ebad916d833 100644 --- a/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs +++ b/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObject.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Uses the Amazon Simple Storage Service (Amazon S3) low level API to -/// perform a multipart upload to an Amazon S3 bucket. The example was -/// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace SSECLowLevelMPUcopyObjectExample { // snippet-start:[S3.dotnetv3.SSECLowLevelMPUcopyObjectExample] @@ -17,6 +12,10 @@ namespace SSECLowLevelMPUcopyObjectExample using Amazon.S3; using Amazon.S3.Model; + /// + /// Uses the Amazon Simple Storage Service (Amazon S3) low level API to + /// perform a multipart upload to an Amazon S3 bucket. + /// public class SSECLowLevelMPUcopyObject { public static async Task Main() diff --git a/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObjectExample.csproj b/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObjectExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObjectExample.csproj +++ b/dotnetv3/S3/SSECLowLevelMPUcopyObjectExample/SSECLowLevelMPUcopyObjectExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs b/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs index 12a8054a270..7a3e1648022 100644 --- a/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs +++ b/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryption.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to apply client encryption to an object in an -/// Amazon Simple Storage Service (Amazon S3) bucket. The example was -/// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace SSEClientEncryptionExample { // snippet-start:[S3.dotnetv3.SSEClientEncryptionExample] @@ -16,6 +11,10 @@ namespace SSEClientEncryptionExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to apply client encryption to an object in an + /// Amazon Simple Storage Service (Amazon S3) bucket. + /// public class SSEClientEncryption { public static async Task Main() diff --git a/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryptionExample.csproj b/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryptionExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryptionExample.csproj +++ b/dotnetv3/S3/SSEClientEncryptionExample/SSEClientEncryptionExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs b/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs index ceb8cd06087..2af74b592ac 100644 --- a/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs +++ b/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLogging.cs @@ -1,15 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to enable logging on an Amazon Simple Storage -/// Service (Amazon S3) bucket. You need to have two Amazon S3 buckets for -/// this example. The first is the bucket for which you wish to enable -/// logging, and the second is the location where you want to store the -/// logs. The example was created using the AWS SDK for .NET version 3.7 -/// and .NET Core 5.0. -/// - namespace ServerAccessLoggingExample { // snippet-start:[S3.dotnetv3.ServerAccessLoggingExample] @@ -20,6 +11,13 @@ namespace ServerAccessLoggingExample using Amazon.S3.Model; using Microsoft.Extensions.Configuration; + /// + /// This example shows how to enable logging on an Amazon Simple Storage + /// Service (Amazon S3) bucket. You need to have two Amazon S3 buckets for + /// this example. The first is the bucket for which you wish to enable + /// logging, and the second is the location where you want to store the + /// logs. + /// public class ServerAccessLogging { private static IConfiguration _configuration = null!; diff --git a/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLoggingExample.csproj b/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLoggingExample.csproj index 4dfa16cef46..fc00bb71bbc 100644 --- a/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLoggingExample.csproj +++ b/dotnetv3/S3/ServerAccessLoggingExample/ServerAccessLoggingExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs b/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs index 90bd6828076..431b4a5f5be 100644 --- a/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs +++ b/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryption.cs @@ -1,12 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to upload an object to an Amazon Simple Storage -/// Service (Amazon S3) bucket with server-side encryption enabled. The -/// example was created using the AWS SDK for .NET version 3.7 and -/// .NET Core 5.0. -/// namespace ServerSideEncryptionExample { // snippet-start:[S3.dotnetv3.ServerSideEncryptionExample] @@ -15,6 +9,10 @@ namespace ServerSideEncryptionExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to upload an object to an Amazon Simple Storage + /// Service (Amazon S3) bucket with server-side encryption enabled. + /// public class ServerSideEncryption { public static async Task Main() diff --git a/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryptionExample.csproj b/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryptionExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryptionExample.csproj +++ b/dotnetv3/S3/ServerSideEncryptionExample/ServerSideEncryptionExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs b/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs index cbe8640fc46..7b5ae441076 100644 --- a/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs +++ b/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPI.cs @@ -1,12 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to track the progress of a multipart upload -/// using the Amazon Simple Storage Service (Amazon S3) TransferUtility to -/// upload to an Amazon S3 bucket. The example was created using the AWS -/// SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace TrackMPUUsingHighLevelAPIExample { // snippet-start:[S3.dotnetv3.TrackMPUUsingHighLevelAPIExample] @@ -15,6 +9,11 @@ namespace TrackMPUUsingHighLevelAPIExample using Amazon.S3; using Amazon.S3.Transfer; + /// + /// This example shows how to track the progress of a multipart upload + /// using the Amazon Simple Storage Service (Amazon S3) TransferUtility to + /// upload to an Amazon S3 bucket. + /// public class TrackMPUUsingHighLevelAPI { public static async Task Main() diff --git a/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPIExample.csproj b/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPIExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPIExample.csproj +++ b/dotnetv3/S3/TrackMPUUsingHighLevelAPIExample/TrackMPUUsingHighLevelAPIExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs b/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs index 8dd9c7e3afd..8aa97c78cba 100644 --- a/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs +++ b/dotnetv3/S3/TransferAccelerationExample/TransferAcceleration.cs @@ -1,13 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Amazon Simple Storage Service (Amazon S3) Transfer Acceleration is a -/// bucket-level feature that enables you to perform faster data transfers -/// to Amazon S3. This example shows how to configure Transfer -/// Acceleration. The example was written using the AWS SDK for .NET 3.7 -/// and .NET Core 5.0. -/// namespace TransferAccelerationExample { // snippet-start:[S3.dotnetv3.TransferAccelerationExample] @@ -16,6 +9,12 @@ namespace TransferAccelerationExample using Amazon.S3; using Amazon.S3.Model; + /// + /// Amazon Simple Storage Service (Amazon S3) Transfer Acceleration is a + /// bucket-level feature that enables you to perform faster data transfers + /// to Amazon S3. This example shows how to configure Transfer + /// Acceleration. + /// public class TransferAcceleration { /// diff --git a/dotnetv3/S3/TransferAccelerationExample/TransferAccelerationExample.csproj b/dotnetv3/S3/TransferAccelerationExample/TransferAccelerationExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/TransferAccelerationExample/TransferAccelerationExample.csproj +++ b/dotnetv3/S3/TransferAccelerationExample/TransferAccelerationExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs b/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs index 87dcc190003..2c20a68e12c 100644 --- a/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs +++ b/dotnetv3/S3/UploadUsingPresignedURLExample/UploadUsingPresignedURL.cs @@ -1,25 +1,28 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to upload an object to an Amazon Simple Storage -/// Service (Amazon S3) bucket using a presigned URL. The code first -/// creates a presigned URL and then uses it to upload an object to an -/// Amazon S3 bucket using that URL. -/// namespace UploadUsingPresignedURLExample { // snippet-start:[S3.dotnetv3.UploadUsingPresignedURLExample] using System; using System.IO; - using System.Net; + using System.Net.Http; + using System.Threading.Tasks; using Amazon; using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to upload an object to an Amazon Simple Storage + /// Service (Amazon S3) bucket using a presigned URL. The code first + /// creates a presigned URL and then uses it to upload an object to an + /// Amazon S3 bucket using that URL. + /// public class UploadUsingPresignedURL { - public static void Main() + private static HttpClient httpClient = new HttpClient(); + + public static async Task Main() { string bucketName = "doc-example-bucket"; string keyName = "samplefile.txt"; @@ -41,7 +44,7 @@ public static void Main() IAmazonS3 client = new AmazonS3Client(RegionEndpoint.USEast1); var url = GeneratePreSignedURL(client, bucketName, keyName, timeoutDuration); - var success = UploadObject(filePath, url); + var success = await UploadObject(filePath, url); if (success) { @@ -63,25 +66,13 @@ public static void Main() /// file to the Amazon S3 bucket. /// A Boolean value indicating the success or failure of the /// operation, based on the HttpWebResponse. - public static bool UploadObject(string filePath, string url) + public static async Task UploadObject(string filePath, string url) { - HttpWebRequest httpRequest = WebRequest.Create(url) as HttpWebRequest; - httpRequest.Method = "PUT"; - using (Stream dataStream = httpRequest.GetRequestStream()) - { - var buffer = new byte[8000]; - using (FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) - { - int bytesRead = 0; - while ((bytesRead = fileStream.Read(buffer, 0, buffer.Length)) > 0) - { - dataStream.Write(buffer, 0, bytesRead); - } - } - } + using var streamContent = new StreamContent( + new FileStream(filePath, FileMode.Open, FileAccess.Read)); - HttpWebResponse response = httpRequest.GetResponse() as HttpWebResponse; - return response.StatusCode == HttpStatusCode.OK; + var response = await httpClient.PutAsync(url, streamContent); + return response.IsSuccessStatusCode; } /// diff --git a/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs b/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs index 5f6057854c5..584e5e3c25a 100644 --- a/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs +++ b/dotnetv3/S3/WebsiteConfigExample/WebsiteConfig.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example uses Amazon Simple Storage Service (Amazon S3) to -/// configure a static website in an Amazon S3 bucket. The example was -/// created using AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace WebsiteConfigExample { // snippet-start:[S3.dotnetv3.WebsiteConfigExample] @@ -15,6 +10,10 @@ namespace WebsiteConfigExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example uses Amazon Simple Storage Service (Amazon S3) to + /// configure a static website in an Amazon S3 bucket. + /// public class WebsiteConfig { /// diff --git a/dotnetv3/S3/WebsiteConfigExample/WebsiteConfigExample.csproj b/dotnetv3/S3/WebsiteConfigExample/WebsiteConfigExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/WebsiteConfigExample/WebsiteConfigExample.csproj +++ b/dotnetv3/S3/WebsiteConfigExample/WebsiteConfigExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs b/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs index 57e2e9ee27c..c232ac2b9fd 100644 --- a/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs +++ b/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to delete multiple objects from an Amazon Simple -/// Storage Service (Amazon S3) bucket. The example was created using the -/// AWS SDK for .NET 3.7 and .NET Core 5.0. -/// namespace DeleteMultipleObjectsExample { // snippet-start:[S3.dotnetv3.DeleteMultipleObjectsExample] @@ -15,6 +10,10 @@ namespace DeleteMultipleObjectsExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to delete multiple objects from an Amazon Simple + /// Storage Service (Amazon S3) bucket. + /// public class DeleteMultipleObjects { /// diff --git a/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj b/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj +++ b/dotnetv3/S3/non-versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs b/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs index 003b933baf4..4190458308e 100644 --- a/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs +++ b/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObject.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to delete an object from a non-versioned Amazon -/// Simple Storage Service (Amazon S3) bucket. This example was created -/// using the AWS SDK 3.7 for .NET and .NET Core 5.0. -/// namespace DeleteObjectExample { // snippet-start:[S3.dotnetv3.DeleteObjectExample] @@ -14,6 +9,10 @@ namespace DeleteObjectExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to delete an object from a non-versioned Amazon + /// Simple Storage Service (Amazon S3) bucket. + /// public class DeleteObject { /// diff --git a/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObjectExample.csproj b/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObjectExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObjectExample.csproj +++ b/dotnetv3/S3/non-versioned-examples/DeleteObjectExample/DeleteObjectExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/s3CORSExample/S3CORS.cs b/dotnetv3/S3/s3CORSExample/S3CORS.cs index bf9bbd98499..6cb72d9fbe7 100644 --- a/dotnetv3/S3/s3CORSExample/S3CORS.cs +++ b/dotnetv3/S3/s3CORSExample/S3CORS.cs @@ -1,15 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to configure your Amazon Simple Storage Service -/// (Amazon S3) bucket to allow cross-origin requests by creating a CORS -/// configuration. The CORS configuration is a document with rules that -/// identify the origins that you will allow to access your bucket, the -/// operations (HTTP methods) supported for each origin, and other operation- -/// specific information. This example was created using the AWS SDK for -/// .NET 3.7 and .NET Core 5.0. -/// namespace S3CORSExample { using System; @@ -19,6 +10,14 @@ namespace S3CORSExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to configure your Amazon Simple Storage Service + /// (Amazon S3) bucket to allow cross-origin requests by creating a CORS + /// configuration. The CORS configuration is a document with rules that + /// identify the origins that you will allow to access your bucket, the + /// operations (HTTP methods) supported for each origin, and other operation- + /// specific information. + /// public class S3CORS { // Remember to change the bucket name to the name of an Amazon Simple diff --git a/dotnetv3/S3/s3CORSExample/S3CORSExample.csproj b/dotnetv3/S3/s3CORSExample/S3CORSExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/s3CORSExample/S3CORSExample.csproj +++ b/dotnetv3/S3/s3CORSExample/S3CORSExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs b/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs index 57d9545753d..4f0866f9f7b 100644 --- a/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs +++ b/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjects.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example shows how to delete objects in a version-enabled Amazon -/// Simple StorageService (Amazon S3) bucket. It was created using AWS -/// SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace DeleteMultipleObjectsExample { // snippet-start:[S3.dotnetv3.DeleteMultipleVersionedObjectsExample] @@ -15,6 +10,10 @@ namespace DeleteMultipleObjectsExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example shows how to delete objects in a version-enabled Amazon + /// Simple StorageService (Amazon S3) bucket. + /// public class DeleteMultipleObjects { public static async Task Main() diff --git a/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj b/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj +++ b/dotnetv3/S3/versioned-examples/DeleteMultipleObjectsExample/DeleteMultipleObjectsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs b/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs index 2ff2a3bf239..193b6569a18 100644 --- a/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs +++ b/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersion.cs @@ -1,12 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example creates an object in an Amazon Simple Storage Service -/// (Amazon S3) bucket and then deletes the object version that was -/// created. The example uses the AWS SDK for .NET version 3.7 and -/// .NET Core 5.0. -/// namespace DeleteObjectVersionExample { // snippet-start:[S3.dotnetv3.DeleteObjectVersionExample] @@ -15,6 +9,11 @@ namespace DeleteObjectVersionExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example creates an object in an Amazon Simple Storage Service + /// (Amazon S3) bucket and then deletes the object version that was + /// created. + /// public class DeleteObjectVersion { public static async Task Main() diff --git a/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersionExample.csproj b/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersionExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersionExample.csproj +++ b/dotnetv3/S3/versioned-examples/DeleteObjectVersionExample/DeleteObjectVersionExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs b/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs index c5ea2ac3bac..ec3a7b2fc70 100644 --- a/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs +++ b/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// This example lists the versions of the objects in a version enabled -/// Amazon Simple Storage Service (Amazon S3) bucket. It was created using -/// the AWS SDK for .NET verion 3.7 and .NET Core 5.0. -/// namespace ListObjectVersionsExample { // snippet-start:[S3.dotnetv3.ListObjectVersionsExample] @@ -14,6 +9,10 @@ namespace ListObjectVersionsExample using Amazon.S3; using Amazon.S3.Model; + /// + /// This example lists the versions of the objects in a version enabled + /// Amazon Simple Storage Service (Amazon S3) bucket. + /// public class ListObjectVersions { public static async Task Main() diff --git a/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersionsExample.csproj b/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersionsExample.csproj index 9b74e131639..c0af6459f36 100644 --- a/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersionsExample.csproj +++ b/dotnetv3/S3/versioned-examples/ListObjectVersionsExample/ListObjectVersionsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs b/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs index 67db3928b61..6bd84f9c140 100644 --- a/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs +++ b/dotnetv3/SNS/IsPhoneNumOptedOutExample/IsPhoneNumOptedOutExample/IsPhoneNumOptedOut.cs @@ -11,9 +11,7 @@ namespace IsPhoneNumOptedOutExample /// /// This example shows how to use the Amazon Simple Notification Service - /// (Amazon SNS) to check whether a phone number has been opted out. The - /// example was created using the AWS SDK for .NET version 3.7 and - /// .NET Core 5.0. + /// (Amazon SNS) to check whether a phone number has been opted out. /// public class IsPhoneNumOptedOut { diff --git a/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRoleExample.csproj b/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRoleExample.csproj index 6f13aff33e6..b8da3f9185e 100644 --- a/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRoleExample.csproj +++ b/dotnetv3/STS/AssumeRole/AssumeRoleExample/AssumeRoleExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleExampleTest.csproj b/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleExampleTest.csproj index 78482563428..3010a1a0336 100644 --- a/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleExampleTest.csproj +++ b/dotnetv3/STS/AssumeRole/AssumeRoleExampleTest/AssumeRoleExampleTest.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false diff --git a/dotnetv3/SageMaker/Lambdas/SageMakerLambdaFunction.cs b/dotnetv3/SageMaker/Lambdas/SageMakerLambdaFunction.cs index 9213f791c80..5ebb59658ff 100644 --- a/dotnetv3/SageMaker/Lambdas/SageMakerLambdaFunction.cs +++ b/dotnetv3/SageMaker/Lambdas/SageMakerLambdaFunction.cs @@ -117,7 +117,7 @@ private async Task ProcessMessageAsync(SQSEvent.SQSMessage message, ILambdaConte // Get information about the SageMaker job. var payload = JsonSerializer.Deserialize(message.Body); - context.Logger.LogInformation($"Payload token {payload.token}"); + context.Logger.LogInformation($"Payload token {payload!.token}"); var token = payload.token; if (payload.arguments.ContainsKey("vej_arn")) diff --git a/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs b/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs index 678a1b692a5..af9d9160f21 100644 --- a/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs +++ b/dotnetv3/Translate/BatchTranslateExample/BatchTranslate.cs @@ -1,11 +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 -/// will also be stored in an Amazon S3 bucket. The example was created using -/// the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace BatchTranslateExample { @@ -16,6 +10,11 @@ namespace BatchTranslateExample using Amazon.Translate; using Amazon.Translate.Model; + /// + /// This example shows how to use Amazon Translate to process the files in + /// an Amazon Simple Storage Service (Amazon S3) bucket. The translated results + /// will also be stored in an Amazon S3 bucket. + /// public class BatchTranslate { public static async Task Main() diff --git a/dotnetv3/Translate/BatchTranslateExample/BatchTranslateExample.csproj b/dotnetv3/Translate/BatchTranslateExample/BatchTranslateExample.csproj index a1339b63155..2d4fdc43308 100644 --- a/dotnetv3/Translate/BatchTranslateExample/BatchTranslateExample.csproj +++ b/dotnetv3/Translate/BatchTranslateExample/BatchTranslateExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslation.cs b/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslation.cs index 278cb11f4f4..03c40a6afb3 100644 --- a/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslation.cs +++ b/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslation.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// The following example shows how to retrieve the details of -/// a text translation job using Amazon Translate. The example was -/// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace DescribeTextTranslationExample { // snippet-start:[Translate.dotnetv3.DescribeTextTranslationJobExample] @@ -14,6 +9,10 @@ namespace DescribeTextTranslationExample using Amazon.Translate; using Amazon.Translate.Model; + /// + /// The following example shows how to retrieve the details of + /// a text translation job using Amazon Translate. + /// public class DescribeTextTranslation { public static async Task Main() diff --git a/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslationExample.csproj b/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslationExample.csproj index 59091a39117..a11271340af 100644 --- a/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslationExample.csproj +++ b/dotnetv3/Translate/DescribeTextTranslationExample/DescribeTextTranslationExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobs.cs b/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobs.cs index 18979858894..d0bb9f6d892 100644 --- a/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobs.cs +++ b/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobs.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// List Amazon Translate translation jobs, along with details about each job. -/// This example was created using the AWS SDK for .NET version 3.7 and -/// .NET Core 5.0. -/// namespace ListTranslationJobsExample { // snippet-start:[Translate.dotnetv3.ListTranslationJobsExample] @@ -15,6 +10,9 @@ namespace ListTranslationJobsExample using Amazon.Translate; using Amazon.Translate.Model; + /// + /// List Amazon Translate translation jobs, along with details about each job. + /// public class ListTranslationJobs { public static async Task Main() diff --git a/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobsExample.csproj b/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobsExample.csproj index 59091a39117..a11271340af 100644 --- a/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobsExample.csproj +++ b/dotnetv3/Translate/ListTranslationJobsExample/ListTranslationJobsExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Translate/README.md b/dotnetv3/Translate/README.md index 63fc39aeeff..2bc5e7cd201 100644 --- a/dotnetv3/Translate/README.md +++ b/dotnetv3/Translate/README.md @@ -33,11 +33,11 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv3 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#L12) (`StartTextTranslationJob`) -- [Stop a translation job](StopTextTranslationJobExample/StopTextTranslationJob.cs#L11) (`StopTextTranslationJob`) -- [Translate text](TranslateTextExample/TranslateText.cs#L11) (`TranslateText`) +- [Describe a translation job](DescribeTextTranslationExample/DescribeTextTranslation.cs#L6) (`DescribeTextTranslationJob`) +- [List translation jobs](ListTranslationJobsExample/ListTranslationJobs.cs#L6) (`ListTextTranslationJobs`) +- [Start a translation job](BatchTranslateExample/BatchTranslate.cs#L6) (`StartTextTranslationJob`) +- [Stop a translation job](StopTextTranslationJobExample/StopTextTranslationJob.cs#L6) (`StopTextTranslationJob`) +- [Translate text](TranslateTextExample/TranslateText.cs#L6) (`TranslateText`) ### Cross-service examples diff --git a/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs b/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs index 4e2fc3acf22..5755079dab9 100644 --- a/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs +++ b/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJob.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Shows how to stop a running Amazon Translation Service text translation -/// job. The example was created using the AWS SDK for .NET version 3.7 and -/// .NET Core 5.0. -/// namespace StopTextTranslationJobExample { // snippet-start:[Translate.dotnetv3.StopTextTranslationJobExample] @@ -14,6 +9,10 @@ namespace StopTextTranslationJobExample using Amazon.Translate; using Amazon.Translate.Model; + /// + /// Shows how to stop a running Amazon Translation Service text translation + /// job. + /// public class StopTextTranslationJob { public static async Task Main() diff --git a/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJobExample.csproj b/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJobExample.csproj index 59091a39117..a11271340af 100644 --- a/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJobExample.csproj +++ b/dotnetv3/Translate/StopTextTranslationJobExample/StopTextTranslationJobExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/Translate/TranslateTextExample/TranslateText.cs b/dotnetv3/Translate/TranslateTextExample/TranslateText.cs index 376845d9f1e..305202ed176 100644 --- a/dotnetv3/Translate/TranslateTextExample/TranslateText.cs +++ b/dotnetv3/Translate/TranslateTextExample/TranslateText.cs @@ -1,11 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -/// -/// Take text from a file stored a Amazon Simple Storage Service (Amazon S3) -/// object and translate it using the Amazon Transfer Service. The example was -/// created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. -/// namespace TranslateTextExample { // snippet-start:[Translate.dotnetv3.TranslateTextExample] @@ -17,6 +12,10 @@ namespace TranslateTextExample using Amazon.Translate; using Amazon.Translate.Model; + /// + /// Take text from a file stored a Amazon Simple Storage Service (Amazon S3) + /// object and translate it using the Amazon Transfer Service. + /// public class TranslateText { public static async Task Main() diff --git a/dotnetv3/Translate/TranslateTextExample/TranslateTextExample.csproj b/dotnetv3/Translate/TranslateTextExample/TranslateTextExample.csproj index 6ebc9d2b055..63f1033686b 100644 --- a/dotnetv3/Translate/TranslateTextExample/TranslateTextExample.csproj +++ b/dotnetv3/Translate/TranslateTextExample/TranslateTextExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs index ba84cd7a5fa..18739cbcc7a 100644 --- a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs +++ b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadData.cs @@ -14,8 +14,7 @@ namespace CreateTablesLoadDataExample /// /// This example creates several Amazon DynamoDB tables and then adds - /// sample data to each table. The code was written using AWS SDK for - /// .NET version 3.7 and .NET Core 5.0. + /// sample data to each table. /// public class CreateTablesLoadData { diff --git a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj index efbd0d057ba..a6f7af21bee 100644 --- a/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj +++ b/dotnetv3/dynamodb/CreateTablesLoadDataExample/CreateTablesLoadDataExample/CreateTablesLoadDataExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample.csproj b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample.csproj +++ b/dotnetv3/dynamodb/high-level-api/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample/HighLevelBatchWriteItemExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs index e00414ff8ff..c4b170dbe96 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs @@ -13,8 +13,7 @@ namespace HighLevelItemCRUDExample /// /// Shows how to perform high-level CRUD operations on an Amazon DynamoDB - /// table. The example was created with the AWS SDK for .NET version 3.7 - /// and .NET Core 5.0. + /// table. /// public class HighLevelItemCrud { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUDExample.csproj b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUDExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUDExample.csproj +++ b/dotnetv3/dynamodb/high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUDExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs index 6be7c0d8b4b..9c9a329cf00 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryData.cs @@ -11,8 +11,7 @@ namespace HighLevelMappingArbitraryDataExample // snippet-start:[dynamodb.dotnetv3.HighLevelMappingArbitraryDataExample] /// - /// Shows how to map arbitrary data to an Amazon DynamoDB table. The example - /// was created using the AWS SDK for .NET version 3.7 and .NET Core 5.0. + /// Shows how to map arbitrary data to an Amazon DynamoDB table. /// public class HighLevelMappingArbitraryData { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample.csproj b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample.csproj +++ b/dotnetv3/dynamodb/high-level-api/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample/HighLevelMappingArbitraryDataExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs index 5be9033bdc4..499f397ca10 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs +++ b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScan.cs @@ -14,8 +14,7 @@ namespace HighLevelQueryAndScanExample /// /// Shows how to perform high-level query and scan operations to Amazon - /// DynamoDB tables. This example was created using the AWS SDK for .NET - /// version 3.7 and .NET Core 5.0. + /// DynamoDB tables. /// public class HighLevelQueryAndScan { diff --git a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample.csproj b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample.csproj +++ b/dotnetv3/dynamodb/high-level-api/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample/HighLevelQueryAndScanExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.csproj b/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.csproj index 5570e40a9f9..1e43d9728f7 100644 --- a/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.csproj +++ b/dotnetv3/dynamodb/low-level-api/LowLevelBatchGet/LowLevelBatchGet.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs b/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs index 3f93f154142..5f43a9ce959 100644 --- a/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs +++ b/dotnetv3/dynamodb/low-level-api/LowLevelTableExample/LowLevelTableExample.cs @@ -104,7 +104,7 @@ private static async Task ListMyTables() { Console.WriteLine("\n*** Listing tables ***"); - string? lastTableNameEvaluated = null; + string lastTableNameEvaluated = null; do { var response = await Client.ListTablesAsync(new ListTablesRequest @@ -186,7 +186,7 @@ await Client.DeleteTableAsync(new DeleteTableRequest // snippet-start:[dynamodb.dotnetv3.WaitUntilTableReady] private static async Task WaitUntilTableReady(string tableName) { - string? status = null; + string status = null; // Wait until table is created. Call DescribeTable. do { diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs b/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs index db11cabb74a..5c644e9476e 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItem.cs @@ -13,8 +13,7 @@ namespace MidLevelBatchWriteItemExample /// /// Shows how to use mid-level Amazon DynamoDB API calls to perform batch - /// operations. The example was created using the AWS SDK for .NET version - /// 3.7 and .NET Core 5.0. + /// operations. /// public class MidLevelBatchWriteItem { diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample.csproj b/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample.csproj +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample/MidLevelBatchWriteItemExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs b/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs index 84e5a33ff98..a2d18401ca9 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScan.cs @@ -14,8 +14,7 @@ namespace MidLevelQueryAndScanExample /// /// Shows how to perform mid-level query procedures on an Amazon DynamoDB - /// table. The example was created using the AWS SDK for .NET version 3.7 and - /// .NET Core 5.0. + /// table. /// public class MidLevelQueryAndScan { diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample.csproj b/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample.csproj +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample/MidLevelQueryAndScanExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs b/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs index b4a0f001e5c..12860e1b108 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnly.cs @@ -14,8 +14,7 @@ namespace MidLevelScanOnlyExample /// /// Shows how to use mid-level Amazon DynamoDB API calls to scan a DynamoDB - /// table for values. This example was created using the AWS SDK for .NET - /// version 3.7 and .NET Core 5.0. + /// table for values. /// public class MidLevelScanOnly { diff --git a/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnlyExample.csproj b/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnlyExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnlyExample.csproj +++ b/dotnetv3/dynamodb/mid-level-api/MidLevelScanOnlyExample/MidLevelScanOnlyExample/MidLevelScanOnlyExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs b/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs index a559bb0ca9d..5522cb31afe 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs +++ b/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs @@ -13,8 +13,7 @@ namespace MidlevelItemCRUDExample // snippet-start:[dynamodb.dotnetv3.MidlevelItemCRUDExample] /// - /// Performs CRUD operations on an Amazon DynamoDB table. The example was - /// created using the AWS SDK for .NET 3.7 and .NET Core 5.0. + /// Performs CRUD operations on an Amazon DynamoDB table. /// public class MidlevelItemCRUD { diff --git a/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUDExample.csproj b/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUDExample.csproj index 2dc3bd11c99..6484147d8af 100644 --- a/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUDExample.csproj +++ b/dotnetv3/dynamodb/mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUDExample.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/Movie.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/Movie.cs index 72e7495d3ac..61f3323eb8f 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/Movie.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/Movie.cs @@ -6,7 +6,7 @@ namespace PartiQL_Basics_Scenario public class Movie { public int Year { get; set; } - public string Title { get; set; } - public MovieInfo Info { get; set; } + public string Title { get; set; } = null!; + public MovieInfo Info { get; set; } = null!; } } \ No newline at end of file diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/MovieInfo.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/MovieInfo.cs index 4df830a311b..e31f1fe9ce5 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/MovieInfo.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/MovieInfo.cs @@ -5,14 +5,14 @@ namespace PartiQL_Basics_Scenario { public class MovieInfo { - public string[] Directors { get; set; } + public string[] Directors { get; set; } = null!; public DateTime ReleaseDate { get; set; } public float Rating { get; set; } - public string[] Genres { get; set; } - public string ImageUrl { get; set; } - public string Plot { get; set; } + public string[] Genres { get; set; } = null!; + public string ImageUrl { get; set; } = null!; + public string Plot { get; set; } = null!; public int Rank { get; set; } public int RunningTimeSecs { get; set; } - public string[] Actors { get; set; } + public string[] Actors { get; set; } = null!; } } \ No newline at end of file diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLMethods.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLMethods.cs index 0a0d2898f99..123c4b86880 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLMethods.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLMethods.cs @@ -85,7 +85,7 @@ public static List ImportMovies(string movieFileName) { if (!File.Exists(movieFileName)) { - return null; + return null!; } using var sr = new StreamReader(movieFileName); @@ -99,7 +99,7 @@ public static List ImportMovies(string movieFileName) } else { - return null; + return null!; } } diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PriorityOrderer.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PriorityOrderer.cs index 51bbece000c..611889cce85 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PriorityOrderer.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Tests/PriorityOrderer.cs @@ -37,7 +37,7 @@ private static TValue GetOrCreate( IDictionary dictionary, TKey key) where TKey : struct where TValue : new() => - dictionary.TryGetValue(key, out TValue result) + dictionary.TryGetValue(key, out var result) ? result : (dictionary[key] = new TValue()); } diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PriorityOrderer.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PriorityOrderer.cs index fdcb460eeb7..de8c273815d 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PriorityOrderer.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQLBatch_Tests/PriorityOrderer.cs @@ -37,7 +37,7 @@ private static TValue GetOrCreate( IDictionary dictionary, TKey key) where TKey : struct where TValue : new() => - dictionary.TryGetValue(key, out TValue result) + dictionary.TryGetValue(key, out var result) ? result : (dictionary[key] = new TValue()); } diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/Movie.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/Movie.cs index 2dc53f6ac24..ccc849c83fb 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/Movie.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/Movie.cs @@ -6,7 +6,7 @@ namespace PartiQL_Batch_Scenario public class Movie { public int Year { get; set; } - public string Title { get; set; } - public MovieInfo Info { get; set; } + public string Title { get; set; } = null!; + public MovieInfo Info { get; set; } = null!; } } \ No newline at end of file diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/MovieInfo.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/MovieInfo.cs index 540502831dc..f7172e11502 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/MovieInfo.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/MovieInfo.cs @@ -5,14 +5,14 @@ namespace PartiQL_Batch_Scenario { public class MovieInfo { - public string[] Directors { get; set; } + public string[] Directors { get; set; } = null!; public DateTime ReleaseDate { get; set; } public float Rating { get; set; } - public string[] Genres { get; set; } - public string ImageUrl { get; set; } - public string Plot { get; set; } + public string[] Genres { get; set; } = null!; + public string ImageUrl { get; set; } = null!; + public string Plot { get; set; } = null!; public int Rank { get; set; } public int RunningTimeSecs { get; set; } - public string[] Actors { get; set; } + public string[] Actors { get; set; } = null!; } } \ No newline at end of file diff --git a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs index 84864d74dde..5a2205da13e 100644 --- a/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs +++ b/dotnetv3/dynamodb/scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs @@ -83,7 +83,7 @@ public static List ImportMovies(string movieFileName) { if (!File.Exists(movieFileName)) { - return null; + return null!; } using var sr = new StreamReader(movieFileName); @@ -97,7 +97,7 @@ public static List ImportMovies(string movieFileName) } else { - return null; + return null!; } } // snippet-end:[PartiQL.dotnetv3.PartiQLBatchScenario-InsertMovies]