diff --git a/Include/sdk/_sdk-versions.json b/Include/sdk/_sdk-versions.json index a82d23cf8..02810e1e2 100644 --- a/Include/sdk/_sdk-versions.json +++ b/Include/sdk/_sdk-versions.json @@ -1,3173 +1,3181 @@ { "NewServiceVersion" : "3.7.400.0", - "ProductVersion" : "3.7.932.0", - "CoreVersion" : "3.7.400.56", + "ProductVersion" : "3.7.933.0", + "CoreVersion" : "3.7.400.57", "OverrideCoreVersion" : "3.3", "DefaultToPreview" : false, "PreviewLabel" : null, "ServiceVersions" : { "CloudHSM" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AutoScaling" : { - "Version" : "3.7.406.1", + "Version" : "3.7.407.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AWSSupport" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudFormation" : { - "Version" : "3.7.401.3", + "Version" : "3.7.401.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudFront" : { - "Version" : "3.7.403.0", + "Version" : "3.7.403.1", "AssemblyVersionOverride" : "3.3.4.0", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudSearch" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudSearchDomain" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudTrail" : { - "Version" : "3.7.402.0", + "Version" : "3.7.402.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ConfigService" : { - "Version" : "3.7.401.52", + "Version" : "3.7.401.53", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudWatch" : { - "Version" : "3.7.402.3", + "Version" : "3.7.402.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudWatchLogs" : { - "Version" : "3.7.407.0", + "Version" : "3.7.407.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeDeploy" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CognitoIdentity" : { - "Version" : "3.7.401.38", + "Version" : "3.7.401.39", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56", - "SecurityToken" : "3.7.401.5" + "Core" : "3.7.400.57", + "SecurityToken" : "3.7.401.6" }, "InPreview" : false }, "CognitoSync" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56", - "CognitoIdentity" : "3.7.401.38" + "Core" : "3.7.400.57", + "CognitoIdentity" : "3.7.401.39" }, "InPreview" : false }, "DataPipeline" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DeviceFarm" : { - "Version" : "3.7.401.44", + "Version" : "3.7.401.45", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DirectConnect" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DynamoDBv2" : { - "Version" : "3.7.403.6", + "Version" : "3.7.403.7", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EC2" : { - "Version" : "3.7.420.0", + "Version" : "3.7.420.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ECS" : { - "Version" : "3.7.407.1", + "Version" : "3.7.407.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElastiCache" : { - "Version" : "3.7.402.0", + "Version" : "3.7.402.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElasticBeanstalk" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElasticLoadBalancing" : { - "Version" : "3.7.401.54", + "Version" : "3.7.401.55", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElasticMapReduce" : { - "Version" : "3.7.402.23", + "Version" : "3.7.403.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElasticTranscoder" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Glacier" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56", - "SQS" : "3.7.400.56", - "SimpleNotificationService" : "3.7.400.56" + "Core" : "3.7.400.57", + "SQS" : "3.7.400.57", + "SimpleNotificationService" : "3.7.400.57" }, "InPreview" : false }, "IdentityManagement" : { - "Version" : "3.7.403.5", + "Version" : "3.7.403.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ImportExport" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Kinesis" : { - "Version" : "3.7.402.33", + "Version" : "3.7.402.34", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Lambda" : { - "Version" : "3.7.410.0", + "Version" : "3.7.411.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KeyManagementService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MachineLearning" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MobileAnalytics" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "OpsWorks" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "RDS" : { - "Version" : "3.7.408.1", + "Version" : "3.7.408.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Redshift" : { - "Version" : "3.7.404.5", + "Version" : "3.7.404.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Route53" : { - "Version" : "3.7.403.13", + "Version" : "3.7.403.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Route53Domains" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "S3" : { - "Version" : "3.7.407.0", + "Version" : "3.7.407.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SecurityToken" : { - "Version" : "3.7.401.5", + "Version" : "3.7.401.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SimpleDB" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SimpleEmail" : { - "Version" : "3.7.401.46", + "Version" : "3.7.402.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SimpleNotificationService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SimpleWorkflow" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SQS" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SimpleSystemsManagement" : { - "Version" : "3.7.403.0", + "Version" : "3.7.403.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "StorageGateway" : { - "Version" : "3.7.401.37", + "Version" : "3.7.401.38", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WorkSpaces" : { - "Version" : "3.7.406.1", + "Version" : "3.7.406.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DirectoryService" : { - "Version" : "3.7.401.35", + "Version" : "3.7.401.36", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElasticFileSystem" : { - "Version" : "3.7.401.2", + "Version" : "3.7.401.3", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeCommit" : { - "Version" : "3.7.401.56", + "Version" : "3.7.401.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodePipeline" : { - "Version" : "3.7.404.22", + "Version" : "3.7.405.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Elasticsearch" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WAF" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisFirehose" : { - "Version" : "3.7.401.9", + "Version" : "3.7.401.10", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AWSMarketplaceCommerceAnalytics" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Inspector" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoT" : { - "Version" : "3.7.404.0", + "Version" : "3.7.404.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IotData" : { - "Version" : "3.7.401.26", + "Version" : "3.7.401.27", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "APIGateway" : { - "Version" : "3.7.401.0", + "Version" : "3.7.401.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ECR" : { - "Version" : "3.7.404.35", + "Version" : "3.7.404.36", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudWatchEvents" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CertificateManager" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GameLift" : { - "Version" : "3.7.402.7", + "Version" : "3.7.402.8", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DatabaseMigrationService" : { - "Version" : "3.7.402.20", + "Version" : "3.7.402.21", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AWSMarketplaceMetering" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CognitoIdentityProvider" : { - "Version" : "3.7.403.37", + "Version" : "3.7.404.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ApplicationDiscoveryService" : { - "Version" : "3.7.401.1", + "Version" : "3.7.401.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ApplicationAutoScaling" : { - "Version" : "3.7.402.0", + "Version" : "3.7.402.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ServiceCatalog" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElasticLoadBalancingV2" : { - "Version" : "3.7.407.1", + "Version" : "3.7.408.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisAnalytics" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Snowball" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Budgets" : { - "Version" : "3.7.401.33", + "Version" : "3.7.401.34", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ServerMigrationService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Rekognition" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Lightsail" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Polly" : { - "Version" : "3.7.401.45", + "Version" : "3.7.401.46", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "StepFunctions" : { - "Version" : "3.7.402.44", + "Version" : "3.7.403.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppStream" : { - "Version" : "3.7.403.28", + "Version" : "3.7.403.29", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "OpsWorksCM" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeBuild" : { - "Version" : "3.7.407.7", + "Version" : "3.7.407.8", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Pinpoint" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Shield" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AWSHealth" : { - "Version" : "3.7.401.0", + "Version" : "3.7.401.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "XRay" : { - "Version" : "3.7.401.0", + "Version" : "3.7.401.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WAFRegional" : { - "Version" : "3.7.401.54", + "Version" : "3.7.401.55", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Batch" : { - "Version" : "3.7.403.9", + "Version" : "3.7.403.10", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CostAndUsageReport" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudDirectory" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Lex" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MTurk" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Organizations" : { - "Version" : "3.7.403.6", + "Version" : "3.7.403.7", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WorkDocs" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ResourceGroupsTaggingAPI" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LexModelBuildingService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MarketplaceEntitlementService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Athena" : { - "Version" : "3.7.402.20", + "Version" : "3.7.402.21", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Greengrass" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DAX" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MigrationHub" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Glue" : { - "Version" : "3.7.410.2", + "Version" : "3.7.410.3", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudHSMV2" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Pricing" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CostExplorer" : { - "Version" : "3.7.402.0", + "Version" : "3.7.403.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaPackage" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaLive" : { - "Version" : "3.7.405.35", + "Version" : "3.7.405.36", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaStoreData" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaStore" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaConvert" : { - "Version" : "3.7.404.1", + "Version" : "3.7.404.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MQ" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GuardDuty" : { - "Version" : "3.7.404.11", + "Version" : "3.7.404.12", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppSync" : { - "Version" : "3.7.403.0", + "Version" : "3.7.403.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SageMakerRuntime" : { - "Version" : "3.7.401.39", + "Version" : "3.7.401.40", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTJobsDataPlane" : { - "Version" : "3.7.401.0", + "Version" : "3.7.401.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SageMaker" : { - "Version" : "3.7.415.5", + "Version" : "3.7.416.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Translate" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Comprehend" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisVideo" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisVideoMedia" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisVideoArchivedMedia" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ResourceGroups" : { - "Version" : "3.7.401.30", + "Version" : "3.7.401.31", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ServerlessApplicationRepository" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Cloud9" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ServiceDiscovery" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WorkMail" : { - "Version" : "3.7.401.13", + "Version" : "3.7.401.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AutoScalingPlans" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "TranscribeService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Connect" : { - "Version" : "3.7.409.3", + "Version" : "3.7.410.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "FMS" : { - "Version" : "3.7.401.20", + "Version" : "3.7.401.21", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SecretsManager" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ACMPCA" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTAnalytics" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoT1ClickDevicesService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoT1ClickProjects" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PI" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Neptune" : { - "Version" : "3.7.401.34", + "Version" : "3.7.401.35", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaTailor" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EKS" : { - "Version" : "3.7.404.9", + "Version" : "3.7.404.10", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DLM" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Signer" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Chime" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PinpointEmail" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PinpointSMSVoice" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "S3Control" : { - "Version" : "3.7.402.11", + "Version" : "3.7.402.12", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "RAM" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Route53Resolver" : { - "Version" : "3.7.402.3", + "Version" : "3.7.402.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "RDSDataService" : { - "Version" : "3.7.401.3", + "Version" : "3.7.401.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "QuickSight" : { - "Version" : "3.7.409.5", + "Version" : "3.7.410.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Amplify" : { - "Version" : "3.7.402.21", + "Version" : "3.7.402.22", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "RoboMaker" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DataSync" : { - "Version" : "3.7.401.13", + "Version" : "3.7.401.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Transfer" : { - "Version" : "3.7.401.22", + "Version" : "3.7.401.23", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GlobalAccelerator" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ComprehendMedical" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisAnalyticsV2" : { - "Version" : "3.7.401.41", + "Version" : "3.7.401.42", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaConnect" : { - "Version" : "3.7.401.43", + "Version" : "3.7.401.44", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "FSx" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SecurityHub" : { - "Version" : "3.7.401.46", + "Version" : "3.7.401.47", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LicenseManager" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppMesh" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Kafka" : { - "Version" : "3.7.401.39", + "Version" : "3.7.401.40", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ApiGatewayManagementApi" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ApiGatewayV2" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DocDB" : { - "Version" : "3.7.401.50", + "Version" : "3.7.401.51", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Backup" : { - "Version" : "3.7.401.43", + "Version" : "3.7.401.44", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Textract" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ManagedBlockchain" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaPackageVod" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GroundStation" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTThingsGraph" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTEvents" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTEventsData" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PersonalizeRuntime" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Personalize" : { - "Version" : "3.7.401.44", + "Version" : "3.7.401.45", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PersonalizeEvents" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ServiceQuotas" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ApplicationInsights" : { - "Version" : "3.7.401.20", + "Version" : "3.7.401.21", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EC2InstanceConnect" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EventBridge" : { - "Version" : "3.7.401.54", + "Version" : "3.7.401.55", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LakeFormation" : { - "Version" : "3.7.401.11", + "Version" : "3.7.401.12", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ForecastService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ForecastQueryService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "QLDB" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "QLDBSession" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WorkMailMessageFlow" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeStarNotifications" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SavingsPlans" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SSO" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SSOOIDC" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MarketplaceCatalog" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SimpleEmailV2" : { - "Version" : "3.7.404.12", + "Version" : "3.7.404.13", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DataExchange" : { - "Version" : "3.7.401.20", + "Version" : "3.7.401.21", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MigrationHubConfig" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ConnectParticipant" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WAFV2" : { - "Version" : "3.7.402.20", + "Version" : "3.7.402.21", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppConfig" : { - "Version" : "3.7.403.3", + "Version" : "3.7.403.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTSecureTunneling" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ElasticInference" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Imagebuilder" : { - "Version" : "3.7.401.19", + "Version" : "3.7.401.20", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Schemas" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AccessAnalyzer" : { - "Version" : "3.7.402.5", + "Version" : "3.7.402.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ComputeOptimizer" : { - "Version" : "3.7.401.1", + "Version" : "3.7.401.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "NetworkManager" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Kendra" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "FraudDetector" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeGuruReviewer" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeGuruProfiler" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Outposts" : { - "Version" : "3.7.404.3", + "Version" : "3.7.404.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AugmentedAIRuntime" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EBS" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisVideoSignalingChannels" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Detective" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeStarconnections" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Synthetics" : { - "Version" : "3.7.402.10", + "Version" : "3.7.402.11", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTSiteWise" : { - "Version" : "3.7.402.3", + "Version" : "3.7.402.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Macie2" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeArtifact" : { - "Version" : "3.7.401.29", + "Version" : "3.7.401.30", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IVS" : { - "Version" : "3.7.402.5", + "Version" : "3.7.402.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Braket" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IdentityStore" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Appflow" : { - "Version" : "3.7.400.57", + "Version" : "3.7.400.58", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "RedshiftDataAPIService" : { - "Version" : "3.7.402.14", + "Version" : "3.7.402.15", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SSOAdmin" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "TimestreamWrite" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "TimestreamQuery" : { - "Version" : "3.7.402.1", + "Version" : "3.7.402.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "S3Outposts" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GlueDataBrew" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppRegistry" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "NetworkFirewall" : { - "Version" : "3.7.402.13", + "Version" : "3.7.402.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MWAA" : { - "Version" : "3.7.402.2", + "Version" : "3.7.402.3", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DevOpsGuru" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SageMakerFeatureStoreRuntime" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppIntegrationsService" : { - "Version" : "3.7.401.53", + "Version" : "3.7.401.54", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ECRPublic" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AmplifyBackend" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ConnectContactLens" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LookoutforVision" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CustomerProfiles" : { - "Version" : "3.7.402.3", + "Version" : "3.7.402.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EMRContainers" : { - "Version" : "3.7.401.45", + "Version" : "3.7.401.46", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SagemakerEdgeManager" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "HealthLake" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AuditManager" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PrometheusService" : { - "Version" : "3.7.401.12", + "Version" : "3.7.401.13", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GreengrassV2" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTWireless" : { - "Version" : "3.7.401.5", + "Version" : "3.7.401.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTFleetHub" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTDeviceAdvisor" : { - "Version" : "3.7.401.28", + "Version" : "3.7.401.29", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LocationService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WellArchitected" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LexRuntimeV2" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LexModelsV2" : { - "Version" : "3.7.402.37", + "Version" : "3.7.402.38", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "FIS" : { - "Version" : "3.7.403.7", + "Version" : "3.7.403.8", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LookoutMetrics" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Mgn" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LookoutEquipment" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "FinSpaceData" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Finspace" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SSMIncidents" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SSMContacts" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ApplicationCostProfiler" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppRunner" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Proton" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Route53RecoveryReadiness" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Route53RecoveryControlConfig" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Route53RecoveryCluster" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ChimeSDKMessaging" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ChimeSDKIdentity" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SnowDeviceManagement" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MemoryDB" : { - "Version" : "3.7.401.24", + "Version" : "3.7.401.25", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "OpenSearchService" : { - "Version" : "3.7.403.8", + "Version" : "3.7.403.9", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KafkaConnect" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ConnectWisdomService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "VoiceID" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Account" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudControlApi" : { - "Version" : "3.7.401.5", + "Version" : "3.7.401.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ManagedGrafana" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Panorama" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ChimeSDKMeetings" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ResilienceHub" : { - "Version" : "3.7.403.0", + "Version" : "3.7.403.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MigrationHubStrategyRecommendations" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Drs" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppConfigData" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MigrationHubRefactorSpaces" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Inspector2" : { - "Version" : "3.7.403.8", + "Version" : "3.7.404.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudWatchEvidently" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudWatchRUM" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "RecycleBin" : { - "Version" : "3.7.401.1", + "Version" : "3.7.401.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTTwinMaker" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WorkSpacesWeb" : { - "Version" : "3.7.402.1", + "Version" : "3.7.402.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "BackupGateway" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AmplifyUIBuilder" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Keyspaces" : { - "Version" : "3.7.402.2", + "Version" : "3.7.402.3", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "BillingConductor" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PinpointSMSVoiceV2" : { - "Version" : "3.7.404.3", + "Version" : "3.7.404.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Ivschat" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ChimeSDKMediaPipelines" : { - "Version" : "3.7.401.9", + "Version" : "3.7.401.10", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EMRServerless" : { - "Version" : "3.7.401.34", + "Version" : "3.7.401.35", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MainframeModernization" : { - "Version" : "3.7.401.19", + "Version" : "3.7.401.20", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ConnectCampaignService" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "RedshiftServerless" : { - "Version" : "3.7.401.13", + "Version" : "3.7.401.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IAMRolesAnywhere" : { - "Version" : "3.7.401.54", + "Version" : "3.7.401.55", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LicenseManagerUserSubscriptions" : { - "Version" : "3.7.401.5", + "Version" : "3.7.401.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Private5G" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SupportApp" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ControlTower" : { - "Version" : "3.7.402.1", + "Version" : "3.7.402.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IoTFleetWise" : { - "Version" : "3.7.403.0", + "Version" : "3.7.403.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MigrationHubOrchestrator" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ConnectCases" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ResourceExplorer2" : { - "Version" : "3.7.402.10", + "Version" : "3.7.402.11", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Scheduler" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ChimeSDKVoice" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SsmSap" : { - "Version" : "3.7.401.48", + "Version" : "3.7.401.49", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "OAM" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ARCZonalShift" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SimSpaceWeaver" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SecurityLake" : { - "Version" : "3.7.401.22", + "Version" : "3.7.401.23", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "OpenSearchServerless" : { - "Version" : "3.7.402.13", + "Version" : "3.7.402.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Omics" : { - "Version" : "3.7.402.1", + "Version" : "3.7.403.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DocDBElastic" : { - "Version" : "3.7.401.11", + "Version" : "3.7.401.12", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SageMakerGeospatial" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Pipes" : { - "Version" : "3.7.402.20", + "Version" : "3.7.402.21", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeCatalyst" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SageMakerMetrics" : { - "Version" : "3.7.401.34", + "Version" : "3.7.401.35", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KinesisVideoWebRTCStorage" : { - "Version" : "3.7.401.53", + "Version" : "3.7.401.54", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LicenseManagerLinuxSubscriptions" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "KendraRanking" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CleanRooms" : { - "Version" : "3.7.402.10", + "Version" : "3.7.402.11", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudTrailData" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Tnb" : { - "Version" : "3.7.401.54", + "Version" : "3.7.401.55", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "InternetMonitor" : { - "Version" : "3.7.402.6", + "Version" : "3.7.402.7", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "IVSRealTime" : { - "Version" : "3.7.402.28", + "Version" : "3.7.402.29", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "VPCLattice" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "OSIS" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MediaPackageV2" : { - "Version" : "3.7.403.1", + "Version" : "3.7.403.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PaymentCryptographyData" : { - "Version" : "3.7.402.18", + "Version" : "3.7.402.19", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PaymentCryptography" : { - "Version" : "3.7.402.7", + "Version" : "3.7.402.8", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeGuruSecurity" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "VerifiedPermissions" : { - "Version" : "3.7.401.11", + "Version" : "3.7.401.12", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppFabric" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MedicalImaging" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EntityResolution" : { - "Version" : "3.7.401.46", + "Version" : "3.7.401.47", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ManagedBlockchainQuery" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PcaConnectorAd" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Neptunedata" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "BedrockRuntime" : { - "Version" : "3.7.408.10", + "Version" : "3.7.408.11", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Bedrock" : { - "Version" : "3.7.409.14", + "Version" : "3.7.409.15", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DataZone" : { - "Version" : "3.7.407.1", + "Version" : "3.7.407.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "LaunchWizard" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "TrustedAdvisor" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CloudFrontKeyValueStore" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "InspectorScan" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CostOptimizationHub" : { - "Version" : "3.7.402.1", + "Version" : "3.7.402.2", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Repostspace" : { - "Version" : "3.7.401.19", + "Version" : "3.7.401.20", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "BCMDataExports" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "FreeTier" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "EKSAuth" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "WorkSpacesThinClient" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "B2bi" : { - "Version" : "3.7.403.2", + "Version" : "3.7.403.3", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "BedrockAgentRuntime" : { - "Version" : "3.7.408.1", + "Version" : "3.7.409.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "QBusiness" : { - "Version" : "3.7.404.9", + "Version" : "3.7.404.10", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "QConnect" : { - "Version" : "3.7.402.3", + "Version" : "3.7.402.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "BedrockAgent" : { - "Version" : "3.7.409.10", + "Version" : "3.7.409.11", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CleanRoomsML" : { - "Version" : "3.7.401.10", + "Version" : "3.7.401.11", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MarketplaceDeployment" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MarketplaceAgreement" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "NeptuneGraph" : { - "Version" : "3.7.402.23", + "Version" : "3.7.403.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "NetworkMonitor" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SupplyChain" : { - "Version" : "3.7.403.16", + "Version" : "3.7.403.17", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Artifact" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Chatbot" : { - "Version" : "3.7.402.31", + "Version" : "3.7.403.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "TimestreamInfluxDB" : { - "Version" : "3.7.403.23", + "Version" : "3.7.403.24", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "CodeConnections" : { - "Version" : "3.7.401.35", + "Version" : "3.7.401.36", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Deadline" : { - "Version" : "3.7.403.5", + "Version" : "3.7.403.6", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ControlCatalog" : { - "Version" : "3.7.402.9", + "Version" : "3.7.402.10", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Route53Profiles" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MailManager" : { - "Version" : "3.7.402.22", + "Version" : "3.7.403.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "TaxSettings" : { - "Version" : "3.7.402.2", + "Version" : "3.7.402.3", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ApplicationSignals" : { - "Version" : "3.7.403.6", + "Version" : "3.7.403.7", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PcaConnectorScep" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "AppTest" : { - "Version" : "3.7.400.56", + "Version" : "3.7.400.57", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "QApps" : { - "Version" : "3.7.402.11", + "Version" : "3.7.402.12", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SSMQuickSetup" : { - "Version" : "3.7.401.0", + "Version" : "3.7.401.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PCS" : { - "Version" : "3.7.400.44", + "Version" : "3.7.400.45", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "DirectoryServiceData" : { - "Version" : "3.7.400.35", + "Version" : "3.7.400.36", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "MarketplaceReporting" : { - "Version" : "3.7.400.27", + "Version" : "3.7.400.28", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "SocialMessaging" : { - "Version" : "3.7.400.23", + "Version" : "3.7.400.24", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GeoPlaces" : { - "Version" : "3.7.400.13", + "Version" : "3.7.400.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GeoMaps" : { - "Version" : "3.7.400.13", + "Version" : "3.7.400.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "GeoRoutes" : { - "Version" : "3.7.400.13", + "Version" : "3.7.400.14", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Billing" : { - "Version" : "3.7.400.6", + "Version" : "3.7.400.7", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "PartnerCentralSelling" : { - "Version" : "3.7.401.4", + "Version" : "3.7.401.5", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "ConnectCampaignsV2" : { - "Version" : "3.7.400.3", + "Version" : "3.7.400.4", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "Notifications" : { - "Version" : "3.7.400.0", + "Version" : "3.7.400.1", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false }, "NotificationsContacts" : { + "Version" : "3.7.400.1", + "AssemblyVersionOverride" : "3.3", + "Dependencies" : { + "Core" : "3.7.400.57" + }, + "InPreview" : false + }, + "BCMPricingCalculator" : { "Version" : "3.7.400.0", "AssemblyVersionOverride" : "3.3", "Dependencies" : { - "Core" : "3.7.400.56" + "Core" : "3.7.400.57" }, "InPreview" : false } diff --git a/buildtools/CopyModularAWSPowerShell.ps1 b/buildtools/CopyModularAWSPowerShell.ps1 index a3c4129ca..25cf25269 100644 --- a/buildtools/CopyModularAWSPowerShell.ps1 +++ b/buildtools/CopyModularAWSPowerShell.ps1 @@ -54,7 +54,7 @@ Copy-Item -Path "$assembliesFolder/netstandard2.0/AWSSDK.Extensions.CrtIntegrati Copy-Item -Path "$rootFolder/LICENSE" -Destination "$modularDeploymentFolder/AWS.Tools.Common/LICENSE" Copy-Item -Path "$rootFolder/NOTICE" -Destination "$modularDeploymentFolder/AWS.Tools.Common/NOTICE" -$projectNameList = @('AccessAnalyzer', 'Account', 'ACMPCA', 'Amplify', 'AmplifyBackend', 'AmplifyUIBuilder', 'APIGateway', 'ApiGatewayManagementApi', 'ApiGatewayV2', 'AppConfig', 'AppConfigData', 'AppFabric', 'Appflow', 'AppIntegrationsService', 'ApplicationAutoScaling', 'ApplicationCostProfiler', 'ApplicationDiscoveryService', 'ApplicationInsights', 'ApplicationSignals', 'AppMesh', 'AppRegistry', 'AppRunner', 'AppStream', 'AppSync', 'AppTest', 'ARCZonalShift', 'Artifact', 'Athena', 'AuditManager', 'AugmentedAIRuntime', 'AutoScaling', 'AutoScalingPlans', 'AWSHealth', 'AWSMarketplaceCommerceAnalytics', 'AWSMarketplaceMetering', 'AWSSupport', 'B2bi', 'Backup', 'BackupGateway', 'Batch', 'BCMDataExports', 'Bedrock', 'BedrockAgent', 'BedrockAgentRuntime', 'BedrockRuntime', 'Billing', 'BillingConductor', 'Braket', 'Budgets', 'CertificateManager', 'Chatbot', 'Chime', 'ChimeSDKIdentity', 'ChimeSDKMediaPipelines', 'ChimeSDKMeetings', 'ChimeSDKMessaging', 'ChimeSDKVoice', 'CleanRooms', 'CleanRoomsML', 'Cloud9', 'CloudControlApi', 'CloudDirectory', 'CloudFormation', 'CloudFront', 'CloudFrontKeyValueStore', 'CloudHSMV2', 'CloudSearch', 'CloudSearchDomain', 'CloudTrail', 'CloudTrailData', 'CloudWatch', 'CloudWatchEvidently', 'CloudWatchLogs', 'CloudWatchRUM', 'CodeArtifact', 'CodeBuild', 'CodeCatalyst', 'CodeCommit', 'CodeConnections', 'CodeDeploy', 'CodeGuruProfiler', 'CodeGuruReviewer', 'CodeGuruSecurity', 'CodePipeline', 'CodeStarconnections', 'CodeStarNotifications', 'CognitoIdentity', 'CognitoIdentityProvider', 'CognitoSync', 'Comprehend', 'ComprehendMedical', 'ComputeOptimizer', 'ConfigService', 'Connect', 'ConnectCampaignService', 'ConnectCampaignsV2', 'ConnectCases', 'ConnectContactLens', 'ConnectParticipant', 'ConnectWisdomService', 'ControlCatalog', 'ControlTower', 'CostAndUsageReport', 'CostExplorer', 'CostOptimizationHub', 'CustomerProfiles', 'DatabaseMigrationService', 'DataExchange', 'DataPipeline', 'DataSync', 'DataZone', 'DAX', 'Deadline', 'Detective', 'DeviceFarm', 'DevOpsGuru', 'DirectConnect', 'DirectoryService', 'DirectoryServiceData', 'DLM', 'DocDB', 'DocDBElastic', 'Drs', 'DynamoDBv2', 'EBS', 'EC2', 'EC2InstanceConnect', 'ECR', 'ECRPublic', 'ECS', 'EKS', 'EKSAuth', 'ElastiCache', 'ElasticBeanstalk', 'ElasticFileSystem', 'ElasticInference', 'ElasticLoadBalancing', 'ElasticLoadBalancingV2', 'ElasticMapReduce', 'Elasticsearch', 'ElasticTranscoder', 'EMRContainers', 'EMRServerless', 'EntityResolution', 'EventBridge', 'Finspace', 'FinSpaceData', 'FIS', 'FMS', 'ForecastQueryService', 'ForecastService', 'FraudDetector', 'FreeTier', 'FSx', 'GameLift', 'GeoMaps', 'GeoPlaces', 'GeoRoutes', 'Glacier', 'GlobalAccelerator', 'Glue', 'GlueDataBrew', 'Greengrass', 'GreengrassV2', 'GroundStation', 'GuardDuty', 'HealthLake', 'IAMRolesAnywhere', 'IdentityManagement', 'IdentityStore', 'Imagebuilder', 'ImportExport', 'Inspector', 'Inspector2', 'InspectorScan', 'InternetMonitor', 'IoT', 'IoTDeviceAdvisor', 'IoTEvents', 'IoTEventsData', 'IoTFleetHub', 'IoTFleetWise', 'IoTJobsDataPlane', 'IoTSecureTunneling', 'IoTSiteWise', 'IoTThingsGraph', 'IoTTwinMaker', 'IoTWireless', 'IVS', 'Ivschat', 'IVSRealTime', 'Kafka', 'KafkaConnect', 'Kendra', 'KendraRanking', 'KeyManagementService', 'Keyspaces', 'Kinesis', 'KinesisAnalyticsV2', 'KinesisFirehose', 'KinesisVideo', 'KinesisVideoMedia', 'KinesisVideoSignalingChannels', 'KinesisVideoWebRTCStorage', 'LakeFormation', 'Lambda', 'LaunchWizard', 'Lex', 'LexModelBuildingService', 'LexModelsV2', 'LexRuntimeV2', 'LicenseManager', 'LicenseManagerLinuxSubscriptions', 'LicenseManagerUserSubscriptions', 'Lightsail', 'LocationService', 'LookoutEquipment', 'LookoutforVision', 'LookoutMetrics', 'MachineLearning', 'Macie2', 'MailManager', 'MainframeModernization', 'ManagedBlockchain', 'ManagedBlockchainQuery', 'ManagedGrafana', 'MarketplaceAgreement', 'MarketplaceCatalog', 'MarketplaceDeployment', 'MarketplaceEntitlementService', 'MarketplaceReporting', 'MediaConnect', 'MediaConvert', 'MediaLive', 'MediaPackage', 'MediaPackageV2', 'MediaPackageVod', 'MediaStore', 'MediaStoreData', 'MediaTailor', 'MedicalImaging', 'MemoryDB', 'Mgn', 'MigrationHub', 'MigrationHubConfig', 'MigrationHubOrchestrator', 'MigrationHubRefactorSpaces', 'MigrationHubStrategyRecommendations', 'MQ', 'MTurk', 'MWAA', 'Neptune', 'Neptunedata', 'NeptuneGraph', 'NetworkFirewall', 'NetworkManager', 'NetworkMonitor', 'Notifications', 'NotificationsContacts', 'OAM', 'Omics', 'OpenSearchServerless', 'OpenSearchService', 'OpsWorks', 'OpsWorksCM', 'Organizations', 'OSIS', 'Outposts', 'Panorama', 'PartnerCentralSelling', 'PaymentCryptography', 'PaymentCryptographyData', 'PcaConnectorAd', 'PcaConnectorScep', 'PCS', 'Personalize', 'PersonalizeEvents', 'PersonalizeRuntime', 'PI', 'Pinpoint', 'PinpointEmail', 'PinpointSMSVoiceV2', 'Pipes', 'Polly', 'Pricing', 'Private5G', 'PrometheusService', 'Proton', 'QApps', 'QBusiness', 'QConnect', 'QLDB', 'QLDBSession', 'QuickSight', 'RAM', 'RDS', 'RDSDataService', 'RecycleBin', 'Redshift', 'RedshiftDataAPIService', 'RedshiftServerless', 'Rekognition', 'Repostspace', 'ResilienceHub', 'ResourceExplorer2', 'ResourceGroups', 'ResourceGroupsTaggingAPI', 'RoboMaker', 'Route53', 'Route53Domains', 'Route53Profiles', 'Route53RecoveryCluster', 'Route53RecoveryControlConfig', 'Route53RecoveryReadiness', 'Route53Resolver', 'S3', 'S3Control', 'S3Outposts', 'SageMaker', 'SagemakerEdgeManager', 'SageMakerFeatureStoreRuntime', 'SageMakerGeospatial', 'SageMakerMetrics', 'SageMakerRuntime', 'SavingsPlans', 'Scheduler', 'Schemas', 'SecretsManager', 'SecurityHub', 'SecurityLake', 'SecurityToken', 'ServerlessApplicationRepository', 'ServerMigrationService', 'ServiceCatalog', 'ServiceDiscovery', 'ServiceQuotas', 'Shield', 'SimpleEmail', 'SimpleEmailV2', 'SimpleNotificationService', 'SimpleSystemsManagement', 'SimpleWorkflow', 'SimSpaceWeaver', 'Snowball', 'SnowDeviceManagement', 'SocialMessaging', 'SQS', 'SSMContacts', 'SSMIncidents', 'SSMQuickSetup', 'SsmSap', 'SSO', 'SSOAdmin', 'SSOOIDC', 'StepFunctions', 'StorageGateway', 'SupplyChain', 'SupportApp', 'Synthetics', 'TaxSettings', 'Textract', 'TimestreamInfluxDB', 'TimestreamQuery', 'TimestreamWrite', 'Tnb', 'TranscribeService', 'Transfer', 'Translate', 'TrustedAdvisor', 'VerifiedPermissions', 'VoiceID', 'VPCLattice', 'WAF', 'WAFRegional', 'WAFV2', 'WellArchitected', 'WorkDocs', 'WorkMail', 'WorkMailMessageFlow', 'WorkSpaces', 'WorkSpacesThinClient', 'WorkSpacesWeb', 'XRay') +$projectNameList = @('AccessAnalyzer', 'Account', 'ACMPCA', 'Amplify', 'AmplifyBackend', 'AmplifyUIBuilder', 'APIGateway', 'ApiGatewayManagementApi', 'ApiGatewayV2', 'AppConfig', 'AppConfigData', 'AppFabric', 'Appflow', 'AppIntegrationsService', 'ApplicationAutoScaling', 'ApplicationCostProfiler', 'ApplicationDiscoveryService', 'ApplicationInsights', 'ApplicationSignals', 'AppMesh', 'AppRegistry', 'AppRunner', 'AppStream', 'AppSync', 'AppTest', 'ARCZonalShift', 'Artifact', 'Athena', 'AuditManager', 'AugmentedAIRuntime', 'AutoScaling', 'AutoScalingPlans', 'AWSHealth', 'AWSMarketplaceCommerceAnalytics', 'AWSMarketplaceMetering', 'AWSSupport', 'B2bi', 'Backup', 'BackupGateway', 'Batch', 'BCMDataExports', 'BCMPricingCalculator', 'Bedrock', 'BedrockAgent', 'BedrockAgentRuntime', 'BedrockRuntime', 'Billing', 'BillingConductor', 'Braket', 'Budgets', 'CertificateManager', 'Chatbot', 'Chime', 'ChimeSDKIdentity', 'ChimeSDKMediaPipelines', 'ChimeSDKMeetings', 'ChimeSDKMessaging', 'ChimeSDKVoice', 'CleanRooms', 'CleanRoomsML', 'Cloud9', 'CloudControlApi', 'CloudDirectory', 'CloudFormation', 'CloudFront', 'CloudFrontKeyValueStore', 'CloudHSMV2', 'CloudSearch', 'CloudSearchDomain', 'CloudTrail', 'CloudTrailData', 'CloudWatch', 'CloudWatchEvidently', 'CloudWatchLogs', 'CloudWatchRUM', 'CodeArtifact', 'CodeBuild', 'CodeCatalyst', 'CodeCommit', 'CodeConnections', 'CodeDeploy', 'CodeGuruProfiler', 'CodeGuruReviewer', 'CodeGuruSecurity', 'CodePipeline', 'CodeStarconnections', 'CodeStarNotifications', 'CognitoIdentity', 'CognitoIdentityProvider', 'CognitoSync', 'Comprehend', 'ComprehendMedical', 'ComputeOptimizer', 'ConfigService', 'Connect', 'ConnectCampaignService', 'ConnectCampaignsV2', 'ConnectCases', 'ConnectContactLens', 'ConnectParticipant', 'ConnectWisdomService', 'ControlCatalog', 'ControlTower', 'CostAndUsageReport', 'CostExplorer', 'CostOptimizationHub', 'CustomerProfiles', 'DatabaseMigrationService', 'DataExchange', 'DataPipeline', 'DataSync', 'DataZone', 'DAX', 'Deadline', 'Detective', 'DeviceFarm', 'DevOpsGuru', 'DirectConnect', 'DirectoryService', 'DirectoryServiceData', 'DLM', 'DocDB', 'DocDBElastic', 'Drs', 'DynamoDBv2', 'EBS', 'EC2', 'EC2InstanceConnect', 'ECR', 'ECRPublic', 'ECS', 'EKS', 'EKSAuth', 'ElastiCache', 'ElasticBeanstalk', 'ElasticFileSystem', 'ElasticInference', 'ElasticLoadBalancing', 'ElasticLoadBalancingV2', 'ElasticMapReduce', 'Elasticsearch', 'ElasticTranscoder', 'EMRContainers', 'EMRServerless', 'EntityResolution', 'EventBridge', 'Finspace', 'FinSpaceData', 'FIS', 'FMS', 'ForecastQueryService', 'ForecastService', 'FraudDetector', 'FreeTier', 'FSx', 'GameLift', 'GeoMaps', 'GeoPlaces', 'GeoRoutes', 'Glacier', 'GlobalAccelerator', 'Glue', 'GlueDataBrew', 'Greengrass', 'GreengrassV2', 'GroundStation', 'GuardDuty', 'HealthLake', 'IAMRolesAnywhere', 'IdentityManagement', 'IdentityStore', 'Imagebuilder', 'ImportExport', 'Inspector', 'Inspector2', 'InspectorScan', 'InternetMonitor', 'IoT', 'IoTDeviceAdvisor', 'IoTEvents', 'IoTEventsData', 'IoTFleetHub', 'IoTFleetWise', 'IoTJobsDataPlane', 'IoTSecureTunneling', 'IoTSiteWise', 'IoTThingsGraph', 'IoTTwinMaker', 'IoTWireless', 'IVS', 'Ivschat', 'IVSRealTime', 'Kafka', 'KafkaConnect', 'Kendra', 'KendraRanking', 'KeyManagementService', 'Keyspaces', 'Kinesis', 'KinesisAnalyticsV2', 'KinesisFirehose', 'KinesisVideo', 'KinesisVideoMedia', 'KinesisVideoSignalingChannels', 'KinesisVideoWebRTCStorage', 'LakeFormation', 'Lambda', 'LaunchWizard', 'Lex', 'LexModelBuildingService', 'LexModelsV2', 'LexRuntimeV2', 'LicenseManager', 'LicenseManagerLinuxSubscriptions', 'LicenseManagerUserSubscriptions', 'Lightsail', 'LocationService', 'LookoutEquipment', 'LookoutforVision', 'LookoutMetrics', 'MachineLearning', 'Macie2', 'MailManager', 'MainframeModernization', 'ManagedBlockchain', 'ManagedBlockchainQuery', 'ManagedGrafana', 'MarketplaceAgreement', 'MarketplaceCatalog', 'MarketplaceDeployment', 'MarketplaceEntitlementService', 'MarketplaceReporting', 'MediaConnect', 'MediaConvert', 'MediaLive', 'MediaPackage', 'MediaPackageV2', 'MediaPackageVod', 'MediaStore', 'MediaStoreData', 'MediaTailor', 'MedicalImaging', 'MemoryDB', 'Mgn', 'MigrationHub', 'MigrationHubConfig', 'MigrationHubOrchestrator', 'MigrationHubRefactorSpaces', 'MigrationHubStrategyRecommendations', 'MQ', 'MTurk', 'MWAA', 'Neptune', 'Neptunedata', 'NeptuneGraph', 'NetworkFirewall', 'NetworkManager', 'NetworkMonitor', 'Notifications', 'NotificationsContacts', 'OAM', 'Omics', 'OpenSearchServerless', 'OpenSearchService', 'OpsWorks', 'OpsWorksCM', 'Organizations', 'OSIS', 'Outposts', 'Panorama', 'PartnerCentralSelling', 'PaymentCryptography', 'PaymentCryptographyData', 'PcaConnectorAd', 'PcaConnectorScep', 'PCS', 'Personalize', 'PersonalizeEvents', 'PersonalizeRuntime', 'PI', 'Pinpoint', 'PinpointEmail', 'PinpointSMSVoiceV2', 'Pipes', 'Polly', 'Pricing', 'Private5G', 'PrometheusService', 'Proton', 'QApps', 'QBusiness', 'QConnect', 'QLDB', 'QLDBSession', 'QuickSight', 'RAM', 'RDS', 'RDSDataService', 'RecycleBin', 'Redshift', 'RedshiftDataAPIService', 'RedshiftServerless', 'Rekognition', 'Repostspace', 'ResilienceHub', 'ResourceExplorer2', 'ResourceGroups', 'ResourceGroupsTaggingAPI', 'RoboMaker', 'Route53', 'Route53Domains', 'Route53Profiles', 'Route53RecoveryCluster', 'Route53RecoveryControlConfig', 'Route53RecoveryReadiness', 'Route53Resolver', 'S3', 'S3Control', 'S3Outposts', 'SageMaker', 'SagemakerEdgeManager', 'SageMakerFeatureStoreRuntime', 'SageMakerGeospatial', 'SageMakerMetrics', 'SageMakerRuntime', 'SavingsPlans', 'Scheduler', 'Schemas', 'SecretsManager', 'SecurityHub', 'SecurityLake', 'SecurityToken', 'ServerlessApplicationRepository', 'ServerMigrationService', 'ServiceCatalog', 'ServiceDiscovery', 'ServiceQuotas', 'Shield', 'SimpleEmail', 'SimpleEmailV2', 'SimpleNotificationService', 'SimpleSystemsManagement', 'SimpleWorkflow', 'SimSpaceWeaver', 'Snowball', 'SnowDeviceManagement', 'SocialMessaging', 'SQS', 'SSMContacts', 'SSMIncidents', 'SSMQuickSetup', 'SsmSap', 'SSO', 'SSOAdmin', 'SSOOIDC', 'StepFunctions', 'StorageGateway', 'SupplyChain', 'SupportApp', 'Synthetics', 'TaxSettings', 'Textract', 'TimestreamInfluxDB', 'TimestreamQuery', 'TimestreamWrite', 'Tnb', 'TranscribeService', 'Transfer', 'Translate', 'TrustedAdvisor', 'VerifiedPermissions', 'VoiceID', 'VPCLattice', 'WAF', 'WAFRegional', 'WAFV2', 'WellArchitected', 'WorkDocs', 'WorkMail', 'WorkMailMessageFlow', 'WorkSpaces', 'WorkSpacesThinClient', 'WorkSpacesWeb', 'XRay') foreach ($project in $projectNameList) { diff --git a/changelogs/CHANGELOG.2024.md b/changelogs/CHANGELOG.2024.md index b7269e686..6f70deaf7 100644 --- a/changelogs/CHANGELOG.2024.md +++ b/changelogs/CHANGELOG.2024.md @@ -1,4 +1,97 @@ -### 4.1.704 (2024-11-21 22:02Z) +### 4.1.705 (2024-11-22 21:43Z) + * AWS Tools for PowerShell now use AWS .NET SDK 3.7.933.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md. + * Amazon Auto Scaling + * Modified cmdlet Write-ASScalingPolicy: added parameter CustomizedMetricSpecification_Period. + * Amazon Bedrock Agent Runtime + * Added cmdlet Invoke-BARInlineAgent leveraging the InvokeInlineAgent service API. + * Amazon Chatbot + * Added cmdlet Get-CHATAssociationList leveraging the ListAssociations service API. + * Added cmdlet Get-CHATCustomAction leveraging the GetCustomAction service API. + * Added cmdlet Get-CHATCustomActionList leveraging the ListCustomActions service API. + * Added cmdlet New-CHATCustomAction leveraging the CreateCustomAction service API. + * Added cmdlet Register-CHATAssociation leveraging the AssociateToConfiguration service API. + * Added cmdlet Remove-CHATCustomAction leveraging the DeleteCustomAction service API. + * Added cmdlet Unregister-CHATAssociation leveraging the DisassociateFromConfiguration service API. + * Added cmdlet Update-CHATCustomAction leveraging the UpdateCustomAction service API. + * Amazon Cognito Identity Provider + * Added cmdlet Complete-CGIPWebAuthnRegistration leveraging the CompleteWebAuthnRegistration service API. + * Added cmdlet Get-CGIPManagedLoginBranding leveraging the DescribeManagedLoginBranding service API. + * Added cmdlet Get-CGIPManagedLoginBrandingByClient leveraging the DescribeManagedLoginBrandingByClient service API. + * Added cmdlet Get-CGIPUserAuthFactor leveraging the GetUserAuthFactors service API. + * Added cmdlet Get-CGIPWebAuthnCredentialList leveraging the ListWebAuthnCredentials service API. + * Added cmdlet New-CGIPManagedLoginBranding leveraging the CreateManagedLoginBranding service API. + * Added cmdlet Remove-CGIPManagedLoginBranding leveraging the DeleteManagedLoginBranding service API. + * Added cmdlet Remove-CGIPWebAuthnCredential leveraging the DeleteWebAuthnCredential service API. + * Added cmdlet Start-CGIPWebAuthnRegistration leveraging the StartWebAuthnRegistration service API. + * Added cmdlet Update-CGIPManagedLoginBranding leveraging the UpdateManagedLoginBranding service API. + * Modified cmdlet Confirm-CGIPUserRegistration: added parameter Session. + * Modified cmdlet New-CGIPUserPool: added parameters SignInPolicy_AllowedFirstAuthFactor and UserPoolTier. + * Modified cmdlet New-CGIPUserPoolDomain: added parameter ManagedLoginVersion. + * Modified cmdlet Set-CGIPUserPoolMfaConfig: added parameters WebAuthnConfiguration_RelyingPartyId and WebAuthnConfiguration_UserVerification. + * Modified cmdlet Start-CGIPAuth: added parameter Session. + * Modified cmdlet Start-CGIPAuthAdmin: added parameter Session. + * Modified cmdlet Update-CGIPUserPool: added parameters PoolName, SignInPolicy_AllowedFirstAuthFactor and UserPoolTier. + * Modified cmdlet Update-CGIPUserPoolDomain: added parameter ManagedLoginVersion. + * Amazon Connect Service + * Added cmdlet Get-CONNAssociatedContactList leveraging the ListAssociatedContacts service API. + * Added cmdlet Get-CONNEmailAddress leveraging the DescribeEmailAddress service API. + * Added cmdlet New-CONNContact leveraging the CreateContact service API. + * Added cmdlet New-CONNEmailAddress leveraging the CreateEmailAddress service API. + * Added cmdlet Remove-CONNEmailAddress leveraging the DeleteEmailAddress service API. + * Added cmdlet Search-CONNEmailAddress leveraging the SearchEmailAddresses service API. + * Added cmdlet Send-CONNOutboundEmail leveraging the SendOutboundEmail service API. + * Added cmdlet Start-CONNEmailContact leveraging the StartEmailContact service API. + * Added cmdlet Start-CONNOutboundEmailContact leveraging the StartOutboundEmailContact service API. + * Added cmdlet Update-CONNEmailAddressMetadata leveraging the UpdateEmailAddressMetadata service API. + * Added cmdlet Update-CONNQueueOutboundEmailConfig leveraging the UpdateQueueOutboundEmailConfig service API. + * Modified cmdlet New-CONNQueue: added parameter OutboundEmailConfig_OutboundEmailAddressId. + * Modified cmdlet New-CONNTaskTemplate: added parameter SelfAssignFlowId. + * Modified cmdlet Search-CONNContact: added parameters SearchableSegmentAttributes_Criterion and SearchableSegmentAttributes_MatchType. + * Modified cmdlet Start-CONNTaskContact: added parameter SegmentAttribute. + * Modified cmdlet Update-CONNContact: added parameter SegmentAttribute. + * Modified cmdlet Update-CONNTaskTemplate: added parameter SelfAssignFlowId. + * Amazon Elastic Load Balancing V2 + * Modified cmdlet Edit-ELB2Listener: added parameter MutualAuthentication_AdvertiseTrustStoreCaName. + * Modified cmdlet New-ELB2Listener: added parameter MutualAuthentication_AdvertiseTrustStoreCaName. + * Amazon Elastic MapReduce + * Modified cmdlet Start-EMRJobFlow: added parameters ManagedScalingPolicy_ScalingStrategy and ManagedScalingPolicy_UtilizationPerformanceIndex. + * Modified cmdlet Write-EMRManagedScalingPolicy: added parameters ManagedScalingPolicy_ScalingStrategy and ManagedScalingPolicy_UtilizationPerformanceIndex. + * Amazon Lambda + * Modified cmdlet New-LMEventSourceMapping: added parameters ProvisionedPollerConfig_MaximumPoller and ProvisionedPollerConfig_MinimumPoller. + * Modified cmdlet Update-LMEventSourceMapping: added parameters ProvisionedPollerConfig_MaximumPoller and ProvisionedPollerConfig_MinimumPoller. + * Amazon Neptune Graph + * Added cmdlet Get-NEPTGExportTask leveraging the GetExportTask service API. + * Added cmdlet Get-NEPTGExportTaskList leveraging the ListExportTasks service API. + * Added cmdlet Start-NEPTGExportTask leveraging the StartExportTask service API. + * Added cmdlet Stop-NEPTGExportTask leveraging the CancelExportTask service API. + * Modified cmdlet New-NEPTGGraphUsingImportTask: added parameter ParquetType. + * Modified cmdlet Start-NEPTGImportTask: added parameter ParquetType. + * Amazon Omics + * Added cmdlet Get-OMICSS3AccessPolicy leveraging the GetS3AccessPolicy service API. + * Added cmdlet Remove-OMICSS3AccessPolicy leveraging the DeleteS3AccessPolicy service API. + * Added cmdlet Update-OMICSSequenceStore leveraging the UpdateSequenceStore service API. + * Added cmdlet Write-OMICSS3AccessPolicy leveraging the PutS3AccessPolicy service API. + * Modified cmdlet Get-OMICSSequenceStoreList: added parameters Filter_Status, Filter_UpdatedAfter and Filter_UpdatedBefore. + * Modified cmdlet New-OMICSSequenceStore: added parameters PropagatedSetLevelTag and S3AccessConfig_AccessLogLocation. + * Amazon Pricing Calculator. Added cmdlets to support the service. Cmdlets for the service have the noun prefix BCMPC and can be listed using the command 'Get-AWSCmdletName -Service BCMPC'. + * Amazon QuickSight + * Added cmdlet Get-QSDashboardsQAConfiguration leveraging the DescribeDashboardsQAConfiguration service API. + * Added cmdlet Search-QSTopic leveraging the SearchTopics service API. + * Added cmdlet Update-QSDashboardsQAConfiguration leveraging the UpdateDashboardsQAConfiguration service API. + * Modified cmdlet New-QSAnalysis: added parameter Definition_StaticFile. + * Modified cmdlet New-QSDashboard: added parameter Definition_StaticFile. + * Modified cmdlet New-QSTemplate: added parameter Definition_StaticFile. + * Modified cmdlet New-QSTopic: added parameter FolderArn. + * Modified cmdlet Update-QSAnalysis: added parameter Definition_StaticFile. + * Modified cmdlet Update-QSDashboard: added parameter Definition_StaticFile. + * Modified cmdlet Update-QSTemplate: added parameter Definition_StaticFile. + * Amazon SageMaker Service + * Modified cmdlet New-SMInferenceComponent: added parameter Specification_BaseInferenceComponentName. + * Modified cmdlet Update-SMInferenceComponent: added parameter Specification_BaseInferenceComponentName. + * Amazon Step Functions + * Modified cmdlet Test-SFNState: added parameter Variable. + +### 4.1.704 (2024-11-21 22:02Z) * AWS Tools for PowerShell now use AWS .NET SDK 3.7.932.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md. * Amazon API Gateway * Added cmdlet Disable-AGDomainNameAccessAssociation leveraging the RejectDomainNameAccessAssociation service API. diff --git a/changelogs/CHANGELOG.ALL.md b/changelogs/CHANGELOG.ALL.md index 429807767..065bda47c 100644 --- a/changelogs/CHANGELOG.ALL.md +++ b/changelogs/CHANGELOG.ALL.md @@ -1,4 +1,97 @@ -### 4.1.704 (2024-11-21 22:02Z) +### 4.1.705 (2024-11-22 21:43Z) + * AWS Tools for PowerShell now use AWS .NET SDK 3.7.933.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md. + * Amazon Auto Scaling + * Modified cmdlet Write-ASScalingPolicy: added parameter CustomizedMetricSpecification_Period. + * Amazon Bedrock Agent Runtime + * Added cmdlet Invoke-BARInlineAgent leveraging the InvokeInlineAgent service API. + * Amazon Chatbot + * Added cmdlet Get-CHATAssociationList leveraging the ListAssociations service API. + * Added cmdlet Get-CHATCustomAction leveraging the GetCustomAction service API. + * Added cmdlet Get-CHATCustomActionList leveraging the ListCustomActions service API. + * Added cmdlet New-CHATCustomAction leveraging the CreateCustomAction service API. + * Added cmdlet Register-CHATAssociation leveraging the AssociateToConfiguration service API. + * Added cmdlet Remove-CHATCustomAction leveraging the DeleteCustomAction service API. + * Added cmdlet Unregister-CHATAssociation leveraging the DisassociateFromConfiguration service API. + * Added cmdlet Update-CHATCustomAction leveraging the UpdateCustomAction service API. + * Amazon Cognito Identity Provider + * Added cmdlet Complete-CGIPWebAuthnRegistration leveraging the CompleteWebAuthnRegistration service API. + * Added cmdlet Get-CGIPManagedLoginBranding leveraging the DescribeManagedLoginBranding service API. + * Added cmdlet Get-CGIPManagedLoginBrandingByClient leveraging the DescribeManagedLoginBrandingByClient service API. + * Added cmdlet Get-CGIPUserAuthFactor leveraging the GetUserAuthFactors service API. + * Added cmdlet Get-CGIPWebAuthnCredentialList leveraging the ListWebAuthnCredentials service API. + * Added cmdlet New-CGIPManagedLoginBranding leveraging the CreateManagedLoginBranding service API. + * Added cmdlet Remove-CGIPManagedLoginBranding leveraging the DeleteManagedLoginBranding service API. + * Added cmdlet Remove-CGIPWebAuthnCredential leveraging the DeleteWebAuthnCredential service API. + * Added cmdlet Start-CGIPWebAuthnRegistration leveraging the StartWebAuthnRegistration service API. + * Added cmdlet Update-CGIPManagedLoginBranding leveraging the UpdateManagedLoginBranding service API. + * Modified cmdlet Confirm-CGIPUserRegistration: added parameter Session. + * Modified cmdlet New-CGIPUserPool: added parameters SignInPolicy_AllowedFirstAuthFactor and UserPoolTier. + * Modified cmdlet New-CGIPUserPoolDomain: added parameter ManagedLoginVersion. + * Modified cmdlet Set-CGIPUserPoolMfaConfig: added parameters WebAuthnConfiguration_RelyingPartyId and WebAuthnConfiguration_UserVerification. + * Modified cmdlet Start-CGIPAuth: added parameter Session. + * Modified cmdlet Start-CGIPAuthAdmin: added parameter Session. + * Modified cmdlet Update-CGIPUserPool: added parameters PoolName, SignInPolicy_AllowedFirstAuthFactor and UserPoolTier. + * Modified cmdlet Update-CGIPUserPoolDomain: added parameter ManagedLoginVersion. + * Amazon Connect Service + * Added cmdlet Get-CONNAssociatedContactList leveraging the ListAssociatedContacts service API. + * Added cmdlet Get-CONNEmailAddress leveraging the DescribeEmailAddress service API. + * Added cmdlet New-CONNContact leveraging the CreateContact service API. + * Added cmdlet New-CONNEmailAddress leveraging the CreateEmailAddress service API. + * Added cmdlet Remove-CONNEmailAddress leveraging the DeleteEmailAddress service API. + * Added cmdlet Search-CONNEmailAddress leveraging the SearchEmailAddresses service API. + * Added cmdlet Send-CONNOutboundEmail leveraging the SendOutboundEmail service API. + * Added cmdlet Start-CONNEmailContact leveraging the StartEmailContact service API. + * Added cmdlet Start-CONNOutboundEmailContact leveraging the StartOutboundEmailContact service API. + * Added cmdlet Update-CONNEmailAddressMetadata leveraging the UpdateEmailAddressMetadata service API. + * Added cmdlet Update-CONNQueueOutboundEmailConfig leveraging the UpdateQueueOutboundEmailConfig service API. + * Modified cmdlet New-CONNQueue: added parameter OutboundEmailConfig_OutboundEmailAddressId. + * Modified cmdlet New-CONNTaskTemplate: added parameter SelfAssignFlowId. + * Modified cmdlet Search-CONNContact: added parameters SearchableSegmentAttributes_Criterion and SearchableSegmentAttributes_MatchType. + * Modified cmdlet Start-CONNTaskContact: added parameter SegmentAttribute. + * Modified cmdlet Update-CONNContact: added parameter SegmentAttribute. + * Modified cmdlet Update-CONNTaskTemplate: added parameter SelfAssignFlowId. + * Amazon Elastic Load Balancing V2 + * Modified cmdlet Edit-ELB2Listener: added parameter MutualAuthentication_AdvertiseTrustStoreCaName. + * Modified cmdlet New-ELB2Listener: added parameter MutualAuthentication_AdvertiseTrustStoreCaName. + * Amazon Elastic MapReduce + * Modified cmdlet Start-EMRJobFlow: added parameters ManagedScalingPolicy_ScalingStrategy and ManagedScalingPolicy_UtilizationPerformanceIndex. + * Modified cmdlet Write-EMRManagedScalingPolicy: added parameters ManagedScalingPolicy_ScalingStrategy and ManagedScalingPolicy_UtilizationPerformanceIndex. + * Amazon Lambda + * Modified cmdlet New-LMEventSourceMapping: added parameters ProvisionedPollerConfig_MaximumPoller and ProvisionedPollerConfig_MinimumPoller. + * Modified cmdlet Update-LMEventSourceMapping: added parameters ProvisionedPollerConfig_MaximumPoller and ProvisionedPollerConfig_MinimumPoller. + * Amazon Neptune Graph + * Added cmdlet Get-NEPTGExportTask leveraging the GetExportTask service API. + * Added cmdlet Get-NEPTGExportTaskList leveraging the ListExportTasks service API. + * Added cmdlet Start-NEPTGExportTask leveraging the StartExportTask service API. + * Added cmdlet Stop-NEPTGExportTask leveraging the CancelExportTask service API. + * Modified cmdlet New-NEPTGGraphUsingImportTask: added parameter ParquetType. + * Modified cmdlet Start-NEPTGImportTask: added parameter ParquetType. + * Amazon Omics + * Added cmdlet Get-OMICSS3AccessPolicy leveraging the GetS3AccessPolicy service API. + * Added cmdlet Remove-OMICSS3AccessPolicy leveraging the DeleteS3AccessPolicy service API. + * Added cmdlet Update-OMICSSequenceStore leveraging the UpdateSequenceStore service API. + * Added cmdlet Write-OMICSS3AccessPolicy leveraging the PutS3AccessPolicy service API. + * Modified cmdlet Get-OMICSSequenceStoreList: added parameters Filter_Status, Filter_UpdatedAfter and Filter_UpdatedBefore. + * Modified cmdlet New-OMICSSequenceStore: added parameters PropagatedSetLevelTag and S3AccessConfig_AccessLogLocation. + * Amazon Pricing Calculator. Added cmdlets to support the service. Cmdlets for the service have the noun prefix BCMPC and can be listed using the command 'Get-AWSCmdletName -Service BCMPC'. + * Amazon QuickSight + * Added cmdlet Get-QSDashboardsQAConfiguration leveraging the DescribeDashboardsQAConfiguration service API. + * Added cmdlet Search-QSTopic leveraging the SearchTopics service API. + * Added cmdlet Update-QSDashboardsQAConfiguration leveraging the UpdateDashboardsQAConfiguration service API. + * Modified cmdlet New-QSAnalysis: added parameter Definition_StaticFile. + * Modified cmdlet New-QSDashboard: added parameter Definition_StaticFile. + * Modified cmdlet New-QSTemplate: added parameter Definition_StaticFile. + * Modified cmdlet New-QSTopic: added parameter FolderArn. + * Modified cmdlet Update-QSAnalysis: added parameter Definition_StaticFile. + * Modified cmdlet Update-QSDashboard: added parameter Definition_StaticFile. + * Modified cmdlet Update-QSTemplate: added parameter Definition_StaticFile. + * Amazon SageMaker Service + * Modified cmdlet New-SMInferenceComponent: added parameter Specification_BaseInferenceComponentName. + * Modified cmdlet Update-SMInferenceComponent: added parameter Specification_BaseInferenceComponentName. + * Amazon Step Functions + * Modified cmdlet Test-SFNState: added parameter Variable. + +### 4.1.704 (2024-11-21 22:02Z) * AWS Tools for PowerShell now use AWS .NET SDK 3.7.932.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md. * Amazon API Gateway * Added cmdlet Disable-AGDomainNameAccessAssociation leveraging the RejectDomainNameAccessAssociation service API. diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/bcm-pricing-calculator.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/bcm-pricing-calculator.xml new file mode 100644 index 000000000..b496cfede --- /dev/null +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/bcm-pricing-calculator.xml @@ -0,0 +1,167 @@ + + + 0 + false + bcm-pricing-calculator + BCMPricingCalculator + BCMPC + AWS Pricing Calculator + IAmazonBCMPricingCalculator + AmazonBCMPricingCalculatorClient + db74072d-53af-4fb4-82f9-935b02c3f5a7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/bedrock-agent-runtime.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/bedrock-agent-runtime.xml index 7ece9dc6f..439dfcb28 100644 --- a/generator/AWSPSGeneratorLib/Config/ServiceConfig/bedrock-agent-runtime.xml +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/bedrock-agent-runtime.xml @@ -34,6 +34,10 @@ + + + + diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/chatbot.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/chatbot.xml index 403906f70..322abcbb9 100644 --- a/generator/AWSPSGeneratorLib/Config/ServiceConfig/chatbot.xml +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/chatbot.xml @@ -18,10 +18,18 @@ + + + + + + + + @@ -34,6 +42,10 @@ + + + + @@ -74,14 +86,30 @@ + + + + + + + + + + + + + + + + @@ -114,6 +142,10 @@ + + + + diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/cognito-idp.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/cognito-idp.xml index f4ba2f084..55516dac7 100644 --- a/generator/AWSPSGeneratorLib/Config/ServiceConfig/cognito-idp.xml +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/cognito-idp.xml @@ -141,6 +141,12 @@ + + + + + + @@ -149,7 +155,7 @@ - + @@ -161,6 +167,10 @@ + + + + @@ -189,6 +199,10 @@ + + + + @@ -213,10 +227,22 @@ + + + + + + + + + + + + @@ -285,6 +311,10 @@ + + + + @@ -342,6 +372,10 @@ + + + + @@ -386,6 +420,10 @@ + + + + @@ -414,6 +452,10 @@ + + + + diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/connect.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/connect.xml index d74a0efbb..68344c44c 100644 --- a/generator/AWSPSGeneratorLib/Config/ServiceConfig/connect.xml +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/connect.xml @@ -116,6 +116,10 @@ + + + + @@ -128,6 +132,10 @@ + + + + @@ -232,6 +240,10 @@ + + + + @@ -332,6 +344,10 @@ + + + + @@ -524,6 +540,10 @@ + + + + @@ -751,6 +771,10 @@ + + + + @@ -861,6 +885,10 @@ + + + + @@ -881,10 +909,18 @@ + + + + + + + + @@ -989,6 +1025,10 @@ + + + + @@ -1046,6 +1086,10 @@ + + + + diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/neptune-graph.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/neptune-graph.xml index e470a9b6e..f3a475b15 100644 --- a/generator/AWSPSGeneratorLib/Config/ServiceConfig/neptune-graph.xml +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/neptune-graph.xml @@ -18,6 +18,10 @@ + + + + @@ -58,6 +62,10 @@ + + + + @@ -82,6 +90,10 @@ + + + + @@ -114,6 +126,10 @@ + + + + diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/omics.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/omics.xml index 4c29af510..8113e5393 100644 --- a/generator/AWSPSGeneratorLib/Config/ServiceConfig/omics.xml +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/omics.xml @@ -119,6 +119,10 @@ + + + + @@ -201,6 +205,10 @@ + + + + @@ -309,6 +317,10 @@ + + + + @@ -361,6 +373,10 @@ + + + + diff --git a/generator/AWSPSGeneratorLib/Config/ServiceConfig/quicksight.xml b/generator/AWSPSGeneratorLib/Config/ServiceConfig/quicksight.xml index 85a7466d5..dded43474 100644 --- a/generator/AWSPSGeneratorLib/Config/ServiceConfig/quicksight.xml +++ b/generator/AWSPSGeneratorLib/Config/ServiceConfig/quicksight.xml @@ -341,6 +341,10 @@ + + + + @@ -660,6 +664,10 @@ + + + + @@ -743,6 +751,10 @@ + + + + diff --git a/modules/AWSPowerShell/AWSAliases.ps1 b/modules/AWSPowerShell/AWSAliases.ps1 index 31704bfd9..551067b5a 100644 --- a/modules/AWSPowerShell/AWSAliases.ps1 +++ b/modules/AWSPowerShell/AWSAliases.ps1 @@ -2340,6 +2340,79 @@ Set-Alias -Name BCMDE-ListTagsForResource -Value Get-BCMDEResourceTag Set-Alias -Name BCMDE-TagResource -Value Add-BCMDEResourceTag Set-Alias -Name BCMDE-UntagResource -Value Remove-BCMDEResourceTag Set-Alias -Name BCMDE-UpdateExport -Value Update-BCMDEExport +Set-Alias -Name Batch-BCMPCCreateBillScenarioCommitmentModification -Value New-BCMPCCreateBillScenarioCommitmentModification +Set-Alias -Name BCMPC-BatchCreateBillScenarioCommitmentModification -Value New-BCMPCCreateBillScenarioCommitmentModification +Set-Alias -Name Batch-BCMPCCreateBillScenarioUsageModification -Value New-BCMPCCreateBillScenarioUsageModification +Set-Alias -Name BCMPC-BatchCreateBillScenarioUsageModification -Value New-BCMPCCreateBillScenarioUsageModification +Set-Alias -Name Batch-BCMPCCreateWorkloadEstimateUsage -Value New-BCMPCCreateWorkloadEstimateUsage +Set-Alias -Name BCMPC-BatchCreateWorkloadEstimateUsage -Value New-BCMPCCreateWorkloadEstimateUsage +Set-Alias -Name Batch-BCMPCDeleteBillScenarioCommitmentModification -Value New-BCMPCDeleteBillScenarioCommitmentModification +Set-Alias -Name BCMPC-BatchDeleteBillScenarioCommitmentModification -Value New-BCMPCDeleteBillScenarioCommitmentModification +Set-Alias -Name Batch-BCMPCDeleteBillScenarioUsageModification -Value New-BCMPCDeleteBillScenarioUsageModification +Set-Alias -Name BCMPC-BatchDeleteBillScenarioUsageModification -Value New-BCMPCDeleteBillScenarioUsageModification +Set-Alias -Name Batch-BCMPCDeleteWorkloadEstimateUsage -Value New-BCMPCDeleteWorkloadEstimateUsage +Set-Alias -Name BCMPC-BatchDeleteWorkloadEstimateUsage -Value New-BCMPCDeleteWorkloadEstimateUsage +Set-Alias -Name Batch-BCMPCUpdateBillScenarioCommitmentModification -Value New-BCMPCUpdateBillScenarioCommitmentModification +Set-Alias -Name BCMPC-BatchUpdateBillScenarioCommitmentModification -Value New-BCMPCUpdateBillScenarioCommitmentModification +Set-Alias -Name Batch-BCMPCUpdateBillScenarioUsageModification -Value New-BCMPCUpdateBillScenarioUsageModification +Set-Alias -Name BCMPC-BatchUpdateBillScenarioUsageModification -Value New-BCMPCUpdateBillScenarioUsageModification +Set-Alias -Name Batch-BCMPCUpdateWorkloadEstimateUsage -Value New-BCMPCUpdateWorkloadEstimateUsage +Set-Alias -Name BCMPC-BatchUpdateWorkloadEstimateUsage -Value New-BCMPCUpdateWorkloadEstimateUsage +Set-Alias -Name Create-BCMPCBillEstimate -Value New-BCMPCBillEstimate +Set-Alias -Name BCMPC-CreateBillEstimate -Value New-BCMPCBillEstimate +Set-Alias -Name Create-BCMPCBillScenario -Value New-BCMPCBillScenario +Set-Alias -Name BCMPC-CreateBillScenario -Value New-BCMPCBillScenario +Set-Alias -Name Create-BCMPCWorkloadEstimate -Value New-BCMPCWorkloadEstimate +Set-Alias -Name BCMPC-CreateWorkloadEstimate -Value New-BCMPCWorkloadEstimate +Set-Alias -Name Delete-BCMPCBillEstimate -Value Remove-BCMPCBillEstimate +Set-Alias -Name BCMPC-DeleteBillEstimate -Value Remove-BCMPCBillEstimate +Set-Alias -Name Delete-BCMPCBillScenario -Value Remove-BCMPCBillScenario +Set-Alias -Name BCMPC-DeleteBillScenario -Value Remove-BCMPCBillScenario +Set-Alias -Name Delete-BCMPCWorkloadEstimate -Value Remove-BCMPCWorkloadEstimate +Set-Alias -Name BCMPC-DeleteWorkloadEstimate -Value Remove-BCMPCWorkloadEstimate +Set-Alias -Name BCMPC-GetBillEstimate -Value Get-BCMPCBillEstimate +Set-Alias -Name BCMPC-GetBillScenario -Value Get-BCMPCBillScenario +Set-Alias -Name Get-BCMPCPreferences -Value Get-BCMPCPreference +Set-Alias -Name BCMPC-GetPreferences -Value Get-BCMPCPreference +Set-Alias -Name BCMPC-GetWorkloadEstimate -Value Get-BCMPCWorkloadEstimate +Set-Alias -Name List-BCMPCBillEstimateCommitments -Value Get-BCMPCBillEstimateCommitmentList +Set-Alias -Name List-BCMPCBillEstimateCommitmentList -Value Get-BCMPCBillEstimateCommitmentList +Set-Alias -Name BCMPC-ListBillEstimateCommitments -Value Get-BCMPCBillEstimateCommitmentList +Set-Alias -Name List-BCMPCBillEstimateInputCommitmentModifications -Value Get-BCMPCBillEstimateInputCommitmentModificationList +Set-Alias -Name List-BCMPCBillEstimateInputCommitmentModificationList -Value Get-BCMPCBillEstimateInputCommitmentModificationList +Set-Alias -Name BCMPC-ListBillEstimateInputCommitmentModifications -Value Get-BCMPCBillEstimateInputCommitmentModificationList +Set-Alias -Name List-BCMPCBillEstimateInputUsageModifications -Value Get-BCMPCBillEstimateInputUsageModificationList +Set-Alias -Name List-BCMPCBillEstimateInputUsageModificationList -Value Get-BCMPCBillEstimateInputUsageModificationList +Set-Alias -Name BCMPC-ListBillEstimateInputUsageModifications -Value Get-BCMPCBillEstimateInputUsageModificationList +Set-Alias -Name List-BCMPCBillEstimateLineItems -Value Get-BCMPCBillEstimateLineItemList +Set-Alias -Name List-BCMPCBillEstimateLineItemList -Value Get-BCMPCBillEstimateLineItemList +Set-Alias -Name BCMPC-ListBillEstimateLineItems -Value Get-BCMPCBillEstimateLineItemList +Set-Alias -Name List-BCMPCBillEstimates -Value Get-BCMPCBillEstimateList +Set-Alias -Name List-BCMPCBillEstimateList -Value Get-BCMPCBillEstimateList +Set-Alias -Name BCMPC-ListBillEstimates -Value Get-BCMPCBillEstimateList +Set-Alias -Name List-BCMPCBillScenarioCommitmentModifications -Value Get-BCMPCBillScenarioCommitmentModificationList +Set-Alias -Name List-BCMPCBillScenarioCommitmentModificationList -Value Get-BCMPCBillScenarioCommitmentModificationList +Set-Alias -Name BCMPC-ListBillScenarioCommitmentModifications -Value Get-BCMPCBillScenarioCommitmentModificationList +Set-Alias -Name List-BCMPCBillScenarios -Value Get-BCMPCBillScenarioList +Set-Alias -Name List-BCMPCBillScenarioList -Value Get-BCMPCBillScenarioList +Set-Alias -Name BCMPC-ListBillScenarios -Value Get-BCMPCBillScenarioList +Set-Alias -Name List-BCMPCBillScenarioUsageModifications -Value Get-BCMPCBillScenarioUsageModificationList +Set-Alias -Name List-BCMPCBillScenarioUsageModificationList -Value Get-BCMPCBillScenarioUsageModificationList +Set-Alias -Name BCMPC-ListBillScenarioUsageModifications -Value Get-BCMPCBillScenarioUsageModificationList +Set-Alias -Name BCMPC-ListTagsForResource -Value Get-BCMPCResourceTag +Set-Alias -Name List-BCMPCWorkloadEstimates -Value Get-BCMPCWorkloadEstimateList +Set-Alias -Name List-BCMPCWorkloadEstimateList -Value Get-BCMPCWorkloadEstimateList +Set-Alias -Name BCMPC-ListWorkloadEstimates -Value Get-BCMPCWorkloadEstimateList +Set-Alias -Name List-BCMPCWorkloadEstimateUsage -Value Get-BCMPCWorkloadEstimateUsageList +Set-Alias -Name List-BCMPCWorkloadEstimateUsageList -Value Get-BCMPCWorkloadEstimateUsageList +Set-Alias -Name BCMPC-ListWorkloadEstimateUsage -Value Get-BCMPCWorkloadEstimateUsageList +Set-Alias -Name BCMPC-TagResource -Value Add-BCMPCResourceTag +Set-Alias -Name BCMPC-UntagResource -Value Remove-BCMPCResourceTag +Set-Alias -Name BCMPC-UpdateBillEstimate -Value Update-BCMPCBillEstimate +Set-Alias -Name BCMPC-UpdateBillScenario -Value Update-BCMPCBillScenario +Set-Alias -Name Update-BCMPCPreferences -Value Update-BCMPCPreference +Set-Alias -Name BCMPC-UpdatePreferences -Value Update-BCMPCPreference +Set-Alias -Name BCMPC-UpdateWorkloadEstimate -Value Update-BCMPCWorkloadEstimate Set-Alias -Name Batch-BDRDeleteEvaluationJob -Value Set-BDRBatchDeleteEvaluationJob Set-Alias -Name Batch-BDRBatchDeleteEvaluationJob -Value Set-BDRBatchDeleteEvaluationJob Set-Alias -Name BDR-BatchDeleteEvaluationJob -Value Set-BDRBatchDeleteEvaluationJob @@ -2545,6 +2618,7 @@ Set-Alias -Name BAR-DeleteAgentMemory -Value Remove-BARAgentMemory Set-Alias -Name BAR-GetAgentMemory -Value Get-BARAgentMemory Set-Alias -Name BAR-InvokeAgent -Value Invoke-BARAgent Set-Alias -Name BAR-InvokeFlow -Value Invoke-BARFlow +Set-Alias -Name BAR-InvokeInlineAgent -Value Invoke-BARInlineAgent Set-Alias -Name Optimize-BARPrompt -Value Get-BAROptimizePrompt Set-Alias -Name Optimize-BAROptimizePrompt -Value Get-BAROptimizePrompt Set-Alias -Name BAR-OptimizePrompt -Value Get-BAROptimizePrompt @@ -2778,14 +2852,21 @@ Set-Alias -Name CE-UpdateAnomalyMonitor -Value Update-CEAnomalyMonitor Set-Alias -Name CE-UpdateAnomalySubscription -Value Update-CEAnomalySubscription Set-Alias -Name CE-UpdateCostAllocationTagsStatus -Value Update-CECostAllocationTagsStatus Set-Alias -Name CE-UpdateCostCategoryDefinition -Value Update-CECostCategoryDefinition +Set-Alias -Name Associate-CHATToConfiguration -Value Register-CHATAssociation +Set-Alias -Name Associate-CHATAssociation -Value Register-CHATAssociation +Set-Alias -Name CHAT-AssociateToConfiguration -Value Register-CHATAssociation Set-Alias -Name Create-CHATChimeWebhookConfiguration -Value New-CHATChimeWebhookConfiguration Set-Alias -Name CHAT-CreateChimeWebhookConfiguration -Value New-CHATChimeWebhookConfiguration +Set-Alias -Name Create-CHATCustomAction -Value New-CHATCustomAction +Set-Alias -Name CHAT-CreateCustomAction -Value New-CHATCustomAction Set-Alias -Name Create-CHATMicrosoftTeamsChannelConfiguration -Value New-CHATMicrosoftTeamsChannelConfiguration Set-Alias -Name CHAT-CreateMicrosoftTeamsChannelConfiguration -Value New-CHATMicrosoftTeamsChannelConfiguration Set-Alias -Name Create-CHATSlackChannelConfiguration -Value New-CHATSlackChannelConfiguration Set-Alias -Name CHAT-CreateSlackChannelConfiguration -Value New-CHATSlackChannelConfiguration Set-Alias -Name Delete-CHATChimeWebhookConfiguration -Value Remove-CHATChimeWebhookConfiguration Set-Alias -Name CHAT-DeleteChimeWebhookConfiguration -Value Remove-CHATChimeWebhookConfiguration +Set-Alias -Name Delete-CHATCustomAction -Value Remove-CHATCustomAction +Set-Alias -Name CHAT-DeleteCustomAction -Value Remove-CHATCustomAction Set-Alias -Name Delete-CHATMicrosoftTeamsChannelConfiguration -Value Remove-CHATMicrosoftTeamsChannelConfiguration Set-Alias -Name CHAT-DeleteMicrosoftTeamsChannelConfiguration -Value Remove-CHATMicrosoftTeamsChannelConfiguration Set-Alias -Name Delete-CHATMicrosoftTeamsConfiguredTeam -Value Remove-CHATMicrosoftTeamsConfiguredTeam @@ -2810,9 +2891,19 @@ Set-Alias -Name CHAT-DescribeSlackUserIdentities -Value Get-CHATSlackUserIdentit Set-Alias -Name Describe-CHATSlackWorkspaces -Value Get-CHATSlackWorkspace Set-Alias -Name Describe-CHATSlackWorkspace -Value Get-CHATSlackWorkspace Set-Alias -Name CHAT-DescribeSlackWorkspaces -Value Get-CHATSlackWorkspace +Set-Alias -Name Disassociate-CHATFromConfiguration -Value Unregister-CHATAssociation +Set-Alias -Name Disassociate-CHATAssociation -Value Unregister-CHATAssociation +Set-Alias -Name CHAT-DisassociateFromConfiguration -Value Unregister-CHATAssociation Set-Alias -Name Get-CHATAccountPreferences -Value Get-CHATAccountPreference Set-Alias -Name CHAT-GetAccountPreferences -Value Get-CHATAccountPreference +Set-Alias -Name CHAT-GetCustomAction -Value Get-CHATCustomAction Set-Alias -Name CHAT-GetMicrosoftTeamsChannelConfiguration -Value Get-CHATMicrosoftTeamsChannelConfiguration +Set-Alias -Name List-CHATAssociations -Value Get-CHATAssociationList +Set-Alias -Name List-CHATAssociationList -Value Get-CHATAssociationList +Set-Alias -Name CHAT-ListAssociations -Value Get-CHATAssociationList +Set-Alias -Name List-CHATCustomActions -Value Get-CHATCustomActionList +Set-Alias -Name List-CHATCustomActionList -Value Get-CHATCustomActionList +Set-Alias -Name CHAT-ListCustomActions -Value Get-CHATCustomActionList Set-Alias -Name List-CHATMicrosoftTeamsChannelConfigurations -Value Get-CHATMicrosoftTeamsChannelConfigurationList Set-Alias -Name List-CHATMicrosoftTeamsChannelConfigurationList -Value Get-CHATMicrosoftTeamsChannelConfigurationList Set-Alias -Name CHAT-ListMicrosoftTeamsChannelConfigurations -Value Get-CHATMicrosoftTeamsChannelConfigurationList @@ -2828,6 +2919,7 @@ Set-Alias -Name CHAT-UntagResource -Value Remove-CHATResourceTag Set-Alias -Name Update-CHATAccountPreferences -Value Update-CHATAccountPreference Set-Alias -Name CHAT-UpdateAccountPreferences -Value Update-CHATAccountPreference Set-Alias -Name CHAT-UpdateChimeWebhookConfiguration -Value Update-CHATChimeWebhookConfiguration +Set-Alias -Name CHAT-UpdateCustomAction -Value Update-CHATCustomAction Set-Alias -Name CHAT-UpdateMicrosoftTeamsChannelConfiguration -Value Update-CHATMicrosoftTeamsChannelConfiguration Set-Alias -Name CHAT-UpdateSlackChannelConfiguration -Value Update-CHATSlackChannelConfiguration Set-Alias -Name Associate-CHMPhoneNumbersWithVoiceConnector -Value Add-CHMPhoneNumbersToVoiceConnector @@ -5648,6 +5740,7 @@ Set-Alias -Name Associate-CGIPSoftwareToken -Value Add-CGIPSoftwareToken Set-Alias -Name CGIP-AssociateSoftwareToken -Value Add-CGIPSoftwareToken Set-Alias -Name Change-CGIPPassword -Value Update-CGIPPassword Set-Alias -Name CGIP-ChangePassword -Value Update-CGIPPassword +Set-Alias -Name CGIP-CompleteWebAuthnRegistration -Value Complete-CGIPWebAuthnRegistration Set-Alias -Name Confirm-CGIPDevice -Value Approve-CGIPDevice Set-Alias -Name CGIP-ConfirmDevice -Value Approve-CGIPDevice Set-Alias -Name CGIP-ConfirmForgotPassword -Value Confirm-CGIPForgotPassword @@ -5657,6 +5750,8 @@ Set-Alias -Name Create-CGIPGroup -Value New-CGIPGroup Set-Alias -Name CGIP-CreateGroup -Value New-CGIPGroup Set-Alias -Name Create-CGIPIdentityProvider -Value New-CGIPIdentityProvider Set-Alias -Name CGIP-CreateIdentityProvider -Value New-CGIPIdentityProvider +Set-Alias -Name Create-CGIPManagedLoginBranding -Value New-CGIPManagedLoginBranding +Set-Alias -Name CGIP-CreateManagedLoginBranding -Value New-CGIPManagedLoginBranding Set-Alias -Name Create-CGIPResourceServer -Value New-CGIPResourceServer Set-Alias -Name CGIP-CreateResourceServer -Value New-CGIPResourceServer Set-Alias -Name Create-CGIPUserImportJob -Value New-CGIPUserImportJob @@ -5671,6 +5766,8 @@ Set-Alias -Name Delete-CGIPGroup -Value Remove-CGIPGroup Set-Alias -Name CGIP-DeleteGroup -Value Remove-CGIPGroup Set-Alias -Name Delete-CGIPIdentityProvider -Value Remove-CGIPIdentityProvider Set-Alias -Name CGIP-DeleteIdentityProvider -Value Remove-CGIPIdentityProvider +Set-Alias -Name Delete-CGIPManagedLoginBranding -Value Remove-CGIPManagedLoginBranding +Set-Alias -Name CGIP-DeleteManagedLoginBranding -Value Remove-CGIPManagedLoginBranding Set-Alias -Name Delete-CGIPResourceServer -Value Remove-CGIPResourceServer Set-Alias -Name CGIP-DeleteResourceServer -Value Remove-CGIPResourceServer Set-Alias -Name Delete-CGIPUser -Value Remove-CGIPUser @@ -5684,8 +5781,14 @@ Set-Alias -Name Delete-CGIPUserPoolClient -Value Remove-CGIPUserPoolClient Set-Alias -Name CGIP-DeleteUserPoolClient -Value Remove-CGIPUserPoolClient Set-Alias -Name Delete-CGIPUserPoolDomain -Value Remove-CGIPUserPoolDomain Set-Alias -Name CGIP-DeleteUserPoolDomain -Value Remove-CGIPUserPoolDomain +Set-Alias -Name Delete-CGIPWebAuthnCredential -Value Remove-CGIPWebAuthnCredential +Set-Alias -Name CGIP-DeleteWebAuthnCredential -Value Remove-CGIPWebAuthnCredential Set-Alias -Name Describe-CGIPIdentityProvider -Value Get-CGIPIdentityProvider Set-Alias -Name CGIP-DescribeIdentityProvider -Value Get-CGIPIdentityProvider +Set-Alias -Name Describe-CGIPManagedLoginBranding -Value Get-CGIPManagedLoginBranding +Set-Alias -Name CGIP-DescribeManagedLoginBranding -Value Get-CGIPManagedLoginBranding +Set-Alias -Name Describe-CGIPManagedLoginBrandingByClient -Value Get-CGIPManagedLoginBrandingByClient +Set-Alias -Name CGIP-DescribeManagedLoginBrandingByClient -Value Get-CGIPManagedLoginBrandingByClient Set-Alias -Name Describe-CGIPResourceServer -Value Get-CGIPResourceServer Set-Alias -Name CGIP-DescribeResourceServer -Value Get-CGIPResourceServer Set-Alias -Name Describe-CGIPRiskConfiguration -Value Get-CGIPRiskConfiguration @@ -5713,6 +5816,8 @@ Set-Alias -Name CGIP-GetSigningCertificate -Value Get-CGIPSigningCertificate Set-Alias -Name CGIP-GetUICustomization -Value Get-CGIPUICustomization Set-Alias -Name CGIP-GetUser -Value Get-CGIPUser Set-Alias -Name CGIP-GetUserAttributeVerificationCode -Value Get-CGIPUserAttributeVerificationCode +Set-Alias -Name Get-CGIPUserAuthFactors -Value Get-CGIPUserAuthFactor +Set-Alias -Name CGIP-GetUserAuthFactors -Value Get-CGIPUserAuthFactor Set-Alias -Name CGIP-GetUserPoolMfaConfig -Value Get-CGIPUserPoolMfaConfig Set-Alias -Name Global-CGIPSignOut -Value Disconnect-CGIPDeviceGlobal Set-Alias -Name Global-CGIPDeviceGlobal -Value Disconnect-CGIPDeviceGlobal @@ -5746,6 +5851,9 @@ Set-Alias -Name List-CGIPUserList -Value Get-CGIPUserList Set-Alias -Name CGIP-ListUsers -Value Get-CGIPUserList Set-Alias -Name List-CGIPUsersInGroup -Value Get-CGIPUsersInGroup Set-Alias -Name CGIP-ListUsersInGroup -Value Get-CGIPUsersInGroup +Set-Alias -Name List-CGIPWebAuthnCredentials -Value Get-CGIPWebAuthnCredentialList +Set-Alias -Name List-CGIPWebAuthnCredentialList -Value Get-CGIPWebAuthnCredentialList +Set-Alias -Name CGIP-ListWebAuthnCredentials -Value Get-CGIPWebAuthnCredentialList Set-Alias -Name Resend-CGIPConfirmationCode -Value Send-CGIPConfirmationCode Set-Alias -Name CGIP-ResendConfirmationCode -Value Send-CGIPConfirmationCode Set-Alias -Name Respond-CGIPToAuthChallenge -Value Send-CGIPAuthChallengeResponse @@ -5763,6 +5871,7 @@ Set-Alias -Name Sign-CGIPUp -Value Register-CGIPUserInPool Set-Alias -Name Sign-CGIPUserInPool -Value Register-CGIPUserInPool Set-Alias -Name CGIP-SignUp -Value Register-CGIPUserInPool Set-Alias -Name CGIP-StartUserImportJob -Value Start-CGIPUserImportJob +Set-Alias -Name CGIP-StartWebAuthnRegistration -Value Start-CGIPWebAuthnRegistration Set-Alias -Name CGIP-StopUserImportJob -Value Stop-CGIPUserImportJob Set-Alias -Name CGIP-TagResource -Value Add-CGIPResourceTag Set-Alias -Name CGIP-UntagResource -Value Remove-CGIPResourceTag @@ -5771,6 +5880,7 @@ Set-Alias -Name Update-CGIPDeviceStatus -Value Edit-CGIPDeviceStatus Set-Alias -Name CGIP-UpdateDeviceStatus -Value Edit-CGIPDeviceStatus Set-Alias -Name CGIP-UpdateGroup -Value Update-CGIPGroup Set-Alias -Name CGIP-UpdateIdentityProvider -Value Update-CGIPIdentityProvider +Set-Alias -Name CGIP-UpdateManagedLoginBranding -Value Update-CGIPManagedLoginBranding Set-Alias -Name CGIP-UpdateResourceServer -Value Update-CGIPResourceServer Set-Alias -Name Update-CGIPUserAttributes -Value Update-CGIPUserAttribute Set-Alias -Name CGIP-UpdateUserAttributes -Value Update-CGIPUserAttribute @@ -6340,12 +6450,16 @@ Set-Alias -Name CONN-ClaimPhoneNumber -Value Request-CONNPhoneNumber Set-Alias -Name CONN-CompleteAttachedFileUpload -Value Complete-CONNAttachedFileUpload Set-Alias -Name Create-CONNAgentStatus -Value New-CONNAgentStatus Set-Alias -Name CONN-CreateAgentStatus -Value New-CONNAgentStatus +Set-Alias -Name Create-CONNContact -Value New-CONNContact +Set-Alias -Name CONN-CreateContact -Value New-CONNContact Set-Alias -Name Create-CONNContactFlow -Value New-CONNContactFlow Set-Alias -Name CONN-CreateContactFlow -Value New-CONNContactFlow Set-Alias -Name Create-CONNContactFlowModule -Value New-CONNContactFlowModule Set-Alias -Name CONN-CreateContactFlowModule -Value New-CONNContactFlowModule Set-Alias -Name Create-CONNContactFlowVersion -Value New-CONNContactFlowVersion Set-Alias -Name CONN-CreateContactFlowVersion -Value New-CONNContactFlowVersion +Set-Alias -Name Create-CONNEmailAddress -Value New-CONNEmailAddress +Set-Alias -Name CONN-CreateEmailAddress -Value New-CONNEmailAddress Set-Alias -Name Create-CONNEvaluationForm -Value New-CONNEvaluationForm Set-Alias -Name CONN-CreateEvaluationForm -Value New-CONNEvaluationForm Set-Alias -Name Create-CONNHoursOfOperation -Value New-CONNHoursOfOperation @@ -6398,6 +6512,8 @@ Set-Alias -Name Delete-CONNContactFlow -Value Remove-CONNContactFlow Set-Alias -Name CONN-DeleteContactFlow -Value Remove-CONNContactFlow Set-Alias -Name Delete-CONNContactFlowModule -Value Remove-CONNContactFlowModule Set-Alias -Name CONN-DeleteContactFlowModule -Value Remove-CONNContactFlowModule +Set-Alias -Name Delete-CONNEmailAddress -Value Remove-CONNEmailAddress +Set-Alias -Name CONN-DeleteEmailAddress -Value Remove-CONNEmailAddress Set-Alias -Name Delete-CONNEvaluationForm -Value Remove-CONNEvaluationForm Set-Alias -Name CONN-DeleteEvaluationForm -Value Remove-CONNEvaluationForm Set-Alias -Name Delete-CONNHoursOfOperation -Value Remove-CONNHoursOfOperation @@ -6448,6 +6564,8 @@ Set-Alias -Name Describe-CONNContactFlow -Value Get-CONNContactFlow Set-Alias -Name CONN-DescribeContactFlow -Value Get-CONNContactFlow Set-Alias -Name Describe-CONNContactFlowModule -Value Get-CONNContactFlowModule Set-Alias -Name CONN-DescribeContactFlowModule -Value Get-CONNContactFlowModule +Set-Alias -Name Describe-CONNEmailAddress -Value Get-CONNEmailAddress +Set-Alias -Name CONN-DescribeEmailAddress -Value Get-CONNEmailAddress Set-Alias -Name Describe-CONNEvaluationForm -Value Get-CONNEvaluationForm Set-Alias -Name CONN-DescribeEvaluationForm -Value Get-CONNEvaluationForm Set-Alias -Name Describe-CONNHoursOfOperation -Value Get-CONNHoursOfOperation @@ -6539,6 +6657,9 @@ Set-Alias -Name CONN-ListAnalyticsDataAssociations -Value Get-CONNAnalyticsDataA Set-Alias -Name List-CONNApprovedOrigins -Value Get-CONNApprovedOriginList Set-Alias -Name List-CONNApprovedOriginList -Value Get-CONNApprovedOriginList Set-Alias -Name CONN-ListApprovedOrigins -Value Get-CONNApprovedOriginList +Set-Alias -Name List-CONNAssociatedContacts -Value Get-CONNAssociatedContactList +Set-Alias -Name List-CONNAssociatedContactList -Value Get-CONNAssociatedContactList +Set-Alias -Name CONN-ListAssociatedContacts -Value Get-CONNAssociatedContactList Set-Alias -Name List-CONNAuthenticationProfiles -Value Get-CONNAuthenticationProfileList Set-Alias -Name List-CONNAuthenticationProfileList -Value Get-CONNAuthenticationProfileList Set-Alias -Name CONN-ListAuthenticationProfiles -Value Get-CONNAuthenticationProfileList @@ -6692,6 +6813,8 @@ Set-Alias -Name Search-CONNContactFlows -Value Search-CONNContactFlow Set-Alias -Name CONN-SearchContactFlows -Value Search-CONNContactFlow Set-Alias -Name Search-CONNContacts -Value Search-CONNContact Set-Alias -Name CONN-SearchContacts -Value Search-CONNContact +Set-Alias -Name Search-CONNEmailAddresses -Value Search-CONNEmailAddress +Set-Alias -Name CONN-SearchEmailAddresses -Value Search-CONNEmailAddress Set-Alias -Name Search-CONNHoursOfOperations -Value Search-CONNHoursOfOperation Set-Alias -Name CONN-SearchHoursOfOperations -Value Search-CONNHoursOfOperation Set-Alias -Name Search-CONNPredefinedAttributes -Value Search-CONNPredefinedAttribute @@ -6715,12 +6838,15 @@ Set-Alias -Name CONN-SearchUsers -Value Search-CONNUser Set-Alias -Name Search-CONNVocabularies -Value Search-CONNVocabulary Set-Alias -Name CONN-SearchVocabularies -Value Search-CONNVocabulary Set-Alias -Name CONN-SendChatIntegrationEvent -Value Send-CONNChatIntegrationEvent +Set-Alias -Name CONN-SendOutboundEmail -Value Send-CONNOutboundEmail Set-Alias -Name CONN-StartAttachedFileUpload -Value Start-CONNAttachedFileUpload Set-Alias -Name CONN-StartChatContact -Value Start-CONNChatContact Set-Alias -Name CONN-StartContactEvaluation -Value Start-CONNContactEvaluation Set-Alias -Name CONN-StartContactRecording -Value Start-CONNContactRecording Set-Alias -Name CONN-StartContactStreaming -Value Start-CONNContactStreaming +Set-Alias -Name CONN-StartEmailContact -Value Start-CONNEmailContact Set-Alias -Name CONN-StartOutboundChatContact -Value Start-CONNOutboundChatContact +Set-Alias -Name CONN-StartOutboundEmailContact -Value Start-CONNOutboundEmailContact Set-Alias -Name CONN-StartOutboundVoiceContact -Value Start-CONNOutboundVoiceContact Set-Alias -Name CONN-StartScreenSharing -Value Start-CONNScreenSharing Set-Alias -Name CONN-StartTaskContact -Value Start-CONNTaskContact @@ -6753,6 +6879,7 @@ Set-Alias -Name CONN-UpdateContactFlowModuleMetadata -Value Update-CONNContactFl Set-Alias -Name CONN-UpdateContactFlowName -Value Update-CONNContactFlowName Set-Alias -Name CONN-UpdateContactRoutingData -Value Update-CONNContactRoutingData Set-Alias -Name CONN-UpdateContactSchedule -Value Update-CONNContactSchedule +Set-Alias -Name CONN-UpdateEmailAddressMetadata -Value Update-CONNEmailAddressMetadata Set-Alias -Name CONN-UpdateEvaluationForm -Value Update-CONNEvaluationForm Set-Alias -Name CONN-UpdateHoursOfOperation -Value Update-CONNHoursOfOperation Set-Alias -Name CONN-UpdateInstanceAttribute -Value Update-CONNInstanceAttribute @@ -6767,6 +6894,7 @@ Set-Alias -Name Update-CONNQueueMaxContacts -Value Update-CONNQueueMaxContact Set-Alias -Name CONN-UpdateQueueMaxContacts -Value Update-CONNQueueMaxContact Set-Alias -Name CONN-UpdateQueueName -Value Update-CONNQueueName Set-Alias -Name CONN-UpdateQueueOutboundCallerConfig -Value Update-CONNQueueOutboundCallerConfig +Set-Alias -Name CONN-UpdateQueueOutboundEmailConfig -Value Update-CONNQueueOutboundEmailConfig Set-Alias -Name CONN-UpdateQueueStatus -Value Update-CONNQueueStatus Set-Alias -Name CONN-UpdateQuickConnectConfig -Value Update-CONNQuickConnectConfig Set-Alias -Name CONN-UpdateQuickConnectName -Value Update-CONNQuickConnectName @@ -20611,6 +20739,8 @@ Set-Alias -Name NEPT-StartLoaderJob -Value Start-NEPTLoaderJob Set-Alias -Name NEPT-StartMLDataProcessingJob -Value Start-NEPTMLDataProcessingJob Set-Alias -Name NEPT-StartMLModelTrainingJob -Value Start-NEPTMLModelTrainingJob Set-Alias -Name NEPT-StartMLModelTransformJob -Value Start-NEPTMLModelTransformJob +Set-Alias -Name Cancel-NEPTGExportTask -Value Stop-NEPTGExportTask +Set-Alias -Name NEPTG-CancelExportTask -Value Stop-NEPTGExportTask Set-Alias -Name Cancel-NEPTGImportTask -Value Stop-NEPTGImportTask Set-Alias -Name NEPTG-CancelImportTask -Value Stop-NEPTGImportTask Set-Alias -Name Cancel-NEPTGQuery -Value Stop-NEPTGQuery @@ -20631,12 +20761,16 @@ Set-Alias -Name Delete-NEPTGPrivateGraphEndpoint -Value Remove-NEPTGPrivateGraph Set-Alias -Name NEPTG-DeletePrivateGraphEndpoint -Value Remove-NEPTGPrivateGraphEndpoint Set-Alias -Name Execute-NEPTGQuery -Value Invoke-NEPTGQuery Set-Alias -Name NEPTG-ExecuteQuery -Value Invoke-NEPTGQuery +Set-Alias -Name NEPTG-GetExportTask -Value Get-NEPTGExportTask Set-Alias -Name NEPTG-GetGraph -Value Get-NEPTGGraph Set-Alias -Name NEPTG-GetGraphSnapshot -Value Get-NEPTGGraphSnapshot Set-Alias -Name NEPTG-GetGraphSummary -Value Get-NEPTGGraphSummary Set-Alias -Name NEPTG-GetImportTask -Value Get-NEPTGImportTask Set-Alias -Name NEPTG-GetPrivateGraphEndpoint -Value Get-NEPTGPrivateGraphEndpoint Set-Alias -Name NEPTG-GetQuery -Value Get-NEPTGQuery +Set-Alias -Name List-NEPTGExportTasks -Value Get-NEPTGExportTaskList +Set-Alias -Name List-NEPTGExportTaskList -Value Get-NEPTGExportTaskList +Set-Alias -Name NEPTG-ListExportTasks -Value Get-NEPTGExportTaskList Set-Alias -Name List-NEPTGGraphs -Value Get-NEPTGGraphList Set-Alias -Name List-NEPTGGraphList -Value Get-NEPTGGraphList Set-Alias -Name NEPTG-ListGraphs -Value Get-NEPTGGraphList @@ -20655,6 +20789,7 @@ Set-Alias -Name NEPTG-ListQueries -Value Get-NEPTGQueryList Set-Alias -Name NEPTG-ListTagsForResource -Value Get-NEPTGResourceTag Set-Alias -Name NEPTG-ResetGraph -Value Reset-NEPTGGraph Set-Alias -Name NEPTG-RestoreGraphFromSnapshot -Value Restore-NEPTGGraphFromSnapshot +Set-Alias -Name NEPTG-StartExportTask -Value Start-NEPTGExportTask Set-Alias -Name NEPTG-StartImportTask -Value Start-NEPTGImportTask Set-Alias -Name NEPTG-TagResource -Value Add-NEPTGResourceTag Set-Alias -Name NEPTG-UntagResource -Value Remove-NEPTGResourceTag @@ -21022,6 +21157,8 @@ Set-Alias -Name Delete-OMICSRunCache -Value Remove-OMICSRunCache Set-Alias -Name OMICS-DeleteRunCache -Value Remove-OMICSRunCache Set-Alias -Name Delete-OMICSRunGroup -Value Remove-OMICSRunGroup Set-Alias -Name OMICS-DeleteRunGroup -Value Remove-OMICSRunGroup +Set-Alias -Name Delete-OMICSS3AccessPolicy -Value Remove-OMICSS3AccessPolicy +Set-Alias -Name OMICS-DeleteS3AccessPolicy -Value Remove-OMICSS3AccessPolicy Set-Alias -Name Delete-OMICSSequenceStore -Value Remove-OMICSSequenceStore Set-Alias -Name OMICS-DeleteSequenceStore -Value Remove-OMICSSequenceStore Set-Alias -Name Delete-OMICSShare -Value Remove-OMICSShare @@ -21046,6 +21183,7 @@ Set-Alias -Name OMICS-GetRun -Value Get-OMICSRun Set-Alias -Name OMICS-GetRunCache -Value Get-OMICSRunCache Set-Alias -Name OMICS-GetRunGroup -Value Get-OMICSRunGroup Set-Alias -Name OMICS-GetRunTask -Value Get-OMICSRunTask +Set-Alias -Name OMICS-GetS3AccessPolicy -Value Get-OMICSS3AccessPolicy Set-Alias -Name OMICS-GetSequenceStore -Value Get-OMICSSequenceStore Set-Alias -Name OMICS-GetShare -Value Get-OMICSShare Set-Alias -Name OMICS-GetVariantImportJob -Value Get-OMICSVariantImportJob @@ -21115,6 +21253,8 @@ Set-Alias -Name OMICS-ListVariantStores -Value Get-OMICSVariantStoreList Set-Alias -Name List-OMICSWorkflows -Value Get-OMICSWorkflowList Set-Alias -Name List-OMICSWorkflowList -Value Get-OMICSWorkflowList Set-Alias -Name OMICS-ListWorkflows -Value Get-OMICSWorkflowList +Set-Alias -Name Put-OMICSS3AccessPolicy -Value Write-OMICSS3AccessPolicy +Set-Alias -Name OMICS-PutS3AccessPolicy -Value Write-OMICSS3AccessPolicy Set-Alias -Name OMICS-StartAnnotationImportJob -Value Start-OMICSAnnotationImportJob Set-Alias -Name OMICS-StartReadSetActivationJob -Value Start-OMICSReadSetActivationJob Set-Alias -Name OMICS-StartReadSetExportJob -Value Start-OMICSReadSetExportJob @@ -21128,6 +21268,7 @@ Set-Alias -Name OMICS-UpdateAnnotationStore -Value Update-OMICSAnnotationStore Set-Alias -Name OMICS-UpdateAnnotationStoreVersion -Value Update-OMICSAnnotationStoreVersion Set-Alias -Name OMICS-UpdateRunCache -Value Update-OMICSRunCache Set-Alias -Name OMICS-UpdateRunGroup -Value Update-OMICSRunGroup +Set-Alias -Name OMICS-UpdateSequenceStore -Value Update-OMICSSequenceStore Set-Alias -Name OMICS-UpdateVariantStore -Value Update-OMICSVariantStore Set-Alias -Name OMICS-UpdateWorkflow -Value Update-OMICSWorkflow Set-Alias -Name Upload-OMICSReadSetPart -Value Set-OMICSReadSetPart @@ -23425,6 +23566,8 @@ Set-Alias -Name Describe-QSDashboardSnapshotJob -Value Get-QSDashboardSnapshotJo Set-Alias -Name QS-DescribeDashboardSnapshotJob -Value Get-QSDashboardSnapshotJob Set-Alias -Name Describe-QSDashboardSnapshotJobResult -Value Get-QSDashboardSnapshotJobResult Set-Alias -Name QS-DescribeDashboardSnapshotJobResult -Value Get-QSDashboardSnapshotJobResult +Set-Alias -Name Describe-QSDashboardsQAConfiguration -Value Get-QSDashboardsQAConfiguration +Set-Alias -Name QS-DescribeDashboardsQAConfiguration -Value Get-QSDashboardsQAConfiguration Set-Alias -Name Describe-QSDataSet -Value Get-QSDataSet Set-Alias -Name QS-DescribeDataSet -Value Get-QSDataSet Set-Alias -Name Describe-QSDataSetPermissions -Value Get-QSDataSetPermission @@ -23619,6 +23762,8 @@ Set-Alias -Name QS-SearchFolders -Value Search-QSFolder Set-Alias -Name Search-QSGroups -Value Find-QSGroup Set-Alias -Name Search-QSGroup -Value Find-QSGroup Set-Alias -Name QS-SearchGroups -Value Find-QSGroup +Set-Alias -Name Search-QSTopics -Value Search-QSTopic +Set-Alias -Name QS-SearchTopics -Value Search-QSTopic Set-Alias -Name QS-StartAssetBundleExportJob -Value Start-QSAssetBundleExportJob Set-Alias -Name QS-StartAssetBundleImportJob -Value Start-QSAssetBundleImportJob Set-Alias -Name QS-StartDashboardSnapshotJob -Value Start-QSDashboardSnapshotJob @@ -23642,6 +23787,7 @@ Set-Alias -Name QS-UpdateDashboardLinks -Value Update-QSDashboardLink Set-Alias -Name Update-QSDashboardPermissions -Value Update-QSDashboardPermission Set-Alias -Name QS-UpdateDashboardPermissions -Value Update-QSDashboardPermission Set-Alias -Name QS-UpdateDashboardPublishedVersion -Value Update-QSDashboardPublishedVersion +Set-Alias -Name QS-UpdateDashboardsQAConfiguration -Value Update-QSDashboardsQAConfiguration Set-Alias -Name QS-UpdateDataSet -Value Update-QSDataSet Set-Alias -Name Update-QSDataSetPermissions -Value Update-QSDataSetPermission Set-Alias -Name QS-UpdateDataSetPermissions -Value Update-QSDataSetPermission diff --git a/modules/AWSPowerShell/AWSPowerShell.NetCore.psd1 b/modules/AWSPowerShell/AWSPowerShell.NetCore.psd1 index 99eea82b9..64201a308 100644 --- a/modules/AWSPowerShell/AWSPowerShell.NetCore.psd1 +++ b/modules/AWSPowerShell/AWSPowerShell.NetCore.psd1 @@ -95,6 +95,7 @@ This product provides support for all AWS services in a single module. As an alt 'AWSSDK.BackupGateway.dll', 'AWSSDK.Batch.dll', 'AWSSDK.BCMDataExports.dll', + 'AWSSDK.BCMPricingCalculator.dll', 'AWSSDK.Bedrock.dll', 'AWSSDK.BedrockAgent.dll', 'AWSSDK.BedrockAgentRuntime.dll', diff --git a/modules/AWSPowerShell/AWSPowerShell.csproj b/modules/AWSPowerShell/AWSPowerShell.csproj index 0609aaf9d..cfa2c768f 100644 --- a/modules/AWSPowerShell/AWSPowerShell.csproj +++ b/modules/AWSPowerShell/AWSPowerShell.csproj @@ -181,6 +181,9 @@ ../../Include/sdk/assemblies/net45/AWSSDK.BCMDataExports.dll + + ../../Include/sdk/assemblies/net45/AWSSDK.BCMPricingCalculator.dll + ../../Include/sdk/assemblies/net45/AWSSDK.Bedrock.dll @@ -1347,6 +1350,9 @@ ../../Include/sdk/assemblies/netstandard2.0/AWSSDK.BCMDataExports.dll + + ../../Include/sdk/assemblies/netstandard2.0/AWSSDK.BCMPricingCalculator.dll + ../../Include/sdk/assemblies/netstandard2.0/AWSSDK.Bedrock.dll diff --git a/modules/AWSPowerShell/AWSPowerShell.psd1 b/modules/AWSPowerShell/AWSPowerShell.psd1 index 297c9d324..9d9225b5c 100644 --- a/modules/AWSPowerShell/AWSPowerShell.psd1 +++ b/modules/AWSPowerShell/AWSPowerShell.psd1 @@ -95,6 +95,7 @@ This product provides support for all AWS services in a single module. As an alt 'AWSSDK.BackupGateway.dll', 'AWSSDK.Batch.dll', 'AWSSDK.BCMDataExports.dll', + 'AWSSDK.BCMPricingCalculator.dll', 'AWSSDK.Bedrock.dll', 'AWSSDK.BedrockAgent.dll', 'AWSSDK.BedrockAgentRuntime.dll', diff --git a/modules/AWSPowerShell/AWSPowerShellCompleters.psm1 b/modules/AWSPowerShell/AWSPowerShellCompleters.psm1 index 11384bf07..527ec943e 100644 --- a/modules/AWSPowerShell/AWSPowerShellCompleters.psm1 +++ b/modules/AWSPowerShell/AWSPowerShellCompleters.psm1 @@ -6410,6 +6410,122 @@ $BCMDE_SelectMap = @{ } _awsArgumentCompleterRegistration $BCMDE_SelectCompleters $BCMDE_SelectMap +# Argument completions for service AWS Pricing Calculator + + +$BCMPC_Completers = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) + + switch ($("$commandName/$parameterName")) + { + # Amazon.BCMPricingCalculator.WorkloadEstimateRateType + "New-BCMPCWorkloadEstimate/RateType" + { + $v = "AFTER_DISCOUNTS","BEFORE_DISCOUNTS" + break + } + + + } + + $v | + Where-Object { $_ -like "$wordToComplete*" } | + ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ } +} + +$BCMPC_map = @{ + "RateType"=@("New-BCMPCWorkloadEstimate") +} + +_awsArgumentCompleterRegistration $BCMPC_Completers $BCMPC_map + +$BCMPC_SelectCompleters = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) + + $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BCMPC.$($commandName.Replace('-', ''))Cmdlet]" + if (-not $cmdletType) { + return + } + $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false) + if (-not $awsCmdletAttribute) { + return + } + $type = $awsCmdletAttribute.SelectReturnType + if (-not $type) { + return + } + + $splitSelect = $wordToComplete -Split '\.' + $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object { + $propertyName = $_ + $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName } + if ($properties.Length -ne 1) { + break + } + $type = $properties.PropertyType + $prefix += "$($properties.Name)." + + $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1') + if ($asEnumerableType -and $type -ne [System.String]) { + $type = $asEnumerableType.GetGenericArguments()[0] + } + } + + $v = @( '*' ) + $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object + if ($properties) { + $v += ($properties | ForEach-Object { $prefix + $_ }) + } + $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object + if ($parameters) { + $v += ($parameters | ForEach-Object { "^$_" }) + } + + $v | + Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } | + ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ } +} + +$BCMPC_SelectMap = @{ + "Select"=@("New-BCMPCCreateBillScenarioCommitmentModification", + "New-BCMPCCreateBillScenarioUsageModification", + "New-BCMPCCreateWorkloadEstimateUsage", + "New-BCMPCDeleteBillScenarioCommitmentModification", + "New-BCMPCDeleteBillScenarioUsageModification", + "New-BCMPCDeleteWorkloadEstimateUsage", + "New-BCMPCUpdateBillScenarioCommitmentModification", + "New-BCMPCUpdateBillScenarioUsageModification", + "New-BCMPCUpdateWorkloadEstimateUsage", + "New-BCMPCBillEstimate", + "New-BCMPCBillScenario", + "New-BCMPCWorkloadEstimate", + "Remove-BCMPCBillEstimate", + "Remove-BCMPCBillScenario", + "Remove-BCMPCWorkloadEstimate", + "Get-BCMPCBillEstimate", + "Get-BCMPCBillScenario", + "Get-BCMPCPreference", + "Get-BCMPCWorkloadEstimate", + "Get-BCMPCBillEstimateCommitmentList", + "Get-BCMPCBillEstimateInputCommitmentModificationList", + "Get-BCMPCBillEstimateInputUsageModificationList", + "Get-BCMPCBillEstimateLineItemList", + "Get-BCMPCBillEstimateList", + "Get-BCMPCBillScenarioCommitmentModificationList", + "Get-BCMPCBillScenarioList", + "Get-BCMPCBillScenarioUsageModificationList", + "Get-BCMPCResourceTag", + "Get-BCMPCWorkloadEstimateList", + "Get-BCMPCWorkloadEstimateUsageList", + "Add-BCMPCResourceTag", + "Remove-BCMPCResourceTag", + "Update-BCMPCBillEstimate", + "Update-BCMPCBillScenario", + "Update-BCMPCPreference", + "Update-BCMPCWorkloadEstimate") +} + +_awsArgumentCompleterRegistration $BCMPC_SelectCompleters $BCMPC_SelectMap # Argument completions for service Amazon Bedrock @@ -7129,6 +7245,7 @@ $BAR_SelectMap = @{ "Get-BARAgentMemory", "Invoke-BARAgent", "Invoke-BARFlow", + "Invoke-BARInlineAgent", "Get-BAROptimizePrompt", "Invoke-BARRetrieve", "Invoke-BARRetrieveAndGenerate") @@ -8223,10 +8340,13 @@ $CHAT_SelectCompleters = { } $CHAT_SelectMap = @{ - "Select"=@("New-CHATChimeWebhookConfiguration", + "Select"=@("Register-CHATAssociation", + "New-CHATChimeWebhookConfiguration", + "New-CHATCustomAction", "New-CHATMicrosoftTeamsChannelConfiguration", "New-CHATSlackChannelConfiguration", "Remove-CHATChimeWebhookConfiguration", + "Remove-CHATCustomAction", "Remove-CHATMicrosoftTeamsChannelConfiguration", "Remove-CHATMicrosoftTeamsConfiguredTeam", "Remove-CHATMicrosoftTeamsUserIdentity", @@ -8237,8 +8357,12 @@ $CHAT_SelectMap = @{ "Get-CHATSlackChannelConfiguration", "Get-CHATSlackUserIdentity", "Get-CHATSlackWorkspace", + "Unregister-CHATAssociation", "Get-CHATAccountPreference", + "Get-CHATCustomAction", "Get-CHATMicrosoftTeamsChannelConfiguration", + "Get-CHATAssociationList", + "Get-CHATCustomActionList", "Get-CHATMicrosoftTeamsChannelConfigurationList", "Get-CHATMicrosoftTeamsConfiguredTeamList", "Get-CHATMicrosoftTeamsUserIdentityList", @@ -8247,6 +8371,7 @@ $CHAT_SelectMap = @{ "Remove-CHATResourceTag", "Update-CHATAccountPreference", "Update-CHATChimeWebhookConfiguration", + "Update-CHATCustomAction", "Update-CHATMicrosoftTeamsChannelConfiguration", "Update-CHATSlackChannelConfiguration") } @@ -15167,7 +15292,7 @@ $CGIP_Completers = { ($_ -eq "Start-CGIPAuthAdmin/AuthFlow") } { - $v = "ADMIN_NO_SRP_AUTH","ADMIN_USER_PASSWORD_AUTH","CUSTOM_AUTH","REFRESH_TOKEN","REFRESH_TOKEN_AUTH","USER_PASSWORD_AUTH","USER_SRP_AUTH" + $v = "ADMIN_NO_SRP_AUTH","ADMIN_USER_PASSWORD_AUTH","CUSTOM_AUTH","REFRESH_TOKEN","REFRESH_TOKEN_AUTH","USER_AUTH","USER_PASSWORD_AUTH","USER_SRP_AUTH" break } @@ -15177,7 +15302,7 @@ $CGIP_Completers = { ($_ -eq "Send-CGIPAuthChallengeResponseAdmin/ChallengeName") } { - $v = "ADMIN_NO_SRP_AUTH","CUSTOM_CHALLENGE","DEVICE_PASSWORD_VERIFIER","DEVICE_SRP_AUTH","EMAIL_OTP","MFA_SETUP","NEW_PASSWORD_REQUIRED","PASSWORD_VERIFIER","SELECT_MFA_TYPE","SMS_MFA","SOFTWARE_TOKEN_MFA" + $v = "ADMIN_NO_SRP_AUTH","CUSTOM_CHALLENGE","DEVICE_PASSWORD_VERIFIER","DEVICE_SRP_AUTH","EMAIL_OTP","MFA_SETUP","NEW_PASSWORD_REQUIRED","PASSWORD","PASSWORD_SRP","PASSWORD_VERIFIER","SELECT_CHALLENGE","SELECT_MFA_TYPE","SMS_MFA","SMS_OTP","SOFTWARE_TOKEN_MFA","WEB_AUTHN" break } @@ -15317,6 +15442,23 @@ $CGIP_Completers = { break } + # Amazon.CognitoIdentityProvider.UserPoolTierType + { + ($_ -eq "New-CGIPUserPool/UserPoolTier") -Or + ($_ -eq "Update-CGIPUserPool/UserPoolTier") + } + { + $v = "ESSENTIALS","LITE","PLUS" + break + } + + # Amazon.CognitoIdentityProvider.UserVerificationType + "Set-CGIPUserPoolMfaConfig/WebAuthnConfiguration_UserVerification" + { + $v = "preferred","required" + break + } + } @@ -15348,7 +15490,9 @@ $CGIP_map = @{ "TokenValidityUnits_IdToken"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient") "TokenValidityUnits_RefreshToken"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient") "UserPoolAddOns_AdvancedSecurityMode"=@("New-CGIPUserPool","Update-CGIPUserPool") + "UserPoolTier"=@("New-CGIPUserPool","Update-CGIPUserPool") "VerificationMessageTemplate_DefaultEmailOption"=@("New-CGIPUserPool","Update-CGIPUserPool") + "WebAuthnConfiguration_UserVerification"=@("Set-CGIPUserPoolMfaConfig") } _awsArgumentCompleterRegistration $CGIP_Completers $CGIP_map @@ -15430,11 +15574,13 @@ $CGIP_SelectMap = @{ "Disconnect-CGIPUserGlobalAdmin", "Add-CGIPSoftwareToken", "Update-CGIPPassword", + "Complete-CGIPWebAuthnRegistration", "Approve-CGIPDevice", "Confirm-CGIPForgotPassword", "Confirm-CGIPUserRegistration", "New-CGIPGroup", "New-CGIPIdentityProvider", + "New-CGIPManagedLoginBranding", "New-CGIPResourceServer", "New-CGIPUserImportJob", "New-CGIPUserPool", @@ -15442,13 +15588,17 @@ $CGIP_SelectMap = @{ "New-CGIPUserPoolDomain", "Remove-CGIPGroup", "Remove-CGIPIdentityProvider", + "Remove-CGIPManagedLoginBranding", "Remove-CGIPResourceServer", "Remove-CGIPUser", "Remove-CGIPUserAttribute", "Remove-CGIPUserPool", "Remove-CGIPUserPoolClient", "Remove-CGIPUserPoolDomain", + "Remove-CGIPWebAuthnCredential", "Get-CGIPIdentityProvider", + "Get-CGIPManagedLoginBranding", + "Get-CGIPManagedLoginBrandingByClient", "Get-CGIPResourceServer", "Get-CGIPRiskConfiguration", "Get-CGIPUserImportJob", @@ -15466,6 +15616,7 @@ $CGIP_SelectMap = @{ "Get-CGIPUICustomization", "Get-CGIPUser", "Get-CGIPUserAttributeVerificationCode", + "Get-CGIPUserAuthFactor", "Get-CGIPUserPoolMfaConfig", "Disconnect-CGIPDeviceGlobal", "Start-CGIPAuth", @@ -15479,6 +15630,7 @@ $CGIP_SelectMap = @{ "Get-CGIPUserPoolList", "Get-CGIPUserList", "Get-CGIPUsersInGroup", + "Get-CGIPWebAuthnCredentialList", "Send-CGIPConfirmationCode", "Send-CGIPAuthChallengeResponse", "Revoke-CGIPToken", @@ -15490,6 +15642,7 @@ $CGIP_SelectMap = @{ "Set-CGIPUserSetting", "Register-CGIPUserInPool", "Start-CGIPUserImportJob", + "Start-CGIPWebAuthnRegistration", "Stop-CGIPUserImportJob", "Add-CGIPResourceTag", "Remove-CGIPResourceTag", @@ -15497,6 +15650,7 @@ $CGIP_SelectMap = @{ "Edit-CGIPDeviceStatus", "Update-CGIPGroup", "Update-CGIPIdentityProvider", + "Update-CGIPManagedLoginBranding", "Update-CGIPResourceServer", "Update-CGIPUserAttribute", "Update-CGIPUserPool", @@ -16666,6 +16820,13 @@ $CONN_Completers = { break } + # Amazon.Connect.Channel + "New-CONNContact/Channel" + { + $v = "CHAT","EMAIL","TASK","VOICE" + break + } + # Amazon.Connect.ChatEventType "Send-CONNChatIntegrationEvent/Event_Type" { @@ -16713,6 +16874,13 @@ $CONN_Completers = { break } + # Amazon.Connect.ContactInitiationMethod + "New-CONNContact/InitiationMethod" + { + $v = "AGENT_REPLY","API","CALLBACK","DISCONNECT","EXTERNAL_OUTBOUND","FLOW","INBOUND","MONITOR","OUTBOUND","QUEUE_TRANSFER","TRANSFER","WEBRTC_API" + break + } + # Amazon.Connect.DirectoryType "New-CONNInstance/IdentityManagementType" { @@ -16738,7 +16906,7 @@ $CONN_Completers = { ($_ -eq "Start-CONNOutboundChatContact/SourceEndpoint_Type") } { - $v = "CONNECT_PHONENUMBER_ARN","CONTACT_FLOW","TELEPHONE_NUMBER","VOIP" + $v = "CONNECT_PHONENUMBER_ARN","CONTACT_FLOW","EMAIL_ADDRESS","TELEPHONE_NUMBER","VOIP" break } @@ -16775,7 +16943,7 @@ $CONN_Completers = { # Amazon.Connect.FileUseCaseType "Start-CONNAttachedFileUpload/FileUseCaseType" { - $v = "ATTACHMENT" + $v = "ATTACHMENT","EMAIL_MESSAGE" break } @@ -16786,7 +16954,7 @@ $CONN_Completers = { ($_ -eq "Remove-CONNFlow/ResourceType") } { - $v = "SMS_PHONE_NUMBER" + $v = "INBOUND_EMAIL","OUTBOUND_EMAIL","SMS_PHONE_NUMBER" break } @@ -16801,6 +16969,20 @@ $CONN_Completers = { break } + # Amazon.Connect.InboundMessageSourceType + "Start-CONNEmailContact/EmailMessage_MessageSourceType" + { + $v = "RAW" + break + } + + # Amazon.Connect.InitiateAs + "New-CONNContact/InitiateAs" + { + $v = "CONNECTED_TO_USER" + break + } + # Amazon.Connect.InstanceAttributeType { ($_ -eq "Get-CONNInstanceAttribute/AttributeType") -Or @@ -16820,7 +17002,7 @@ $CONN_Completers = { ($_ -eq "Update-CONNInstanceStorageConfig/ResourceType") } { - $v = "AGENT_EVENTS","ATTACHMENTS","CALL_RECORDINGS","CHAT_TRANSCRIPTS","CONTACT_EVALUATIONS","CONTACT_TRACE_RECORDS","MEDIA_STREAMS","REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS","SCHEDULED_REPORTS","SCREEN_RECORDINGS" + $v = "AGENT_EVENTS","ATTACHMENTS","CALL_RECORDINGS","CHAT_TRANSCRIPTS","CONTACT_EVALUATIONS","CONTACT_TRACE_RECORDS","EMAIL_MESSAGES","MEDIA_STREAMS","REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS","SCHEDULED_REPORTS","SCREEN_RECORDINGS" break } @@ -16830,7 +17012,7 @@ $CONN_Completers = { ($_ -eq "New-CONNIntegrationAssociation/IntegrationType") } { - $v = "APPLICATION","CASES_DOMAIN","EVENT","FILE_SCANNER","PINPOINT_APP","Q_MESSAGE_TEMPLATES","VOICE_ID","WISDOM_ASSISTANT","WISDOM_KNOWLEDGE_BASE","WISDOM_QUICK_RESPONSES" + $v = "APPLICATION","CASES_DOMAIN","EVENT","FILE_SCANNER","PINPOINT_APP","Q_MESSAGE_TEMPLATES","SES_IDENTITY","VOICE_ID","WISDOM_ASSISTANT","WISDOM_KNOWLEDGE_BASE","WISDOM_QUICK_RESPONSES" break } @@ -16854,7 +17036,17 @@ $CONN_Completers = { ($_ -eq "Get-CONNFlowAssociationList/ResourceType") } { - $v = "VOICE_PHONE_NUMBER" + $v = "INBOUND_EMAIL","OUTBOUND_EMAIL","VOICE_PHONE_NUMBER" + break + } + + # Amazon.Connect.OutboundMessageSourceType + { + ($_ -eq "Send-CONNOutboundEmail/EmailMessage_MessageSourceType") -Or + ($_ -eq "Start-CONNOutboundEmailContact/EmailMessage_MessageSourceType") + } + { + $v = "RAW","TEMPLATE" break } @@ -16944,6 +17136,7 @@ $CONN_Completers = { # Amazon.Connect.SearchContactsMatchType { ($_ -eq "Search-CONNContact/SearchableContactAttributes_MatchType") -Or + ($_ -eq "Search-CONNContact/SearchableSegmentAttributes_MatchType") -Or ($_ -eq "Search-CONNContact/Transcript_MatchType") } { @@ -16994,6 +17187,7 @@ $CONN_Completers = { ($_ -eq "Search-CONNAgentStatus/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNContactFlow/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNContactFlowModule/StringCondition_ComparisonType") -Or + ($_ -eq "Search-CONNEmailAddress/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNHoursOfOperation/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNPredefinedAttribute/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNPrompt/StringCondition_ComparisonType") -Or @@ -17030,7 +17224,10 @@ $CONN_Completers = { } # Amazon.Connect.TrafficType - "Start-CONNOutboundVoiceContact/TrafficType" + { + ($_ -eq "Send-CONNOutboundEmail/TrafficType") -Or + ($_ -eq "Start-CONNOutboundVoiceContact/TrafficType") + } { $v = "CAMPAIGN","GENERAL" break @@ -17109,16 +17306,20 @@ $CONN_map = @{ "Agent_Video"=@("Start-CONNWebRTCContact") "AgentAvailabilityTimer"=@("New-CONNRoutingProfile","Update-CONNRoutingProfileAgentAvailabilityTimer") "AttributeType"=@("Get-CONNInstanceAttribute","Update-CONNInstanceAttribute") + "Channel"=@("New-CONNContact") "ContactFlowModuleState"=@("Get-CONNContactFlowModuleList") "ContactFlowState"=@("Update-CONNContactFlowMetadata") "Customer_ScreenShare"=@("Start-CONNWebRTCContact") "Customer_Video"=@("Start-CONNWebRTCContact") "DestinationEndpoint_Type"=@("Start-CONNOutboundChatContact") + "EmailMessage_MessageSourceType"=@("Send-CONNOutboundEmail","Start-CONNEmailContact","Start-CONNOutboundEmailContact") "Event_Type"=@("Send-CONNChatIntegrationEvent") "EventSourceName"=@("Get-CONNRuleList") "FileUseCaseType"=@("Start-CONNAttachedFileUpload") "HierarchyGroupCondition_HierarchyGroupMatchType"=@("Search-CONNUser") "IdentityManagementType"=@("New-CONNInstance") + "InitiateAs"=@("New-CONNContact") + "InitiationMethod"=@("New-CONNContact") "IntegrationType"=@("Get-CONNIntegrationAssociationList","New-CONNIntegrationAssociation") "Interval_IntervalPeriod"=@("Get-CONNMetricDataV2") "LanguageCode"=@("Add-CONNDefaultVocabulary","Get-CONNDefaultVocabularyList","New-CONNVocabulary","Search-CONNVocabulary") @@ -17136,6 +17337,7 @@ $CONN_map = @{ "ScoringStrategy_Mode"=@("New-CONNEvaluationForm","Update-CONNEvaluationForm") "ScoringStrategy_Status"=@("New-CONNEvaluationForm","Update-CONNEvaluationForm") "SearchableContactAttributes_MatchType"=@("Search-CONNContact") + "SearchableSegmentAttributes_MatchType"=@("Search-CONNContact") "SearchCriteria_QueueTypeCondition"=@("Search-CONNQueue") "SearchCriteria_StateCondition"=@("Search-CONNContactFlow") "SearchCriteria_StatusCondition"=@("Search-CONNContactFlow") @@ -17151,11 +17353,11 @@ $CONN_map = @{ "StorageConfig_StorageType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig") "StorageConfigKinesisVideoStreamConfigEncryptionConfigEncryptionType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig") "StorageConfigS3ConfigEncryptionConfigEncryptionType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig") - "StringCondition_ComparisonType"=@("Search-CONNAgentStatus","Search-CONNContactFlow","Search-CONNContactFlowModule","Search-CONNHoursOfOperation","Search-CONNPredefinedAttribute","Search-CONNPrompt","Search-CONNQueue","Search-CONNQuickConnect","Search-CONNRoutingProfile","Search-CONNSecurityProfile","Search-CONNUser","Search-CONNUserHierarchyGroup") + "StringCondition_ComparisonType"=@("Search-CONNAgentStatus","Search-CONNContactFlow","Search-CONNContactFlowModule","Search-CONNEmailAddress","Search-CONNHoursOfOperation","Search-CONNPredefinedAttribute","Search-CONNPrompt","Search-CONNQueue","Search-CONNQuickConnect","Search-CONNRoutingProfile","Search-CONNSecurityProfile","Search-CONNUser","Search-CONNUserHierarchyGroup") "TagSearchCondition_TagKeyComparisonType"=@("Search-CONNResourceTag") "TagSearchCondition_TagValueComparisonType"=@("Search-CONNResourceTag") "TimeRange_Type"=@("Search-CONNContact") - "TrafficType"=@("Start-CONNOutboundVoiceContact") + "TrafficType"=@("Send-CONNOutboundEmail","Start-CONNOutboundVoiceContact") "Transcript_MatchType"=@("Search-CONNContact") "TriggerEventSource_EventSourceName"=@("New-CONNRule") "Type"=@("Get-CONNViewList","New-CONNContactFlow") @@ -17236,9 +17438,11 @@ $CONN_SelectMap = @{ "Request-CONNPhoneNumber", "Complete-CONNAttachedFileUpload", "New-CONNAgentStatus", + "New-CONNContact", "New-CONNContactFlow", "New-CONNContactFlowModule", "New-CONNContactFlowVersion", + "New-CONNEmailAddress", "New-CONNEvaluationForm", "New-CONNHoursOfOperation", "New-CONNInstance", @@ -17265,6 +17469,7 @@ $CONN_SelectMap = @{ "Remove-CONNContactEvaluation", "Remove-CONNContactFlow", "Remove-CONNContactFlowModule", + "Remove-CONNEmailAddress", "Remove-CONNEvaluationForm", "Remove-CONNHoursOfOperation", "Remove-CONNInstance", @@ -17290,6 +17495,7 @@ $CONN_SelectMap = @{ "Get-CONNContactEvaluation", "Get-CONNContactFlow", "Get-CONNContactFlowModule", + "Get-CONNEmailAddress", "Get-CONNEvaluationForm", "Get-CONNHoursOfOperation", "Get-CONNInstance", @@ -17338,6 +17544,7 @@ $CONN_SelectMap = @{ "Get-CONNAgentStatusList", "Get-CONNAnalyticsDataAssociationList", "Get-CONNApprovedOriginList", + "Get-CONNAssociatedContactList", "Get-CONNAuthenticationProfileList", "Get-CONNBotList", "Get-CONNContactEvaluationList", @@ -17393,6 +17600,7 @@ $CONN_SelectMap = @{ "Search-CONNContactFlowModule", "Search-CONNContactFlow", "Search-CONNContact", + "Search-CONNEmailAddress", "Search-CONNHoursOfOperation", "Search-CONNPredefinedAttribute", "Search-CONNPrompt", @@ -17405,12 +17613,15 @@ $CONN_SelectMap = @{ "Search-CONNUser", "Search-CONNVocabulary", "Send-CONNChatIntegrationEvent", + "Send-CONNOutboundEmail", "Start-CONNAttachedFileUpload", "Start-CONNChatContact", "Start-CONNContactEvaluation", "Start-CONNContactRecording", "Start-CONNContactStreaming", + "Start-CONNEmailContact", "Start-CONNOutboundChatContact", + "Start-CONNOutboundEmailContact", "Start-CONNOutboundVoiceContact", "Start-CONNScreenSharing", "Start-CONNTaskContact", @@ -17437,6 +17648,7 @@ $CONN_SelectMap = @{ "Update-CONNContactFlowName", "Update-CONNContactRoutingData", "Update-CONNContactSchedule", + "Update-CONNEmailAddressMetadata", "Update-CONNEvaluationForm", "Update-CONNHoursOfOperation", "Update-CONNInstanceAttribute", @@ -17450,6 +17662,7 @@ $CONN_SelectMap = @{ "Update-CONNQueueMaxContact", "Update-CONNQueueName", "Update-CONNQueueOutboundCallerConfig", + "Update-CONNQueueOutboundEmailConfig", "Update-CONNQueueStatus", "Update-CONNQuickConnectConfig", "Update-CONNQuickConnectName", @@ -27517,6 +27730,16 @@ $ELB2_Completers = { switch ($("$commandName/$parameterName")) { + # Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum + { + ($_ -eq "Edit-ELB2Listener/MutualAuthentication_AdvertiseTrustStoreCaName") -Or + ($_ -eq "New-ELB2Listener/MutualAuthentication_AdvertiseTrustStoreCaName") + } + { + $v = "off","on" + break + } + # Amazon.ElasticLoadBalancingV2.EnablePrefixForIpv6SourceNatEnum { ($_ -eq "New-ELB2LoadBalancer/EnablePrefixForIpv6SourceNat") -Or @@ -27613,6 +27836,7 @@ $ELB2_map = @{ "HealthCheckProtocol"=@("Edit-ELB2TargetGroup","New-ELB2TargetGroup") "IpAddressType"=@("New-ELB2LoadBalancer","New-ELB2TargetGroup","Set-ELB2IpAddressType","Set-ELB2Subnet") "LoadBalancerType"=@("Get-ELB2SSLPolicy") + "MutualAuthentication_AdvertiseTrustStoreCaName"=@("Edit-ELB2Listener","New-ELB2Listener") "MutualAuthentication_TrustStoreAssociationStatus"=@("Edit-ELB2Listener","New-ELB2Listener") "Protocol"=@("Edit-ELB2Listener","New-ELB2Listener","New-ELB2TargetGroup") "Scheme"=@("New-ELB2LoadBalancer") @@ -27846,6 +28070,16 @@ $EMR_Completers = { break } + # Amazon.ElasticMapReduce.ScalingStrategy + { + ($_ -eq "Start-EMRJobFlow/ManagedScalingPolicy_ScalingStrategy") -Or + ($_ -eq "Write-EMRManagedScalingPolicy/ManagedScalingPolicy_ScalingStrategy") + } + { + $v = "ADVANCED","DEFAULT" + break + } + # Amazon.ElasticMapReduce.SpotProvisioningAllocationStrategy { ($_ -eq "Add-EMRInstanceFleet/SpotResizeSpecification_AllocationStrategy") -Or @@ -27891,6 +28125,7 @@ $EMR_map = @{ "InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_CapacityReservationPreference"=@("Add-EMRInstanceFleet") "InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_UsageStrategy"=@("Add-EMRInstanceFleet") "InstanceFleetType"=@("Get-EMRInstanceList") + "ManagedScalingPolicy_ScalingStrategy"=@("Start-EMRJobFlow","Write-EMRManagedScalingPolicy") "OnDemandResizeSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet","Edit-EMRInstanceFleet") "OnDemandSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet") "OutputNotebookFormat"=@("Start-EMRNotebookExecution") @@ -50109,13 +50344,20 @@ $NEPTG_Completers = { break } + # Amazon.NeptuneGraph.ExportFormat + "Start-NEPTGExportTask/Format" + { + $v = "CSV","PARQUET" + break + } + # Amazon.NeptuneGraph.Format { ($_ -eq "New-NEPTGGraphUsingImportTask/Format") -Or ($_ -eq "Start-NEPTGImportTask/Format") } { - $v = "CSV","NTRIPLES","OPEN_CYPHER" + $v = "CSV","NTRIPLES","OPEN_CYPHER","PARQUET" break } @@ -50126,6 +50368,17 @@ $NEPTG_Completers = { break } + # Amazon.NeptuneGraph.ParquetType + { + ($_ -eq "New-NEPTGGraphUsingImportTask/ParquetType") -Or + ($_ -eq "Start-NEPTGExportTask/ParquetType") -Or + ($_ -eq "Start-NEPTGImportTask/ParquetType") + } + { + $v = "COLUMNAR" + break + } + # Amazon.NeptuneGraph.PlanCacheType "Invoke-NEPTGQuery/PlanCache" { @@ -50158,9 +50411,10 @@ $NEPTG_Completers = { $NEPTG_map = @{ "BlankNodeHandling"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGImportTask") "ExplainMode"=@("Invoke-NEPTGQuery") - "Format"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGImportTask") + "Format"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGExportTask","Start-NEPTGImportTask") "Language"=@("Invoke-NEPTGQuery") "Mode"=@("Get-NEPTGGraphSummary") + "ParquetType"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGExportTask","Start-NEPTGImportTask") "PlanCache"=@("Invoke-NEPTGQuery") "State"=@("Get-NEPTGQueryList") } @@ -50215,7 +50469,8 @@ $NEPTG_SelectCompleters = { } $NEPTG_SelectMap = @{ - "Select"=@("Stop-NEPTGImportTask", + "Select"=@("Stop-NEPTGExportTask", + "Stop-NEPTGImportTask", "Stop-NEPTGQuery", "New-NEPTGGraph", "New-NEPTGGraphSnapshot", @@ -50225,12 +50480,14 @@ $NEPTG_SelectMap = @{ "Remove-NEPTGGraphSnapshot", "Remove-NEPTGPrivateGraphEndpoint", "Invoke-NEPTGQuery", + "Get-NEPTGExportTask", "Get-NEPTGGraph", "Get-NEPTGGraphSnapshot", "Get-NEPTGGraphSummary", "Get-NEPTGImportTask", "Get-NEPTGPrivateGraphEndpoint", "Get-NEPTGQuery", + "Get-NEPTGExportTaskList", "Get-NEPTGGraphList", "Get-NEPTGGraphSnapshotList", "Get-NEPTGImportTaskList", @@ -50239,6 +50496,7 @@ $NEPTG_SelectMap = @{ "Get-NEPTGResourceTag", "Reset-NEPTGGraph", "Restore-NEPTGGraphFromSnapshot", + "Start-NEPTGExportTask", "Start-NEPTGImportTask", "Add-NEPTGResourceTag", "Remove-NEPTGResourceTag", @@ -51167,6 +51425,13 @@ $OMICS_Completers = { break } + # Amazon.Omics.SequenceStoreStatus + "Get-OMICSSequenceStoreList/Filter_Status" + { + $v = "ACTIVE","CREATING","DELETING","FAILED","UPDATING" + break + } + # Amazon.Omics.StorageType "Start-OMICSRun/StorageType" { @@ -51238,7 +51503,7 @@ $OMICS_map = @{ "ETagAlgorithmFamily"=@("New-OMICSSequenceStore") "File"=@("Get-OMICSReadSet","Get-OMICSReference") "Filter_CreationType"=@("Get-OMICSReadSetList") - "Filter_Status"=@("Get-OMICSAnnotationImportJobList","Get-OMICSAnnotationStoreList","Get-OMICSAnnotationStoreVersionList","Get-OMICSReadSetActivationJobList","Get-OMICSReadSetExportJobList","Get-OMICSReadSetImportJobList","Get-OMICSReadSetList","Get-OMICSReferenceImportJobList","Get-OMICSVariantImportJobList","Get-OMICSVariantStoreList") + "Filter_Status"=@("Get-OMICSAnnotationImportJobList","Get-OMICSAnnotationStoreList","Get-OMICSAnnotationStoreVersionList","Get-OMICSReadSetActivationJobList","Get-OMICSReadSetExportJobList","Get-OMICSReadSetImportJobList","Get-OMICSReadSetList","Get-OMICSReferenceImportJobList","Get-OMICSSequenceStoreList","Get-OMICSVariantImportJobList","Get-OMICSVariantStoreList") "LogLevel"=@("Start-OMICSRun") "PartSource"=@("Get-OMICSReadSetUploadPartList","Set-OMICSReadSetPart") "ResourceOwner"=@("Get-OMICSShareList") @@ -51328,6 +51593,7 @@ $OMICS_SelectMap = @{ "Remove-OMICSRun", "Remove-OMICSRunCache", "Remove-OMICSRunGroup", + "Remove-OMICSS3AccessPolicy", "Remove-OMICSSequenceStore", "Remove-OMICSShare", "Remove-OMICSVariantStore", @@ -51348,6 +51614,7 @@ $OMICS_SelectMap = @{ "Get-OMICSRunCache", "Get-OMICSRunGroup", "Get-OMICSRunTask", + "Get-OMICSS3AccessPolicy", "Get-OMICSSequenceStore", "Get-OMICSShare", "Get-OMICSVariantImportJob", @@ -51375,6 +51642,7 @@ $OMICS_SelectMap = @{ "Get-OMICSVariantImportJobList", "Get-OMICSVariantStoreList", "Get-OMICSWorkflowList", + "Write-OMICSS3AccessPolicy", "Start-OMICSAnnotationImportJob", "Start-OMICSReadSetActivationJob", "Start-OMICSReadSetExportJob", @@ -51388,6 +51656,7 @@ $OMICS_SelectMap = @{ "Update-OMICSAnnotationStoreVersion", "Update-OMICSRunCache", "Update-OMICSRunGroup", + "Update-OMICSSequenceStore", "Update-OMICSVariantStore", "Update-OMICSWorkflow", "Set-OMICSReadSetPart") @@ -57564,6 +57833,13 @@ $QS_Completers = { break } + # Amazon.QuickSight.DashboardsQAStatus + "Update-QSDashboardsQAConfiguration/DashboardsQAStatus" + { + $v = "DISABLED","ENABLED" + break + } + # Amazon.QuickSight.DashboardUIState { ($_ -eq "New-QSDashboard/SheetControlsOption_VisibilityState") -Or @@ -57930,6 +58206,7 @@ $QS_map = @{ "Capabilities_ShareDataSource"=@("New-QSCustomPermission","Update-QSCustomPermission") "Capabilities_SubscribeDashboardEmailReport"=@("New-QSCustomPermission","Update-QSCustomPermission") "Capabilities_ViewAccountSPICECapacity"=@("New-QSCustomPermission","Update-QSCustomPermission") + "DashboardsQAStatus"=@("Update-QSDashboardsQAConfiguration") "DataPointDrillUpDownOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard") "DataPointMenuLabelOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard") "DataPointTooltipOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard") @@ -58103,6 +58380,7 @@ $QS_SelectMap = @{ "Get-QSDashboardPermission", "Get-QSDashboardSnapshotJob", "Get-QSDashboardSnapshotJobResult", + "Get-QSDashboardsQAConfiguration", "Get-QSDataSet", "Get-QSDataSetPermission", "Get-QSDataSetRefreshProperty", @@ -58181,6 +58459,7 @@ $QS_SelectMap = @{ "Search-QSDataSource", "Search-QSFolder", "Find-QSGroup", + "Search-QSTopic", "Start-QSAssetBundleExportJob", "Start-QSAssetBundleImportJob", "Start-QSDashboardSnapshotJob", @@ -58199,6 +58478,7 @@ $QS_SelectMap = @{ "Update-QSDashboardLink", "Update-QSDashboardPermission", "Update-QSDashboardPublishedVersion", + "Update-QSDashboardsQAConfiguration", "Update-QSDataSet", "Update-QSDataSetPermission", "Update-QSDataSource", diff --git a/modules/AWSPowerShell/Cmdlets/AutoScaling/Basic/Write-ASScalingPolicy-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/AutoScaling/Basic/Write-ASScalingPolicy-Cmdlet.cs index eb517149d..a20d8dc1c 100644 --- a/modules/AWSPowerShell/Cmdlets/AutoScaling/Basic/Write-ASScalingPolicy-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/AutoScaling/Basic/Write-ASScalingPolicy-Cmdlet.cs @@ -291,6 +291,20 @@ public partial class WriteASScalingPolicyCmdlet : AmazonAutoScalingClientCmdlet, public System.String CustomizedMetricSpecification_Namespace { get; set; } #endregion + #region Parameter CustomizedMetricSpecification_Period + /// + /// + /// The period of the metric in seconds. The default value is 60. Accepted values are + /// 10, 30, and 60. For high resolution metric, set the value to less than 60. For more + /// information, see Create + /// a target tracking policy using high-resolution metrics for faster response. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("TargetTrackingConfiguration_CustomizedMetricSpecification_Period")] + public System.Int32? CustomizedMetricSpecification_Period { get; set; } + #endregion + #region Parameter PolicyName /// /// @@ -541,6 +555,7 @@ protected override void ProcessRecord() context.CustomizedMetricSpecification_Metric = new List(this.CustomizedMetricSpecification_Metric); } context.CustomizedMetricSpecification_Namespace = this.CustomizedMetricSpecification_Namespace; + context.CustomizedMetricSpecification_Period = this.CustomizedMetricSpecification_Period; context.CustomizedMetricSpecification_Statistic = this.CustomizedMetricSpecification_Statistic; context.CustomizedMetricSpecification_Unit = this.CustomizedMetricSpecification_Unit; context.TargetTrackingConfiguration_DisableScaleIn = this.TargetTrackingConfiguration_DisableScaleIn; @@ -774,6 +789,16 @@ public object Execute(ExecutorContext context) requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification.Namespace = requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification_customizedMetricSpecification_Namespace; requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecificationIsNull = false; } + System.Int32? requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification_customizedMetricSpecification_Period = null; + if (cmdletContext.CustomizedMetricSpecification_Period != null) + { + requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification_customizedMetricSpecification_Period = cmdletContext.CustomizedMetricSpecification_Period.Value; + } + if (requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification_customizedMetricSpecification_Period != null) + { + requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification.Period = requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification_customizedMetricSpecification_Period.Value; + requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecificationIsNull = false; + } Amazon.AutoScaling.MetricStatistic requestTargetTrackingConfiguration_targetTrackingConfiguration_CustomizedMetricSpecification_customizedMetricSpecification_Statistic = null; if (cmdletContext.CustomizedMetricSpecification_Statistic != null) { @@ -891,6 +916,7 @@ internal partial class CmdletContext : ExecutorContext public System.String CustomizedMetricSpecification_MetricName { get; set; } public List CustomizedMetricSpecification_Metric { get; set; } public System.String CustomizedMetricSpecification_Namespace { get; set; } + public System.Int32? CustomizedMetricSpecification_Period { get; set; } public Amazon.AutoScaling.MetricStatistic CustomizedMetricSpecification_Statistic { get; set; } public System.String CustomizedMetricSpecification_Unit { get; set; } public System.Boolean? TargetTrackingConfiguration_DisableScaleIn { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.Aliases.psm1 b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.Aliases.psm1 new file mode 100644 index 000000000..f4fe3273d --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.Aliases.psm1 @@ -0,0 +1,3 @@ +# BCMPricingCalculator + +Export-ModuleMember -Alias * \ No newline at end of file diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.Completers.psm1 new file mode 100644 index 000000000..1da8cd6e6 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.Completers.psm1 @@ -0,0 +1,191 @@ +# Auto-generated argument completers for parameters of SDK ConstantClass-derived type used in cmdlets. +# Do not modify this file; it may be overwritten during version upgrades. + +$psMajorVersion = $PSVersionTable.PSVersion.Major +if ($psMajorVersion -eq 2) +{ + Write-Verbose "Dynamic argument completion not supported in PowerShell version 2; skipping load." + return +} + +# PowerShell's native Register-ArgumentCompleter cmdlet is available on v5.0 or higher. For lower +# version, we can use the version in the TabExpansion++ module if installed. +$registrationCmdletAvailable = ($psMajorVersion -ge 5) -Or !((Get-Command Register-ArgumentCompleter -ea Ignore) -eq $null) + +# internal function to perform the registration using either cmdlet or manipulation +# of the options table +function _awsArgumentCompleterRegistration() +{ + param + ( + [scriptblock]$scriptBlock, + [hashtable]$param2CmdletsMap + ) + + if ($registrationCmdletAvailable) + { + foreach ($paramName in $param2CmdletsMap.Keys) + { + $args = @{ + "ScriptBlock" = $scriptBlock + "Parameter" = $paramName + } + + $cmdletNames = $param2CmdletsMap[$paramName] + if ($cmdletNames -And $cmdletNames.Length -gt 0) + { + $args["Command"] = $cmdletNames + } + + Register-ArgumentCompleter @args + } + } + else + { + if (-not $global:options) { $global:options = @{ CustomArgumentCompleters = @{ }; NativeArgumentCompleters = @{ } } } + + foreach ($paramName in $param2CmdletsMap.Keys) + { + $cmdletNames = $param2CmdletsMap[$paramName] + + if ($cmdletNames -And $cmdletNames.Length -gt 0) + { + foreach ($cn in $cmdletNames) + { + $fqn = [string]::Concat($cn, ":", $paramName) + $global:options['CustomArgumentCompleters'][$fqn] = $scriptBlock + } + } + else + { + $global:options['CustomArgumentCompleters'][$paramName] = $scriptBlock + } + } + + $function:tabexpansion2 = $function:tabexpansion2 -replace 'End\r\n{', 'End { if ($null -ne $options) { $options += $global:options} else {$options = $global:options}' + } +} + +# To allow for same-name parameters of different ConstantClass-derived types +# each completer function checks on command name concatenated with parameter name. +# Additionally, the standard code pattern for completers is to pipe through +# sort-object after filtering against $wordToComplete but we omit this as our members +# are already sorted. + +# Argument completions for service AWS Pricing Calculator + + +$BCMPC_Completers = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) + + switch ($("$commandName/$parameterName")) + { + # Amazon.BCMPricingCalculator.WorkloadEstimateRateType + "New-BCMPCWorkloadEstimate/RateType" + { + $v = "AFTER_DISCOUNTS","BEFORE_DISCOUNTS" + break + } + + + } + + $v | + Where-Object { $_ -like "$wordToComplete*" } | + ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ } +} + +$BCMPC_map = @{ + "RateType"=@("New-BCMPCWorkloadEstimate") +} + +_awsArgumentCompleterRegistration $BCMPC_Completers $BCMPC_map + +$BCMPC_SelectCompleters = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) + + $cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.BCMPC.$($commandName.Replace('-', ''))Cmdlet]" + if (-not $cmdletType) { + return + } + $awsCmdletAttribute = $cmdletType.GetCustomAttributes([Amazon.PowerShell.Common.AWSCmdletAttribute], $false) + if (-not $awsCmdletAttribute) { + return + } + $type = $awsCmdletAttribute.SelectReturnType + if (-not $type) { + return + } + + $splitSelect = $wordToComplete -Split '\.' + $splitSelect | Select-Object -First ($splitSelect.Length - 1) | ForEach-Object { + $propertyName = $_ + $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')) | Where-Object { $_.Name -ieq $propertyName } + if ($properties.Length -ne 1) { + break + } + $type = $properties.PropertyType + $prefix += "$($properties.Name)." + + $asEnumerableType = $type.GetInterface('System.Collections.Generic.IEnumerable`1') + if ($asEnumerableType -and $type -ne [System.String]) { + $type = $asEnumerableType.GetGenericArguments()[0] + } + } + + $v = @( '*' ) + $properties = $type.GetProperties(('Instance', 'Public', 'DeclaredOnly')).Name | Sort-Object + if ($properties) { + $v += ($properties | ForEach-Object { $prefix + $_ }) + } + $parameters = $cmdletType.GetProperties(('Instance', 'Public')) | Where-Object { $_.GetCustomAttributes([System.Management.Automation.ParameterAttribute], $true) } | Select-Object -ExpandProperty Name | Sort-Object + if ($parameters) { + $v += ($parameters | ForEach-Object { "^$_" }) + } + + $v | + Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } | + ForEach-Object { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ } +} + +$BCMPC_SelectMap = @{ + "Select"=@("New-BCMPCCreateBillScenarioCommitmentModification", + "New-BCMPCCreateBillScenarioUsageModification", + "New-BCMPCCreateWorkloadEstimateUsage", + "New-BCMPCDeleteBillScenarioCommitmentModification", + "New-BCMPCDeleteBillScenarioUsageModification", + "New-BCMPCDeleteWorkloadEstimateUsage", + "New-BCMPCUpdateBillScenarioCommitmentModification", + "New-BCMPCUpdateBillScenarioUsageModification", + "New-BCMPCUpdateWorkloadEstimateUsage", + "New-BCMPCBillEstimate", + "New-BCMPCBillScenario", + "New-BCMPCWorkloadEstimate", + "Remove-BCMPCBillEstimate", + "Remove-BCMPCBillScenario", + "Remove-BCMPCWorkloadEstimate", + "Get-BCMPCBillEstimate", + "Get-BCMPCBillScenario", + "Get-BCMPCPreference", + "Get-BCMPCWorkloadEstimate", + "Get-BCMPCBillEstimateCommitmentList", + "Get-BCMPCBillEstimateInputCommitmentModificationList", + "Get-BCMPCBillEstimateInputUsageModificationList", + "Get-BCMPCBillEstimateLineItemList", + "Get-BCMPCBillEstimateList", + "Get-BCMPCBillScenarioCommitmentModificationList", + "Get-BCMPCBillScenarioList", + "Get-BCMPCBillScenarioUsageModificationList", + "Get-BCMPCResourceTag", + "Get-BCMPCWorkloadEstimateList", + "Get-BCMPCWorkloadEstimateUsageList", + "Add-BCMPCResourceTag", + "Remove-BCMPCResourceTag", + "Update-BCMPCBillEstimate", + "Update-BCMPCBillScenario", + "Update-BCMPCPreference", + "Update-BCMPCWorkloadEstimate") +} + +_awsArgumentCompleterRegistration $BCMPC_SelectCompleters $BCMPC_SelectMap + diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.csproj b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.csproj new file mode 100644 index 000000000..4619011dc --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.csproj @@ -0,0 +1,66 @@ + + + + netstandard2.0 + Amazon.PowerShell.Cmdlets.BCMPricingCalculator + Properties + AnyCPU + ../../solutions/ + prompt + 4 + 1591,1574,1570,1587 + true + ../../aws-powershell.snk + bin/$(Configuration)/ + TRACE + NU1605,CS0108 + + + AWS.Tools.BCMPricingCalculator + $(OutputPath)/AWS.Tools.BCMPricingCalculator.XML + $(DefineConstants);NETSTANDARD;NETSTANDARD2_0;CORECLR;MODULAR + 0.0.0.0 + 0.0.0.0 + AWS Tools for PowerShell + Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Amazon.com, Inc + https://github.com/aws/aws-tools-for-powershell + + + true + full + false + false + $(DefineConstants);DEBUG + + + pdbonly + true + + + + + + + + + ../../../../Include/sdk/assemblies/netstandard2.0/AWSSDK.Core.dll + + + ../../../../Include/sdk/assemblies/netstandard2.0/AWSSDK.BCMPricingCalculator.dll + + + + + + + + + + \ No newline at end of file diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.psd1 b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.psd1 new file mode 100644 index 000000000..a69d7e030 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AWS.Tools.BCMPricingCalculator.psd1 @@ -0,0 +1,151 @@ +# +# Module manifest for module 'AWS.Tools.BCMPricingCalculator' +# + +@{ + # Script module or binary module file associated with this manifest + RootModule = 'AWS.Tools.BCMPricingCalculator.dll' + + # Supported PSEditions + CompatiblePSEditions = @('Core', 'Desktop') + + # Version number of this module. + ModuleVersion = '0.0.0.0' + + # ID used to uniquely identify this module + GUID = 'db74072d-53af-4fb4-82f9-935b02c3f5a7' + + # Author of this module + Author = 'Amazon.com, Inc' + + # Company or vendor of this module + CompanyName = 'Amazon.com, Inc' + + # Copyright statement for this module + Copyright = 'Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.' + + # Description of the functionality provided by this module + Description = 'The BCMPricingCalculator module of AWS Tools for PowerShell lets developers and administrators manage AWS Pricing Calculator from the PowerShell scripting environment. In order to manage each AWS service, install the corresponding module (e.g. AWS.Tools.EC2, AWS.Tools.S3...). +The module AWS.Tools.Installer (https://www.powershellgallery.com/packages/AWS.Tools.Installer/) makes it easier to install, update and uninstall the AWS.Tools modules. +This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5.1+ and PowerShell Core 6+ on Windows, Linux and macOS. When running on Windows PowerShell, .NET Framework 4.7.2 or newer is required. Alternative modules AWSPowerShell.NetCore and AWSPowerShell, provide support for all AWS services from a single module and also support older versions of Windows PowerShell and .NET Framework.' + + # Minimum version of the PowerShell engine required by this module + PowerShellVersion = '5.1' + + # Name of the PowerShell host required by this module + PowerShellHostName = '' + + # Minimum version of the PowerShell host required by this module + PowerShellHostVersion = '' + + # Minimum version of the .NET Framework required by this module + DotNetFrameworkVersion = '4.7.2' + + # Minimum version of the common language runtime (CLR) required by this module + CLRVersion = '' + + # Processor architecture (None, X86, Amd64, IA64) required by this module + ProcessorArchitecture = '' + + # Modules that must be imported into the global environment prior to importing this module + RequiredModules = @( + @{ + ModuleName = 'AWS.Tools.Common'; + RequiredVersion = '0.0.0.0'; + Guid = 'e5b05bf3-9eee-47b2-81f2-41ddc0501b86' } + ) + + # Assemblies that must be loaded prior to importing this module. + RequiredAssemblies = @( + 'AWSSDK.BCMPricingCalculator.dll' + ) + + # Script files (.ps1) that are run in the caller's environment prior to importing this module + ScriptsToProcess = @( + + ) + + # Type files (.ps1xml) to be loaded when importing this module + TypesToProcess = @( + + ) + + # Format files (.ps1xml) to be loaded when importing this module + FormatsToProcess = @( + 'AWS.Tools.BCMPricingCalculator.Format.ps1xml' + ) + + # Modules to import as nested modules of the module specified in ModuleToProcess + NestedModules = @( + 'AWS.Tools.BCMPricingCalculator.Completers.psm1', + 'AWS.Tools.BCMPricingCalculator.Aliases.psm1' + ) + + # Functions to export from this module + FunctionsToExport = '' + + # Cmdlets to export from this module + CmdletsToExport = @( + 'Add-BCMPCResourceTag', + 'Get-BCMPCBillEstimate', + 'Get-BCMPCBillEstimateCommitmentList', + 'Get-BCMPCBillEstimateInputCommitmentModificationList', + 'Get-BCMPCBillEstimateInputUsageModificationList', + 'Get-BCMPCBillEstimateLineItemList', + 'Get-BCMPCBillEstimateList', + 'Get-BCMPCBillScenario', + 'Get-BCMPCBillScenarioCommitmentModificationList', + 'Get-BCMPCBillScenarioList', + 'Get-BCMPCBillScenarioUsageModificationList', + 'Get-BCMPCPreference', + 'Get-BCMPCResourceTag', + 'Get-BCMPCWorkloadEstimate', + 'Get-BCMPCWorkloadEstimateList', + 'Get-BCMPCWorkloadEstimateUsageList', + 'New-BCMPCBillEstimate', + 'New-BCMPCBillScenario', + 'New-BCMPCCreateBillScenarioCommitmentModification', + 'New-BCMPCCreateBillScenarioUsageModification', + 'New-BCMPCCreateWorkloadEstimateUsage', + 'New-BCMPCDeleteBillScenarioCommitmentModification', + 'New-BCMPCDeleteBillScenarioUsageModification', + 'New-BCMPCDeleteWorkloadEstimateUsage', + 'New-BCMPCUpdateBillScenarioCommitmentModification', + 'New-BCMPCUpdateBillScenarioUsageModification', + 'New-BCMPCUpdateWorkloadEstimateUsage', + 'New-BCMPCWorkloadEstimate', + 'Remove-BCMPCBillEstimate', + 'Remove-BCMPCBillScenario', + 'Remove-BCMPCResourceTag', + 'Remove-BCMPCWorkloadEstimate', + 'Update-BCMPCBillEstimate', + 'Update-BCMPCBillScenario', + 'Update-BCMPCPreference', + 'Update-BCMPCWorkloadEstimate') + + # Variables to export from this module + VariablesToExport = '*' + + # Aliases to export from this module + AliasesToExport = @() + + # List of all modules packaged with this module + ModuleList = @() + + # List of all files packaged with this module + FileList = @( + 'AWS.Tools.BCMPricingCalculator.dll-Help.xml' + ) + + # Private data to pass to the module specified in ModuleToProcess + PrivateData = @{ + + PSData = @{ + Tags = @('AWS', 'cloud', 'Windows', 'PSEdition_Desktop', 'PSEdition_Core', 'Linux', 'MacOS', 'Mac') + LicenseUri = 'https://aws.amazon.com/apache-2-0/' + ProjectUri = 'https://github.com/aws/aws-tools-for-powershell' + IconUri = 'https://sdk-for-net.amazonwebservices.com/images/AWSLogo128x128.png' + ReleaseNotes = 'https://github.com/aws/aws-tools-for-powershell/blob/master/CHANGELOG.md' + } + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AmazonBCMPricingCalculatorClientCmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AmazonBCMPricingCalculatorClientCmdlet.cs new file mode 100644 index 000000000..142fc5b1f --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/AmazonBCMPricingCalculatorClientCmdlet.cs @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + [AWSClientCmdlet("AWS Pricing Calculator", "BCMPC", "2024-06-19", "BCMPricingCalculator")] + public abstract partial class AmazonBCMPricingCalculatorClientCmdlet : ServiceCmdlet + { + protected IAmazonBCMPricingCalculator Client { get; private set; } + + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public AmazonBCMPricingCalculatorConfig ClientConfig + { + get + { + return base._ClientConfig as AmazonBCMPricingCalculatorConfig; + } + set + { + base._ClientConfig = value; + } + } + + protected IAmazonBCMPricingCalculator CreateClient(AWSCredentials credentials, RegionEndpoint region) + { + var config = this.ClientConfig ?? new AmazonBCMPricingCalculatorConfig(); + if (region != null) config.RegionEndpoint = region; + Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); + this.CustomizeClientConfig(config); + var client = new AmazonBCMPricingCalculatorClient(credentials, config); + client.BeforeRequestEvent += RequestEventHandler; + client.AfterResponseEvent += ResponseEventHandler; + return client; + } + + protected override void BeginProcessing() + { + base.AWSServiceId = AmazonBCMPricingCalculatorConfig.ServiceId.ToString(); + + base.BeginProcessing(); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + Client = CreateClient(_CurrentCredentials, _RegionEndpoint); + } + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Add-BCMPCResourceTag-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Add-BCMPCResourceTag-Cmdlet.cs new file mode 100644 index 000000000..db1b75b9d --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Add-BCMPCResourceTag-Cmdlet.cs @@ -0,0 +1,254 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Adds one or more tags to a specified resource. + /// + [Cmdlet("Add", "BCMPCResourceTag", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Pricing Calculator TagResource API operation.", Operation = new[] {"TagResource"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.TagResourceResponse))] + [AWSCmdletOutput("None or Amazon.BCMPricingCalculator.Model.TagResourceResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.BCMPricingCalculator.Model.TagResourceResponse) be returned by specifying '-Select *'." + )] + public partial class AddBCMPCResourceTagCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Arn + /// + /// + /// The Amazon Resource Name (ARN) of the resource to add tags to. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Arn { get; set; } + #endregion + + #region Parameter Tag + /// + /// + /// The tags to add to the resource. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("Tags")] + public System.Collections.Hashtable Tag { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.TagResourceResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Arn parameter. + /// The -PassThru parameter is deprecated, use -Select '^Arn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Arn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Arn), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Add-BCMPCResourceTag (TagResource)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Arn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Arn = this.Arn; + #if MODULAR + if (this.Arn == null && ParameterWasBound(nameof(this.Arn))) + { + WriteWarning("You are passing $null as a value for parameter Arn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Tag != null) + { + context.Tag = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Tag.Keys) + { + context.Tag.Add((String)hashKey, (System.String)(this.Tag[hashKey])); + } + } + #if MODULAR + if (this.Tag == null && ParameterWasBound(nameof(this.Tag))) + { + WriteWarning("You are passing $null as a value for parameter Tag which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.TagResourceRequest(); + + if (cmdletContext.Arn != null) + { + request.Arn = cmdletContext.Arn; + } + if (cmdletContext.Tag != null) + { + request.Tags = cmdletContext.Tag; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.TagResourceResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.TagResourceRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "TagResource"); + try + { + #if DESKTOP + return client.TagResource(request); + #elif CORECLR + return client.TagResourceAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Arn { get; set; } + public Dictionary Tag { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimate-Cmdlet.cs new file mode 100644 index 000000000..ad07b36a4 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimate-Cmdlet.cs @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Retrieves details of a specific bill estimate. + /// + [Cmdlet("Get", "BCMPCBillEstimate")] + [OutputType("Amazon.BCMPricingCalculator.Model.GetBillEstimateResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator GetBillEstimate API operation.", Operation = new[] {"GetBillEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.GetBillEstimateResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.GetBillEstimateResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.GetBillEstimateResponse object containing multiple properties." + )] + public partial class GetBCMPCBillEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Identifier + /// + /// + /// The unique identifier of the bill estimate to retrieve. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.GetBillEstimateResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.GetBillEstimateResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.GetBillEstimateRequest(); + + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.GetBillEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.GetBillEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "GetBillEstimate"); + try + { + #if DESKTOP + return client.GetBillEstimate(request); + #elif CORECLR + return client.GetBillEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Identifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateCommitmentList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateCommitmentList-Cmdlet.cs new file mode 100644 index 000000000..e6e8aa720 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateCommitmentList-Cmdlet.cs @@ -0,0 +1,235 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists the commitments associated with a bill estimate. + /// + [Cmdlet("Get", "BCMPCBillEstimateCommitmentList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillEstimateCommitmentSummary")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillEstimateCommitments API operation.", Operation = new[] {"ListBillEstimateCommitments"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillEstimateCommitmentSummary or Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillEstimateCommitmentSummary objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillEstimateCommitmentListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillEstimateId + /// + /// + /// The unique identifier of the bill estimate to list commitments for. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillEstimateId { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillEstimateId = this.BillEstimateId; + #if MODULAR + if (this.BillEstimateId == null && ParameterWasBound(nameof(this.BillEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter BillEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsRequest(); + + if (cmdletContext.BillEstimateId != null) + { + request.BillEstimateId = cmdletContext.BillEstimateId; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillEstimateCommitmentsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillEstimateCommitments"); + try + { + #if DESKTOP + return client.ListBillEstimateCommitments(request); + #elif CORECLR + return client.ListBillEstimateCommitmentsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillEstimateId { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateInputCommitmentModificationList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateInputCommitmentModificationList-Cmdlet.cs new file mode 100644 index 000000000..827af0f4c --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateInputCommitmentModificationList-Cmdlet.cs @@ -0,0 +1,236 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists the input commitment modifications associated with a bill estimate. + /// + [Cmdlet("Get", "BCMPCBillEstimateInputCommitmentModificationList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillEstimateInputCommitmentModificationSummary")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillEstimateInputCommitmentModifications API operation.", Operation = new[] {"ListBillEstimateInputCommitmentModifications"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillEstimateInputCommitmentModificationSummary or Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillEstimateInputCommitmentModificationSummary objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillEstimateInputCommitmentModificationListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillEstimateId + /// + /// + /// The unique identifier of the bill estimate to list input commitment modifications + /// for. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillEstimateId { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillEstimateId = this.BillEstimateId; + #if MODULAR + if (this.BillEstimateId == null && ParameterWasBound(nameof(this.BillEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter BillEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsRequest(); + + if (cmdletContext.BillEstimateId != null) + { + request.BillEstimateId = cmdletContext.BillEstimateId; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillEstimateInputCommitmentModificationsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillEstimateInputCommitmentModifications"); + try + { + #if DESKTOP + return client.ListBillEstimateInputCommitmentModifications(request); + #elif CORECLR + return client.ListBillEstimateInputCommitmentModificationsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillEstimateId { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateInputUsageModificationList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateInputUsageModificationList-Cmdlet.cs new file mode 100644 index 000000000..499ea76f2 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateInputUsageModificationList-Cmdlet.cs @@ -0,0 +1,256 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists the input usage modifications associated with a bill estimate. + /// + [Cmdlet("Get", "BCMPCBillEstimateInputUsageModificationList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillEstimateInputUsageModificationSummary")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillEstimateInputUsageModifications API operation.", Operation = new[] {"ListBillEstimateInputUsageModifications"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillEstimateInputUsageModificationSummary or Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillEstimateInputUsageModificationSummary objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillEstimateInputUsageModificationListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillEstimateId + /// + /// + /// The unique identifier of the bill estimate to list input usage modifications for. + /// + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillEstimateId { get; set; } + #endregion + + #region Parameter Filter + /// + /// + /// Filters to apply to the list of input usage modifications. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Filters")] + public Amazon.BCMPricingCalculator.Model.ListUsageFilter[] Filter { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillEstimateId = this.BillEstimateId; + #if MODULAR + if (this.BillEstimateId == null && ParameterWasBound(nameof(this.BillEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter BillEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsRequest(); + + if (cmdletContext.BillEstimateId != null) + { + request.BillEstimateId = cmdletContext.BillEstimateId; + } + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillEstimateInputUsageModificationsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillEstimateInputUsageModifications"); + try + { + #if DESKTOP + return client.ListBillEstimateInputUsageModifications(request); + #elif CORECLR + return client.ListBillEstimateInputUsageModificationsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillEstimateId { get; set; } + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateLineItemList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateLineItemList-Cmdlet.cs new file mode 100644 index 000000000..4736fd57e --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateLineItemList-Cmdlet.cs @@ -0,0 +1,255 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists the line items associated with a bill estimate. + /// + [Cmdlet("Get", "BCMPCBillEstimateLineItemList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillEstimateLineItemSummary")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillEstimateLineItems API operation.", Operation = new[] {"ListBillEstimateLineItems"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillEstimateLineItemSummary or Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillEstimateLineItemSummary objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillEstimateLineItemListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillEstimateId + /// + /// + /// The unique identifier of the bill estimate to list line items for. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillEstimateId { get; set; } + #endregion + + #region Parameter Filter + /// + /// + /// Filters to apply to the list of line items. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Filters")] + public Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsFilter[] Filter { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillEstimateId = this.BillEstimateId; + #if MODULAR + if (this.BillEstimateId == null && ParameterWasBound(nameof(this.BillEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter BillEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsRequest(); + + if (cmdletContext.BillEstimateId != null) + { + request.BillEstimateId = cmdletContext.BillEstimateId; + } + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillEstimateLineItemsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillEstimateLineItems"); + try + { + #if DESKTOP + return client.ListBillEstimateLineItems(request); + #elif CORECLR + return client.ListBillEstimateLineItemsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillEstimateId { get; set; } + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateList-Cmdlet.cs new file mode 100644 index 000000000..c02193380 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillEstimateList-Cmdlet.cs @@ -0,0 +1,312 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists all bill estimates for the account. + /// + [Cmdlet("Get", "BCMPCBillEstimateList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillEstimateSummary")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillEstimates API operation.", Operation = new[] {"ListBillEstimates"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillEstimatesResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillEstimateSummary or Amazon.BCMPricingCalculator.Model.ListBillEstimatesResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillEstimateSummary objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillEstimatesResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillEstimateListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter CreatedAtFilter_AfterTimestamp + /// + /// + /// Include results after this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? CreatedAtFilter_AfterTimestamp { get; set; } + #endregion + + #region Parameter ExpiresAtFilter_AfterTimestamp + /// + /// + /// Include results after this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAtFilter_AfterTimestamp { get; set; } + #endregion + + #region Parameter CreatedAtFilter_BeforeTimestamp + /// + /// + /// Include results before this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? CreatedAtFilter_BeforeTimestamp { get; set; } + #endregion + + #region Parameter ExpiresAtFilter_BeforeTimestamp + /// + /// + /// Include results before this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAtFilter_BeforeTimestamp { get; set; } + #endregion + + #region Parameter Filter + /// + /// + /// Filters to apply to the list of bill estimates. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Filters")] + public Amazon.BCMPricingCalculator.Model.ListBillEstimatesFilter[] Filter { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillEstimatesResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillEstimatesResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.CreatedAtFilter_AfterTimestamp = this.CreatedAtFilter_AfterTimestamp; + context.CreatedAtFilter_BeforeTimestamp = this.CreatedAtFilter_BeforeTimestamp; + context.ExpiresAtFilter_AfterTimestamp = this.ExpiresAtFilter_AfterTimestamp; + context.ExpiresAtFilter_BeforeTimestamp = this.ExpiresAtFilter_BeforeTimestamp; + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillEstimatesRequest(); + + + // populate CreatedAtFilter + var requestCreatedAtFilterIsNull = true; + request.CreatedAtFilter = new Amazon.BCMPricingCalculator.Model.FilterTimestamp(); + System.DateTime? requestCreatedAtFilter_createdAtFilter_AfterTimestamp = null; + if (cmdletContext.CreatedAtFilter_AfterTimestamp != null) + { + requestCreatedAtFilter_createdAtFilter_AfterTimestamp = cmdletContext.CreatedAtFilter_AfterTimestamp.Value; + } + if (requestCreatedAtFilter_createdAtFilter_AfterTimestamp != null) + { + request.CreatedAtFilter.AfterTimestamp = requestCreatedAtFilter_createdAtFilter_AfterTimestamp.Value; + requestCreatedAtFilterIsNull = false; + } + System.DateTime? requestCreatedAtFilter_createdAtFilter_BeforeTimestamp = null; + if (cmdletContext.CreatedAtFilter_BeforeTimestamp != null) + { + requestCreatedAtFilter_createdAtFilter_BeforeTimestamp = cmdletContext.CreatedAtFilter_BeforeTimestamp.Value; + } + if (requestCreatedAtFilter_createdAtFilter_BeforeTimestamp != null) + { + request.CreatedAtFilter.BeforeTimestamp = requestCreatedAtFilter_createdAtFilter_BeforeTimestamp.Value; + requestCreatedAtFilterIsNull = false; + } + // determine if request.CreatedAtFilter should be set to null + if (requestCreatedAtFilterIsNull) + { + request.CreatedAtFilter = null; + } + + // populate ExpiresAtFilter + var requestExpiresAtFilterIsNull = true; + request.ExpiresAtFilter = new Amazon.BCMPricingCalculator.Model.FilterTimestamp(); + System.DateTime? requestExpiresAtFilter_expiresAtFilter_AfterTimestamp = null; + if (cmdletContext.ExpiresAtFilter_AfterTimestamp != null) + { + requestExpiresAtFilter_expiresAtFilter_AfterTimestamp = cmdletContext.ExpiresAtFilter_AfterTimestamp.Value; + } + if (requestExpiresAtFilter_expiresAtFilter_AfterTimestamp != null) + { + request.ExpiresAtFilter.AfterTimestamp = requestExpiresAtFilter_expiresAtFilter_AfterTimestamp.Value; + requestExpiresAtFilterIsNull = false; + } + System.DateTime? requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp = null; + if (cmdletContext.ExpiresAtFilter_BeforeTimestamp != null) + { + requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp = cmdletContext.ExpiresAtFilter_BeforeTimestamp.Value; + } + if (requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp != null) + { + request.ExpiresAtFilter.BeforeTimestamp = requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp.Value; + requestExpiresAtFilterIsNull = false; + } + // determine if request.ExpiresAtFilter should be set to null + if (requestExpiresAtFilterIsNull) + { + request.ExpiresAtFilter = null; + } + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillEstimatesResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillEstimatesRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillEstimates"); + try + { + #if DESKTOP + return client.ListBillEstimates(request); + #elif CORECLR + return client.ListBillEstimatesAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.DateTime? CreatedAtFilter_AfterTimestamp { get; set; } + public System.DateTime? CreatedAtFilter_BeforeTimestamp { get; set; } + public System.DateTime? ExpiresAtFilter_AfterTimestamp { get; set; } + public System.DateTime? ExpiresAtFilter_BeforeTimestamp { get; set; } + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenario-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenario-Cmdlet.cs new file mode 100644 index 000000000..15ba5c52b --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenario-Cmdlet.cs @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Retrieves details of a specific bill scenario. + /// + [Cmdlet("Get", "BCMPCBillScenario")] + [OutputType("Amazon.BCMPricingCalculator.Model.GetBillScenarioResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator GetBillScenario API operation.", Operation = new[] {"GetBillScenario"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.GetBillScenarioResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.GetBillScenarioResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.GetBillScenarioResponse object containing multiple properties." + )] + public partial class GetBCMPCBillScenarioCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Identifier + /// + /// + /// The unique identifier of the bill scenario to retrieve. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.GetBillScenarioResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.GetBillScenarioResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.GetBillScenarioRequest(); + + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.GetBillScenarioResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.GetBillScenarioRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "GetBillScenario"); + try + { + #if DESKTOP + return client.GetBillScenario(request); + #elif CORECLR + return client.GetBillScenarioAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Identifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioCommitmentModificationList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioCommitmentModificationList-Cmdlet.cs new file mode 100644 index 000000000..c050aa6ec --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioCommitmentModificationList-Cmdlet.cs @@ -0,0 +1,236 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists the commitment modifications associated with a bill scenario. + /// + [Cmdlet("Get", "BCMPCBillScenarioCommitmentModificationList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillScenarioCommitmentModificationItem")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillScenarioCommitmentModifications API operation.", Operation = new[] {"ListBillScenarioCommitmentModifications"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillScenarioCommitmentModificationItem or Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillScenarioCommitmentModificationItem objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillScenarioCommitmentModificationListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The unique identifier of the bill scenario to list commitment modifications for. + /// + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillScenarioCommitmentModificationsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillScenarioCommitmentModifications"); + try + { + #if DESKTOP + return client.ListBillScenarioCommitmentModifications(request); + #elif CORECLR + return client.ListBillScenarioCommitmentModificationsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioList-Cmdlet.cs new file mode 100644 index 000000000..842df0f43 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioList-Cmdlet.cs @@ -0,0 +1,312 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists all bill scenarios for the account. + /// + [Cmdlet("Get", "BCMPCBillScenarioList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillScenarioSummary")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillScenarios API operation.", Operation = new[] {"ListBillScenarios"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillScenariosResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillScenarioSummary or Amazon.BCMPricingCalculator.Model.ListBillScenariosResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillScenarioSummary objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillScenariosResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillScenarioListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter CreatedAtFilter_AfterTimestamp + /// + /// + /// Include results after this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? CreatedAtFilter_AfterTimestamp { get; set; } + #endregion + + #region Parameter ExpiresAtFilter_AfterTimestamp + /// + /// + /// Include results after this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAtFilter_AfterTimestamp { get; set; } + #endregion + + #region Parameter CreatedAtFilter_BeforeTimestamp + /// + /// + /// Include results before this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? CreatedAtFilter_BeforeTimestamp { get; set; } + #endregion + + #region Parameter ExpiresAtFilter_BeforeTimestamp + /// + /// + /// Include results before this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAtFilter_BeforeTimestamp { get; set; } + #endregion + + #region Parameter Filter + /// + /// + /// Filters to apply to the list of bill scenarios. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Filters")] + public Amazon.BCMPricingCalculator.Model.ListBillScenariosFilter[] Filter { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillScenariosResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillScenariosResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.CreatedAtFilter_AfterTimestamp = this.CreatedAtFilter_AfterTimestamp; + context.CreatedAtFilter_BeforeTimestamp = this.CreatedAtFilter_BeforeTimestamp; + context.ExpiresAtFilter_AfterTimestamp = this.ExpiresAtFilter_AfterTimestamp; + context.ExpiresAtFilter_BeforeTimestamp = this.ExpiresAtFilter_BeforeTimestamp; + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillScenariosRequest(); + + + // populate CreatedAtFilter + var requestCreatedAtFilterIsNull = true; + request.CreatedAtFilter = new Amazon.BCMPricingCalculator.Model.FilterTimestamp(); + System.DateTime? requestCreatedAtFilter_createdAtFilter_AfterTimestamp = null; + if (cmdletContext.CreatedAtFilter_AfterTimestamp != null) + { + requestCreatedAtFilter_createdAtFilter_AfterTimestamp = cmdletContext.CreatedAtFilter_AfterTimestamp.Value; + } + if (requestCreatedAtFilter_createdAtFilter_AfterTimestamp != null) + { + request.CreatedAtFilter.AfterTimestamp = requestCreatedAtFilter_createdAtFilter_AfterTimestamp.Value; + requestCreatedAtFilterIsNull = false; + } + System.DateTime? requestCreatedAtFilter_createdAtFilter_BeforeTimestamp = null; + if (cmdletContext.CreatedAtFilter_BeforeTimestamp != null) + { + requestCreatedAtFilter_createdAtFilter_BeforeTimestamp = cmdletContext.CreatedAtFilter_BeforeTimestamp.Value; + } + if (requestCreatedAtFilter_createdAtFilter_BeforeTimestamp != null) + { + request.CreatedAtFilter.BeforeTimestamp = requestCreatedAtFilter_createdAtFilter_BeforeTimestamp.Value; + requestCreatedAtFilterIsNull = false; + } + // determine if request.CreatedAtFilter should be set to null + if (requestCreatedAtFilterIsNull) + { + request.CreatedAtFilter = null; + } + + // populate ExpiresAtFilter + var requestExpiresAtFilterIsNull = true; + request.ExpiresAtFilter = new Amazon.BCMPricingCalculator.Model.FilterTimestamp(); + System.DateTime? requestExpiresAtFilter_expiresAtFilter_AfterTimestamp = null; + if (cmdletContext.ExpiresAtFilter_AfterTimestamp != null) + { + requestExpiresAtFilter_expiresAtFilter_AfterTimestamp = cmdletContext.ExpiresAtFilter_AfterTimestamp.Value; + } + if (requestExpiresAtFilter_expiresAtFilter_AfterTimestamp != null) + { + request.ExpiresAtFilter.AfterTimestamp = requestExpiresAtFilter_expiresAtFilter_AfterTimestamp.Value; + requestExpiresAtFilterIsNull = false; + } + System.DateTime? requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp = null; + if (cmdletContext.ExpiresAtFilter_BeforeTimestamp != null) + { + requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp = cmdletContext.ExpiresAtFilter_BeforeTimestamp.Value; + } + if (requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp != null) + { + request.ExpiresAtFilter.BeforeTimestamp = requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp.Value; + requestExpiresAtFilterIsNull = false; + } + // determine if request.ExpiresAtFilter should be set to null + if (requestExpiresAtFilterIsNull) + { + request.ExpiresAtFilter = null; + } + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillScenariosResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillScenariosRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillScenarios"); + try + { + #if DESKTOP + return client.ListBillScenarios(request); + #elif CORECLR + return client.ListBillScenariosAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.DateTime? CreatedAtFilter_AfterTimestamp { get; set; } + public System.DateTime? CreatedAtFilter_BeforeTimestamp { get; set; } + public System.DateTime? ExpiresAtFilter_AfterTimestamp { get; set; } + public System.DateTime? ExpiresAtFilter_BeforeTimestamp { get; set; } + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioUsageModificationList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioUsageModificationList-Cmdlet.cs new file mode 100644 index 000000000..b0dcb4331 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCBillScenarioUsageModificationList-Cmdlet.cs @@ -0,0 +1,255 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists the usage modifications associated with a bill scenario. + /// + [Cmdlet("Get", "BCMPCBillScenarioUsageModificationList")] + [OutputType("Amazon.BCMPricingCalculator.Model.BillScenarioUsageModificationItem")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListBillScenarioUsageModifications API operation.", Operation = new[] {"ListBillScenarioUsageModifications"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BillScenarioUsageModificationItem or Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BillScenarioUsageModificationItem objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCBillScenarioUsageModificationListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The unique identifier of the bill scenario to list usage modifications for. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter Filter + /// + /// + /// Filters to apply to the list of usage modifications. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Filters")] + public Amazon.BCMPricingCalculator.Model.ListUsageFilter[] Filter { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListBillScenarioUsageModificationsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListBillScenarioUsageModifications"); + try + { + #if DESKTOP + return client.ListBillScenarioUsageModifications(request); + #elif CORECLR + return client.ListBillScenarioUsageModificationsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCPreference-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCPreference-Cmdlet.cs new file mode 100644 index 000000000..a456211f4 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCPreference-Cmdlet.cs @@ -0,0 +1,152 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Retrieves the current preferences for the Amazon Web Services Cost Explorer service. + /// + [Cmdlet("Get", "BCMPCPreference")] + [OutputType("Amazon.BCMPricingCalculator.Model.GetPreferencesResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator GetPreferences API operation.", Operation = new[] {"GetPreferences"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.GetPreferencesResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.GetPreferencesResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.GetPreferencesResponse object containing multiple properties." + )] + public partial class GetBCMPCPreferenceCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.GetPreferencesResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.GetPreferencesResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.GetPreferencesRequest(); + + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.GetPreferencesResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.GetPreferencesRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "GetPreferences"); + try + { + #if DESKTOP + return client.GetPreferences(request); + #elif CORECLR + return client.GetPreferencesAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCResourceTag-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCResourceTag-Cmdlet.cs new file mode 100644 index 000000000..3c2e2173c --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCResourceTag-Cmdlet.cs @@ -0,0 +1,202 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists all tags associated with a specified resource. + /// + [Cmdlet("Get", "BCMPCResourceTag")] + [OutputType("System.String")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListTagsForResource API operation.", Operation = new[] {"ListTagsForResource"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListTagsForResourceResponse))] + [AWSCmdletOutput("System.String or Amazon.BCMPricingCalculator.Model.ListTagsForResourceResponse", + "This cmdlet returns a collection of System.String objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListTagsForResourceResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCResourceTagCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Arn + /// + /// + /// The Amazon Resource Name (ARN) of the resource to list tags for. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Arn { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Tags'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListTagsForResourceResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListTagsForResourceResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Tags"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Arn parameter. + /// The -PassThru parameter is deprecated, use -Select '^Arn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Arn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Arn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Arn = this.Arn; + #if MODULAR + if (this.Arn == null && ParameterWasBound(nameof(this.Arn))) + { + WriteWarning("You are passing $null as a value for parameter Arn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListTagsForResourceRequest(); + + if (cmdletContext.Arn != null) + { + request.Arn = cmdletContext.Arn; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListTagsForResourceResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListTagsForResourceRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListTagsForResource"); + try + { + #if DESKTOP + return client.ListTagsForResource(request); + #elif CORECLR + return client.ListTagsForResourceAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Arn { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Tags; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimate-Cmdlet.cs new file mode 100644 index 000000000..f1404691f --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimate-Cmdlet.cs @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Retrieves details of a specific workload estimate. + /// + [Cmdlet("Get", "BCMPCWorkloadEstimate")] + [OutputType("Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator GetWorkloadEstimate API operation.", Operation = new[] {"GetWorkloadEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateResponse object containing multiple properties." + )] + public partial class GetBCMPCWorkloadEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Identifier + /// + /// + /// The unique identifier of the workload estimate to retrieve. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateRequest(); + + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.GetWorkloadEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "GetWorkloadEstimate"); + try + { + #if DESKTOP + return client.GetWorkloadEstimate(request); + #elif CORECLR + return client.GetWorkloadEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Identifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimateList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimateList-Cmdlet.cs new file mode 100644 index 000000000..da8b0ebcb --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimateList-Cmdlet.cs @@ -0,0 +1,312 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists all workload estimates for the account. + /// + [Cmdlet("Get", "BCMPCWorkloadEstimateList")] + [OutputType("Amazon.BCMPricingCalculator.Model.WorkloadEstimateSummary")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListWorkloadEstimates API operation.", Operation = new[] {"ListWorkloadEstimates"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.WorkloadEstimateSummary or Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.WorkloadEstimateSummary objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCWorkloadEstimateListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter CreatedAtFilter_AfterTimestamp + /// + /// + /// Include results after this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? CreatedAtFilter_AfterTimestamp { get; set; } + #endregion + + #region Parameter ExpiresAtFilter_AfterTimestamp + /// + /// + /// Include results after this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAtFilter_AfterTimestamp { get; set; } + #endregion + + #region Parameter CreatedAtFilter_BeforeTimestamp + /// + /// + /// Include results before this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? CreatedAtFilter_BeforeTimestamp { get; set; } + #endregion + + #region Parameter ExpiresAtFilter_BeforeTimestamp + /// + /// + /// Include results before this timestamp. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAtFilter_BeforeTimestamp { get; set; } + #endregion + + #region Parameter Filter + /// + /// + /// Filters to apply to the list of workload estimates. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Filters")] + public Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesFilter[] Filter { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.CreatedAtFilter_AfterTimestamp = this.CreatedAtFilter_AfterTimestamp; + context.CreatedAtFilter_BeforeTimestamp = this.CreatedAtFilter_BeforeTimestamp; + context.ExpiresAtFilter_AfterTimestamp = this.ExpiresAtFilter_AfterTimestamp; + context.ExpiresAtFilter_BeforeTimestamp = this.ExpiresAtFilter_BeforeTimestamp; + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesRequest(); + + + // populate CreatedAtFilter + var requestCreatedAtFilterIsNull = true; + request.CreatedAtFilter = new Amazon.BCMPricingCalculator.Model.FilterTimestamp(); + System.DateTime? requestCreatedAtFilter_createdAtFilter_AfterTimestamp = null; + if (cmdletContext.CreatedAtFilter_AfterTimestamp != null) + { + requestCreatedAtFilter_createdAtFilter_AfterTimestamp = cmdletContext.CreatedAtFilter_AfterTimestamp.Value; + } + if (requestCreatedAtFilter_createdAtFilter_AfterTimestamp != null) + { + request.CreatedAtFilter.AfterTimestamp = requestCreatedAtFilter_createdAtFilter_AfterTimestamp.Value; + requestCreatedAtFilterIsNull = false; + } + System.DateTime? requestCreatedAtFilter_createdAtFilter_BeforeTimestamp = null; + if (cmdletContext.CreatedAtFilter_BeforeTimestamp != null) + { + requestCreatedAtFilter_createdAtFilter_BeforeTimestamp = cmdletContext.CreatedAtFilter_BeforeTimestamp.Value; + } + if (requestCreatedAtFilter_createdAtFilter_BeforeTimestamp != null) + { + request.CreatedAtFilter.BeforeTimestamp = requestCreatedAtFilter_createdAtFilter_BeforeTimestamp.Value; + requestCreatedAtFilterIsNull = false; + } + // determine if request.CreatedAtFilter should be set to null + if (requestCreatedAtFilterIsNull) + { + request.CreatedAtFilter = null; + } + + // populate ExpiresAtFilter + var requestExpiresAtFilterIsNull = true; + request.ExpiresAtFilter = new Amazon.BCMPricingCalculator.Model.FilterTimestamp(); + System.DateTime? requestExpiresAtFilter_expiresAtFilter_AfterTimestamp = null; + if (cmdletContext.ExpiresAtFilter_AfterTimestamp != null) + { + requestExpiresAtFilter_expiresAtFilter_AfterTimestamp = cmdletContext.ExpiresAtFilter_AfterTimestamp.Value; + } + if (requestExpiresAtFilter_expiresAtFilter_AfterTimestamp != null) + { + request.ExpiresAtFilter.AfterTimestamp = requestExpiresAtFilter_expiresAtFilter_AfterTimestamp.Value; + requestExpiresAtFilterIsNull = false; + } + System.DateTime? requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp = null; + if (cmdletContext.ExpiresAtFilter_BeforeTimestamp != null) + { + requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp = cmdletContext.ExpiresAtFilter_BeforeTimestamp.Value; + } + if (requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp != null) + { + request.ExpiresAtFilter.BeforeTimestamp = requestExpiresAtFilter_expiresAtFilter_BeforeTimestamp.Value; + requestExpiresAtFilterIsNull = false; + } + // determine if request.ExpiresAtFilter should be set to null + if (requestExpiresAtFilterIsNull) + { + request.ExpiresAtFilter = null; + } + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListWorkloadEstimatesRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListWorkloadEstimates"); + try + { + #if DESKTOP + return client.ListWorkloadEstimates(request); + #elif CORECLR + return client.ListWorkloadEstimatesAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.DateTime? CreatedAtFilter_AfterTimestamp { get; set; } + public System.DateTime? CreatedAtFilter_BeforeTimestamp { get; set; } + public System.DateTime? ExpiresAtFilter_AfterTimestamp { get; set; } + public System.DateTime? ExpiresAtFilter_BeforeTimestamp { get; set; } + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimateUsageList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimateUsageList-Cmdlet.cs new file mode 100644 index 000000000..b305868e6 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Get-BCMPCWorkloadEstimateUsageList-Cmdlet.cs @@ -0,0 +1,255 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Lists the usage associated with a workload estimate. + /// + [Cmdlet("Get", "BCMPCWorkloadEstimateUsageList")] + [OutputType("Amazon.BCMPricingCalculator.Model.WorkloadEstimateUsageItem")] + [AWSCmdlet("Calls the AWS Pricing Calculator ListWorkloadEstimateUsage API operation.", Operation = new[] {"ListWorkloadEstimateUsage"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.WorkloadEstimateUsageItem or Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.WorkloadEstimateUsageItem objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageResponse) can be returned by specifying '-Select *'." + )] + public partial class GetBCMPCWorkloadEstimateUsageListCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Filter + /// + /// + /// Filters to apply to the list of usage items. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Filters")] + public Amazon.BCMPricingCalculator.Model.ListUsageFilter[] Filter { get; set; } + #endregion + + #region Parameter WorkloadEstimateId + /// + /// + /// The unique identifier of the workload estimate to list usage for. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String WorkloadEstimateId { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to return per page. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// A token to retrieve the next page of results. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Items'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Items"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the WorkloadEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.WorkloadEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + context.WorkloadEstimateId = this.WorkloadEstimateId; + #if MODULAR + if (this.WorkloadEstimateId == null && ParameterWasBound(nameof(this.WorkloadEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter WorkloadEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageRequest(); + + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + if (cmdletContext.WorkloadEstimateId != null) + { + request.WorkloadEstimateId = cmdletContext.WorkloadEstimateId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.ListWorkloadEstimateUsageRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "ListWorkloadEstimateUsage"); + try + { + #if DESKTOP + return client.ListWorkloadEstimateUsage(request); + #elif CORECLR + return client.ListWorkloadEstimateUsageAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.String WorkloadEstimateId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Items; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCBillEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCBillEstimate-Cmdlet.cs new file mode 100644 index 000000000..0c99647a3 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCBillEstimate-Cmdlet.cs @@ -0,0 +1,300 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Create a Bill estimate from a Bill scenario. In the Bill scenario you can model usage + /// addition, usage changes, and usage removal. You can also model commitment addition + /// and commitment removal. After all changes in a Bill scenario is made satisfactorily, + /// you can call this API with a Bill scenario ID to generate the Bill estimate. Bill + /// estimate calculates the pre-tax cost for your consolidated billing family, incorporating + /// all modeled usage and commitments alongside existing usage and commitments from your + /// most recent completed anniversary bill, with any applicable discounts applied. + /// + [Cmdlet("New", "BCMPCBillEstimate", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.CreateBillEstimateResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator CreateBillEstimate API operation.", Operation = new[] {"CreateBillEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.CreateBillEstimateResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.CreateBillEstimateResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.CreateBillEstimateResponse object containing multiple properties." + )] + public partial class NewBCMPCBillEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The ID of the Bill Scenario for which you want to create a Bill estimate. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter Name + /// + /// + /// The name of the Bill estimate that will be created. Names must be unique for an account. + /// + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Name { get; set; } + #endregion + + #region Parameter Tag + /// + /// + /// An optional list of tags to associate with the specified BillEstimate. You can use + /// resource tags to control access to your BillEstimate using IAM policies. Each tag + /// consists of a key and a value, and each key must be unique for the resource. The following + /// restrictions apply to resource tags:
  • Although the maximum number of array members is 200, you can assign a maximum of 50 + /// user-tags to one resource. The remaining are reserved for Amazon Web Services.
  • The maximum length of a key is 128 characters.
  • The maximum length of a value is 256 characters.
  • Keys and values can only contain alphanumeric characters, spaces, and any of the following: + /// _.:/=+@-.
  • Keys and values are case sensitive.
  • Keys and values are trimmed for any leading or trailing whitespaces.
  • Don't use aws: as a prefix for your keys. This prefix is reserved for Amazon + /// Web Services.
+ ///
+ ///
+ [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Tags")] + public System.Collections.Hashtable Tag { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// A unique, case-sensitive identifier that you provide to ensure the idempotency of + /// the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.CreateBillEstimateResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.CreateBillEstimateResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Name parameter. + /// The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Name), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCBillEstimate (CreateBillEstimate)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Name; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.ClientToken = this.ClientToken; + context.Name = this.Name; + #if MODULAR + if (this.Name == null && ParameterWasBound(nameof(this.Name))) + { + WriteWarning("You are passing $null as a value for parameter Name which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Tag != null) + { + context.Tag = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Tag.Keys) + { + context.Tag.Add((String)hashKey, (System.String)(this.Tag[hashKey])); + } + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.CreateBillEstimateRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + if (cmdletContext.Tag != null) + { + request.Tags = cmdletContext.Tag; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.CreateBillEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.CreateBillEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "CreateBillEstimate"); + try + { + #if DESKTOP + return client.CreateBillEstimate(request); + #elif CORECLR + return client.CreateBillEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public System.String ClientToken { get; set; } + public System.String Name { get; set; } + public Dictionary Tag { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCBillScenario-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCBillScenario-Cmdlet.cs new file mode 100644 index 000000000..9527accb8 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCBillScenario-Cmdlet.cs @@ -0,0 +1,258 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Creates a new bill scenario to model potential changes to Amazon Web Services usage + /// and costs. + /// + [Cmdlet("New", "BCMPCBillScenario", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.CreateBillScenarioResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator CreateBillScenario API operation.", Operation = new[] {"CreateBillScenario"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.CreateBillScenarioResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.CreateBillScenarioResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.CreateBillScenarioResponse object containing multiple properties." + )] + public partial class NewBCMPCBillScenarioCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Name + /// + /// + /// A descriptive name for the bill scenario. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Name { get; set; } + #endregion + + #region Parameter Tag + /// + /// + /// The tags to apply to the bill scenario. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Tags")] + public System.Collections.Hashtable Tag { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// A unique, case-sensitive identifier to ensure idempotency of the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.CreateBillScenarioResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.CreateBillScenarioResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Name parameter. + /// The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Name), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCBillScenario (CreateBillScenario)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Name; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ClientToken = this.ClientToken; + context.Name = this.Name; + #if MODULAR + if (this.Name == null && ParameterWasBound(nameof(this.Name))) + { + WriteWarning("You are passing $null as a value for parameter Name which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Tag != null) + { + context.Tag = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Tag.Keys) + { + context.Tag.Add((String)hashKey, (System.String)(this.Tag[hashKey])); + } + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.CreateBillScenarioRequest(); + + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + if (cmdletContext.Tag != null) + { + request.Tags = cmdletContext.Tag; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.CreateBillScenarioResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.CreateBillScenarioRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "CreateBillScenario"); + try + { + #if DESKTOP + return client.CreateBillScenario(request); + #elif CORECLR + return client.CreateBillScenarioAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ClientToken { get; set; } + public System.String Name { get; set; } + public Dictionary Tag { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateBillScenarioCommitmentModification-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateBillScenarioCommitmentModification-Cmdlet.cs new file mode 100644 index 000000000..833c05a95 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateBillScenarioCommitmentModification-Cmdlet.cs @@ -0,0 +1,269 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Create Compute Savings Plans, EC2 Instance Savings Plans, or EC2 Reserved Instances + /// commitments that you want to model in a Bill Scenario. + /// + [Cmdlet("New", "BCMPCCreateBillScenarioCommitmentModification", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchCreateBillScenarioCommitmentModification API operation.", Operation = new[] {"BatchCreateBillScenarioCommitmentModification"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationResponse object containing multiple properties." + )] + public partial class NewBCMPCCreateBillScenarioCommitmentModificationCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The ID of the Bill Scenario for which you want to create the modeled commitment. + /// + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter CommitmentModification + /// + /// + /// List of commitments that you want to model in the Bill Scenario. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("CommitmentModifications")] + public Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationEntry[] CommitmentModification { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// A unique, case-sensitive identifier that you provide to ensure the idempotency of + /// the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.BillScenarioId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCCreateBillScenarioCommitmentModification (BatchCreateBillScenarioCommitmentModification)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.ClientToken = this.ClientToken; + if (this.CommitmentModification != null) + { + context.CommitmentModification = new List(this.CommitmentModification); + } + #if MODULAR + if (this.CommitmentModification == null && ParameterWasBound(nameof(this.CommitmentModification))) + { + WriteWarning("You are passing $null as a value for parameter CommitmentModification which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.CommitmentModification != null) + { + request.CommitmentModifications = cmdletContext.CommitmentModification; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioCommitmentModificationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchCreateBillScenarioCommitmentModification"); + try + { + #if DESKTOP + return client.BatchCreateBillScenarioCommitmentModification(request); + #elif CORECLR + return client.BatchCreateBillScenarioCommitmentModificationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public System.String ClientToken { get; set; } + public List CommitmentModification { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateBillScenarioUsageModification-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateBillScenarioUsageModification-Cmdlet.cs new file mode 100644 index 000000000..b48fc1af1 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateBillScenarioUsageModification-Cmdlet.cs @@ -0,0 +1,267 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Create Amazon Web Services service usage that you want to model in a Bill Scenario. + /// + [Cmdlet("New", "BCMPCCreateBillScenarioUsageModification", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchCreateBillScenarioUsageModification API operation.", Operation = new[] {"BatchCreateBillScenarioUsageModification"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationResponse object containing multiple properties." + )] + public partial class NewBCMPCCreateBillScenarioUsageModificationCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The ID of the Bill Scenario for which you want to create the modeled usage. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter UsageModification + /// + /// + /// List of usage that you want to model in the Bill Scenario. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("UsageModifications")] + public Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationEntry[] UsageModification { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// A unique, case-sensitive identifier that you provide to ensure the idempotency of + /// the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.BillScenarioId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCCreateBillScenarioUsageModification (BatchCreateBillScenarioUsageModification)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.ClientToken = this.ClientToken; + if (this.UsageModification != null) + { + context.UsageModification = new List(this.UsageModification); + } + #if MODULAR + if (this.UsageModification == null && ParameterWasBound(nameof(this.UsageModification))) + { + WriteWarning("You are passing $null as a value for parameter UsageModification which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.UsageModification != null) + { + request.UsageModifications = cmdletContext.UsageModification; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchCreateBillScenarioUsageModificationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchCreateBillScenarioUsageModification"); + try + { + #if DESKTOP + return client.BatchCreateBillScenarioUsageModification(request); + #elif CORECLR + return client.BatchCreateBillScenarioUsageModificationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public System.String ClientToken { get; set; } + public List UsageModification { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateWorkloadEstimateUsage-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateWorkloadEstimateUsage-Cmdlet.cs new file mode 100644 index 000000000..0795af634 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCCreateWorkloadEstimateUsage-Cmdlet.cs @@ -0,0 +1,266 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Create Amazon Web Services service usage that you want to model in a Workload Estimate. + /// + [Cmdlet("New", "BCMPCCreateWorkloadEstimateUsage", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchCreateWorkloadEstimateUsage API operation.", Operation = new[] {"BatchCreateWorkloadEstimateUsage"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageResponse object containing multiple properties." + )] + public partial class NewBCMPCCreateWorkloadEstimateUsageCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Usage + /// + /// + /// List of usage that you want to model in the Workload estimate. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageEntry[] Usage { get; set; } + #endregion + + #region Parameter WorkloadEstimateId + /// + /// + /// The ID of the Workload estimate for which you want to create the modeled usage. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String WorkloadEstimateId { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// A unique, case-sensitive identifier that you provide to ensure the idempotency of + /// the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the WorkloadEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.WorkloadEstimateId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCCreateWorkloadEstimateUsage (BatchCreateWorkloadEstimateUsage)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.WorkloadEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ClientToken = this.ClientToken; + if (this.Usage != null) + { + context.Usage = new List(this.Usage); + } + #if MODULAR + if (this.Usage == null && ParameterWasBound(nameof(this.Usage))) + { + WriteWarning("You are passing $null as a value for parameter Usage which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.WorkloadEstimateId = this.WorkloadEstimateId; + #if MODULAR + if (this.WorkloadEstimateId == null && ParameterWasBound(nameof(this.WorkloadEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter WorkloadEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageRequest(); + + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Usage != null) + { + request.Usage = cmdletContext.Usage; + } + if (cmdletContext.WorkloadEstimateId != null) + { + request.WorkloadEstimateId = cmdletContext.WorkloadEstimateId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchCreateWorkloadEstimateUsageRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchCreateWorkloadEstimateUsage"); + try + { + #if DESKTOP + return client.BatchCreateWorkloadEstimateUsage(request); + #elif CORECLR + return client.BatchCreateWorkloadEstimateUsageAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ClientToken { get; set; } + public List Usage { get; set; } + public System.String WorkloadEstimateId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteBillScenarioCommitmentModification-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteBillScenarioCommitmentModification-Cmdlet.cs new file mode 100644 index 000000000..2fba5db7d --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteBillScenarioCommitmentModification-Cmdlet.cs @@ -0,0 +1,256 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Delete commitment that you have created in a Bill Scenario. You can only delete a + /// commitment that you had added and cannot model deletion (or removal) of a existing + /// commitment. If you want model deletion of an existing commitment, see the negate + /// BillScenarioCommitmentModificationAction of + /// BatchCreateBillScenarioCommitmentModification operation. + /// + [Cmdlet("New", "BCMPCDeleteBillScenarioCommitmentModification", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationError")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchDeleteBillScenarioCommitmentModification API operation.", Operation = new[] {"BatchDeleteBillScenarioCommitmentModification"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationError or Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationError objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationResponse) can be returned by specifying '-Select *'." + )] + public partial class NewBCMPCDeleteBillScenarioCommitmentModificationCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The ID of the Bill Scenario for which you want to delete the modeled commitment. + /// + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter Id + /// + /// + /// List of commitments that you want to delete from the Bill Scenario. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("Ids")] + public System.String[] Id { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Errors'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Errors"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.BillScenarioId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCDeleteBillScenarioCommitmentModification (BatchDeleteBillScenarioCommitmentModification)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Id != null) + { + context.Id = new List(this.Id); + } + #if MODULAR + if (this.Id == null && ParameterWasBound(nameof(this.Id))) + { + WriteWarning("You are passing $null as a value for parameter Id which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.Id != null) + { + request.Ids = cmdletContext.Id; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioCommitmentModificationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchDeleteBillScenarioCommitmentModification"); + try + { + #if DESKTOP + return client.BatchDeleteBillScenarioCommitmentModification(request); + #elif CORECLR + return client.BatchDeleteBillScenarioCommitmentModificationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public List Id { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Errors; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteBillScenarioUsageModification-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteBillScenarioUsageModification-Cmdlet.cs new file mode 100644 index 000000000..b8b8297c4 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteBillScenarioUsageModification-Cmdlet.cs @@ -0,0 +1,254 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Delete usage that you have created in a Bill Scenario. You can only delete usage + /// that you had added and cannot model deletion (or removal) of a existing usage. If + /// you want model removal of an existing usage, see + /// BatchUpdateBillScenarioUsageModification. + /// + [Cmdlet("New", "BCMPCDeleteBillScenarioUsageModification", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationError")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchDeleteBillScenarioUsageModification API operation.", Operation = new[] {"BatchDeleteBillScenarioUsageModification"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationError or Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationError objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationResponse) can be returned by specifying '-Select *'." + )] + public partial class NewBCMPCDeleteBillScenarioUsageModificationCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The ID of the Bill Scenario for which you want to delete the modeled usage. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter Id + /// + /// + /// List of usage that you want to delete from the Bill Scenario. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("Ids")] + public System.String[] Id { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Errors'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Errors"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.BillScenarioId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCDeleteBillScenarioUsageModification (BatchDeleteBillScenarioUsageModification)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Id != null) + { + context.Id = new List(this.Id); + } + #if MODULAR + if (this.Id == null && ParameterWasBound(nameof(this.Id))) + { + WriteWarning("You are passing $null as a value for parameter Id which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.Id != null) + { + request.Ids = cmdletContext.Id; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchDeleteBillScenarioUsageModificationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchDeleteBillScenarioUsageModification"); + try + { + #if DESKTOP + return client.BatchDeleteBillScenarioUsageModification(request); + #elif CORECLR + return client.BatchDeleteBillScenarioUsageModificationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public List Id { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Errors; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteWorkloadEstimateUsage-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteWorkloadEstimateUsage-Cmdlet.cs new file mode 100644 index 000000000..cc2a3977c --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCDeleteWorkloadEstimateUsage-Cmdlet.cs @@ -0,0 +1,254 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Delete usage that you have created in a Workload estimate. You can only delete usage + /// that you had added and cannot model deletion (or removal) of a existing usage. If + /// you want model removal of an existing usage, see + /// BatchUpdateWorkloadEstimateUsage. + /// + [Cmdlet("New", "BCMPCDeleteWorkloadEstimateUsage", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageError")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchDeleteWorkloadEstimateUsage API operation.", Operation = new[] {"BatchDeleteWorkloadEstimateUsage"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageError or Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageResponse", + "This cmdlet returns a collection of Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageError objects.", + "The service call response (type Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageResponse) can be returned by specifying '-Select *'." + )] + public partial class NewBCMPCDeleteWorkloadEstimateUsageCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Id + /// + /// + /// List of usage that you want to delete from the Workload estimate. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("Ids")] + public System.String[] Id { get; set; } + #endregion + + #region Parameter WorkloadEstimateId + /// + /// + /// The ID of the Workload estimate for which you want to delete the modeled usage. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String WorkloadEstimateId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Errors'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Errors"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the WorkloadEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.WorkloadEstimateId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCDeleteWorkloadEstimateUsage (BatchDeleteWorkloadEstimateUsage)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.WorkloadEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.Id != null) + { + context.Id = new List(this.Id); + } + #if MODULAR + if (this.Id == null && ParameterWasBound(nameof(this.Id))) + { + WriteWarning("You are passing $null as a value for parameter Id which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.WorkloadEstimateId = this.WorkloadEstimateId; + #if MODULAR + if (this.WorkloadEstimateId == null && ParameterWasBound(nameof(this.WorkloadEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter WorkloadEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageRequest(); + + if (cmdletContext.Id != null) + { + request.Ids = cmdletContext.Id; + } + if (cmdletContext.WorkloadEstimateId != null) + { + request.WorkloadEstimateId = cmdletContext.WorkloadEstimateId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchDeleteWorkloadEstimateUsageRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchDeleteWorkloadEstimateUsage"); + try + { + #if DESKTOP + return client.BatchDeleteWorkloadEstimateUsage(request); + #elif CORECLR + return client.BatchDeleteWorkloadEstimateUsageAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List Id { get; set; } + public System.String WorkloadEstimateId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Errors; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateBillScenarioCommitmentModification-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateBillScenarioCommitmentModification-Cmdlet.cs new file mode 100644 index 000000000..f1c7a4db3 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateBillScenarioCommitmentModification-Cmdlet.cs @@ -0,0 +1,252 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Update a newly added or existing commitment. You can update the commitment group + /// based on a commitment ID and a Bill scenario ID. + /// + [Cmdlet("New", "BCMPCUpdateBillScenarioCommitmentModification", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchUpdateBillScenarioCommitmentModification API operation.", Operation = new[] {"BatchUpdateBillScenarioCommitmentModification"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationResponse object containing multiple properties." + )] + public partial class NewBCMPCUpdateBillScenarioCommitmentModificationCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The ID of the Bill Scenario for which you want to modify the commitment group of + /// a modeled commitment. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter CommitmentModification + /// + /// + /// List of commitments that you want to update in a Bill Scenario. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("CommitmentModifications")] + public Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationEntry[] CommitmentModification { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.BillScenarioId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCUpdateBillScenarioCommitmentModification (BatchUpdateBillScenarioCommitmentModification)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.CommitmentModification != null) + { + context.CommitmentModification = new List(this.CommitmentModification); + } + #if MODULAR + if (this.CommitmentModification == null && ParameterWasBound(nameof(this.CommitmentModification))) + { + WriteWarning("You are passing $null as a value for parameter CommitmentModification which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.CommitmentModification != null) + { + request.CommitmentModifications = cmdletContext.CommitmentModification; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioCommitmentModificationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchUpdateBillScenarioCommitmentModification"); + try + { + #if DESKTOP + return client.BatchUpdateBillScenarioCommitmentModification(request); + #elif CORECLR + return client.BatchUpdateBillScenarioCommitmentModificationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public List CommitmentModification { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateBillScenarioUsageModification-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateBillScenarioUsageModification-Cmdlet.cs new file mode 100644 index 000000000..2e8fabfb4 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateBillScenarioUsageModification-Cmdlet.cs @@ -0,0 +1,252 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Update a newly added or existing usage lines. You can update the usage amounts, usage + /// hour, and usage group based on a usage ID and a Bill scenario ID. + /// + [Cmdlet("New", "BCMPCUpdateBillScenarioUsageModification", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchUpdateBillScenarioUsageModification API operation.", Operation = new[] {"BatchUpdateBillScenarioUsageModification"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationResponse object containing multiple properties." + )] + public partial class NewBCMPCUpdateBillScenarioUsageModificationCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter BillScenarioId + /// + /// + /// The ID of the Bill Scenario for which you want to modify the usage lines. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String BillScenarioId { get; set; } + #endregion + + #region Parameter UsageModification + /// + /// + /// List of usage lines that you want to update in a Bill Scenario identified by the + /// usage ID. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("UsageModifications")] + public Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationEntry[] UsageModification { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the BillScenarioId parameter. + /// The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^BillScenarioId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.BillScenarioId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCUpdateBillScenarioUsageModification (BatchUpdateBillScenarioUsageModification)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.BillScenarioId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.BillScenarioId = this.BillScenarioId; + #if MODULAR + if (this.BillScenarioId == null && ParameterWasBound(nameof(this.BillScenarioId))) + { + WriteWarning("You are passing $null as a value for parameter BillScenarioId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.UsageModification != null) + { + context.UsageModification = new List(this.UsageModification); + } + #if MODULAR + if (this.UsageModification == null && ParameterWasBound(nameof(this.UsageModification))) + { + WriteWarning("You are passing $null as a value for parameter UsageModification which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationRequest(); + + if (cmdletContext.BillScenarioId != null) + { + request.BillScenarioId = cmdletContext.BillScenarioId; + } + if (cmdletContext.UsageModification != null) + { + request.UsageModifications = cmdletContext.UsageModification; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchUpdateBillScenarioUsageModificationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchUpdateBillScenarioUsageModification"); + try + { + #if DESKTOP + return client.BatchUpdateBillScenarioUsageModification(request); + #elif CORECLR + return client.BatchUpdateBillScenarioUsageModificationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String BillScenarioId { get; set; } + public List UsageModification { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateWorkloadEstimateUsage-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateWorkloadEstimateUsage-Cmdlet.cs new file mode 100644 index 000000000..3e1acb5ca --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCUpdateWorkloadEstimateUsage-Cmdlet.cs @@ -0,0 +1,251 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Update a newly added or existing usage lines. You can update the usage amounts and + /// usage group based on a usage ID and a Workload estimate ID. + /// + [Cmdlet("New", "BCMPCUpdateWorkloadEstimateUsage", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator BatchUpdateWorkloadEstimateUsage API operation.", Operation = new[] {"BatchUpdateWorkloadEstimateUsage"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageResponse object containing multiple properties." + )] + public partial class NewBCMPCUpdateWorkloadEstimateUsageCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Usage + /// + /// + /// List of usage line amounts and usage group that you want to update in a Workload + /// estimate identified by the usage ID. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageEntry[] Usage { get; set; } + #endregion + + #region Parameter WorkloadEstimateId + /// + /// + /// The ID of the Workload estimate for which you want to modify the usage lines. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String WorkloadEstimateId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the WorkloadEstimateId parameter. + /// The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^WorkloadEstimateId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.WorkloadEstimateId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCUpdateWorkloadEstimateUsage (BatchUpdateWorkloadEstimateUsage)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.WorkloadEstimateId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.Usage != null) + { + context.Usage = new List(this.Usage); + } + #if MODULAR + if (this.Usage == null && ParameterWasBound(nameof(this.Usage))) + { + WriteWarning("You are passing $null as a value for parameter Usage which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.WorkloadEstimateId = this.WorkloadEstimateId; + #if MODULAR + if (this.WorkloadEstimateId == null && ParameterWasBound(nameof(this.WorkloadEstimateId))) + { + WriteWarning("You are passing $null as a value for parameter WorkloadEstimateId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageRequest(); + + if (cmdletContext.Usage != null) + { + request.Usage = cmdletContext.Usage; + } + if (cmdletContext.WorkloadEstimateId != null) + { + request.WorkloadEstimateId = cmdletContext.WorkloadEstimateId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.BatchUpdateWorkloadEstimateUsageRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "BatchUpdateWorkloadEstimateUsage"); + try + { + #if DESKTOP + return client.BatchUpdateWorkloadEstimateUsage(request); + #elif CORECLR + return client.BatchUpdateWorkloadEstimateUsageAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List Usage { get; set; } + public System.String WorkloadEstimateId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCWorkloadEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCWorkloadEstimate-Cmdlet.cs new file mode 100644 index 000000000..dc2cfe1f8 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/New-BCMPCWorkloadEstimate-Cmdlet.cs @@ -0,0 +1,274 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Creates a new workload estimate to model costs for a specific workload. + /// + [Cmdlet("New", "BCMPCWorkloadEstimate", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator CreateWorkloadEstimate API operation.", Operation = new[] {"CreateWorkloadEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateResponse object containing multiple properties." + )] + public partial class NewBCMPCWorkloadEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Name + /// + /// + /// A descriptive name for the workload estimate. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Name { get; set; } + #endregion + + #region Parameter RateType + /// + /// + /// The type of pricing rates to use for the estimate. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.BCMPricingCalculator.WorkloadEstimateRateType")] + public Amazon.BCMPricingCalculator.WorkloadEstimateRateType RateType { get; set; } + #endregion + + #region Parameter Tag + /// + /// + /// The tags to apply to the workload estimate. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Tags")] + public System.Collections.Hashtable Tag { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// A unique, case-sensitive identifier to ensure idempotency of the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Name parameter. + /// The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Name), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-BCMPCWorkloadEstimate (CreateWorkloadEstimate)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Name; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ClientToken = this.ClientToken; + context.Name = this.Name; + #if MODULAR + if (this.Name == null && ParameterWasBound(nameof(this.Name))) + { + WriteWarning("You are passing $null as a value for parameter Name which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.RateType = this.RateType; + if (this.Tag != null) + { + context.Tag = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Tag.Keys) + { + context.Tag.Add((String)hashKey, (System.String)(this.Tag[hashKey])); + } + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateRequest(); + + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + if (cmdletContext.RateType != null) + { + request.RateType = cmdletContext.RateType; + } + if (cmdletContext.Tag != null) + { + request.Tags = cmdletContext.Tag; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.CreateWorkloadEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "CreateWorkloadEstimate"); + try + { + #if DESKTOP + return client.CreateWorkloadEstimate(request); + #elif CORECLR + return client.CreateWorkloadEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ClientToken { get; set; } + public System.String Name { get; set; } + public Amazon.BCMPricingCalculator.WorkloadEstimateRateType RateType { get; set; } + public Dictionary Tag { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCBillEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCBillEstimate-Cmdlet.cs new file mode 100644 index 000000000..4a0a72668 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCBillEstimate-Cmdlet.cs @@ -0,0 +1,217 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Deletes an existing bill estimate. + /// + [Cmdlet("Remove", "BCMPCBillEstimate", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Pricing Calculator DeleteBillEstimate API operation.", Operation = new[] {"DeleteBillEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.DeleteBillEstimateResponse))] + [AWSCmdletOutput("None or Amazon.BCMPricingCalculator.Model.DeleteBillEstimateResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.BCMPricingCalculator.Model.DeleteBillEstimateResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveBCMPCBillEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Identifier + /// + /// + /// The unique identifier of the bill estimate to delete. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.DeleteBillEstimateResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Identifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-BCMPCBillEstimate (DeleteBillEstimate)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.DeleteBillEstimateRequest(); + + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.DeleteBillEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.DeleteBillEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "DeleteBillEstimate"); + try + { + #if DESKTOP + return client.DeleteBillEstimate(request); + #elif CORECLR + return client.DeleteBillEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Identifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCBillScenario-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCBillScenario-Cmdlet.cs new file mode 100644 index 000000000..00154fd52 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCBillScenario-Cmdlet.cs @@ -0,0 +1,217 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Deletes an existing bill scenario. + /// + [Cmdlet("Remove", "BCMPCBillScenario", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Pricing Calculator DeleteBillScenario API operation.", Operation = new[] {"DeleteBillScenario"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.DeleteBillScenarioResponse))] + [AWSCmdletOutput("None or Amazon.BCMPricingCalculator.Model.DeleteBillScenarioResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.BCMPricingCalculator.Model.DeleteBillScenarioResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveBCMPCBillScenarioCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Identifier + /// + /// + /// The unique identifier of the bill scenario to delete. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.DeleteBillScenarioResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Identifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-BCMPCBillScenario (DeleteBillScenario)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.DeleteBillScenarioRequest(); + + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.DeleteBillScenarioResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.DeleteBillScenarioRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "DeleteBillScenario"); + try + { + #if DESKTOP + return client.DeleteBillScenario(request); + #elif CORECLR + return client.DeleteBillScenarioAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Identifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCResourceTag-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCResourceTag-Cmdlet.cs new file mode 100644 index 000000000..f2d00e295 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCResourceTag-Cmdlet.cs @@ -0,0 +1,250 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Removes one or more tags from a specified resource. + /// + [Cmdlet("Remove", "BCMPCResourceTag", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Pricing Calculator UntagResource API operation.", Operation = new[] {"UntagResource"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.UntagResourceResponse))] + [AWSCmdletOutput("None or Amazon.BCMPricingCalculator.Model.UntagResourceResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.BCMPricingCalculator.Model.UntagResourceResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveBCMPCResourceTagCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Arn + /// + /// + /// The Amazon Resource Name (ARN) of the resource to remove tags from. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Arn { get; set; } + #endregion + + #region Parameter TagKey + /// + /// + /// The keys of the tags to remove from the resource. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("TagKeys")] + public System.String[] TagKey { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.UntagResourceResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Arn parameter. + /// The -PassThru parameter is deprecated, use -Select '^Arn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Arn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Arn), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-BCMPCResourceTag (UntagResource)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Arn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Arn = this.Arn; + #if MODULAR + if (this.Arn == null && ParameterWasBound(nameof(this.Arn))) + { + WriteWarning("You are passing $null as a value for parameter Arn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.TagKey != null) + { + context.TagKey = new List(this.TagKey); + } + #if MODULAR + if (this.TagKey == null && ParameterWasBound(nameof(this.TagKey))) + { + WriteWarning("You are passing $null as a value for parameter TagKey which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.UntagResourceRequest(); + + if (cmdletContext.Arn != null) + { + request.Arn = cmdletContext.Arn; + } + if (cmdletContext.TagKey != null) + { + request.TagKeys = cmdletContext.TagKey; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.UntagResourceResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.UntagResourceRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "UntagResource"); + try + { + #if DESKTOP + return client.UntagResource(request); + #elif CORECLR + return client.UntagResourceAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Arn { get; set; } + public List TagKey { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCWorkloadEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCWorkloadEstimate-Cmdlet.cs new file mode 100644 index 000000000..f8153904e --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Remove-BCMPCWorkloadEstimate-Cmdlet.cs @@ -0,0 +1,217 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Deletes an existing workload estimate. + /// + [Cmdlet("Remove", "BCMPCWorkloadEstimate", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Pricing Calculator DeleteWorkloadEstimate API operation.", Operation = new[] {"DeleteWorkloadEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.DeleteWorkloadEstimateResponse))] + [AWSCmdletOutput("None or Amazon.BCMPricingCalculator.Model.DeleteWorkloadEstimateResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.BCMPricingCalculator.Model.DeleteWorkloadEstimateResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveBCMPCWorkloadEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Identifier + /// + /// + /// The unique identifier of the workload estimate to delete. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.DeleteWorkloadEstimateResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Identifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-BCMPCWorkloadEstimate (DeleteWorkloadEstimate)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.DeleteWorkloadEstimateRequest(); + + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.DeleteWorkloadEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.DeleteWorkloadEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "DeleteWorkloadEstimate"); + try + { + #if DESKTOP + return client.DeleteWorkloadEstimate(request); + #elif CORECLR + return client.DeleteWorkloadEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Identifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCBillEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCBillEstimate-Cmdlet.cs new file mode 100644 index 000000000..2948e5e3a --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCBillEstimate-Cmdlet.cs @@ -0,0 +1,249 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Updates an existing bill estimate. + /// + [Cmdlet("Update", "BCMPCBillEstimate", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.UpdateBillEstimateResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator UpdateBillEstimate API operation.", Operation = new[] {"UpdateBillEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.UpdateBillEstimateResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.UpdateBillEstimateResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.UpdateBillEstimateResponse object containing multiple properties." + )] + public partial class UpdateBCMPCBillEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ExpiresAt + /// + /// + /// The new expiration date for the bill estimate. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAt { get; set; } + #endregion + + #region Parameter Identifier + /// + /// + /// The unique identifier of the bill estimate to update. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Name + /// + /// + /// The new name for the bill estimate. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Name { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.UpdateBillEstimateResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.UpdateBillEstimateResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Identifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-BCMPCBillEstimate (UpdateBillEstimate)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ExpiresAt = this.ExpiresAt; + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Name = this.Name; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.UpdateBillEstimateRequest(); + + if (cmdletContext.ExpiresAt != null) + { + request.ExpiresAt = cmdletContext.ExpiresAt.Value; + } + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.UpdateBillEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.UpdateBillEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "UpdateBillEstimate"); + try + { + #if DESKTOP + return client.UpdateBillEstimate(request); + #elif CORECLR + return client.UpdateBillEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.DateTime? ExpiresAt { get; set; } + public System.String Identifier { get; set; } + public System.String Name { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCBillScenario-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCBillScenario-Cmdlet.cs new file mode 100644 index 000000000..f0ed2a532 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCBillScenario-Cmdlet.cs @@ -0,0 +1,249 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Updates an existing bill scenario. + /// + [Cmdlet("Update", "BCMPCBillScenario", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.UpdateBillScenarioResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator UpdateBillScenario API operation.", Operation = new[] {"UpdateBillScenario"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.UpdateBillScenarioResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.UpdateBillScenarioResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.UpdateBillScenarioResponse object containing multiple properties." + )] + public partial class UpdateBCMPCBillScenarioCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ExpiresAt + /// + /// + /// The new expiration date for the bill scenario. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAt { get; set; } + #endregion + + #region Parameter Identifier + /// + /// + /// The unique identifier of the bill scenario to update. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Name + /// + /// + /// The new name for the bill scenario. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Name { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.UpdateBillScenarioResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.UpdateBillScenarioResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Identifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-BCMPCBillScenario (UpdateBillScenario)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ExpiresAt = this.ExpiresAt; + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Name = this.Name; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.UpdateBillScenarioRequest(); + + if (cmdletContext.ExpiresAt != null) + { + request.ExpiresAt = cmdletContext.ExpiresAt.Value; + } + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.UpdateBillScenarioResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.UpdateBillScenarioRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "UpdateBillScenario"); + try + { + #if DESKTOP + return client.UpdateBillScenario(request); + #elif CORECLR + return client.UpdateBillScenarioAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.DateTime? ExpiresAt { get; set; } + public System.String Identifier { get; set; } + public System.String Name { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCPreference-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCPreference-Cmdlet.cs new file mode 100644 index 000000000..12d196f0c --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCPreference-Cmdlet.cs @@ -0,0 +1,208 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Updates the preferences for the Amazon Web Services Cost Explorer service. + /// + [Cmdlet("Update", "BCMPCPreference", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.UpdatePreferencesResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator UpdatePreferences API operation.", Operation = new[] {"UpdatePreferences"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.UpdatePreferencesResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.UpdatePreferencesResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.UpdatePreferencesResponse object containing multiple properties." + )] + public partial class UpdateBCMPCPreferenceCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ManagementAccountRateTypeSelection + /// + /// + /// The updated preferred rate types for the management account. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ManagementAccountRateTypeSelections")] + public System.String[] ManagementAccountRateTypeSelection { get; set; } + #endregion + + #region Parameter MemberAccountRateTypeSelection + /// + /// + /// The updated preferred rate types for member accounts. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MemberAccountRateTypeSelections")] + public System.String[] MemberAccountRateTypeSelection { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.UpdatePreferencesResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.UpdatePreferencesResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = string.Empty; + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-BCMPCPreference (UpdatePreferences)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + if (this.ManagementAccountRateTypeSelection != null) + { + context.ManagementAccountRateTypeSelection = new List(this.ManagementAccountRateTypeSelection); + } + if (this.MemberAccountRateTypeSelection != null) + { + context.MemberAccountRateTypeSelection = new List(this.MemberAccountRateTypeSelection); + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.UpdatePreferencesRequest(); + + if (cmdletContext.ManagementAccountRateTypeSelection != null) + { + request.ManagementAccountRateTypeSelections = cmdletContext.ManagementAccountRateTypeSelection; + } + if (cmdletContext.MemberAccountRateTypeSelection != null) + { + request.MemberAccountRateTypeSelections = cmdletContext.MemberAccountRateTypeSelection; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.UpdatePreferencesResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.UpdatePreferencesRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "UpdatePreferences"); + try + { + #if DESKTOP + return client.UpdatePreferences(request); + #elif CORECLR + return client.UpdatePreferencesAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List ManagementAccountRateTypeSelection { get; set; } + public List MemberAccountRateTypeSelection { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCWorkloadEstimate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCWorkloadEstimate-Cmdlet.cs new file mode 100644 index 000000000..fc933ce11 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BCMPricingCalculator/Basic/Update-BCMPCWorkloadEstimate-Cmdlet.cs @@ -0,0 +1,249 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BCMPricingCalculator; +using Amazon.BCMPricingCalculator.Model; + +namespace Amazon.PowerShell.Cmdlets.BCMPC +{ + /// + /// Updates an existing workload estimate. + /// + [Cmdlet("Update", "BCMPCWorkloadEstimate", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateResponse")] + [AWSCmdlet("Calls the AWS Pricing Calculator UpdateWorkloadEstimate API operation.", Operation = new[] {"UpdateWorkloadEstimate"}, SelectReturnType = typeof(Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateResponse))] + [AWSCmdletOutput("Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateResponse", + "This cmdlet returns an Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateResponse object containing multiple properties." + )] + public partial class UpdateBCMPCWorkloadEstimateCmdlet : AmazonBCMPricingCalculatorClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ExpiresAt + /// + /// + /// The new expiration date for the workload estimate. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? ExpiresAt { get; set; } + #endregion + + #region Parameter Identifier + /// + /// + /// The unique identifier of the workload estimate to update. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Identifier { get; set; } + #endregion + + #region Parameter Name + /// + /// + /// The new name for the workload estimate. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Name { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateResponse). + /// Specifying the name of a property of type Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Identifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Identifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Identifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-BCMPCWorkloadEstimate (UpdateWorkloadEstimate)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Identifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ExpiresAt = this.ExpiresAt; + context.Identifier = this.Identifier; + #if MODULAR + if (this.Identifier == null && ParameterWasBound(nameof(this.Identifier))) + { + WriteWarning("You are passing $null as a value for parameter Identifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Name = this.Name; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateRequest(); + + if (cmdletContext.ExpiresAt != null) + { + request.ExpiresAt = cmdletContext.ExpiresAt.Value; + } + if (cmdletContext.Identifier != null) + { + request.Identifier = cmdletContext.Identifier; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateResponse CallAWSServiceOperation(IAmazonBCMPricingCalculator client, Amazon.BCMPricingCalculator.Model.UpdateWorkloadEstimateRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Pricing Calculator", "UpdateWorkloadEstimate"); + try + { + #if DESKTOP + return client.UpdateWorkloadEstimate(request); + #elif CORECLR + return client.UpdateWorkloadEstimateAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.DateTime? ExpiresAt { get; set; } + public System.String Identifier { get; set; } + public System.String Name { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.Completers.psm1 index 5719ca4cb..af1d0747a 100644 --- a/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.Completers.psm1 @@ -180,6 +180,7 @@ $BAR_SelectMap = @{ "Get-BARAgentMemory", "Invoke-BARAgent", "Invoke-BARFlow", + "Invoke-BARInlineAgent", "Get-BAROptimizePrompt", "Invoke-BARRetrieve", "Invoke-BARRetrieveAndGenerate") diff --git a/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.psd1 b/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.psd1 index 5e601cfd0..6d8055435 100644 --- a/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.psd1 +++ b/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/AWS.Tools.BedrockAgentRuntime.psd1 @@ -90,6 +90,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-BAROptimizePrompt', 'Invoke-BARAgent', 'Invoke-BARFlow', + 'Invoke-BARInlineAgent', 'Invoke-BARRetrieve', 'Invoke-BARRetrieveAndGenerate', 'Remove-BARAgentMemory') diff --git a/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/Basic/Invoke-BARInlineAgent-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/Basic/Invoke-BARInlineAgent-Cmdlet.cs new file mode 100644 index 000000000..85ac186fb --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/BedrockAgentRuntime/Basic/Invoke-BARInlineAgent-Cmdlet.cs @@ -0,0 +1,698 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.BedrockAgentRuntime; +using Amazon.BedrockAgentRuntime.Model; + +namespace Amazon.PowerShell.Cmdlets.BAR +{ + /// + /// Invokes an inline Amazon Bedrock agent using the configurations you provide with + /// the request. + /// + ///
  • + /// Specify the following fields for security purposes. + ///
    • + /// (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a KMS + /// key to encrypt the creation of the agent. + ///
    • + /// (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which + /// the agent should maintain session information. After this time expires, the subsequent + /// InvokeInlineAgent request begins a new session. + ///
  • + /// To override the default prompt behavior for agent orchestration and to use advanced + /// prompts, include a promptOverrideConfiguration object. For more information, + /// see Advanced + /// prompts. + ///
  • + /// The agent instructions will not be honored if your agent has only one knowledge base, + /// uses default prompts, has no action group, and user input is disabled. + ///
+ /// The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeInlineAgent. + /// + ///
+ [Cmdlet("Invoke", "BARInlineAgent", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse")] + [AWSCmdlet("Calls the Amazon Bedrock Agent Runtime InvokeInlineAgent API operation.", Operation = new[] {"InvokeInlineAgent"}, SelectReturnType = typeof(Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse))] + [AWSCmdletOutput("Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse", + "This cmdlet returns an Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse object containing multiple properties." + )] + public partial class InvokeBARInlineAgentCmdlet : AmazonBedrockAgentRuntimeClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ActionGroup + /// + /// + /// A list of action groups with each action group defining the action the inline agent + /// needs to carry out. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ActionGroups")] + public Amazon.BedrockAgentRuntime.Model.AgentActionGroup[] ActionGroup { get; set; } + #endregion + + #region Parameter CustomerEncryptionKeyArn + /// + /// + /// The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt + /// your inline agent. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String CustomerEncryptionKeyArn { get; set; } + #endregion + + #region Parameter EnableTrace + /// + /// + /// Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentRequest.EnableTrace + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Boolean? EnableTrace { get; set; } + #endregion + + #region Parameter EndSession + /// + /// + /// Specifies whether to end the session with the inline agent or not. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Boolean? EndSession { get; set; } + #endregion + + #region Parameter InlineSessionState_File + /// + /// + /// Contains information about the files used by code interpreter. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("InlineSessionState_Files")] + public Amazon.BedrockAgentRuntime.Model.InputFile[] InlineSessionState_File { get; set; } + #endregion + + #region Parameter FoundationModel + /// + /// + /// The model + /// identifier (ID) of the model to use for orchestration by the inline agent. For + /// example, meta.llama3-1-70b-instruct-v1:0. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String FoundationModel { get; set; } + #endregion + + #region Parameter GuardrailConfiguration_GuardrailIdentifier + /// + /// + /// The unique identifier for the guardrail. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String GuardrailConfiguration_GuardrailIdentifier { get; set; } + #endregion + + #region Parameter GuardrailConfiguration_GuardrailVersion + /// + /// + /// The version of the guardrail. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String GuardrailConfiguration_GuardrailVersion { get; set; } + #endregion + + #region Parameter IdleSessionTTLInSecond + /// + /// + /// The number of seconds for which the inline agent should maintain session information. + /// After this time expires, the subsequent InvokeInlineAgent request begins a + /// new session. A user interaction remains active for the amount of time specified. If no conversation + /// occurs during this time, the session expires and the data provided before the timeout + /// is deleted. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("IdleSessionTTLInSeconds")] + public System.Int32? IdleSessionTTLInSecond { get; set; } + #endregion + + #region Parameter InputText + /// + /// + /// The prompt text to send to the agent. If you include returnControlInvocationResults in the sessionState field, + /// the inputText field will be ignored. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String InputText { get; set; } + #endregion + + #region Parameter Instruction + /// + /// + /// The instructions that tell the inline agent what it should do and how it should interact + /// with users. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Instruction { get; set; } + #endregion + + #region Parameter InlineSessionState_InvocationId + /// + /// + /// The identifier of the invocation of an action. This value must match the invocationId + /// returned in the InvokeInlineAgent response for the action whose results are + /// provided in the returnControlInvocationResults field. For more information, + /// see Return + /// control to the agent developer. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String InlineSessionState_InvocationId { get; set; } + #endregion + + #region Parameter KnowledgeBases + /// + /// + /// Contains information of the knowledge bases to associate with. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public Amazon.BedrockAgentRuntime.Model.KnowledgeBase[] KnowledgeBases { get; set; } + #endregion + + #region Parameter PromptOverrideConfiguration_OverrideLambda + /// + /// + /// The ARN of the Lambda function to use when parsing the raw foundation model output + /// in parts of the agent sequence. If you specify this field, at least one of the promptConfigurations + /// must contain a parserMode value that is set to OVERRIDDEN. For more + /// information, see Parser + /// Lambda function in Amazon Bedrock Agents. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String PromptOverrideConfiguration_OverrideLambda { get; set; } + #endregion + + #region Parameter PromptOverrideConfiguration_PromptConfiguration + /// + /// + /// Contains configurations to override a prompt template in one part of an agent sequence. + /// For more information, see Advanced + /// prompts. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("PromptOverrideConfiguration_PromptConfigurations")] + public Amazon.BedrockAgentRuntime.Model.PromptConfiguration[] PromptOverrideConfiguration_PromptConfiguration { get; set; } + #endregion + + #region Parameter InlineSessionState_PromptSessionAttribute + /// + /// + /// Contains attributes that persist across a session and the values of those attributes. + /// + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("InlineSessionState_PromptSessionAttributes")] + public System.Collections.Hashtable InlineSessionState_PromptSessionAttribute { get; set; } + #endregion + + #region Parameter InlineSessionState_ReturnControlInvocationResult + /// + /// + /// Contains information about the results from the action group invocation. For more + /// information, see Return + /// control to the agent developer. If you include this field in the sessionState field, the inputText field + /// will be ignored. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("InlineSessionState_ReturnControlInvocationResults")] + public Amazon.BedrockAgentRuntime.Model.InvocationResultMember[] InlineSessionState_ReturnControlInvocationResult { get; set; } + #endregion + + #region Parameter InlineSessionState_SessionAttribute + /// + /// + /// Contains attributes that persist across a session and the values of those attributes. + /// + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("InlineSessionState_SessionAttributes")] + public System.Collections.Hashtable InlineSessionState_SessionAttribute { get; set; } + #endregion + + #region Parameter SessionId + /// + /// + /// The unique identifier of the session. Use the same value across requests to continue + /// the same conversation. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String SessionId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse). + /// Specifying the name of a property of type Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the SessionId parameter. + /// The -PassThru parameter is deprecated, use -Select '^SessionId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^SessionId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.SessionId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Invoke-BARInlineAgent (InvokeInlineAgent)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.SessionId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.ActionGroup != null) + { + context.ActionGroup = new List(this.ActionGroup); + } + context.CustomerEncryptionKeyArn = this.CustomerEncryptionKeyArn; + context.EnableTrace = this.EnableTrace; + context.EndSession = this.EndSession; + context.FoundationModel = this.FoundationModel; + #if MODULAR + if (this.FoundationModel == null && ParameterWasBound(nameof(this.FoundationModel))) + { + WriteWarning("You are passing $null as a value for parameter FoundationModel which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.GuardrailConfiguration_GuardrailIdentifier = this.GuardrailConfiguration_GuardrailIdentifier; + context.GuardrailConfiguration_GuardrailVersion = this.GuardrailConfiguration_GuardrailVersion; + context.IdleSessionTTLInSecond = this.IdleSessionTTLInSecond; + if (this.InlineSessionState_File != null) + { + context.InlineSessionState_File = new List(this.InlineSessionState_File); + } + context.InlineSessionState_InvocationId = this.InlineSessionState_InvocationId; + if (this.InlineSessionState_PromptSessionAttribute != null) + { + context.InlineSessionState_PromptSessionAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.InlineSessionState_PromptSessionAttribute.Keys) + { + context.InlineSessionState_PromptSessionAttribute.Add((String)hashKey, (System.String)(this.InlineSessionState_PromptSessionAttribute[hashKey])); + } + } + if (this.InlineSessionState_ReturnControlInvocationResult != null) + { + context.InlineSessionState_ReturnControlInvocationResult = new List(this.InlineSessionState_ReturnControlInvocationResult); + } + if (this.InlineSessionState_SessionAttribute != null) + { + context.InlineSessionState_SessionAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.InlineSessionState_SessionAttribute.Keys) + { + context.InlineSessionState_SessionAttribute.Add((String)hashKey, (System.String)(this.InlineSessionState_SessionAttribute[hashKey])); + } + } + context.InputText = this.InputText; + context.Instruction = this.Instruction; + #if MODULAR + if (this.Instruction == null && ParameterWasBound(nameof(this.Instruction))) + { + WriteWarning("You are passing $null as a value for parameter Instruction which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.KnowledgeBases != null) + { + context.KnowledgeBases = new List(this.KnowledgeBases); + } + context.PromptOverrideConfiguration_OverrideLambda = this.PromptOverrideConfiguration_OverrideLambda; + if (this.PromptOverrideConfiguration_PromptConfiguration != null) + { + context.PromptOverrideConfiguration_PromptConfiguration = new List(this.PromptOverrideConfiguration_PromptConfiguration); + } + context.SessionId = this.SessionId; + #if MODULAR + if (this.SessionId == null && ParameterWasBound(nameof(this.SessionId))) + { + WriteWarning("You are passing $null as a value for parameter SessionId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentRequest(); + + if (cmdletContext.ActionGroup != null) + { + request.ActionGroups = cmdletContext.ActionGroup; + } + if (cmdletContext.CustomerEncryptionKeyArn != null) + { + request.CustomerEncryptionKeyArn = cmdletContext.CustomerEncryptionKeyArn; + } + if (cmdletContext.EnableTrace != null) + { + request.EnableTrace = cmdletContext.EnableTrace.Value; + } + if (cmdletContext.EndSession != null) + { + request.EndSession = cmdletContext.EndSession.Value; + } + if (cmdletContext.FoundationModel != null) + { + request.FoundationModel = cmdletContext.FoundationModel; + } + + // populate GuardrailConfiguration + var requestGuardrailConfigurationIsNull = true; + request.GuardrailConfiguration = new Amazon.BedrockAgentRuntime.Model.GuardrailConfigurationWithArn(); + System.String requestGuardrailConfiguration_guardrailConfiguration_GuardrailIdentifier = null; + if (cmdletContext.GuardrailConfiguration_GuardrailIdentifier != null) + { + requestGuardrailConfiguration_guardrailConfiguration_GuardrailIdentifier = cmdletContext.GuardrailConfiguration_GuardrailIdentifier; + } + if (requestGuardrailConfiguration_guardrailConfiguration_GuardrailIdentifier != null) + { + request.GuardrailConfiguration.GuardrailIdentifier = requestGuardrailConfiguration_guardrailConfiguration_GuardrailIdentifier; + requestGuardrailConfigurationIsNull = false; + } + System.String requestGuardrailConfiguration_guardrailConfiguration_GuardrailVersion = null; + if (cmdletContext.GuardrailConfiguration_GuardrailVersion != null) + { + requestGuardrailConfiguration_guardrailConfiguration_GuardrailVersion = cmdletContext.GuardrailConfiguration_GuardrailVersion; + } + if (requestGuardrailConfiguration_guardrailConfiguration_GuardrailVersion != null) + { + request.GuardrailConfiguration.GuardrailVersion = requestGuardrailConfiguration_guardrailConfiguration_GuardrailVersion; + requestGuardrailConfigurationIsNull = false; + } + // determine if request.GuardrailConfiguration should be set to null + if (requestGuardrailConfigurationIsNull) + { + request.GuardrailConfiguration = null; + } + if (cmdletContext.IdleSessionTTLInSecond != null) + { + request.IdleSessionTTLInSeconds = cmdletContext.IdleSessionTTLInSecond.Value; + } + + // populate InlineSessionState + var requestInlineSessionStateIsNull = true; + request.InlineSessionState = new Amazon.BedrockAgentRuntime.Model.InlineSessionState(); + List requestInlineSessionState_inlineSessionState_File = null; + if (cmdletContext.InlineSessionState_File != null) + { + requestInlineSessionState_inlineSessionState_File = cmdletContext.InlineSessionState_File; + } + if (requestInlineSessionState_inlineSessionState_File != null) + { + request.InlineSessionState.Files = requestInlineSessionState_inlineSessionState_File; + requestInlineSessionStateIsNull = false; + } + System.String requestInlineSessionState_inlineSessionState_InvocationId = null; + if (cmdletContext.InlineSessionState_InvocationId != null) + { + requestInlineSessionState_inlineSessionState_InvocationId = cmdletContext.InlineSessionState_InvocationId; + } + if (requestInlineSessionState_inlineSessionState_InvocationId != null) + { + request.InlineSessionState.InvocationId = requestInlineSessionState_inlineSessionState_InvocationId; + requestInlineSessionStateIsNull = false; + } + Dictionary requestInlineSessionState_inlineSessionState_PromptSessionAttribute = null; + if (cmdletContext.InlineSessionState_PromptSessionAttribute != null) + { + requestInlineSessionState_inlineSessionState_PromptSessionAttribute = cmdletContext.InlineSessionState_PromptSessionAttribute; + } + if (requestInlineSessionState_inlineSessionState_PromptSessionAttribute != null) + { + request.InlineSessionState.PromptSessionAttributes = requestInlineSessionState_inlineSessionState_PromptSessionAttribute; + requestInlineSessionStateIsNull = false; + } + List requestInlineSessionState_inlineSessionState_ReturnControlInvocationResult = null; + if (cmdletContext.InlineSessionState_ReturnControlInvocationResult != null) + { + requestInlineSessionState_inlineSessionState_ReturnControlInvocationResult = cmdletContext.InlineSessionState_ReturnControlInvocationResult; + } + if (requestInlineSessionState_inlineSessionState_ReturnControlInvocationResult != null) + { + request.InlineSessionState.ReturnControlInvocationResults = requestInlineSessionState_inlineSessionState_ReturnControlInvocationResult; + requestInlineSessionStateIsNull = false; + } + Dictionary requestInlineSessionState_inlineSessionState_SessionAttribute = null; + if (cmdletContext.InlineSessionState_SessionAttribute != null) + { + requestInlineSessionState_inlineSessionState_SessionAttribute = cmdletContext.InlineSessionState_SessionAttribute; + } + if (requestInlineSessionState_inlineSessionState_SessionAttribute != null) + { + request.InlineSessionState.SessionAttributes = requestInlineSessionState_inlineSessionState_SessionAttribute; + requestInlineSessionStateIsNull = false; + } + // determine if request.InlineSessionState should be set to null + if (requestInlineSessionStateIsNull) + { + request.InlineSessionState = null; + } + if (cmdletContext.InputText != null) + { + request.InputText = cmdletContext.InputText; + } + if (cmdletContext.Instruction != null) + { + request.Instruction = cmdletContext.Instruction; + } + if (cmdletContext.KnowledgeBases != null) + { + request.KnowledgeBases = cmdletContext.KnowledgeBases; + } + + // populate PromptOverrideConfiguration + var requestPromptOverrideConfigurationIsNull = true; + request.PromptOverrideConfiguration = new Amazon.BedrockAgentRuntime.Model.PromptOverrideConfiguration(); + System.String requestPromptOverrideConfiguration_promptOverrideConfiguration_OverrideLambda = null; + if (cmdletContext.PromptOverrideConfiguration_OverrideLambda != null) + { + requestPromptOverrideConfiguration_promptOverrideConfiguration_OverrideLambda = cmdletContext.PromptOverrideConfiguration_OverrideLambda; + } + if (requestPromptOverrideConfiguration_promptOverrideConfiguration_OverrideLambda != null) + { + request.PromptOverrideConfiguration.OverrideLambda = requestPromptOverrideConfiguration_promptOverrideConfiguration_OverrideLambda; + requestPromptOverrideConfigurationIsNull = false; + } + List requestPromptOverrideConfiguration_promptOverrideConfiguration_PromptConfiguration = null; + if (cmdletContext.PromptOverrideConfiguration_PromptConfiguration != null) + { + requestPromptOverrideConfiguration_promptOverrideConfiguration_PromptConfiguration = cmdletContext.PromptOverrideConfiguration_PromptConfiguration; + } + if (requestPromptOverrideConfiguration_promptOverrideConfiguration_PromptConfiguration != null) + { + request.PromptOverrideConfiguration.PromptConfigurations = requestPromptOverrideConfiguration_promptOverrideConfiguration_PromptConfiguration; + requestPromptOverrideConfigurationIsNull = false; + } + // determine if request.PromptOverrideConfiguration should be set to null + if (requestPromptOverrideConfigurationIsNull) + { + request.PromptOverrideConfiguration = null; + } + if (cmdletContext.SessionId != null) + { + request.SessionId = cmdletContext.SessionId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse CallAWSServiceOperation(IAmazonBedrockAgentRuntime client, Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Bedrock Agent Runtime", "InvokeInlineAgent"); + try + { + #if DESKTOP + return client.InvokeInlineAgent(request); + #elif CORECLR + return client.InvokeInlineAgentAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List ActionGroup { get; set; } + public System.String CustomerEncryptionKeyArn { get; set; } + public System.Boolean? EnableTrace { get; set; } + public System.Boolean? EndSession { get; set; } + public System.String FoundationModel { get; set; } + public System.String GuardrailConfiguration_GuardrailIdentifier { get; set; } + public System.String GuardrailConfiguration_GuardrailVersion { get; set; } + public System.Int32? IdleSessionTTLInSecond { get; set; } + public List InlineSessionState_File { get; set; } + public System.String InlineSessionState_InvocationId { get; set; } + public Dictionary InlineSessionState_PromptSessionAttribute { get; set; } + public List InlineSessionState_ReturnControlInvocationResult { get; set; } + public Dictionary InlineSessionState_SessionAttribute { get; set; } + public System.String InputText { get; set; } + public System.String Instruction { get; set; } + public List KnowledgeBases { get; set; } + public System.String PromptOverrideConfiguration_OverrideLambda { get; set; } + public List PromptOverrideConfiguration_PromptConfiguration { get; set; } + public System.String SessionId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.Completers.psm1 index 392ff021d..7e251a595 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.Completers.psm1 @@ -123,10 +123,13 @@ $CHAT_SelectCompleters = { } $CHAT_SelectMap = @{ - "Select"=@("New-CHATChimeWebhookConfiguration", + "Select"=@("Register-CHATAssociation", + "New-CHATChimeWebhookConfiguration", + "New-CHATCustomAction", "New-CHATMicrosoftTeamsChannelConfiguration", "New-CHATSlackChannelConfiguration", "Remove-CHATChimeWebhookConfiguration", + "Remove-CHATCustomAction", "Remove-CHATMicrosoftTeamsChannelConfiguration", "Remove-CHATMicrosoftTeamsConfiguredTeam", "Remove-CHATMicrosoftTeamsUserIdentity", @@ -137,8 +140,12 @@ $CHAT_SelectMap = @{ "Get-CHATSlackChannelConfiguration", "Get-CHATSlackUserIdentity", "Get-CHATSlackWorkspace", + "Unregister-CHATAssociation", "Get-CHATAccountPreference", + "Get-CHATCustomAction", "Get-CHATMicrosoftTeamsChannelConfiguration", + "Get-CHATAssociationList", + "Get-CHATCustomActionList", "Get-CHATMicrosoftTeamsChannelConfigurationList", "Get-CHATMicrosoftTeamsConfiguredTeamList", "Get-CHATMicrosoftTeamsUserIdentityList", @@ -147,6 +154,7 @@ $CHAT_SelectMap = @{ "Remove-CHATResourceTag", "Update-CHATAccountPreference", "Update-CHATChimeWebhookConfiguration", + "Update-CHATCustomAction", "Update-CHATMicrosoftTeamsChannelConfiguration", "Update-CHATSlackChannelConfiguration") } diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.psd1 b/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.psd1 index 3e4dbfef1..aec791de7 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.psd1 +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/AWS.Tools.Chatbot.psd1 @@ -88,7 +88,10 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 CmdletsToExport = @( 'Add-CHATResourceTag', 'Get-CHATAccountPreference', + 'Get-CHATAssociationList', 'Get-CHATChimeWebhookConfiguration', + 'Get-CHATCustomAction', + 'Get-CHATCustomActionList', 'Get-CHATMicrosoftTeamsChannelConfiguration', 'Get-CHATMicrosoftTeamsChannelConfigurationList', 'Get-CHATMicrosoftTeamsConfiguredTeamList', @@ -98,9 +101,12 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-CHATSlackUserIdentity', 'Get-CHATSlackWorkspace', 'New-CHATChimeWebhookConfiguration', + 'New-CHATCustomAction', 'New-CHATMicrosoftTeamsChannelConfiguration', 'New-CHATSlackChannelConfiguration', + 'Register-CHATAssociation', 'Remove-CHATChimeWebhookConfiguration', + 'Remove-CHATCustomAction', 'Remove-CHATMicrosoftTeamsChannelConfiguration', 'Remove-CHATMicrosoftTeamsConfiguredTeam', 'Remove-CHATMicrosoftTeamsUserIdentity', @@ -108,8 +114,10 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Remove-CHATSlackChannelConfiguration', 'Remove-CHATSlackUserIdentity', 'Remove-CHATSlackWorkspaceAuthorization', + 'Unregister-CHATAssociation', 'Update-CHATAccountPreference', 'Update-CHATChimeWebhookConfiguration', + 'Update-CHATCustomAction', 'Update-CHATMicrosoftTeamsChannelConfiguration', 'Update-CHATSlackChannelConfiguration') diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATAssociationList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATAssociationList-Cmdlet.cs new file mode 100644 index 000000000..07d6b5234 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATAssociationList-Cmdlet.cs @@ -0,0 +1,219 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Lists resources associated with a channel configuration. + /// + [Cmdlet("Get", "CHATAssociationList")] + [OutputType("Amazon.Chatbot.Model.AssociationListing")] + [AWSCmdlet("Calls the AWS Chatbot ListAssociations API operation.", Operation = new[] {"ListAssociations"}, SelectReturnType = typeof(Amazon.Chatbot.Model.ListAssociationsResponse))] + [AWSCmdletOutput("Amazon.Chatbot.Model.AssociationListing or Amazon.Chatbot.Model.ListAssociationsResponse", + "This cmdlet returns a collection of Amazon.Chatbot.Model.AssociationListing objects.", + "The service call response (type Amazon.Chatbot.Model.ListAssociationsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetCHATAssociationListCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ChatConfiguration + /// + /// + /// The channel configuration to list associations for. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ChatConfiguration { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to include in the response. If more results exist than + /// the specified MaxResults value, a token is included in the response so that the remaining + /// results can be retrieved. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// An optional token returned from a prior request. Use this token for pagination of + /// results from this action. If this parameter is specified, the response includes only + /// results beyond the token, up to the value specified by MaxResults. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Associations'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.ListAssociationsResponse). + /// Specifying the name of a property of type Amazon.Chatbot.Model.ListAssociationsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Associations"; + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.ChatConfiguration = this.ChatConfiguration; + #if MODULAR + if (this.ChatConfiguration == null && ParameterWasBound(nameof(this.ChatConfiguration))) + { + WriteWarning("You are passing $null as a value for parameter ChatConfiguration which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.ListAssociationsRequest(); + + if (cmdletContext.ChatConfiguration != null) + { + request.ChatConfiguration = cmdletContext.ChatConfiguration; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.ListAssociationsResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.ListAssociationsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "ListAssociations"); + try + { + #if DESKTOP + return client.ListAssociations(request); + #elif CORECLR + return client.ListAssociationsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ChatConfiguration { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Associations; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATChimeWebhookConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATChimeWebhookConfiguration-Cmdlet.cs index 39fe0159c..434714f15 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATChimeWebhookConfiguration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATChimeWebhookConfiguration-Cmdlet.cs @@ -47,7 +47,7 @@ public partial class GetCHATChimeWebhookConfigurationCmdlet : AmazonChatbotClien #region Parameter ChatConfigurationArn /// /// - /// An optional Amazon Resource Number (ARN) of a ChimeWebhookConfiguration to describe. + /// An optional Amazon Resource Name (ARN) of a ChimeWebhookConfiguration to describe. /// /// [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATCustomAction-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATCustomAction-Cmdlet.cs new file mode 100644 index 000000000..a2fbf7d29 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATCustomAction-Cmdlet.cs @@ -0,0 +1,202 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Returns a custom action. + /// + [Cmdlet("Get", "CHATCustomAction")] + [OutputType("Amazon.Chatbot.Model.CustomAction")] + [AWSCmdlet("Calls the AWS Chatbot GetCustomAction API operation.", Operation = new[] {"GetCustomAction"}, SelectReturnType = typeof(Amazon.Chatbot.Model.GetCustomActionResponse))] + [AWSCmdletOutput("Amazon.Chatbot.Model.CustomAction or Amazon.Chatbot.Model.GetCustomActionResponse", + "This cmdlet returns an Amazon.Chatbot.Model.CustomAction object.", + "The service call response (type Amazon.Chatbot.Model.GetCustomActionResponse) can be returned by specifying '-Select *'." + )] + public partial class GetCHATCustomActionCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter CustomActionArn + /// + /// + /// Returns the fully defined Amazon Resource Name (ARN) of the custom action. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String CustomActionArn { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'CustomAction'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.GetCustomActionResponse). + /// Specifying the name of a property of type Amazon.Chatbot.Model.GetCustomActionResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "CustomAction"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the CustomActionArn parameter. + /// The -PassThru parameter is deprecated, use -Select '^CustomActionArn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^CustomActionArn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.CustomActionArn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.CustomActionArn = this.CustomActionArn; + #if MODULAR + if (this.CustomActionArn == null && ParameterWasBound(nameof(this.CustomActionArn))) + { + WriteWarning("You are passing $null as a value for parameter CustomActionArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.GetCustomActionRequest(); + + if (cmdletContext.CustomActionArn != null) + { + request.CustomActionArn = cmdletContext.CustomActionArn; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.GetCustomActionResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.GetCustomActionRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "GetCustomAction"); + try + { + #if DESKTOP + return client.GetCustomAction(request); + #elif CORECLR + return client.GetCustomActionAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String CustomActionArn { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.CustomAction; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATCustomActionList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATCustomActionList-Cmdlet.cs new file mode 100644 index 000000000..00defa445 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATCustomActionList-Cmdlet.cs @@ -0,0 +1,190 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Lists custom actions defined in this account. + /// + [Cmdlet("Get", "CHATCustomActionList")] + [OutputType("System.String")] + [AWSCmdlet("Calls the AWS Chatbot ListCustomActions API operation.", Operation = new[] {"ListCustomActions"}, SelectReturnType = typeof(Amazon.Chatbot.Model.ListCustomActionsResponse))] + [AWSCmdletOutput("System.String or Amazon.Chatbot.Model.ListCustomActionsResponse", + "This cmdlet returns a collection of System.String objects.", + "The service call response (type Amazon.Chatbot.Model.ListCustomActionsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetCHATCustomActionListCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to include in the response. If more results exist than + /// the specified MaxResults value, a token is included in the response so that the remaining + /// results can be retrieved. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// An optional token returned from a prior request. Use this token for pagination of + /// results from this action. If this parameter is specified, the response includes only + /// results beyond the token, up to the value specified by MaxResults. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'CustomActions'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.ListCustomActionsResponse). + /// Specifying the name of a property of type Amazon.Chatbot.Model.ListCustomActionsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "CustomActions"; + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.ListCustomActionsRequest(); + + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.ListCustomActionsResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.ListCustomActionsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "ListCustomActions"); + try + { + #if DESKTOP + return client.ListCustomActions(request); + #elif CORECLR + return client.ListCustomActionsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.CustomActions; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs index f89eec5a7..8d2eb5f08 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs @@ -47,7 +47,7 @@ public partial class GetCHATMicrosoftTeamsChannelConfigurationCmdlet : AmazonCha #region Parameter ChatConfigurationArn /// /// - /// The Amazon Resource Number (ARN) of the MicrosoftTeamsChannelConfiguration to retrieve. + /// The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration to retrieve. /// /// #if !MODULAR diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsUserIdentityList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsUserIdentityList-Cmdlet.cs index 98fdc29a2..d161256f6 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsUserIdentityList-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATMicrosoftTeamsUserIdentityList-Cmdlet.cs @@ -45,7 +45,7 @@ public partial class GetCHATMicrosoftTeamsUserIdentityListCmdlet : AmazonChatbot #region Parameter ChatConfigurationArn /// /// - /// The Amazon Resource Number (ARN) of the MicrosoftTeamsChannelConfiguration associated + /// The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated /// with the user identities to list. /// /// diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATResourceTag-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATResourceTag-Cmdlet.cs index 42cf51ce1..006c7f03c 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATResourceTag-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATResourceTag-Cmdlet.cs @@ -46,7 +46,7 @@ public partial class GetCHATResourceTagCmdlet : AmazonChatbotClientCmdlet, IExec #region Parameter ResourceARN /// /// - /// The ARN you specified to list the tags of. + /// The ARN of the resource to list tags for. /// /// #if !MODULAR diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackChannelConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackChannelConfiguration-Cmdlet.cs index 25edd8a57..444a88182 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackChannelConfiguration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackChannelConfiguration-Cmdlet.cs @@ -47,7 +47,7 @@ public partial class GetCHATSlackChannelConfigurationCmdlet : AmazonChatbotClien #region Parameter ChatConfigurationArn /// /// - /// An optional Amazon Resource Number (ARN) of a SlackChannelConfiguration to describe. + /// An optional Amazon Resource Name (ARN) of a SlackChannelConfiguration to describe. /// /// [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackUserIdentity-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackUserIdentity-Cmdlet.cs index 1ce62c61a..b64f6b0d5 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackUserIdentity-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Get-CHATSlackUserIdentity-Cmdlet.cs @@ -45,8 +45,8 @@ public partial class GetCHATSlackUserIdentityCmdlet : AmazonChatbotClientCmdlet, #region Parameter ChatConfigurationArn /// /// - /// The Amazon Resource Number (ARN) of the SlackChannelConfiguration associated with - /// the user identities to describe. + /// The Amazon Resource Name (ARN) of the SlackChannelConfiguration associated with the + /// user identities to describe. /// /// [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/New-CHATCustomAction-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/New-CHATCustomAction-Cmdlet.cs new file mode 100644 index 000000000..9f099bb0a --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/New-CHATCustomAction-Cmdlet.cs @@ -0,0 +1,319 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Creates a custom action that can be invoked as an alias or as a button on a notification. + /// + [Cmdlet("New", "CHATCustomAction", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("System.String")] + [AWSCmdlet("Calls the AWS Chatbot CreateCustomAction API operation.", Operation = new[] {"CreateCustomAction"}, SelectReturnType = typeof(Amazon.Chatbot.Model.CreateCustomActionResponse))] + [AWSCmdletOutput("System.String or Amazon.Chatbot.Model.CreateCustomActionResponse", + "This cmdlet returns a System.String object.", + "The service call response (type Amazon.Chatbot.Model.CreateCustomActionResponse) can be returned by specifying '-Select *'." + )] + public partial class NewCHATCustomActionCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ActionName + /// + /// + /// The name of the custom action. This name is included in the Amazon Resource Name (ARN). + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ActionName { get; set; } + #endregion + + #region Parameter AliasName + /// + /// + /// The name used to invoke this action in a chat channel. For example, @aws run my-alias. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String AliasName { get; set; } + #endregion + + #region Parameter Attachment + /// + /// + /// Defines when this custom action button should be attached to a notification. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Attachments")] + public Amazon.Chatbot.Model.CustomActionAttachment[] Attachment { get; set; } + #endregion + + #region Parameter Definition_CommandText + /// + /// + /// The command string to run which may include variables by prefixing with a dollar sign + /// ($). + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Definition_CommandText { get; set; } + #endregion + + #region Parameter Tag + /// + /// + /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value + /// pairs. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Tags")] + public Amazon.Chatbot.Model.Tag[] Tag { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// A unique, case-sensitive identifier that you provide to ensure the idempotency of + /// the request. Idempotency ensures that an API request completes only once. With an + /// idempotent request, if the original request completes successfully, subsequent retries + /// with the same client token returns the result from the original successful request.If you do not specify a client token, one is automatically generated by the SDK. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'CustomActionArn'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.CreateCustomActionResponse). + /// Specifying the name of a property of type Amazon.Chatbot.Model.CreateCustomActionResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "CustomActionArn"; + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.ActionName), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-CHATCustomAction (CreateCustomAction)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.ActionName = this.ActionName; + #if MODULAR + if (this.ActionName == null && ParameterWasBound(nameof(this.ActionName))) + { + WriteWarning("You are passing $null as a value for parameter ActionName which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.AliasName = this.AliasName; + if (this.Attachment != null) + { + context.Attachment = new List(this.Attachment); + } + context.ClientToken = this.ClientToken; + context.Definition_CommandText = this.Definition_CommandText; + #if MODULAR + if (this.Definition_CommandText == null && ParameterWasBound(nameof(this.Definition_CommandText))) + { + WriteWarning("You are passing $null as a value for parameter Definition_CommandText which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Tag != null) + { + context.Tag = new List(this.Tag); + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.CreateCustomActionRequest(); + + if (cmdletContext.ActionName != null) + { + request.ActionName = cmdletContext.ActionName; + } + if (cmdletContext.AliasName != null) + { + request.AliasName = cmdletContext.AliasName; + } + if (cmdletContext.Attachment != null) + { + request.Attachments = cmdletContext.Attachment; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + + // populate Definition + var requestDefinitionIsNull = true; + request.Definition = new Amazon.Chatbot.Model.CustomActionDefinition(); + System.String requestDefinition_definition_CommandText = null; + if (cmdletContext.Definition_CommandText != null) + { + requestDefinition_definition_CommandText = cmdletContext.Definition_CommandText; + } + if (requestDefinition_definition_CommandText != null) + { + request.Definition.CommandText = requestDefinition_definition_CommandText; + requestDefinitionIsNull = false; + } + // determine if request.Definition should be set to null + if (requestDefinitionIsNull) + { + request.Definition = null; + } + if (cmdletContext.Tag != null) + { + request.Tags = cmdletContext.Tag; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.CreateCustomActionResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.CreateCustomActionRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "CreateCustomAction"); + try + { + #if DESKTOP + return client.CreateCustomAction(request); + #elif CORECLR + return client.CreateCustomActionAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ActionName { get; set; } + public System.String AliasName { get; set; } + public List Attachment { get; set; } + public System.String ClientToken { get; set; } + public System.String Definition_CommandText { get; set; } + public List Tag { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.CustomActionArn; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Register-CHATAssociation-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Register-CHATAssociation-Cmdlet.cs new file mode 100644 index 000000000..26f120cf6 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Register-CHATAssociation-Cmdlet.cs @@ -0,0 +1,226 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Links a resource (for example, a custom action) to a channel configuration. + /// + [Cmdlet("Register", "CHATAssociation", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Chatbot AssociateToConfiguration API operation.", Operation = new[] {"AssociateToConfiguration"}, SelectReturnType = typeof(Amazon.Chatbot.Model.AssociateToConfigurationResponse))] + [AWSCmdletOutput("None or Amazon.Chatbot.Model.AssociateToConfigurationResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.Chatbot.Model.AssociateToConfigurationResponse) be returned by specifying '-Select *'." + )] + public partial class RegisterCHATAssociationCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ChatConfiguration + /// + /// + /// The channel configuration to associate with the resource. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ChatConfiguration { get; set; } + #endregion + + #region Parameter Resource + /// + /// + /// The resource Amazon Resource Name (ARN) to link. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Resource { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.AssociateToConfigurationResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.ChatConfiguration), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Register-CHATAssociation (AssociateToConfiguration)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.ChatConfiguration = this.ChatConfiguration; + #if MODULAR + if (this.ChatConfiguration == null && ParameterWasBound(nameof(this.ChatConfiguration))) + { + WriteWarning("You are passing $null as a value for parameter ChatConfiguration which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Resource = this.Resource; + #if MODULAR + if (this.Resource == null && ParameterWasBound(nameof(this.Resource))) + { + WriteWarning("You are passing $null as a value for parameter Resource which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.AssociateToConfigurationRequest(); + + if (cmdletContext.ChatConfiguration != null) + { + request.ChatConfiguration = cmdletContext.ChatConfiguration; + } + if (cmdletContext.Resource != null) + { + request.Resource = cmdletContext.Resource; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.AssociateToConfigurationResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.AssociateToConfigurationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "AssociateToConfiguration"); + try + { + #if DESKTOP + return client.AssociateToConfiguration(request); + #elif CORECLR + return client.AssociateToConfigurationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ChatConfiguration { get; set; } + public System.String Resource { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Remove-CHATCustomAction-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Remove-CHATCustomAction-Cmdlet.cs new file mode 100644 index 000000000..c4f9cd1bd --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Remove-CHATCustomAction-Cmdlet.cs @@ -0,0 +1,217 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Deletes a custom action. + /// + [Cmdlet("Remove", "CHATCustomAction", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Chatbot DeleteCustomAction API operation.", Operation = new[] {"DeleteCustomAction"}, SelectReturnType = typeof(Amazon.Chatbot.Model.DeleteCustomActionResponse))] + [AWSCmdletOutput("None or Amazon.Chatbot.Model.DeleteCustomActionResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.Chatbot.Model.DeleteCustomActionResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveCHATCustomActionCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter CustomActionArn + /// + /// + /// The fully defined ARN of the custom action. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String CustomActionArn { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.DeleteCustomActionResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the CustomActionArn parameter. + /// The -PassThru parameter is deprecated, use -Select '^CustomActionArn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^CustomActionArn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.CustomActionArn), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-CHATCustomAction (DeleteCustomAction)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.CustomActionArn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.CustomActionArn = this.CustomActionArn; + #if MODULAR + if (this.CustomActionArn == null && ParameterWasBound(nameof(this.CustomActionArn))) + { + WriteWarning("You are passing $null as a value for parameter CustomActionArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.DeleteCustomActionRequest(); + + if (cmdletContext.CustomActionArn != null) + { + request.CustomActionArn = cmdletContext.CustomActionArn; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.DeleteCustomActionResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.DeleteCustomActionRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "DeleteCustomAction"); + try + { + #if DESKTOP + return client.DeleteCustomAction(request); + #elif CORECLR + return client.DeleteCustomActionAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String CustomActionArn { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Unregister-CHATAssociation-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Unregister-CHATAssociation-Cmdlet.cs new file mode 100644 index 000000000..133e003ff --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Unregister-CHATAssociation-Cmdlet.cs @@ -0,0 +1,226 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Unlink a resource, for example a custom action, from a channel configuration. + /// + [Cmdlet("Unregister", "CHATAssociation", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("None")] + [AWSCmdlet("Calls the AWS Chatbot DisassociateFromConfiguration API operation.", Operation = new[] {"DisassociateFromConfiguration"}, SelectReturnType = typeof(Amazon.Chatbot.Model.DisassociateFromConfigurationResponse))] + [AWSCmdletOutput("None or Amazon.Chatbot.Model.DisassociateFromConfigurationResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.Chatbot.Model.DisassociateFromConfigurationResponse) be returned by specifying '-Select *'." + )] + public partial class UnregisterCHATAssociationCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ChatConfiguration + /// + /// + /// The channel configuration the resource is being disassociated from. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ChatConfiguration { get; set; } + #endregion + + #region Parameter Resource + /// + /// + /// The resource (for example, a custom action) Amazon Resource Name (ARN) to unlink. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Resource { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.DisassociateFromConfigurationResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.ChatConfiguration), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Unregister-CHATAssociation (DisassociateFromConfiguration)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.ChatConfiguration = this.ChatConfiguration; + #if MODULAR + if (this.ChatConfiguration == null && ParameterWasBound(nameof(this.ChatConfiguration))) + { + WriteWarning("You are passing $null as a value for parameter ChatConfiguration which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Resource = this.Resource; + #if MODULAR + if (this.Resource == null && ParameterWasBound(nameof(this.Resource))) + { + WriteWarning("You are passing $null as a value for parameter Resource which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.DisassociateFromConfigurationRequest(); + + if (cmdletContext.ChatConfiguration != null) + { + request.ChatConfiguration = cmdletContext.ChatConfiguration; + } + if (cmdletContext.Resource != null) + { + request.Resource = cmdletContext.Resource; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.DisassociateFromConfigurationResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.DisassociateFromConfigurationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "DisassociateFromConfiguration"); + try + { + #if DESKTOP + return client.DisassociateFromConfiguration(request); + #elif CORECLR + return client.DisassociateFromConfigurationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ChatConfiguration { get; set; } + public System.String Resource { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATChimeWebhookConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATChimeWebhookConfiguration-Cmdlet.cs index 0339d16c6..7f515a644 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATChimeWebhookConfiguration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATChimeWebhookConfiguration-Cmdlet.cs @@ -49,7 +49,7 @@ public partial class UpdateCHATChimeWebhookConfigurationCmdlet : AmazonChatbotCl #region Parameter ChatConfigurationArn /// /// - /// The Amazon Resource Number (ARN) of the ChimeWebhookConfiguration to update. + /// The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update. /// /// #if !MODULAR diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATCustomAction-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATCustomAction-Cmdlet.cs new file mode 100644 index 000000000..c46222866 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATCustomAction-Cmdlet.cs @@ -0,0 +1,300 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Chatbot; +using Amazon.Chatbot.Model; + +namespace Amazon.PowerShell.Cmdlets.CHAT +{ + /// + /// Updates a custom action. + /// + [Cmdlet("Update", "CHATCustomAction", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("System.String")] + [AWSCmdlet("Calls the AWS Chatbot UpdateCustomAction API operation.", Operation = new[] {"UpdateCustomAction"}, SelectReturnType = typeof(Amazon.Chatbot.Model.UpdateCustomActionResponse))] + [AWSCmdletOutput("System.String or Amazon.Chatbot.Model.UpdateCustomActionResponse", + "This cmdlet returns a System.String object.", + "The service call response (type Amazon.Chatbot.Model.UpdateCustomActionResponse) can be returned by specifying '-Select *'." + )] + public partial class UpdateCHATCustomActionCmdlet : AmazonChatbotClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AliasName + /// + /// + /// The name used to invoke this action in the chat channel. For example, @aws run + /// my-alias. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String AliasName { get; set; } + #endregion + + #region Parameter Attachment + /// + /// + /// Defines when this custom action button should be attached to a notification. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Attachments")] + public Amazon.Chatbot.Model.CustomActionAttachment[] Attachment { get; set; } + #endregion + + #region Parameter Definition_CommandText + /// + /// + /// The command string to run which may include variables by prefixing with a dollar sign + /// ($). + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Definition_CommandText { get; set; } + #endregion + + #region Parameter CustomActionArn + /// + /// + /// The fully defined Amazon Resource Name (ARN) of the custom action. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String CustomActionArn { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'CustomActionArn'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Chatbot.Model.UpdateCustomActionResponse). + /// Specifying the name of a property of type Amazon.Chatbot.Model.UpdateCustomActionResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "CustomActionArn"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the CustomActionArn parameter. + /// The -PassThru parameter is deprecated, use -Select '^CustomActionArn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^CustomActionArn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.CustomActionArn), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-CHATCustomAction (UpdateCustomAction)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.CustomActionArn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AliasName = this.AliasName; + if (this.Attachment != null) + { + context.Attachment = new List(this.Attachment); + } + context.CustomActionArn = this.CustomActionArn; + #if MODULAR + if (this.CustomActionArn == null && ParameterWasBound(nameof(this.CustomActionArn))) + { + WriteWarning("You are passing $null as a value for parameter CustomActionArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Definition_CommandText = this.Definition_CommandText; + #if MODULAR + if (this.Definition_CommandText == null && ParameterWasBound(nameof(this.Definition_CommandText))) + { + WriteWarning("You are passing $null as a value for parameter Definition_CommandText which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Chatbot.Model.UpdateCustomActionRequest(); + + if (cmdletContext.AliasName != null) + { + request.AliasName = cmdletContext.AliasName; + } + if (cmdletContext.Attachment != null) + { + request.Attachments = cmdletContext.Attachment; + } + if (cmdletContext.CustomActionArn != null) + { + request.CustomActionArn = cmdletContext.CustomActionArn; + } + + // populate Definition + var requestDefinitionIsNull = true; + request.Definition = new Amazon.Chatbot.Model.CustomActionDefinition(); + System.String requestDefinition_definition_CommandText = null; + if (cmdletContext.Definition_CommandText != null) + { + requestDefinition_definition_CommandText = cmdletContext.Definition_CommandText; + } + if (requestDefinition_definition_CommandText != null) + { + request.Definition.CommandText = requestDefinition_definition_CommandText; + requestDefinitionIsNull = false; + } + // determine if request.Definition should be set to null + if (requestDefinitionIsNull) + { + request.Definition = null; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Chatbot.Model.UpdateCustomActionResponse CallAWSServiceOperation(IAmazonChatbot client, Amazon.Chatbot.Model.UpdateCustomActionRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Chatbot", "UpdateCustomAction"); + try + { + #if DESKTOP + return client.UpdateCustomAction(request); + #elif CORECLR + return client.UpdateCustomActionAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AliasName { get; set; } + public List Attachment { get; set; } + public System.String CustomActionArn { get; set; } + public System.String Definition_CommandText { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.CustomActionArn; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs index e70560dec..01f6ec7c0 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATMicrosoftTeamsChannelConfiguration-Cmdlet.cs @@ -76,7 +76,7 @@ public partial class UpdateCHATMicrosoftTeamsChannelConfigurationCmdlet : Amazon #region Parameter ChatConfigurationArn /// /// - /// The Amazon Resource Number (ARN) of the TeamsChannelConfiguration to update. + /// The Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update. /// /// #if !MODULAR diff --git a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATSlackChannelConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATSlackChannelConfiguration-Cmdlet.cs index 91c8f5259..9040c0bfa 100644 --- a/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATSlackChannelConfiguration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Chatbot/Basic/Update-CHATSlackChannelConfiguration-Cmdlet.cs @@ -49,7 +49,7 @@ public partial class UpdateCHATSlackChannelConfigurationCmdlet : AmazonChatbotCl #region Parameter ChatConfigurationArn /// /// - /// The Amazon Resource Number (ARN) of the SlackChannelConfiguration to update. + /// The Amazon Resource Name (ARN) of the SlackChannelConfiguration to update. /// /// #if !MODULAR diff --git a/modules/AWSPowerShell/Cmdlets/CodePipeline/Basic/Write-CPApprovalResult-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CodePipeline/Basic/Write-CPApprovalResult-Cmdlet.cs index 5b8d84e9d..bd80d2eed 100644 --- a/modules/AWSPowerShell/Cmdlets/CodePipeline/Basic/Write-CPApprovalResult-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CodePipeline/Basic/Write-CPApprovalResult-Cmdlet.cs @@ -134,7 +134,10 @@ public partial class WriteCPApprovalResultCmdlet : AmazonCodePipelineClientCmdle /// The system-generated token used to identify a unique approval request. The token for /// each open approval request can be obtained using the GetPipelineState action. /// It is used to validate that the approval request corresponding to this token is still - /// valid. + /// valid.
For a pipeline where the execution mode is set to PARALLEL, the token required to + /// approve/reject approval request as detailed above is not available. Instead, use the + /// externalExecutionId from the GetPipelineState action as the token in + /// the approval request. /// ///
#if !MODULAR diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.Completers.psm1 index 9f7101ca6..5c1d8189f 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.Completers.psm1 @@ -117,7 +117,7 @@ $CGIP_Completers = { ($_ -eq "Start-CGIPAuthAdmin/AuthFlow") } { - $v = "ADMIN_NO_SRP_AUTH","ADMIN_USER_PASSWORD_AUTH","CUSTOM_AUTH","REFRESH_TOKEN","REFRESH_TOKEN_AUTH","USER_PASSWORD_AUTH","USER_SRP_AUTH" + $v = "ADMIN_NO_SRP_AUTH","ADMIN_USER_PASSWORD_AUTH","CUSTOM_AUTH","REFRESH_TOKEN","REFRESH_TOKEN_AUTH","USER_AUTH","USER_PASSWORD_AUTH","USER_SRP_AUTH" break } @@ -127,7 +127,7 @@ $CGIP_Completers = { ($_ -eq "Send-CGIPAuthChallengeResponseAdmin/ChallengeName") } { - $v = "ADMIN_NO_SRP_AUTH","CUSTOM_CHALLENGE","DEVICE_PASSWORD_VERIFIER","DEVICE_SRP_AUTH","EMAIL_OTP","MFA_SETUP","NEW_PASSWORD_REQUIRED","PASSWORD_VERIFIER","SELECT_MFA_TYPE","SMS_MFA","SOFTWARE_TOKEN_MFA" + $v = "ADMIN_NO_SRP_AUTH","CUSTOM_CHALLENGE","DEVICE_PASSWORD_VERIFIER","DEVICE_SRP_AUTH","EMAIL_OTP","MFA_SETUP","NEW_PASSWORD_REQUIRED","PASSWORD","PASSWORD_SRP","PASSWORD_VERIFIER","SELECT_CHALLENGE","SELECT_MFA_TYPE","SMS_MFA","SMS_OTP","SOFTWARE_TOKEN_MFA","WEB_AUTHN" break } @@ -267,6 +267,23 @@ $CGIP_Completers = { break } + # Amazon.CognitoIdentityProvider.UserPoolTierType + { + ($_ -eq "New-CGIPUserPool/UserPoolTier") -Or + ($_ -eq "Update-CGIPUserPool/UserPoolTier") + } + { + $v = "ESSENTIALS","LITE","PLUS" + break + } + + # Amazon.CognitoIdentityProvider.UserVerificationType + "Set-CGIPUserPoolMfaConfig/WebAuthnConfiguration_UserVerification" + { + $v = "preferred","required" + break + } + } @@ -298,7 +315,9 @@ $CGIP_map = @{ "TokenValidityUnits_IdToken"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient") "TokenValidityUnits_RefreshToken"=@("New-CGIPUserPoolClient","Update-CGIPUserPoolClient") "UserPoolAddOns_AdvancedSecurityMode"=@("New-CGIPUserPool","Update-CGIPUserPool") + "UserPoolTier"=@("New-CGIPUserPool","Update-CGIPUserPool") "VerificationMessageTemplate_DefaultEmailOption"=@("New-CGIPUserPool","Update-CGIPUserPool") + "WebAuthnConfiguration_UserVerification"=@("Set-CGIPUserPoolMfaConfig") } _awsArgumentCompleterRegistration $CGIP_Completers $CGIP_map @@ -380,11 +399,13 @@ $CGIP_SelectMap = @{ "Disconnect-CGIPUserGlobalAdmin", "Add-CGIPSoftwareToken", "Update-CGIPPassword", + "Complete-CGIPWebAuthnRegistration", "Approve-CGIPDevice", "Confirm-CGIPForgotPassword", "Confirm-CGIPUserRegistration", "New-CGIPGroup", "New-CGIPIdentityProvider", + "New-CGIPManagedLoginBranding", "New-CGIPResourceServer", "New-CGIPUserImportJob", "New-CGIPUserPool", @@ -392,13 +413,17 @@ $CGIP_SelectMap = @{ "New-CGIPUserPoolDomain", "Remove-CGIPGroup", "Remove-CGIPIdentityProvider", + "Remove-CGIPManagedLoginBranding", "Remove-CGIPResourceServer", "Remove-CGIPUser", "Remove-CGIPUserAttribute", "Remove-CGIPUserPool", "Remove-CGIPUserPoolClient", "Remove-CGIPUserPoolDomain", + "Remove-CGIPWebAuthnCredential", "Get-CGIPIdentityProvider", + "Get-CGIPManagedLoginBranding", + "Get-CGIPManagedLoginBrandingByClient", "Get-CGIPResourceServer", "Get-CGIPRiskConfiguration", "Get-CGIPUserImportJob", @@ -416,6 +441,7 @@ $CGIP_SelectMap = @{ "Get-CGIPUICustomization", "Get-CGIPUser", "Get-CGIPUserAttributeVerificationCode", + "Get-CGIPUserAuthFactor", "Get-CGIPUserPoolMfaConfig", "Disconnect-CGIPDeviceGlobal", "Start-CGIPAuth", @@ -429,6 +455,7 @@ $CGIP_SelectMap = @{ "Get-CGIPUserPoolList", "Get-CGIPUserList", "Get-CGIPUsersInGroup", + "Get-CGIPWebAuthnCredentialList", "Send-CGIPConfirmationCode", "Send-CGIPAuthChallengeResponse", "Revoke-CGIPToken", @@ -440,6 +467,7 @@ $CGIP_SelectMap = @{ "Set-CGIPUserSetting", "Register-CGIPUserInPool", "Start-CGIPUserImportJob", + "Start-CGIPWebAuthnRegistration", "Stop-CGIPUserImportJob", "Add-CGIPResourceTag", "Remove-CGIPResourceTag", @@ -447,6 +475,7 @@ $CGIP_SelectMap = @{ "Edit-CGIPDeviceStatus", "Update-CGIPGroup", "Update-CGIPIdentityProvider", + "Update-CGIPManagedLoginBranding", "Update-CGIPResourceServer", "Update-CGIPUserAttribute", "Update-CGIPUserPool", diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.psd1 b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.psd1 index 8b6ea235a..5c2b92fae 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.psd1 +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/AWS.Tools.CognitoIdentityProvider.psd1 @@ -91,6 +91,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Add-CGIPSoftwareToken', 'Add-CGIPUserToGroupAdmin', 'Approve-CGIPDevice', + 'Complete-CGIPWebAuthnRegistration', 'Confirm-CGIPForgotPassword', 'Confirm-CGIPUserRegistration', 'Confirm-CGIPUserRegistrationAdmin', @@ -114,6 +115,8 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-CGIPIdentityProviderByIdentifier', 'Get-CGIPIdentityProviderList', 'Get-CGIPLogDeliveryConfiguration', + 'Get-CGIPManagedLoginBranding', + 'Get-CGIPManagedLoginBrandingByClient', 'Get-CGIPResourceServer', 'Get-CGIPResourceServerList', 'Get-CGIPResourceTag', @@ -124,6 +127,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-CGIPUserAdmin', 'Get-CGIPUserAttributeVerificationCode', 'Get-CGIPUserAuthEventListAdmin', + 'Get-CGIPUserAuthFactor', 'Get-CGIPUserImportJob', 'Get-CGIPUserImportJobList', 'Get-CGIPUserList', @@ -134,8 +138,10 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-CGIPUserPoolList', 'Get-CGIPUserPoolMfaConfig', 'Get-CGIPUsersInGroup', + 'Get-CGIPWebAuthnCredentialList', 'New-CGIPGroup', 'New-CGIPIdentityProvider', + 'New-CGIPManagedLoginBranding', 'New-CGIPResourceServer', 'New-CGIPUserAdmin', 'New-CGIPUserImportJob', @@ -145,6 +151,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Register-CGIPUserInPool', 'Remove-CGIPGroup', 'Remove-CGIPIdentityProvider', + 'Remove-CGIPManagedLoginBranding', 'Remove-CGIPResourceServer', 'Remove-CGIPResourceTag', 'Remove-CGIPUser', @@ -155,6 +162,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Remove-CGIPUserPool', 'Remove-CGIPUserPoolClient', 'Remove-CGIPUserPoolDomain', + 'Remove-CGIPWebAuthnCredential', 'Reset-CGIPForgottenPassword', 'Reset-CGIPUserPasswordAdmin', 'Revoke-CGIPToken', @@ -173,6 +181,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Start-CGIPAuth', 'Start-CGIPAuthAdmin', 'Start-CGIPUserImportJob', + 'Start-CGIPWebAuthnRegistration', 'Stop-CGIPDeviceTracking', 'Stop-CGIPDeviceTrackingAdmin', 'Stop-CGIPUserImportJob', @@ -182,6 +191,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Update-CGIPAuthEventFeedbackAdmin', 'Update-CGIPGroup', 'Update-CGIPIdentityProvider', + 'Update-CGIPManagedLoginBranding', 'Update-CGIPPassword', 'Update-CGIPResourceServer', 'Update-CGIPUserAttribute', diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Approve-CGIPDevice-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Approve-CGIPDevice-Cmdlet.cs index 97d0482d9..79e1dc167 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Approve-CGIPDevice-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Approve-CGIPDevice-Cmdlet.cs @@ -106,7 +106,7 @@ public partial class ApproveCGIPDeviceCmdlet : AmazonCognitoIdentityProviderClie #region Parameter DeviceSecretVerifierConfig_PasswordVerifier /// /// - /// The password verifier. + /// A password verifier for a user's device. Used in SRP authentication. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -116,7 +116,7 @@ public partial class ApproveCGIPDeviceCmdlet : AmazonCognitoIdentityProviderClie #region Parameter DeviceSecretVerifierConfig_Salt /// /// - /// The salt + /// The salt that you want to use in SRP authentication with the user's device. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Complete-CGIPWebAuthnRegistration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Complete-CGIPWebAuthnRegistration-Cmdlet.cs new file mode 100644 index 000000000..cd361bab3 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Complete-CGIPWebAuthnRegistration-Cmdlet.cs @@ -0,0 +1,258 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Completes registration of a passkey authenticator for the current user. Your application + /// provides data from a successful registration request with the data from the output + /// of a + /// StartWebAuthnRegistration. + /// + /// + /// + /// Authorize this action with a signed-in user's access token. It must include the scope + /// aws.cognito.signin.user.admin. + /// + /// + [Cmdlet("Complete", "CGIPWebAuthnRegistration", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("None")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider CompleteWebAuthnRegistration API operation.", Operation = new[] {"CompleteWebAuthnRegistration"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.CompleteWebAuthnRegistrationResponse))] + [AWSCmdletOutput("None or Amazon.CognitoIdentityProvider.Model.CompleteWebAuthnRegistrationResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.CognitoIdentityProvider.Model.CompleteWebAuthnRegistrationResponse) be returned by specifying '-Select *'." + )] + public partial class CompleteCGIPWebAuthnRegistrationCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AccessToken + /// + /// + /// A valid access token that Amazon Cognito issued to the user whose passkey registration + /// you want to verify. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AccessToken { get; set; } + #endregion + + #region Parameter WebAuthnCredential + /// + /// + /// A RegistrationResponseJSON + /// public-key credential response from the user's passkey provider. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.Management.Automation.PSObject WebAuthnCredential { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.CompleteWebAuthnRegistrationResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the AccessToken parameter. + /// The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.AccessToken), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Complete-CGIPWebAuthnRegistration (CompleteWebAuthnRegistration)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.AccessToken; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AccessToken = this.AccessToken; + #if MODULAR + if (this.AccessToken == null && ParameterWasBound(nameof(this.AccessToken))) + { + WriteWarning("You are passing $null as a value for parameter AccessToken which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.WebAuthnCredential = this.WebAuthnCredential; + #if MODULAR + if (this.WebAuthnCredential == null && ParameterWasBound(nameof(this.WebAuthnCredential))) + { + WriteWarning("You are passing $null as a value for parameter WebAuthnCredential which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.CompleteWebAuthnRegistrationRequest(); + + if (cmdletContext.AccessToken != null) + { + request.AccessToken = cmdletContext.AccessToken; + } + if (cmdletContext.WebAuthnCredential != null) + { + request.Credential = Amazon.PowerShell.Common.DocumentHelper.ToDocument(cmdletContext.WebAuthnCredential); + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.CompleteWebAuthnRegistrationResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.CompleteWebAuthnRegistrationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "CompleteWebAuthnRegistration"); + try + { + #if DESKTOP + return client.CompleteWebAuthnRegistration(request); + #elif CORECLR + return client.CompleteWebAuthnRegistrationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AccessToken { get; set; } + public System.Management.Automation.PSObject WebAuthnCredential { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPForgotPassword-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPForgotPassword-Cmdlet.cs index 5e7c28f5b..511437078 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPForgotPassword-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPForgotPassword-Cmdlet.cs @@ -55,7 +55,8 @@ public partial class ConfirmCGIPForgotPasswordCmdlet : AnonymousAmazonCognitoIde #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPUserRegistration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPUserRegistration-Cmdlet.cs index f414eab39..9b427ab17 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPUserRegistration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Confirm-CGIPUserRegistration-Cmdlet.cs @@ -53,23 +53,26 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// /// [Cmdlet("Confirm", "CGIPUserRegistration", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] - [OutputType("None")] + [OutputType("System.String")] [AWSCmdlet("Calls the Amazon Cognito Identity Provider ConfirmSignUp API operation. This operation uses anonymous authentication and does not require credential parameters to be supplied.", Operation = new[] {"ConfirmSignUp"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.ConfirmSignUpResponse))] - [AWSCmdletOutput("None or Amazon.CognitoIdentityProvider.Model.ConfirmSignUpResponse", - "This cmdlet does not generate any output." + - "The service response (type Amazon.CognitoIdentityProvider.Model.ConfirmSignUpResponse) be returned by specifying '-Select *'." + [AWSCmdletOutput("System.String or Amazon.CognitoIdentityProvider.Model.ConfirmSignUpResponse", + "This cmdlet returns a System.String object.", + "The service call response (type Amazon.CognitoIdentityProvider.Model.ConfirmSignUpResponse) can be returned by specifying '-Select *'." )] public partial class ConfirmCGIPUserRegistrationCmdlet : AnonymousAmazonCognitoIdentityProviderClientCmdlet, IExecutor { protected override bool IsSensitiveRequest { get; set; } = true; + protected override bool IsSensitiveResponse { get; set; } = true; + protected override bool IsGeneratedCmdlet { get; set; } = true; #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -181,6 +184,17 @@ public partial class ConfirmCGIPUserRegistrationCmdlet : AnonymousAmazonCognitoI public System.String SecretHash { get; set; } #endregion + #region Parameter Session + /// + /// + /// The optional session ID from a SignUp API request. You can sign in a user directly + /// from the sign-up process with the USER_AUTH authentication flow. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Session { get; set; } + #endregion + #region Parameter Username /// /// @@ -203,12 +217,13 @@ public partial class ConfirmCGIPUserRegistrationCmdlet : AnonymousAmazonCognitoI #region Parameter Select /// - /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Use the -Select parameter to control the cmdlet output. The default value is 'Session'. /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.ConfirmSignUpResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.ConfirmSignUpResponse will result in that property being returned. /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] - public string Select { get; set; } = "*"; + public string Select { get; set; } = "Session"; #endregion #region Parameter PassThru @@ -287,6 +302,7 @@ protected override void ProcessRecord() #endif context.ForceAliasCreation = this.ForceAliasCreation; context.SecretHash = this.SecretHash; + context.Session = this.Session; context.UserContextData_EncodedData = this.UserContextData_EncodedData; context.UserContextData_IpAddress = this.UserContextData_IpAddress; context.Username = this.Username; @@ -351,6 +367,10 @@ public object Execute(ExecutorContext context) { request.SecretHash = cmdletContext.SecretHash; } + if (cmdletContext.Session != null) + { + request.Session = cmdletContext.Session; + } // populate UserContextData var requestUserContextDataIsNull = true; @@ -451,11 +471,12 @@ internal partial class CmdletContext : ExecutorContext public System.String ConfirmationCode { get; set; } public System.Boolean? ForceAliasCreation { get; set; } public System.String SecretHash { get; set; } + public System.String Session { get; set; } public System.String UserContextData_EncodedData { get; set; } public System.String UserContextData_IpAddress { get; set; } public System.String Username { get; set; } public System.Func Select { get; set; } = - (response, cmdlet) => null; + (response, cmdlet) => response.Session; } } diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPDeviceListAdmin-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPDeviceListAdmin-Cmdlet.cs index 389c04a29..c4b756ebe 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPDeviceListAdmin-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPDeviceListAdmin-Cmdlet.cs @@ -28,7 +28,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP { /// - /// Lists devices, as an administrator. + /// Lists a user's registered devices. /// /// /// Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPManagedLoginBranding-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPManagedLoginBranding-Cmdlet.cs new file mode 100644 index 000000000..bb1e696f1 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPManagedLoginBranding-Cmdlet.cs @@ -0,0 +1,252 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// When given the ID of a managed login branding style, returns detailed information + /// about the style. + /// + [Cmdlet("Get", "CGIPManagedLoginBranding")] + [OutputType("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider DescribeManagedLoginBranding API operation.", Operation = new[] {"DescribeManagedLoginBranding"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingResponse))] + [AWSCmdletOutput("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType or Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingResponse", + "This cmdlet returns an Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType object.", + "The service call response (type Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingResponse) can be returned by specifying '-Select *'." + )] + public partial class GetCGIPManagedLoginBrandingCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ManagedLoginBrandingId + /// + /// + /// The ID of the managed login branding style that you want to get more information about. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ManagedLoginBrandingId { get; set; } + #endregion + + #region Parameter ReturnMergedResource + /// + /// + /// When true, returns values for branding options that are unchanged from Amazon + /// Cognito defaults. When false or when you omit this parameter, returns only + /// values that you customized in your branding style. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ReturnMergedResources")] + public System.Boolean? ReturnMergedResource { get; set; } + #endregion + + #region Parameter UserPoolId + /// + /// + /// The ID of the user pool that contains the managed login branding style that you want + /// to get information about. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String UserPoolId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'ManagedLoginBranding'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "ManagedLoginBranding"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the UserPoolId parameter. + /// The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.UserPoolId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ManagedLoginBrandingId = this.ManagedLoginBrandingId; + #if MODULAR + if (this.ManagedLoginBrandingId == null && ParameterWasBound(nameof(this.ManagedLoginBrandingId))) + { + WriteWarning("You are passing $null as a value for parameter ManagedLoginBrandingId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.ReturnMergedResource = this.ReturnMergedResource; + context.UserPoolId = this.UserPoolId; + #if MODULAR + if (this.UserPoolId == null && ParameterWasBound(nameof(this.UserPoolId))) + { + WriteWarning("You are passing $null as a value for parameter UserPoolId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingRequest(); + + if (cmdletContext.ManagedLoginBrandingId != null) + { + request.ManagedLoginBrandingId = cmdletContext.ManagedLoginBrandingId; + } + if (cmdletContext.ReturnMergedResource != null) + { + request.ReturnMergedResources = cmdletContext.ReturnMergedResource.Value; + } + if (cmdletContext.UserPoolId != null) + { + request.UserPoolId = cmdletContext.UserPoolId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "DescribeManagedLoginBranding"); + try + { + #if DESKTOP + return client.DescribeManagedLoginBranding(request); + #elif CORECLR + return client.DescribeManagedLoginBrandingAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ManagedLoginBrandingId { get; set; } + public System.Boolean? ReturnMergedResource { get; set; } + public System.String UserPoolId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.ManagedLoginBranding; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPManagedLoginBrandingByClient-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPManagedLoginBrandingByClient-Cmdlet.cs new file mode 100644 index 000000000..806f633b9 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPManagedLoginBrandingByClient-Cmdlet.cs @@ -0,0 +1,255 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// When given the ID of a user pool app client, returns detailed information about the + /// style assigned to the app client. + /// + [Cmdlet("Get", "CGIPManagedLoginBrandingByClient")] + [OutputType("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider DescribeManagedLoginBrandingByClient API operation.", Operation = new[] {"DescribeManagedLoginBrandingByClient"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientResponse))] + [AWSCmdletOutput("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType or Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientResponse", + "This cmdlet returns an Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType object.", + "The service call response (type Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientResponse) can be returned by specifying '-Select *'." + )] + public partial class GetCGIPManagedLoginBrandingByClientCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ClientId + /// + /// + /// The app client that's assigned to the branding style that you want more information + /// about. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ClientId { get; set; } + #endregion + + #region Parameter ReturnMergedResource + /// + /// + /// When true, returns values for branding options that are unchanged from Amazon + /// Cognito defaults. When false or when you omit this parameter, returns only + /// values that you customized in your branding style. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ReturnMergedResources")] + public System.Boolean? ReturnMergedResource { get; set; } + #endregion + + #region Parameter UserPoolId + /// + /// + /// The ID of the user pool that contains the app client where you want more information + /// about the managed login branding style. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String UserPoolId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'ManagedLoginBranding'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "ManagedLoginBranding"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the UserPoolId parameter. + /// The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.UserPoolId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ClientId = this.ClientId; + #if MODULAR + if (this.ClientId == null && ParameterWasBound(nameof(this.ClientId))) + { + WriteWarning("You are passing $null as a value for parameter ClientId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.ReturnMergedResource = this.ReturnMergedResource; + context.UserPoolId = this.UserPoolId; + #if MODULAR + if (this.UserPoolId == null && ParameterWasBound(nameof(this.UserPoolId))) + { + WriteWarning("You are passing $null as a value for parameter UserPoolId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientRequest(); + + if (cmdletContext.ClientId != null) + { + request.ClientId = cmdletContext.ClientId; + } + if (cmdletContext.ReturnMergedResource != null) + { + request.ReturnMergedResources = cmdletContext.ReturnMergedResource.Value; + } + if (cmdletContext.UserPoolId != null) + { + request.UserPoolId = cmdletContext.UserPoolId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.DescribeManagedLoginBrandingByClientRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "DescribeManagedLoginBrandingByClient"); + try + { + #if DESKTOP + return client.DescribeManagedLoginBrandingByClient(request); + #elif CORECLR + return client.DescribeManagedLoginBrandingByClientAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ClientId { get; set; } + public System.Boolean? ReturnMergedResource { get; set; } + public System.String UserPoolId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.ManagedLoginBranding; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAdmin-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAdmin-Cmdlet.cs index 624c4294a..b991af277 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAdmin-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAdmin-Cmdlet.cs @@ -29,7 +29,8 @@ namespace Amazon.PowerShell.Cmdlets.CGIP { /// /// Gets the specified user by user name in a user pool as an administrator. Works on - /// any user. + /// any user. This operation contributes to your monthly active user (MAU) count for the + /// purpose of billing. /// /// /// Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAttributeVerificationCode-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAttributeVerificationCode-Cmdlet.cs index 97b8f1ac8..37231c097 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAttributeVerificationCode-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAttributeVerificationCode-Cmdlet.cs @@ -51,7 +51,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAuthFactor-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAuthFactor-Cmdlet.cs new file mode 100644 index 000000000..34ed80b86 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserAuthFactor-Cmdlet.cs @@ -0,0 +1,213 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Lists the authentication options for the currently signed-in user. Returns the following: + /// + ///
  1. + /// The user's multi-factor authentication (MFA) preferences. + ///
  2. + /// The user's options in the USER_AUTH flow that they can select in a SELECT_CHALLENGE + /// response or request in a PREFERRED_CHALLENGErequest. + ///
+ ///
+ [Cmdlet("Get", "CGIPUserAuthFactor")] + [OutputType("Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsResponse")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider GetUserAuthFactors API operation.", Operation = new[] {"GetUserAuthFactors"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsResponse))] + [AWSCmdletOutput("Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsResponse", + "This cmdlet returns an Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsResponse object containing multiple properties." + )] + public partial class GetCGIPUserAuthFactorCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsSensitiveResponse { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AccessToken + /// + /// + /// A valid access token that Amazon Cognito issued to the user whose authentication factors + /// you want to view. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AccessToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the AccessToken parameter. + /// The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.AccessToken; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AccessToken = this.AccessToken; + #if MODULAR + if (this.AccessToken == null && ParameterWasBound(nameof(this.AccessToken))) + { + WriteWarning("You are passing $null as a value for parameter AccessToken which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsRequest(); + + if (cmdletContext.AccessToken != null) + { + request.AccessToken = cmdletContext.AccessToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.GetUserAuthFactorsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "GetUserAuthFactors"); + try + { + #if DESKTOP + return client.GetUserAuthFactors(request); + #elif CORECLR + return client.GetUserAuthFactorsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AccessToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserList-Cmdlet.cs index 6710e713b..dca13f0c2 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserList-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPUserList-Cmdlet.cs @@ -71,9 +71,9 @@ public partial class GetCGIPUserListCmdlet : AmazonCognitoIdentityProviderClient #region Parameter Filter /// /// - /// A filter string of the form "AttributeNameFilter-Type "AttributeValue"". - /// Quotation marks within the filter string must be escaped using the backslash (\) - /// character. For example, "family_name = \"Reddy\"".
  • AttributeName: The name of the attribute to search for. You can only search + /// A filter string of the form "AttributeName Filter-Type "AttributeValue". Quotation + /// marks within the filter string must be escaped using the backslash (\) character. + /// For example, "family_name = \"Reddy\"".
    • AttributeName: The name of the attribute to search for. You can only search /// for one attribute at a time.
    • Filter-Type: For an exact match, use =, for example, "given_name /// = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name /// ^= \"Jon\"".
    • AttributeValue: The attribute value that must be matched for each user.
    If the filter string is empty, ListUsers returns all users in the user pool.You can only search for the following standard attributes:
    • username (case-sensitive)
    • email
    • phone_number
    • name
    • given_name
    • family_name
    • preferred_username
    • cognito:user_status (called Status in the Console) (case-insensitive)
    • status (called Enabled in the Console) (case-sensitive)
    • sub
    Custom attributes aren't searchable.You can also list users with a client-side filter. The server-side filter matches diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPWebAuthnCredentialList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPWebAuthnCredentialList-Cmdlet.cs new file mode 100644 index 000000000..ccbde28ad --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Get-CGIPWebAuthnCredentialList-Cmdlet.cs @@ -0,0 +1,277 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Generates a list of the current user's registered passkey, or webauthN, credentials.

    This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration. + ///
    + [Cmdlet("Get", "CGIPWebAuthnCredentialList")] + [OutputType("Amazon.CognitoIdentityProvider.Model.WebAuthnCredentialDescription")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider ListWebAuthnCredentials API operation.", Operation = new[] {"ListWebAuthnCredentials"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsResponse))] + [AWSCmdletOutput("Amazon.CognitoIdentityProvider.Model.WebAuthnCredentialDescription or Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsResponse", + "This cmdlet returns a collection of Amazon.CognitoIdentityProvider.Model.WebAuthnCredentialDescription objects.", + "The service call response (type Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetCGIPWebAuthnCredentialListCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AccessToken + /// + /// + /// A valid access token that Amazon Cognito issued to the user whose registered passkeys + /// you want to list. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AccessToken { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of the user's passkey credentials that you want to return. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// An identifier that was returned from the previous call to this operation, which can + /// be used to return the next set of items in the list. + /// + /// + ///
    Note: This parameter is only used if you are manually controlling output pagination of the service API call. + ///
    'NextToken' is only returned by the cmdlet when '-Select *' is specified. In order to manually control output pagination, set '-NextToken' to null for the first call then set the 'NextToken' using the same property output from the previous call for subsequent calls. + ///
    + ///
    + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Credentials'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Credentials"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the AccessToken parameter. + /// The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter NoAutoIteration + /// + /// By default the cmdlet will auto-iterate and retrieve all results to the pipeline by performing multiple + /// service calls. If set, the cmdlet will retrieve only the next 'page' of results using the value of NextToken + /// as the start point. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter NoAutoIteration { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.AccessToken; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AccessToken = this.AccessToken; + #if MODULAR + if (this.AccessToken == null && ParameterWasBound(nameof(this.AccessToken))) + { + WriteWarning("You are passing $null as a value for parameter AccessToken which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent; + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + + // create request and set iteration invariants + var request = new Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsRequest(); + + if (cmdletContext.AccessToken != null) + { + request.AccessToken = cmdletContext.AccessToken; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + + // Initialize loop variant and commence piping + var _nextToken = cmdletContext.NextToken; + var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); + + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + do + { + request.NextToken = _nextToken; + + CmdletOutput output; + + try + { + + var response = CallAWSServiceOperation(client, request); + + object pipelineOutput = null; + if (!useParameterSelect) + { + pipelineOutput = cmdletContext.Select(response, this); + } + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + + _nextToken = response.NextToken; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + ProcessOutput(output); + + } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken)); + + if (useParameterSelect) + { + WriteObject(cmdletContext.Select(null, this)); + } + + + return null; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.ListWebAuthnCredentialsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "ListWebAuthnCredentials"); + try + { + #if DESKTOP + return client.ListWebAuthnCredentials(request); + #elif CORECLR + return client.ListWebAuthnCredentialsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AccessToken { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Credentials; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPManagedLoginBranding-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPManagedLoginBranding-Cmdlet.cs new file mode 100644 index 000000000..906e3d16b --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPManagedLoginBranding-Cmdlet.cs @@ -0,0 +1,336 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Creates a new set of branding settings for a user pool style and associates it with + /// an app client. This operation is the programmatic option for the creation of a new + /// style in the branding designer. + /// + /// + /// + /// Provides values for UI customization in a Settings JSON object and image files + /// in an Assets array. To send the JSON object Document type parameter + /// in Settings, you might need to update to the most recent version of your Amazon + /// Web Services SDK. + /// + /// This operation has a 2-megabyte request-size limit and include the CSS settings and + /// image assets for your app client. Your branding settings might exceed 2MB in size. + /// Amazon Cognito doesn't require that you pass all parameters in one request and preserves + /// existing style settings that you don't specify. If your request is larger than 2MB, + /// separate it into multiple requests, each with a size smaller than the limit. + /// + /// For more information, see API + /// and SDK operations for managed login branding + /// Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests + /// for this API operation. For this operation, you must use IAM credentials to authorize + /// requests, and you must grant yourself the corresponding IAM permission in a policy. + /// Learn more + /// + [Cmdlet("New", "CGIPManagedLoginBranding", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider CreateManagedLoginBranding API operation.", Operation = new[] {"CreateManagedLoginBranding"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingResponse))] + [AWSCmdletOutput("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType or Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingResponse", + "This cmdlet returns an Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType object.", + "The service call response (type Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingResponse) can be returned by specifying '-Select *'." + )] + public partial class NewCGIPManagedLoginBrandingCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Asset + /// + /// + /// An array of image files that you want to apply to roles like backgrounds, logos, and + /// icons. Each object must also indicate whether it is for dark mode, light mode, or + /// browser-adaptive mode. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Assets")] + public Amazon.CognitoIdentityProvider.Model.AssetType[] Asset { get; set; } + #endregion + + #region Parameter ClientId + /// + /// + /// The app client that you want to create the branding style for. Each style is permanently + /// linked to an app client. To change the style for an app client, delete the existing + /// style with DeleteManagedLoginBranding + /// and create a new one. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ClientId { get; set; } + #endregion + + #region Parameter Setting + /// + /// + /// A JSON file, encoded as a Document type, with the the settings that you want + /// to apply to your style. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Settings")] + public System.Management.Automation.PSObject Setting { get; set; } + #endregion + + #region Parameter UseCognitoProvidedValue + /// + /// + /// When true, applies the default branding style options. This option reverts to default + /// style options that are managed by Amazon Cognito. You can modify them later in the + /// branding designer.When you specify true for this option, you must also omit values for Settings + /// and Assets in the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("UseCognitoProvidedValues")] + public System.Boolean? UseCognitoProvidedValue { get; set; } + #endregion + + #region Parameter UserPoolId + /// + /// + /// The ID of the user pool where you want to create a new branding style. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String UserPoolId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'ManagedLoginBranding'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "ManagedLoginBranding"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the UserPoolId parameter. + /// The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.UserPoolId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-CGIPManagedLoginBranding (CreateManagedLoginBranding)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.UserPoolId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.Asset != null) + { + context.Asset = new List(this.Asset); + } + context.ClientId = this.ClientId; + #if MODULAR + if (this.ClientId == null && ParameterWasBound(nameof(this.ClientId))) + { + WriteWarning("You are passing $null as a value for parameter ClientId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Setting = this.Setting; + context.UseCognitoProvidedValue = this.UseCognitoProvidedValue; + context.UserPoolId = this.UserPoolId; + #if MODULAR + if (this.UserPoolId == null && ParameterWasBound(nameof(this.UserPoolId))) + { + WriteWarning("You are passing $null as a value for parameter UserPoolId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingRequest(); + + if (cmdletContext.Asset != null) + { + request.Assets = cmdletContext.Asset; + } + if (cmdletContext.ClientId != null) + { + request.ClientId = cmdletContext.ClientId; + } + if (cmdletContext.Setting != null) + { + request.Settings = Amazon.PowerShell.Common.DocumentHelper.ToDocument(cmdletContext.Setting); + } + if (cmdletContext.UseCognitoProvidedValue != null) + { + request.UseCognitoProvidedValues = cmdletContext.UseCognitoProvidedValue.Value; + } + if (cmdletContext.UserPoolId != null) + { + request.UserPoolId = cmdletContext.UserPoolId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.CreateManagedLoginBrandingRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "CreateManagedLoginBranding"); + try + { + #if DESKTOP + return client.CreateManagedLoginBranding(request); + #elif CORECLR + return client.CreateManagedLoginBrandingAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List Asset { get; set; } + public System.String ClientId { get; set; } + public System.Management.Automation.PSObject Setting { get; set; } + public System.Boolean? UseCognitoProvidedValue { get; set; } + public System.String UserPoolId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.ManagedLoginBranding; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserAdmin-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserAdmin-Cmdlet.cs index 77d7f9fe9..53eb61512 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserAdmin-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserAdmin-Cmdlet.cs @@ -44,7 +44,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. ///
    /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -59,8 +59,12 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// Alternatively, you can call AdminCreateUser with SUPPRESS for the MessageAction /// parameter, and Amazon Cognito won't send any email. /// - /// In either case, the user will be in the FORCE_CHANGE_PASSWORD state until they - /// sign in and change their password. + /// In either case, if the user has a password, they will be in the FORCE_CHANGE_PASSWORD + /// state until they sign in and set their password. Your invitation message template + /// must have the {####} password placeholder if your users have passwords. If + /// your template doesn't have this placeholder, Amazon Cognito doesn't deliver the invitation + /// message. In this case, you must update your message template and resend the password + /// with a new AdminCreateUser request with a MessageAction value of RESEND. /// /// Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests /// for this API operation. For this operation, you must use IAM credentials to authorize @@ -153,10 +157,15 @@ public partial class NewCGIPUserAdminCmdlet : AmazonCognitoIdentityProviderClien /// /// /// The user's temporary password. This password must conform to the password policy that - /// you specified when you created the user pool.The temporary password is valid only once. To complete the Admin Create User flow, + /// you specified when you created the user pool.The exception to the requirement for a password is when your user pool supports passwordless + /// sign-in with email or SMS OTPs. To create a user with no password, omit this parameter + /// or submit a blank value. You can only create a passwordless user when passwordless + /// sign-in is available. See the + /// SignInPolicyType property of CreateUserPool + /// and UpdateUserPool.The temporary password is valid only once. To complete the Admin Create User flow, /// the user must enter the temporary password in the sign-in page, along with a new password - /// to be used in all future sign-ins.This parameter isn't required. If you don't specify a value, Amazon Cognito generates - /// one for you.The temporary password can only be used until the user account expiration limit that + /// to be used in all future sign-ins.If you don't specify a value, Amazon Cognito generates one for you unless you have + /// passwordless options active for your user pool.The temporary password can only be used until the user account expiration limit that /// you set for your user pool. To reset the account after that time limit, you must call /// AdminCreateUser again and specify RESEND for the MessageAction /// parameter. @@ -177,7 +186,9 @@ public partial class NewCGIPUserAdminCmdlet : AmazonCognitoIdentityProviderClien /// sign up in response to your welcome message).For custom attributes, you must prepend the custom: prefix to the attribute /// name.To send a message inviting the user to sign up, you must specify the user's email /// address or phone number. You can do this in your call to AdminCreateUser or in the - /// Users tab of the Amazon Cognito console for managing your user pools.In your call to AdminCreateUser, you can set the email_verified attribute + /// Users tab of the Amazon Cognito console for managing your user pools.You must also provide an email address or phone number when you expect the user to + /// do passwordless sign-in with an email or SMS OTP. These attributes must be provided + /// when passwordless options are the only available, or when you don't submit a TemporaryPassword.In your call to AdminCreateUser, you can set the email_verified attribute /// to True, and you can set the phone_number_verified attribute to True. /// You can also do this by calling AdminUpdateUserAttributes.
    • email: The email address of the user to whom the message that contains the /// code and username will be sent. Required if the email_verified attribute is diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPool-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPool-Cmdlet.cs index 545955561..119b00e60 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPool-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPool-Cmdlet.cs @@ -38,7 +38,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -98,14 +98,29 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter AdminCreateUserConfig_AllowAdminCreateUserOnly /// /// - /// Set to True if only the administrator is allowed to create user profiles. Set - /// to False if users can sign themselves up via an app. + /// The setting for allowing self-service sign-up. When true, only administrators + /// can create new user profiles. When false, users can register themselves and + /// create a new user profile with the SignUp + /// operation. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.Boolean? AdminCreateUserConfig_AllowAdminCreateUserOnly { get; set; } #endregion + #region Parameter SignInPolicy_AllowedFirstAuthFactor + /// + /// + /// The sign-in methods that a user pool supports as the first factor. You can permit + /// users to start authentication with a standard username and password, or with other + /// one-time password and hardware factors. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Policies_SignInPolicy_AllowedFirstAuthFactors")] + public System.String[] SignInPolicy_AllowedFirstAuthFactor { get; set; } + #endregion + #region Parameter UserAttributeUpdateSettings_AttributesRequireVerificationBeforeUpdate /// /// @@ -145,10 +160,10 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient /// user pool through Amazon Cognito APIs. For most use cases, set case sensitivity to /// False (case insensitive) as a best practice. When usernames and email addresses /// are case insensitive, users can sign in as the same user when they enter a different - /// capitalization of their user name.Valid values include:
      True
      Enables case sensitivity for all username input. When this option is set to True, + /// capitalization of their user name.Valid values include:
      true
      Enables case sensitivity for all username input. When this option is set to true, /// users must sign in using the exact capitalization of their given username, such as - /// “UserName”. This is the default value.
      False
      Enables case insensitivity for all username input. For example, when this option is - /// set to False, users can sign in using username, USERNAME, or + /// “UserName”. This is the default value.
      false
      Enables case insensitivity for all username input. For example, when this option is + /// set to false, users can sign in using username, USERNAME, or /// UserName. This option also enables both preferred_username and email /// alias to be case insensitive, in addition to the username attribute.
      /// @@ -191,7 +206,9 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_CreateAuthChallenge /// /// - /// Creates an authentication challenge. + /// The configuration of a create auth challenge Lambda trigger, one of three triggers + /// in the sequence of the custom + /// authentication challenge triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -214,7 +231,10 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_CustomMessage /// /// - /// A custom Message Lambda trigger. + /// A custom message Lambda trigger. This trigger is an opportunity to customize all SMS + /// and email messages from your user pool. When a custom message trigger is active, your + /// user pool routes all messages to a Lambda function that returns a runtime-customized + /// message subject and body for your user pool to deliver to a user. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -224,7 +244,10 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter VerificationMessageTemplate_DefaultEmailOption /// /// - /// The default email option. + /// The configuration of verification emails to contain a clickable link or a verification + /// code.For link, your template body must contain link text in the format {##Click here##}. + /// "Click here" in the example is a customizable string. For code, your template body + /// must contain a code placeholder in the format {####}. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -235,7 +258,9 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_DefineAuthChallenge /// /// - /// Defines the authentication challenge. + /// The configuration of a define auth challenge Lambda trigger, one of three triggers + /// in the sequence of the custom + /// authentication challenge triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -415,7 +440,7 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient /// authentication (MFA), Amazon Cognito creates a role with the required permissions /// and a trust policy that demonstrates use of the ExternalId.For more information about the ExternalId of a role, see How /// to use an external ID when granting access to your Amazon Web Services resources to - /// a third party + /// a third party. /// ///
      [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -437,9 +462,9 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_KMSKeyID /// /// - /// The Amazon Resource Name (ARN) of an KMS + /// The ARN of an KMS /// key. Amazon Cognito uses the key to encrypt codes and temporary passwords sent - /// to CustomEmailSender and CustomSMSSender. + /// to custom sender Lambda triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -581,7 +606,9 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_PostAuthentication /// /// - /// A post-authentication Lambda trigger. + /// The configuration of a post + /// authentication Lambda trigger in a user pool. This trigger can take custom actions + /// after a user signs in. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -591,7 +618,9 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_PostConfirmation /// /// - /// A post-confirmation Lambda trigger. + /// The configuration of a post + /// confirmation Lambda trigger in a user pool. This trigger can take custom actions + /// after a user confirms their user account and their email address or phone number. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -601,7 +630,9 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_PreAuthentication /// /// - /// A pre-authentication Lambda trigger. + /// The configuration of a pre + /// authentication trigger in a user pool. This trigger can evaluate and modify user + /// sign-in events. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -611,7 +642,10 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_PreSignUp /// /// - /// A pre-registration Lambda trigger. + /// The configuration of a pre + /// sign-up Lambda trigger in a user pool. This trigger evaluates new users and can + /// bypass confirmation, link + /// a federated user profile, or block sign-up requests. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -621,10 +655,10 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_PreTokenGeneration /// /// - /// The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda - /// trigger.Set this parameter for legacy purposes. If you also set an ARN in PreTokenGenerationConfig, + /// The legacy configuration of a pre + /// token generation Lambda trigger in a user pool.Set this parameter for legacy purposes. If you also set an ARN in PreTokenGenerationConfig, /// its value must be identical to PreTokenGeneration. For new instances of pre - /// token generation triggers, set the LambdaArn of PreTokenGenerationConfig.You can set + /// token generation triggers, set the LambdaArn of PreTokenGenerationConfig. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -634,7 +668,10 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter AccountRecoverySetting_RecoveryMechanism /// /// - /// The list of RecoveryOptionTypes. + /// The list of options and priorities for user message delivery in forgot-password operations. + /// Sets or displays user pool preferences for email or SMS message priority, whether + /// users should fall back to a second delivery method, and whether passwords should only + /// be reset by administrators. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -655,8 +692,8 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter PasswordPolicy_RequireLowercase /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one lowercase letter in their password. + /// The requirement in a password policy that users must include at least one lowercase + /// letter in their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -667,8 +704,8 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter PasswordPolicy_RequireNumber /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one number in their password. + /// The requirement in a password policy that users must include at least one number in + /// their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -679,8 +716,8 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter PasswordPolicy_RequireSymbol /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one symbol in their password. + /// The requirement in a password policy that users must include at least one symbol in + /// their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -691,8 +728,8 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter PasswordPolicy_RequireUppercase /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one uppercase letter in their password. + /// The requirement in a password policy that users must include at least one uppercase + /// letter in their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -820,12 +857,13 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter AdminCreateUserConfig_UnusedAccountValidityDay /// /// - /// The user account expiration limit, in days, after which a new account that hasn't - /// signed in is no longer usable. To reset the account after that time limit, you must - /// call AdminCreateUser again, specifying "RESEND" for the MessageAction - /// parameter. The default value for this parameter is 7.If you set a value for TemporaryPasswordValidityDays in PasswordPolicy, - /// that value will be used, and UnusedAccountValidityDays will be no longer be - /// an available parameter for that user pool. + /// This parameter is no longer in use. Configure the duration of temporary passwords + /// with the TemporaryPasswordValidityDays parameter of PasswordPolicyType. + /// For older user pools that have a UnusedAccountValidityDays configuration, that + /// value is effective until you set a value for TemporaryPasswordValidityDays.The password expiration limit in days for administrator-created users. When this time + /// expires, the user can't sign in with their temporary password. To reset the account + /// after that time limit, you must call AdminCreateUser again, specifying RESEND + /// for the MessageAction parameter. The default value for this parameter is 7. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -836,7 +874,10 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient #region Parameter LambdaConfig_UserMigration /// /// - /// The user migration Lambda config type. + /// The configuration of a migrate + /// user Lambda trigger in a user pool. This trigger can create user profiles when + /// users sign in or attempt to reset their password with credentials that don't exist + /// yet. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -868,10 +909,26 @@ public partial class NewCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderClient public System.Collections.Hashtable UserPoolTag { get; set; } #endregion + #region Parameter UserPoolTier + /// + /// + /// The user pool feature + /// plan, or tier. This parameter determines the eligibility of the user pool for + /// features like managed login, access-token customization, and threat protection. Defaults + /// to ESSENTIALS. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.CognitoIdentityProvider.UserPoolTierType")] + public Amazon.CognitoIdentityProvider.UserPoolTierType UserPoolTier { get; set; } + #endregion + #region Parameter LambdaConfig_VerifyAuthChallengeResponse /// /// - /// Verifies the authentication challenge response. + /// The configuration of a verify auth challenge Lambda trigger, one of three triggers + /// in the sequence of the custom + /// authentication challenge triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -992,6 +1049,10 @@ protected override void ProcessRecord() context.PasswordPolicy_RequireSymbol = this.PasswordPolicy_RequireSymbol; context.PasswordPolicy_RequireUppercase = this.PasswordPolicy_RequireUppercase; context.PasswordPolicy_TemporaryPasswordValidityDay = this.PasswordPolicy_TemporaryPasswordValidityDay; + if (this.SignInPolicy_AllowedFirstAuthFactor != null) + { + context.SignInPolicy_AllowedFirstAuthFactor = new List(this.SignInPolicy_AllowedFirstAuthFactor); + } context.PoolName = this.PoolName; #if MODULAR if (this.PoolName == null && ParameterWasBound(nameof(this.PoolName))) @@ -1027,6 +1088,7 @@ protected override void ProcessRecord() context.UserPoolTag.Add((String)hashKey, (System.String)(this.UserPoolTag[hashKey])); } } + context.UserPoolTier = this.UserPoolTier; context.VerificationMessageTemplate_DefaultEmailOption = this.VerificationMessageTemplate_DefaultEmailOption; context.VerificationMessageTemplate_EmailMessage = this.VerificationMessageTemplate_EmailMessage; context.VerificationMessageTemplate_EmailMessageByLink = this.VerificationMessageTemplate_EmailMessageByLink; @@ -1482,6 +1544,31 @@ public object Execute(ExecutorContext context) // populate Policies var requestPoliciesIsNull = true; request.Policies = new Amazon.CognitoIdentityProvider.Model.UserPoolPolicyType(); + Amazon.CognitoIdentityProvider.Model.SignInPolicyType requestPolicies_policies_SignInPolicy = null; + + // populate SignInPolicy + var requestPolicies_policies_SignInPolicyIsNull = true; + requestPolicies_policies_SignInPolicy = new Amazon.CognitoIdentityProvider.Model.SignInPolicyType(); + List requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor = null; + if (cmdletContext.SignInPolicy_AllowedFirstAuthFactor != null) + { + requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor = cmdletContext.SignInPolicy_AllowedFirstAuthFactor; + } + if (requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor != null) + { + requestPolicies_policies_SignInPolicy.AllowedFirstAuthFactors = requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor; + requestPolicies_policies_SignInPolicyIsNull = false; + } + // determine if requestPolicies_policies_SignInPolicy should be set to null + if (requestPolicies_policies_SignInPolicyIsNull) + { + requestPolicies_policies_SignInPolicy = null; + } + if (requestPolicies_policies_SignInPolicy != null) + { + request.Policies.SignInPolicy = requestPolicies_policies_SignInPolicy; + requestPoliciesIsNull = false; + } Amazon.CognitoIdentityProvider.Model.PasswordPolicyType requestPolicies_policies_PasswordPolicy = null; // populate PasswordPolicy @@ -1717,6 +1804,10 @@ public object Execute(ExecutorContext context) { request.UserPoolTags = cmdletContext.UserPoolTag; } + if (cmdletContext.UserPoolTier != null) + { + request.UserPoolTier = cmdletContext.UserPoolTier; + } // populate VerificationMessageTemplate var requestVerificationMessageTemplateIsNull = true; @@ -1890,6 +1981,7 @@ internal partial class CmdletContext : ExecutorContext public System.Boolean? PasswordPolicy_RequireSymbol { get; set; } public System.Boolean? PasswordPolicy_RequireUppercase { get; set; } public System.Int32? PasswordPolicy_TemporaryPasswordValidityDay { get; set; } + public List SignInPolicy_AllowedFirstAuthFactor { get; set; } public System.String PoolName { get; set; } public List Schema { get; set; } public System.String SmsAuthenticationMessage { get; set; } @@ -1903,6 +1995,7 @@ internal partial class CmdletContext : ExecutorContext public Amazon.CognitoIdentityProvider.AdvancedSecurityEnabledModeType AdvancedSecurityAdditionalFlows_CustomAuthMode { get; set; } public Amazon.CognitoIdentityProvider.AdvancedSecurityModeType UserPoolAddOns_AdvancedSecurityMode { get; set; } public Dictionary UserPoolTag { get; set; } + public Amazon.CognitoIdentityProvider.UserPoolTierType UserPoolTier { get; set; } public Amazon.CognitoIdentityProvider.DefaultEmailOptionType VerificationMessageTemplate_DefaultEmailOption { get; set; } public System.String VerificationMessageTemplate_EmailMessage { get; set; } public System.String VerificationMessageTemplate_EmailMessageByLink { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolClient-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolClient-Cmdlet.cs index 503b2c819..d19e5ff6d 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolClient-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolClient-Cmdlet.cs @@ -62,10 +62,9 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider #region Parameter TokenValidityUnits_AccessToken /// /// - /// A time unit of seconds, minutes, hours, or days for the - /// value that you set in the AccessTokenValidity parameter. The default AccessTokenValidity - /// time unit is hours. AccessTokenValidity duration can range from five minutes - /// to one day. + /// A time unit for the value that you set in the AccessTokenValidity parameter. + /// The default AccessTokenValidity time unit is hours. AccessTokenValidity + /// duration can range from five minutes to one day. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -137,9 +136,11 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider #region Parameter AnalyticsConfiguration_ApplicationArn /// /// - /// The Amazon Resource Name (ARN) of an Amazon Pinpoint project. You can use the Amazon - /// Pinpoint project to integrate with the chosen user pool Client. Amazon Cognito publishes - /// events to the Amazon Pinpoint project that the app ARN declares. + /// The Amazon Resource Name (ARN) of an Amazon Pinpoint project that you want to connect + /// to your user pool app client. Amazon Cognito publishes events to the Amazon Pinpoint + /// project that ApplicationArn declares. You can also configure your application + /// to pass an endpoint ID in the AnalyticsMetadata parameter of sign-in operations. + /// The endpoint ID is information about the destination for push notifications /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -149,7 +150,7 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider #region Parameter AnalyticsConfiguration_ApplicationId /// /// - /// The application ID for an Amazon Pinpoint application. + /// Your Amazon Pinpoint project ID. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -215,7 +216,7 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider /// /// /// Activates the propagation of additional user context data. For more information about - /// propagation of user context data, see + /// propagation of user context data, see /// Adding advanced security to a user pool. If you don’t include this parameter, /// you can't send device fingerprint information, including source IP address, to Amazon /// Cognito advanced security. You can only activate EnablePropagateAdditionalUserContextData @@ -246,7 +247,12 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider /// or more flows, including with a user name and Secure Remote Password (SRP), a user /// name and password, or a custom authentication process that you define with Lambda /// functions.If you don't specify a value for ExplicitAuthFlows, your user client supports - /// ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH.Valid values include:
      • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication + /// ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH.Valid values include:
        • ALLOW_USER_AUTH: Enable selection-based sign-in with USER_AUTH. This + /// setting covers username-password, secure remote password (SRP), passwordless, and + /// passkey authentication. This authentiation flow can do username-password and SRP authentication + /// without other ExplicitAuthFlows permitting them. For example users can complete + /// an SRP challenge through USER_AUTH without the flow USER_SRP_AUTH being + /// active for the app client. This flow doesn't include CUSTOM_AUTH.
        • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication /// flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH /// setting. With this authentication flow, your app passes a user name and password to /// Amazon Cognito in the request, instead of using the Secure Remote Password (SRP) protocol @@ -266,7 +272,8 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider #region Parameter AnalyticsConfiguration_ExternalId /// /// - /// The external ID. + /// The external + /// ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -287,10 +294,9 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider #region Parameter TokenValidityUnits_IdToken /// /// - /// A time unit of seconds, minutes, hours, or days for the - /// value that you set in the IdTokenValidity parameter. The default IdTokenValidity - /// time unit is hours. IdTokenValidity duration can range from five minutes to - /// one day. + /// A time unit for the value that you set in the IdTokenValidity parameter. The + /// default IdTokenValidity time unit is hours. IdTokenValidity duration + /// can range from five minutes to one day. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -367,10 +373,9 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider #region Parameter TokenValidityUnits_RefreshToken /// /// - /// A time unit of seconds, minutes, hours, or days for the - /// value that you set in the RefreshTokenValidity parameter. The default RefreshTokenValidity - /// time unit is days. RefreshTokenValidity duration can range from 60 minutes - /// to 10 years. + /// A time unit for the value that you set in the RefreshTokenValidity parameter. + /// The default RefreshTokenValidity time unit is days. RefreshTokenValidity + /// duration can range from 60 minutes to 10 years. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -400,8 +405,8 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider #region Parameter AnalyticsConfiguration_RoleArn /// /// - /// The ARN of an Identity and Access Management role that authorizes Amazon Cognito to - /// publish events to Amazon Pinpoint analytics. + /// The ARN of an Identity and Access Management role that has the permissions required + /// for Amazon Cognito to publish events to Amazon Pinpoint analytics. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -415,7 +420,12 @@ public partial class NewCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvider /// client. The following are supported: COGNITO, Facebook, Google, /// SignInWithApple, and LoginWithAmazon. You can also specify the names /// that you configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP - /// or MyOIDCIdP. + /// or MyOIDCIdP.This setting applies to providers that you can access with the hosted + /// UI and OAuth 2.0 authorization server. The removal of COGNITO from this + /// list doesn't prevent authentication operations for local users with the user pools + /// API in an Amazon Web Services SDK. The only way to prevent API-based authentication + /// is to block access with a WAF + /// rule. /// ///
      [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolDomain-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolDomain-Cmdlet.cs index a791b8aa3..def3d33c3 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolDomain-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/New-CGIPUserPoolDomain-Cmdlet.cs @@ -28,7 +28,8 @@ namespace Amazon.PowerShell.Cmdlets.CGIP { /// - /// Creates a new domain for a user pool. + /// Creates a new domain for a user pool. The domain hosts user pool domain services like + /// managed login, the hosted UI (classic), and the user pool authorization server. /// /// /// Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests @@ -80,10 +81,23 @@ public partial class NewCGIPUserPoolDomainCmdlet : AmazonCognitoIdentityProvider public System.String Domain { get; set; } #endregion + #region Parameter ManagedLoginVersion + /// + /// + /// The version of managed login branding that you want to apply to your domain. A value + /// of 1 indicates hosted UI (classic) branding and a version of 2 indicates + /// managed login branding.Managed login requires that your user pool be configured for any feature + /// plan other than Lite. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Int32? ManagedLoginVersion { get; set; } + #endregion + #region Parameter UserPoolId /// /// - /// The user pool ID. + /// The ID of the user pool where you want to add a domain. /// /// #if !MODULAR @@ -167,6 +181,7 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter Domain which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + context.ManagedLoginVersion = this.ManagedLoginVersion; context.UserPoolId = this.UserPoolId; #if MODULAR if (this.UserPoolId == null && ParameterWasBound(nameof(this.UserPoolId))) @@ -213,6 +228,10 @@ public object Execute(ExecutorContext context) { request.Domain = cmdletContext.Domain; } + if (cmdletContext.ManagedLoginVersion != null) + { + request.ManagedLoginVersion = cmdletContext.ManagedLoginVersion.Value; + } if (cmdletContext.UserPoolId != null) { request.UserPoolId = cmdletContext.UserPoolId; @@ -280,6 +299,7 @@ internal partial class CmdletContext : ExecutorContext { public System.String CustomDomainConfig_CertificateArn { get; set; } public System.String Domain { get; set; } + public System.Int32? ManagedLoginVersion { get; set; } public System.String UserPoolId { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response.CloudFrontDomain; diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Register-CGIPUserInPool-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Register-CGIPUserInPool-Cmdlet.cs index 4f9f5826c..ed908078b 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Register-CGIPUserInPool-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Register-CGIPUserInPool-Cmdlet.cs @@ -47,14 +47,23 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into /// production. For more information, see /// SMS message settings for Amazon Cognito user pools in the Amazon Cognito Developer /// Guide. - /// + /// + /// You might receive a LimitExceeded exception in response to this request if + /// you have exceeded a rate quota for email or SMS messages, and if your user pool automatically + /// verifies email addresses or phone numbers. When you get this exception in the response, + /// the user is successfully created and is in an UNCONFIRMED state. You can send + /// a new code with the + /// ResendConfirmationCode request, or confirm the user as an administrator with an + /// + /// AdminConfirmSignUp request. + /// /// [Cmdlet("Register", "CGIPUserInPool", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] [OutputType("Amazon.CognitoIdentityProvider.Model.SignUpResponse")] @@ -67,12 +76,15 @@ public partial class RegisterCGIPUserInPoolCmdlet : AnonymousAmazonCognitoIdenti protected override bool IsSensitiveRequest { get; set; } = true; + protected override bool IsSensitiveResponse { get; set; } = true; + protected override bool IsGeneratedCmdlet { get; set; } = true; #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -144,17 +156,15 @@ public partial class RegisterCGIPUserInPoolCmdlet : AnonymousAmazonCognitoIdenti #region Parameter Password /// /// - /// The password of the user you want to register. + /// The password of the user you want to register.Users can sign up without a password when your user pool supports passwordless sign-in + /// with email or SMS OTPs. To create a user with no password, omit this parameter or + /// submit a blank value. You can only create a passwordless user when passwordless sign-in + /// is available. See the + /// SignInPolicyType property of CreateUserPool + /// and UpdateUserPool. /// /// - #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] - #else - [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] - [System.Management.Automation.AllowEmptyString] - [System.Management.Automation.AllowNull] - #endif - [Amazon.PowerShell.Common.AWSRequiredParameter] public System.String Password { get; set; } #endregion @@ -295,12 +305,6 @@ protected override void ProcessRecord() } } context.Password = this.Password; - #if MODULAR - if (this.Password == null && ParameterWasBound(nameof(this.Password))) - { - WriteWarning("You are passing $null as a value for parameter Password which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); - } - #endif context.SecretHash = this.SecretHash; if (this.UserAttribute != null) { diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Remove-CGIPManagedLoginBranding-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Remove-CGIPManagedLoginBranding-Cmdlet.cs new file mode 100644 index 000000000..ab3296cd7 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Remove-CGIPManagedLoginBranding-Cmdlet.cs @@ -0,0 +1,256 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Deletes a managed login branding style. When you delete a style, you delete the branding + /// association for an app client and restore it to default settings. + /// + /// + /// Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests + /// for this API operation. For this operation, you must use IAM credentials to authorize + /// requests, and you must grant yourself the corresponding IAM permission in a policy. + /// Learn more + /// + [Cmdlet("Remove", "CGIPManagedLoginBranding", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider DeleteManagedLoginBranding API operation.", Operation = new[] {"DeleteManagedLoginBranding"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.DeleteManagedLoginBrandingResponse))] + [AWSCmdletOutput("None or Amazon.CognitoIdentityProvider.Model.DeleteManagedLoginBrandingResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.CognitoIdentityProvider.Model.DeleteManagedLoginBrandingResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveCGIPManagedLoginBrandingCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ManagedLoginBrandingId + /// + /// + /// The ID of the managed login branding style that you want to delete. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ManagedLoginBrandingId { get; set; } + #endregion + + #region Parameter UserPoolId + /// + /// + /// The ID of the user pool that contains the managed login branding style that you want + /// to delete. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String UserPoolId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.DeleteManagedLoginBrandingResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the UserPoolId parameter. + /// The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.UserPoolId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-CGIPManagedLoginBranding (DeleteManagedLoginBranding)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.UserPoolId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ManagedLoginBrandingId = this.ManagedLoginBrandingId; + #if MODULAR + if (this.ManagedLoginBrandingId == null && ParameterWasBound(nameof(this.ManagedLoginBrandingId))) + { + WriteWarning("You are passing $null as a value for parameter ManagedLoginBrandingId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.UserPoolId = this.UserPoolId; + #if MODULAR + if (this.UserPoolId == null && ParameterWasBound(nameof(this.UserPoolId))) + { + WriteWarning("You are passing $null as a value for parameter UserPoolId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.DeleteManagedLoginBrandingRequest(); + + if (cmdletContext.ManagedLoginBrandingId != null) + { + request.ManagedLoginBrandingId = cmdletContext.ManagedLoginBrandingId; + } + if (cmdletContext.UserPoolId != null) + { + request.UserPoolId = cmdletContext.UserPoolId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.DeleteManagedLoginBrandingResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.DeleteManagedLoginBrandingRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "DeleteManagedLoginBranding"); + try + { + #if DESKTOP + return client.DeleteManagedLoginBranding(request); + #elif CORECLR + return client.DeleteManagedLoginBrandingAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ManagedLoginBrandingId { get; set; } + public System.String UserPoolId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Remove-CGIPWebAuthnCredential-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Remove-CGIPWebAuthnCredential-Cmdlet.cs new file mode 100644 index 000000000..9538daaca --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Remove-CGIPWebAuthnCredential-Cmdlet.cs @@ -0,0 +1,257 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Deletes a registered passkey, or webauthN, device for the currently signed-in user. + /// + /// + /// + /// Authorize this action with a signed-in user's access token. It must include the scope + /// aws.cognito.signin.user.admin. + /// + /// + [Cmdlet("Remove", "CGIPWebAuthnCredential", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider DeleteWebAuthnCredential API operation.", Operation = new[] {"DeleteWebAuthnCredential"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.DeleteWebAuthnCredentialResponse))] + [AWSCmdletOutput("None or Amazon.CognitoIdentityProvider.Model.DeleteWebAuthnCredentialResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.CognitoIdentityProvider.Model.DeleteWebAuthnCredentialResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveCGIPWebAuthnCredentialCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AccessToken + /// + /// + /// A valid access token that Amazon Cognito issued to the user whose passkey you want + /// to delete. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AccessToken { get; set; } + #endregion + + #region Parameter CredentialId + /// + /// + /// The unique identifier of the passkey that you want to delete. Look up registered devices + /// with + /// ListWebAuthnCredentials. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String CredentialId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.DeleteWebAuthnCredentialResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the CredentialId parameter. + /// The -PassThru parameter is deprecated, use -Select '^CredentialId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^CredentialId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.CredentialId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-CGIPWebAuthnCredential (DeleteWebAuthnCredential)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.CredentialId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AccessToken = this.AccessToken; + #if MODULAR + if (this.AccessToken == null && ParameterWasBound(nameof(this.AccessToken))) + { + WriteWarning("You are passing $null as a value for parameter AccessToken which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.CredentialId = this.CredentialId; + #if MODULAR + if (this.CredentialId == null && ParameterWasBound(nameof(this.CredentialId))) + { + WriteWarning("You are passing $null as a value for parameter CredentialId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.DeleteWebAuthnCredentialRequest(); + + if (cmdletContext.AccessToken != null) + { + request.AccessToken = cmdletContext.AccessToken; + } + if (cmdletContext.CredentialId != null) + { + request.CredentialId = cmdletContext.CredentialId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.DeleteWebAuthnCredentialResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.DeleteWebAuthnCredentialRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "DeleteWebAuthnCredential"); + try + { + #if DESKTOP + return client.DeleteWebAuthnCredential(request); + #elif CORECLR + return client.DeleteWebAuthnCredentialAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AccessToken { get; set; } + public System.String CredentialId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPForgottenPassword-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPForgottenPassword-Cmdlet.cs index 9bfbeacac..2f48cd0f8 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPForgottenPassword-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPForgottenPassword-Cmdlet.cs @@ -62,7 +62,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. ///
      /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -88,7 +88,8 @@ public partial class ResetCGIPForgottenPasswordCmdlet : AnonymousAmazonCognitoId #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPUserPasswordAdmin-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPUserPasswordAdmin-Cmdlet.cs index 0d9d77116..34c4a2984 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPUserPasswordAdmin-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Reset-CGIPUserPasswordAdmin-Cmdlet.cs @@ -46,7 +46,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponse-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponse-Cmdlet.cs index 685cfc25e..2a6f1c1ac 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponse-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponse-Cmdlet.cs @@ -54,7 +54,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -81,7 +81,8 @@ public partial class SendCGIPAuthChallengeResponseCmdlet : AmazonCognitoIdentity #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -111,9 +112,20 @@ public partial class SendCGIPAuthChallengeResponseCmdlet : AmazonCognitoIdentity /// The responses to the challenge that you received in the previous request. Each challenge /// has its own required response parameters. The following examples are partial JSON /// request bodies that highlight challenge-response parameters.You must provide a SECRET_HASH parameter in all challenge responses to an app client - /// that has a client secret.
      SMS_MFA
      "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[code]", "USERNAME": + /// that has a client secret. Include a DEVICE_KEY for device authentication.
      SELECT_CHALLENGE
      "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "USERNAME": "[username]", + /// "ANSWER": "[Challenge name]"}Available challenges are PASSWORD, PASSWORD_SRP, EMAIL_OTP, SMS_OTP, + /// and WEB_AUTHN.Complete authentication in the SELECT_CHALLENGE response for PASSWORD, + /// PASSWORD_SRP, and WEB_AUTHN:
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "WEB_AUTHN", + /// "USERNAME": "[username]", "CREDENTIAL": "[AuthenticationResponseJSON]"}See + /// AuthenticationResponseJSON.
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD", + /// "USERNAME": "[username]", "PASSWORD": "[password]"}
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD_SRP", + /// "USERNAME": "[username]", "SRP_A": "[SRP_A]"}
      For SMS_OTP and EMAIL_OTP, respond with the username and answer. Your + /// user pool will send a code for the user to submit in the next challenge response.
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "SMS_OTP", + /// "USERNAME": "[username]"}
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "EMAIL_OTP", + /// "USERNAME": "[username]"}
      SMS_OTP
      "ChallengeName": "SMS_OTP", "ChallengeResponses": {"SMS_OTP_CODE": "[code]", "USERNAME": /// "[username]"}
      EMAIL_OTP
      "ChallengeName": "EMAIL_OTP", "ChallengeResponses": {"EMAIL_OTP_CODE": "[code]", - /// "USERNAME": "[username]"}
      PASSWORD_VERIFIER
      This challenge response is part of the SRP flow. Amazon Cognito requires that your + /// "USERNAME": "[username]"}
      SMS_MFA
      "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[code]", "USERNAME": + /// "[username]"}
      PASSWORD_VERIFIER
      This challenge response is part of the SRP flow. Amazon Cognito requires that your /// application respond to this challenge within a few seconds. When the response time /// exceeds this period, your user pool returns a NotAuthorizedException error."ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": {"PASSWORD_CLAIM_SIGNATURE": /// "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponseAdmin-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponseAdmin-Cmdlet.cs index dea557b2f..d99936903 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponseAdmin-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPAuthChallengeResponseAdmin-Cmdlet.cs @@ -48,7 +48,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -81,7 +81,8 @@ public partial class SendCGIPAuthChallengeResponseAdminCmdlet : AmazonCognitoIde #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -111,9 +112,20 @@ public partial class SendCGIPAuthChallengeResponseAdminCmdlet : AmazonCognitoIde /// The responses to the challenge that you received in the previous request. Each challenge /// has its own required response parameters. The following examples are partial JSON /// request bodies that highlight challenge-response parameters.You must provide a SECRET_HASH parameter in all challenge responses to an app client - /// that has a client secret.
      SMS_MFA
      "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[code]", "USERNAME": + /// that has a client secret. Include a DEVICE_KEY for device authentication.
      SELECT_CHALLENGE
      "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "USERNAME": "[username]", + /// "ANSWER": "[Challenge name]"}Available challenges are PASSWORD, PASSWORD_SRP, EMAIL_OTP, SMS_OTP, + /// and WEB_AUTHN.Complete authentication in the SELECT_CHALLENGE response for PASSWORD, + /// PASSWORD_SRP, and WEB_AUTHN:
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "WEB_AUTHN", + /// "USERNAME": "[username]", "CREDENTIAL": "[AuthenticationResponseJSON]"}See + /// AuthenticationResponseJSON.
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD", + /// "USERNAME": "[username]", "PASSWORD": "[password]"}
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD_SRP", + /// "USERNAME": "[username]", "SRP_A": "[SRP_A]"}
      For SMS_OTP and EMAIL_OTP, respond with the username and answer. Your + /// user pool will send a code for the user to submit in the next challenge response.
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "SMS_OTP", + /// "USERNAME": "[username]"}
      • "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "EMAIL_OTP", + /// "USERNAME": "[username]"}
      SMS_OTP
      "ChallengeName": "SMS_OTP", "ChallengeResponses": {"SMS_OTP_CODE": "[code]", "USERNAME": /// "[username]"}
      EMAIL_OTP
      "ChallengeName": "EMAIL_OTP", "ChallengeResponses": {"EMAIL_OTP_CODE": "[code]", - /// "USERNAME": "[username]"}
      PASSWORD_VERIFIER
      This challenge response is part of the SRP flow. Amazon Cognito requires that your + /// "USERNAME": "[username]"}
      SMS_MFA
      "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[code]", "USERNAME": + /// "[username]"}
      PASSWORD_VERIFIER
      This challenge response is part of the SRP flow. Amazon Cognito requires that your /// application respond to this challenge within a few seconds. When the response time /// exceeds this period, your user pool returns a NotAuthorizedException error."ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": {"PASSWORD_CLAIM_SIGNATURE": /// "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": @@ -196,7 +208,7 @@ public partial class SendCGIPAuthChallengeResponseAdminCmdlet : AmazonCognitoIde #region Parameter ContextData_HttpHeader /// /// - /// HttpHeaders received on your server in same order. + /// The HTTP headers from your user's authentication request. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -217,7 +229,7 @@ public partial class SendCGIPAuthChallengeResponseAdminCmdlet : AmazonCognitoIde #region Parameter ContextData_ServerName /// /// - /// Your server endpoint where this API is invoked. + /// The name of your application's service endpoint. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -227,7 +239,7 @@ public partial class SendCGIPAuthChallengeResponseAdminCmdlet : AmazonCognitoIde #region Parameter ContextData_ServerPath /// /// - /// Your server path where this API is invoked. + /// The path of your application's service endpoint. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPConfirmationCode-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPConfirmationCode-Cmdlet.cs index 847bdc62b..40a1e544d 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPConfirmationCode-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Send-CGIPConfirmationCode-Cmdlet.cs @@ -47,7 +47,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -73,7 +73,8 @@ public partial class SendCGIPConfirmationCodeCmdlet : AnonymousAmazonCognitoIden #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPRiskConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPRiskConfiguration-Cmdlet.cs index ef34b788f..c2a629321 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPRiskConfiguration-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPRiskConfiguration-Cmdlet.cs @@ -56,9 +56,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter RiskExceptionConfiguration_BlockedIPRangeList /// /// - /// Overrides the risk decision to always block the pre-authentication requests. The IP - /// range is in CIDR notation, a compact representation of an IP address and its routing - /// prefix. + /// An always-block IP address list. Overrides the risk decision and always blocks authentication + /// requests. This parameter is displayed and set in CIDR notation. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -82,10 +81,13 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter HighAction_EventAction /// /// - /// The action to take in response to the account takeover action. Valid values are as - /// follows:
      • BLOCK Choosing this action will block the request.
      • MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else - /// allow the request.
      • MFA_REQUIRED Present an MFA challenge if user has configured it, else block - /// the request.
      • NO_ACTION Allow the user to sign in.
      + /// The action to take for the attempted account takeover action for the associated risk + /// level. Valid values are as follows:
      • BLOCK: Block the request.
      • MFA_IF_CONFIGURED: Present an MFA challenge if possible. MFA is possible if + /// the user pool has active MFA methods that the user can set up. For example, if the + /// user pool only supports SMS message MFA but the user doesn't have a phone number attribute, + /// MFA setup isn't possible. If MFA setup isn't possible, allow the request.
      • MFA_REQUIRED: Present an MFA challenge if possible. Block the request if a + /// user hasn't set up MFA. To sign in with required MFA, users must have an email address + /// or phone number attribute, or a registered TOTP factor.
      • NO_ACTION: Take no action. Permit sign-in.
      ///
      ///
      [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -97,10 +99,13 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter LowAction_EventAction /// /// - /// The action to take in response to the account takeover action. Valid values are as - /// follows:
      • BLOCK Choosing this action will block the request.
      • MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else - /// allow the request.
      • MFA_REQUIRED Present an MFA challenge if user has configured it, else block - /// the request.
      • NO_ACTION Allow the user to sign in.
      + /// The action to take for the attempted account takeover action for the associated risk + /// level. Valid values are as follows:
      • BLOCK: Block the request.
      • MFA_IF_CONFIGURED: Present an MFA challenge if possible. MFA is possible if + /// the user pool has active MFA methods that the user can set up. For example, if the + /// user pool only supports SMS message MFA but the user doesn't have a phone number attribute, + /// MFA setup isn't possible. If MFA setup isn't possible, allow the request.
      • MFA_REQUIRED: Present an MFA challenge if possible. Block the request if a + /// user hasn't set up MFA. To sign in with required MFA, users must have an email address + /// or phone number attribute, or a registered TOTP factor.
      • NO_ACTION: Take no action. Permit sign-in.
      ///
      ///
      [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -112,10 +117,13 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter MediumAction_EventAction /// /// - /// The action to take in response to the account takeover action. Valid values are as - /// follows:
      • BLOCK Choosing this action will block the request.
      • MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else - /// allow the request.
      • MFA_REQUIRED Present an MFA challenge if user has configured it, else block - /// the request.
      • NO_ACTION Allow the user to sign in.
      + /// The action to take for the attempted account takeover action for the associated risk + /// level. Valid values are as follows:
      • BLOCK: Block the request.
      • MFA_IF_CONFIGURED: Present an MFA challenge if possible. MFA is possible if + /// the user pool has active MFA methods that the user can set up. For example, if the + /// user pool only supports SMS message MFA but the user doesn't have a phone number attribute, + /// MFA setup isn't possible. If MFA setup isn't possible, allow the request.
      • MFA_REQUIRED: Present an MFA challenge if possible. Block the request if a + /// user hasn't set up MFA. To sign in with required MFA, users must have an email address + /// or phone number attribute, or a registered TOTP factor.
      • NO_ACTION: Take no action. Permit sign-in.
      ///
      ///
      [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -127,7 +135,7 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter Actions_EventAction /// /// - /// The event action. + /// The action that Amazon Cognito takes when it detects compromised credentials. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -139,8 +147,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter CompromisedCredentialsRiskConfiguration_EventFilter /// /// - /// Perform the action for these events. The default is to perform all events if no event - /// filter is specified. + /// Settings for the sign-in activity where you want to configure compromised-credentials + /// actions. Defaults to all events. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -150,7 +158,7 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter NotifyConfiguration_From /// /// - /// The email address that is sending the email. The address must be either individually + /// The email address that sends the email message. The address must be either individually /// verified with Amazon Simple Email Service, or from a domain that has been verified /// with Amazon SES. /// @@ -163,7 +171,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter BlockEmail_HtmlBody /// /// - /// The email HTML body. + /// The body of an email notification formatted in HTML. Choose an HtmlBody or + /// a TextBody to send an HTML-formatted or plaintext message, respectively. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -174,7 +183,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter MfaEmail_HtmlBody /// /// - /// The email HTML body. + /// The body of an email notification formatted in HTML. Choose an HtmlBody or + /// a TextBody to send an HTML-formatted or plaintext message, respectively. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -185,7 +195,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter NoActionEmail_HtmlBody /// /// - /// The email HTML body. + /// The body of an email notification formatted in HTML. Choose an HtmlBody or + /// a TextBody to send an HTML-formatted or plaintext message, respectively. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -196,7 +207,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter HighAction_Notify /// /// - /// Flag specifying whether to send a notification. + /// Determines whether Amazon Cognito sends a user a notification message when your user + /// pools assesses a user's session at the associated risk level. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -207,7 +219,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter LowAction_Notify /// /// - /// Flag specifying whether to send a notification. + /// Determines whether Amazon Cognito sends a user a notification message when your user + /// pools assesses a user's session at the associated risk level. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -218,7 +231,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter MediumAction_Notify /// /// - /// Flag specifying whether to send a notification. + /// Determines whether Amazon Cognito sends a user a notification message when your user + /// pools assesses a user's session at the associated risk level. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -229,7 +243,7 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter NotifyConfiguration_ReplyTo /// /// - /// The destination to which the receiver of an email should reply to. + /// The reply-to email address of an email template. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -240,8 +254,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter RiskExceptionConfiguration_SkippedIPRangeList /// /// - /// Risk detection isn't performed on the IP addresses in this range list. The IP range - /// is in CIDR notation. + /// An always-allow IP address list. Risk detection isn't performed on the IP addresses + /// in this range list. This parameter is displayed and set in CIDR notation. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -264,7 +278,7 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter BlockEmail_Subject /// /// - /// The email subject. + /// The subject of the threat protection email notification. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -275,7 +289,7 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter MfaEmail_Subject /// /// - /// The email subject. + /// The subject of the threat protection email notification. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -286,7 +300,7 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter NoActionEmail_Subject /// /// - /// The email subject. + /// The subject of the threat protection email notification. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -297,7 +311,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter BlockEmail_TextBody /// /// - /// The email text body. + /// The body of an email notification formatted in plaintext. Choose an HtmlBody + /// or a TextBody to send an HTML-formatted or plaintext message, respectively. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -308,7 +323,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter MfaEmail_TextBody /// /// - /// The email text body. + /// The body of an email notification formatted in plaintext. Choose an HtmlBody + /// or a TextBody to send an HTML-formatted or plaintext message, respectively. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -319,7 +335,8 @@ public partial class SetCGIPRiskConfigurationCmdlet : AmazonCognitoIdentityProvi #region Parameter NoActionEmail_TextBody /// /// - /// The email text body. + /// The body of an email notification formatted in plaintext. Choose an HtmlBody + /// or a TextBody to send an HTML-formatted or plaintext message, respectively. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPUserPoolMfaConfig-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPUserPoolMfaConfig-Cmdlet.cs index 385635eb0..c2363e1aa 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPUserPoolMfaConfig-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Set-CGIPUserPoolMfaConfig-Cmdlet.cs @@ -28,7 +28,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP { /// - /// Sets the user pool multi-factor authentication (MFA) configuration. + /// Sets the user pool multi-factor authentication (MFA) and passkey configuration. /// /// /// This action might generate an SMS text message. Starting June 1, 2021, US telecom @@ -40,7 +40,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -87,6 +87,19 @@ public partial class SetCGIPUserPoolMfaConfigCmdlet : AmazonCognitoIdentityProvi public Amazon.CognitoIdentityProvider.UserPoolMfaType MfaConfiguration { get; set; } #endregion + #region Parameter WebAuthnConfiguration_RelyingPartyId + /// + /// + /// Sets or displays the authentication domain, typically your user pool domain, that + /// passkey providers must use as a relying party (RP) in their configuration.Under the following conditions, the passkey relying party ID must be the fully-qualified + /// domain name of your custom domain:
      • The user pool is configured for passkey authentication.
      • The user pool has a custom domain, whether or not it also has a prefix domain.
      • Your application performs authentication with managed login or the classic hosted + /// UI.
      + ///
      + ///
      + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String WebAuthnConfiguration_RelyingPartyId { get; set; } + #endregion + #region Parameter SmsMfaConfiguration /// /// @@ -136,6 +149,19 @@ public partial class SetCGIPUserPoolMfaConfigCmdlet : AmazonCognitoIdentityProvi public System.String UserPoolId { get; set; } #endregion + #region Parameter WebAuthnConfiguration_UserVerification + /// + /// + /// Sets or displays your user-pool treatment for MFA with a passkey. You can override + /// other MFA options and require passkey MFA, or you can set it as preferred. When passkey + /// MFA is preferred, the hosted UI encourages users to register a passkey at sign-in. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.CognitoIdentityProvider.UserVerificationType")] + public Amazon.CognitoIdentityProvider.UserVerificationType WebAuthnConfiguration_UserVerification { get; set; } + #endregion + #region Parameter Select /// /// Use the -Select parameter to control the cmdlet output. The default value is '*'. @@ -210,6 +236,8 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter UserPoolId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + context.WebAuthnConfiguration_RelyingPartyId = this.WebAuthnConfiguration_RelyingPartyId; + context.WebAuthnConfiguration_UserVerification = this.WebAuthnConfiguration_UserVerification; // allow further manipulation of loaded context prior to processing PostExecutionContextLoad(context); @@ -272,6 +300,35 @@ public object Execute(ExecutorContext context) request.UserPoolId = cmdletContext.UserPoolId; } + // populate WebAuthnConfiguration + var requestWebAuthnConfigurationIsNull = true; + request.WebAuthnConfiguration = new Amazon.CognitoIdentityProvider.Model.WebAuthnConfigurationType(); + System.String requestWebAuthnConfiguration_webAuthnConfiguration_RelyingPartyId = null; + if (cmdletContext.WebAuthnConfiguration_RelyingPartyId != null) + { + requestWebAuthnConfiguration_webAuthnConfiguration_RelyingPartyId = cmdletContext.WebAuthnConfiguration_RelyingPartyId; + } + if (requestWebAuthnConfiguration_webAuthnConfiguration_RelyingPartyId != null) + { + request.WebAuthnConfiguration.RelyingPartyId = requestWebAuthnConfiguration_webAuthnConfiguration_RelyingPartyId; + requestWebAuthnConfigurationIsNull = false; + } + Amazon.CognitoIdentityProvider.UserVerificationType requestWebAuthnConfiguration_webAuthnConfiguration_UserVerification = null; + if (cmdletContext.WebAuthnConfiguration_UserVerification != null) + { + requestWebAuthnConfiguration_webAuthnConfiguration_UserVerification = cmdletContext.WebAuthnConfiguration_UserVerification; + } + if (requestWebAuthnConfiguration_webAuthnConfiguration_UserVerification != null) + { + request.WebAuthnConfiguration.UserVerification = requestWebAuthnConfiguration_webAuthnConfiguration_UserVerification; + requestWebAuthnConfigurationIsNull = false; + } + // determine if request.WebAuthnConfiguration should be set to null + if (requestWebAuthnConfigurationIsNull) + { + request.WebAuthnConfiguration = null; + } + CmdletOutput output; // issue call @@ -338,6 +395,8 @@ internal partial class CmdletContext : ExecutorContext public Amazon.CognitoIdentityProvider.Model.SmsMfaConfigType SmsMfaConfiguration { get; set; } public Amazon.CognitoIdentityProvider.Model.SoftwareTokenMfaConfigType SoftwareTokenMfaConfiguration { get; set; } public System.String UserPoolId { get; set; } + public System.String WebAuthnConfiguration_RelyingPartyId { get; set; } + public Amazon.CognitoIdentityProvider.UserVerificationType WebAuthnConfiguration_UserVerification { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response; } diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuth-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuth-Cmdlet.cs index dd9c295b6..84b211bdc 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuth-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuth-Cmdlet.cs @@ -49,7 +49,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -76,7 +76,8 @@ public partial class StartCGIPAuthCmdlet : AmazonCognitoIdentityProviderClientCm #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -86,13 +87,24 @@ public partial class StartCGIPAuthCmdlet : AmazonCognitoIdentityProviderClientCm #region Parameter AuthFlow /// /// - /// The authentication flow for this call to run. The API action will depend on this value. - /// For example:
      • REFRESH_TOKEN_AUTH takes in a valid refresh token and returns new tokens.
      • USER_SRP_AUTH takes in USERNAME and SRP_A and returns the SRP - /// variables to be used for next challenge execution.
      • USER_PASSWORD_AUTH takes in USERNAME and PASSWORD and returns - /// the next challenge or tokens.
      Valid values include:
      • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.
      • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing - /// the access token and ID token by supplying a valid refresh token.
      • CUSTOM_AUTH: Custom authentication flow.
      • USER_PASSWORD_AUTH: Non-SRP authentication flow; user name and password are - /// passed directly. If a user migration Lambda trigger is set, this flow will invoke - /// the user migration Lambda if it doesn't find the user name in the user pool.
      ADMIN_NO_SRP_AUTH isn't a valid value. + /// The authentication flow that you want to initiate. The AuthParameters that + /// you must submit are linked to the flow that you submit. For example:
      • USER_AUTH: Request a preferred authentication type or review available authentication + /// types. From the offered authentication types, select one in a challenge response and + /// then authenticate with that method in an additional challenge response.
      • REFRESH_TOKEN_AUTH: Receive new ID and access tokens when you pass a REFRESH_TOKEN + /// parameter with a valid refresh token as the value.
      • USER_SRP_AUTH: Receive secure remote password (SRP) variables for the next + /// challenge, PASSWORD_VERIFIER, when you pass USERNAME and SRP_A + /// parameters.
      • USER_PASSWORD_AUTH: Receive new tokens or the next challenge, for example + /// SOFTWARE_TOKEN_MFA, when you pass USERNAME and PASSWORD parameters.
      Valid values include the following:
      USER_AUTH
      The entry point for sign-in with passwords, one-time passwords, biometric devices, + /// and security keys.
      USER_SRP_AUTH
      Username-password authentication with the Secure Remote Password (SRP) protocol. For + /// more information, see Use + /// SRP password verification in custom authentication flow.
      REFRESH_TOKEN_AUTH and REFRESH_TOKEN
      Provide a valid refresh token and receive new ID and access tokens. For more information, + /// see Using + /// the refresh token.
      CUSTOM_AUTH
      Custom authentication with Lambda triggers. For more information, see Custom + /// authentication challenge Lambda triggers.
      USER_PASSWORD_AUTH
      Username-password authentication with the password sent directly in the request. For + /// more information, see Admin + /// authentication flow.
      ADMIN_USER_PASSWORD_AUTH is a flow type of AdminInitiateAuth + /// and isn't valid for InitiateAuth. ADMIN_NO_SRP_AUTH is a legacy server-side + /// username-password flow and isn't valid for InitiateAuth. ///
      ///
      #if !MODULAR @@ -110,7 +122,9 @@ public partial class StartCGIPAuthCmdlet : AmazonCognitoIdentityProviderClientCm /// /// /// The authentication parameters. These are inputs corresponding to the AuthFlow - /// that you're invoking. The required values depend on the value of AuthFlow:
      • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH + /// that you're invoking. The required values depend on the value of AuthFlow:
        • For USER_AUTH: USERNAME (required), PREFERRED_CHALLENGE. If you + /// don't provide a value for PREFERRED_CHALLENGE, Amazon Cognito responds with + /// the AvailableChallenges parameter that specifies the available sign-in methods.
        • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH /// (required if the app client is configured with a client secret), DEVICE_KEY.
        • For USER_PASSWORD_AUTH: USERNAME (required), PASSWORD (required), /// SECRET_HASH (required if the app client is configured with a client secret), /// DEVICE_KEY.
        • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH @@ -156,7 +170,7 @@ public partial class StartCGIPAuthCmdlet : AmazonCognitoIdentityProviderClientCm /// attribute, which provides the data that you assigned to the ClientMetadata parameter /// in your InitiateAuth request. In your function code in Lambda, you can process the /// validationData value to enhance your workflow for your specific needs.When you use the InitiateAuth API action, Amazon Cognito also invokes the functions - /// for the following triggers, but it doesn't provide the ClientMetadata value as input:
          • Post authentication
          • Custom message
          • Pre token generation
          • Create auth challenge
          • Define auth challenge
          For more information, see + /// for the following triggers, but it doesn't provide the ClientMetadata value as input:For more information, see /// Customizing user pool Workflows with Lambda Triggers in the Amazon Cognito /// Developer Guide.When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the /// following:
          • Store the ClientMetadata value. This data is available only to Lambda triggers that @@ -190,6 +204,17 @@ public partial class StartCGIPAuthCmdlet : AmazonCognitoIdentityProviderClientCm public System.String UserContextData_IpAddress { get; set; } #endregion + #region Parameter Session + /// + /// + /// The optional session ID from a ConfirmSignUp API request. You can sign in a + /// user directly from the sign-up process with the USER_AUTH authentication flow. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Session { get; set; } + #endregion + #region Parameter Select /// /// Use the -Select parameter to control the cmdlet output. The default value is '*'. @@ -283,6 +308,7 @@ protected override void ProcessRecord() context.ClientMetadata.Add((String)hashKey, (System.String)(this.ClientMetadata[hashKey])); } } + context.Session = this.Session; context.UserContextData_EncodedData = this.UserContextData_EncodedData; context.UserContextData_IpAddress = this.UserContextData_IpAddress; @@ -336,6 +362,10 @@ public object Execute(ExecutorContext context) { request.ClientMetadata = cmdletContext.ClientMetadata; } + if (cmdletContext.Session != null) + { + request.Session = cmdletContext.Session; + } // populate UserContextData var requestUserContextDataIsNull = true; @@ -431,6 +461,7 @@ internal partial class CmdletContext : ExecutorContext public Dictionary AuthParameter { get; set; } public System.String ClientId { get; set; } public Dictionary ClientMetadata { get; set; } + public System.String Session { get; set; } public System.String UserContextData_EncodedData { get; set; } public System.String UserContextData_IpAddress { get; set; } public System.Func Select { get; set; } = diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuthAdmin-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuthAdmin-Cmdlet.cs index 8b0414a9f..4c96ef2a0 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuthAdmin-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPAuthAdmin-Cmdlet.cs @@ -40,7 +40,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -73,7 +73,8 @@ public partial class StartCGIPAuthAdminCmdlet : AmazonCognitoIdentityProviderCli #region Parameter AnalyticsMetadata_AnalyticsEndpointId /// /// - /// The endpoint ID. + /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where + /// to send notifications. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -83,14 +84,23 @@ public partial class StartCGIPAuthAdminCmdlet : AmazonCognitoIdentityProviderCli #region Parameter AuthFlow /// /// - /// The authentication flow for this call to run. The API action will depend on this value. - /// For example:
            • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.
            • USER_SRP_AUTH will take in USERNAME and SRP_A and return the - /// Secure Remote Password (SRP) protocol variables to be used for next challenge execution.
            • ADMIN_USER_PASSWORD_AUTH will take in USERNAME and PASSWORD - /// and return the next challenge or tokens.
            Valid values include:
            • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.
            • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing - /// the access token and ID token by supplying a valid refresh token.
            • CUSTOM_AUTH: Custom authentication flow.
            • ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the USERNAME - /// and PASSWORD directly if the flow is enabled for calling the app client.
            • ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. This replaces - /// the ADMIN_NO_SRP_AUTH authentication flow. In this flow, Amazon Cognito receives - /// the password in the request instead of using the SRP process to verify passwords.
            + /// The authentication flow that you want to initiate. The AuthParameters that + /// you must submit are linked to the flow that you submit. For example:
            • USER_AUTH: Request a preferred authentication type or review available authentication + /// types. From the offered authentication types, select one in a challenge response and + /// then authenticate with that method in an additional challenge response.
            • REFRESH_TOKEN_AUTH: Receive new ID and access tokens when you pass a REFRESH_TOKEN + /// parameter with a valid refresh token as the value.
            • USER_SRP_AUTH: Receive secure remote password (SRP) variables for the next + /// challenge, PASSWORD_VERIFIER, when you pass USERNAME and SRP_A + /// parameters..
            • ADMIN_USER_PASSWORD_AUTH: Receive new tokens or the next challenge, for example + /// SOFTWARE_TOKEN_MFA, when you pass USERNAME and PASSWORD parameters.
            Valid values include the following:
            USER_AUTH
            The entry point for sign-in with passwords, one-time passwords, biometric devices, + /// and security keys.
            USER_SRP_AUTH
            Username-password authentication with the Secure Remote Password (SRP) protocol. For + /// more information, see Use + /// SRP password verification in custom authentication flow.
            REFRESH_TOKEN_AUTH and REFRESH_TOKEN
            Provide a valid refresh token and receive new ID and access tokens. For more information, + /// see Using + /// the refresh token.
            CUSTOM_AUTH
            Custom authentication with Lambda triggers. For more information, see Custom + /// authentication challenge Lambda triggers.
            ADMIN_USER_PASSWORD_AUTH
            Username-password authentication with the password sent directly in the request. For + /// more information, see Admin + /// authentication flow.
            USER_PASSWORD_AUTH is a flow type of InitiateAuth + /// and isn't valid for AdminInitiateAuth. ///
            ///
            #if !MODULAR @@ -108,7 +118,9 @@ public partial class StartCGIPAuthAdminCmdlet : AmazonCognitoIdentityProviderCli /// /// /// The authentication parameters. These are inputs corresponding to the AuthFlow - /// that you're invoking. The required values depend on the value of AuthFlow:
            • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH + /// that you're invoking. The required values depend on the value of AuthFlow:
              • For USER_AUTH: USERNAME (required), PREFERRED_CHALLENGE. If you + /// don't provide a value for PREFERRED_CHALLENGE, Amazon Cognito responds with + /// the AvailableChallenges parameter that specifies the available sign-in methods.
              • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH /// (required if the app client is configured with a client secret), DEVICE_KEY.
              • For ADMIN_USER_PASSWORD_AUTH: USERNAME (required), PASSWORD (required), /// SECRET_HASH (required if the app client is configured with a client secret), /// DEVICE_KEY.
              • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH @@ -154,7 +166,7 @@ public partial class StartCGIPAuthAdminCmdlet : AmazonCognitoIdentityProviderCli /// attribute, which provides the data that you assigned to the ClientMetadata parameter /// in your AdminInitiateAuth request. In your function code in Lambda, you can process /// the validationData value to enhance your workflow for your specific needs.When you use the AdminInitiateAuth API action, Amazon Cognito also invokes the functions - /// for the following triggers, but it doesn't provide the ClientMetadata value as input:
                • Post authentication
                • Custom message
                • Pre token generation
                • Create auth challenge
                • Define auth challenge
                For more information, see + /// for the following triggers, but it doesn't provide the ClientMetadata value as input:For more information, see /// Customizing user pool Workflows with Lambda Triggers in the Amazon Cognito /// Developer Guide.When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the /// following:
                • Store the ClientMetadata value. This data is available only to Lambda triggers that @@ -181,7 +193,7 @@ public partial class StartCGIPAuthAdminCmdlet : AmazonCognitoIdentityProviderCli #region Parameter ContextData_HttpHeader /// /// - /// HttpHeaders received on your server in same order. + /// The HTTP headers from your user's authentication request. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -202,7 +214,7 @@ public partial class StartCGIPAuthAdminCmdlet : AmazonCognitoIdentityProviderCli #region Parameter ContextData_ServerName /// /// - /// Your server endpoint where this API is invoked. + /// The name of your application's service endpoint. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -212,13 +224,24 @@ public partial class StartCGIPAuthAdminCmdlet : AmazonCognitoIdentityProviderCli #region Parameter ContextData_ServerPath /// /// - /// Your server path where this API is invoked. + /// The path of your application's service endpoint. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.String ContextData_ServerPath { get; set; } #endregion + #region Parameter Session + /// + /// + /// The optional session ID from a ConfirmSignUp API request. You can sign in a + /// user directly from the sign-up process with the USER_AUTH authentication flow. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Session { get; set; } + #endregion + #region Parameter UserPoolId /// /// @@ -337,6 +360,7 @@ protected override void ProcessRecord() context.ContextData_IpAddress = this.ContextData_IpAddress; context.ContextData_ServerName = this.ContextData_ServerName; context.ContextData_ServerPath = this.ContextData_ServerPath; + context.Session = this.Session; context.UserPoolId = this.UserPoolId; #if MODULAR if (this.UserPoolId == null && ParameterWasBound(nameof(this.UserPoolId))) @@ -454,6 +478,10 @@ public object Execute(ExecutorContext context) { request.ContextData = null; } + if (cmdletContext.Session != null) + { + request.Session = cmdletContext.Session; + } if (cmdletContext.UserPoolId != null) { request.UserPoolId = cmdletContext.UserPoolId; @@ -529,6 +557,7 @@ internal partial class CmdletContext : ExecutorContext public System.String ContextData_IpAddress { get; set; } public System.String ContextData_ServerName { get; set; } public System.String ContextData_ServerPath { get; set; } + public System.String Session { get; set; } public System.String UserPoolId { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response; diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPWebAuthnRegistration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPWebAuthnRegistration-Cmdlet.cs new file mode 100644 index 000000000..c920c3058 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Start-CGIPWebAuthnRegistration-Cmdlet.cs @@ -0,0 +1,234 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Requests credential creation options from your user pool for registration of a passkey + /// authenticator. Returns information about the user pool, the user profile, and authentication + /// requirements. Users must provide this information in their request to enroll your + /// application with their passkey provider. + /// + /// + /// + /// After users present this data and register with their passkey provider, return the + /// response to your user pool in a + /// CompleteWebAuthnRegistration API request. + /// + /// Authorize this action with a signed-in user's access token. It must include the scope + /// aws.cognito.signin.user.admin. + /// + /// + [Cmdlet("Start", "CGIPWebAuthnRegistration", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.Runtime.Documents.Document")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider StartWebAuthnRegistration API operation.", Operation = new[] {"StartWebAuthnRegistration"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationResponse))] + [AWSCmdletOutput("Amazon.Runtime.Documents.Document or Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationResponse", + "This cmdlet returns an Amazon.Runtime.Documents.Document object.", + "The service call response (type Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationResponse) can be returned by specifying '-Select *'." + )] + public partial class StartCGIPWebAuthnRegistrationCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AccessToken + /// + /// + /// A valid access token that Amazon Cognito issued to the user whose passkey metadata + /// you want to generate. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AccessToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'CredentialCreationOptions'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "CredentialCreationOptions"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the AccessToken parameter. + /// The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^AccessToken' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.AccessToken), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Start-CGIPWebAuthnRegistration (StartWebAuthnRegistration)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.AccessToken; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AccessToken = this.AccessToken; + #if MODULAR + if (this.AccessToken == null && ParameterWasBound(nameof(this.AccessToken))) + { + WriteWarning("You are passing $null as a value for parameter AccessToken which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationRequest(); + + if (cmdletContext.AccessToken != null) + { + request.AccessToken = cmdletContext.AccessToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.StartWebAuthnRegistrationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "StartWebAuthnRegistration"); + try + { + #if DESKTOP + return client.StartWebAuthnRegistration(request); + #elif CORECLR + return client.StartWebAuthnRegistrationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AccessToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.CredentialCreationOptions; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPManagedLoginBranding-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPManagedLoginBranding-Cmdlet.cs new file mode 100644 index 000000000..2fa4a6335 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPManagedLoginBranding-Cmdlet.cs @@ -0,0 +1,304 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.CognitoIdentityProvider; +using Amazon.CognitoIdentityProvider.Model; + +namespace Amazon.PowerShell.Cmdlets.CGIP +{ + /// + /// Configures the branding settings for a user pool style. This operation is the programmatic + /// option for the configuration of a style in the branding designer. + /// + /// + /// + /// Provides values for UI customization in a Settings JSON object and image files + /// in an Assets array. + /// + /// This operation has a 2-megabyte request-size limit and include the CSS settings and + /// image assets for your app client. Your branding settings might exceed 2MB in size. + /// Amazon Cognito doesn't require that you pass all parameters in one request and preserves + /// existing style settings that you don't specify. If your request is larger than 2MB, + /// separate it into multiple requests, each with a size smaller than the limit. + /// + /// For more information, see API + /// and SDK operations for managed login branding. + /// + /// Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests + /// for this API operation. For this operation, you must use IAM credentials to authorize + /// requests, and you must grant yourself the corresponding IAM permission in a policy. + /// Learn more + /// + [Cmdlet("Update", "CGIPManagedLoginBranding", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType")] + [AWSCmdlet("Calls the Amazon Cognito Identity Provider UpdateManagedLoginBranding API operation.", Operation = new[] {"UpdateManagedLoginBranding"}, SelectReturnType = typeof(Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingResponse))] + [AWSCmdletOutput("Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType or Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingResponse", + "This cmdlet returns an Amazon.CognitoIdentityProvider.Model.ManagedLoginBrandingType object.", + "The service call response (type Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingResponse) can be returned by specifying '-Select *'." + )] + public partial class UpdateCGIPManagedLoginBrandingCmdlet : AmazonCognitoIdentityProviderClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Asset + /// + /// + /// An array of image files that you want to apply to roles like backgrounds, logos, and + /// icons. Each object must also indicate whether it is for dark mode, light mode, or + /// browser-adaptive mode. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Assets")] + public Amazon.CognitoIdentityProvider.Model.AssetType[] Asset { get; set; } + #endregion + + #region Parameter ManagedLoginBrandingId + /// + /// + /// The ID of the managed login branding style that you want to update. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ManagedLoginBrandingId { get; set; } + #endregion + + #region Parameter Setting + /// + /// + /// A JSON file, encoded as a Document type, with the the settings that you want + /// to apply to your style. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Settings")] + public System.Management.Automation.PSObject Setting { get; set; } + #endregion + + #region Parameter UseCognitoProvidedValue + /// + /// + /// When true, applies the default branding style options. This option reverts to default + /// style options that are managed by Amazon Cognito. You can modify them later in the + /// branding designer.When you specify true for this option, you must also omit values for Settings + /// and Assets in the request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("UseCognitoProvidedValues")] + public System.Boolean? UseCognitoProvidedValue { get; set; } + #endregion + + #region Parameter UserPoolId + /// + /// + /// The ID of the user pool that contains the managed login branding style that you want + /// to update. + /// + /// + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + public System.String UserPoolId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'ManagedLoginBranding'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingResponse). + /// Specifying the name of a property of type Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "ManagedLoginBranding"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the UserPoolId parameter. + /// The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^UserPoolId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.UserPoolId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-CGIPManagedLoginBranding (UpdateManagedLoginBranding)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.UserPoolId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.Asset != null) + { + context.Asset = new List(this.Asset); + } + context.ManagedLoginBrandingId = this.ManagedLoginBrandingId; + context.Setting = this.Setting; + context.UseCognitoProvidedValue = this.UseCognitoProvidedValue; + context.UserPoolId = this.UserPoolId; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingRequest(); + + if (cmdletContext.Asset != null) + { + request.Assets = cmdletContext.Asset; + } + if (cmdletContext.ManagedLoginBrandingId != null) + { + request.ManagedLoginBrandingId = cmdletContext.ManagedLoginBrandingId; + } + if (cmdletContext.Setting != null) + { + request.Settings = Amazon.PowerShell.Common.DocumentHelper.ToDocument(cmdletContext.Setting); + } + if (cmdletContext.UseCognitoProvidedValue != null) + { + request.UseCognitoProvidedValues = cmdletContext.UseCognitoProvidedValue.Value; + } + if (cmdletContext.UserPoolId != null) + { + request.UserPoolId = cmdletContext.UserPoolId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingResponse CallAWSServiceOperation(IAmazonCognitoIdentityProvider client, Amazon.CognitoIdentityProvider.Model.UpdateManagedLoginBrandingRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity Provider", "UpdateManagedLoginBranding"); + try + { + #if DESKTOP + return client.UpdateManagedLoginBranding(request); + #elif CORECLR + return client.UpdateManagedLoginBrandingAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List Asset { get; set; } + public System.String ManagedLoginBrandingId { get; set; } + public System.Management.Automation.PSObject Setting { get; set; } + public System.Boolean? UseCognitoProvidedValue { get; set; } + public System.String UserPoolId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.ManagedLoginBranding; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPPassword-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPPassword-Cmdlet.cs index 2508cbfc8..72a13af93 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPPassword-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPPassword-Cmdlet.cs @@ -77,17 +77,12 @@ public partial class UpdateCGIPPasswordCmdlet : AnonymousAmazonCognitoIdentityPr #region Parameter PreviousPassword /// /// - /// The old password. + /// The user's previous password. Required if the user has a password. If the user has + /// no password and only signs in with passwordless authentication options, you can omit + /// this parameter. /// /// - #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] - #else - [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] - [System.Management.Automation.AllowEmptyString] - [System.Management.Automation.AllowNull] - #endif - [Amazon.PowerShell.Common.AWSRequiredParameter] public System.String PreviousPassword { get; set; } #endregion @@ -177,12 +172,6 @@ protected override void ProcessRecord() } #endif context.PreviousPassword = this.PreviousPassword; - #if MODULAR - if (this.PreviousPassword == null && ParameterWasBound(nameof(this.PreviousPassword))) - { - WriteWarning("You are passing $null as a value for parameter PreviousPassword which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); - } - #endif context.ProposedPassword = this.ProposedPassword; #if MODULAR if (this.ProposedPassword == null && ParameterWasBound(nameof(this.ProposedPassword))) diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttribute-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttribute-Cmdlet.cs index a30038ecf..cd93cf06f 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttribute-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttribute-Cmdlet.cs @@ -53,7 +53,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttributeAdmin-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttributeAdmin-Cmdlet.cs index 8242d7c47..dca17f230 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttributeAdmin-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserAttributeAdmin-Cmdlet.cs @@ -38,7 +38,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -109,9 +109,9 @@ public partial class UpdateCGIPUserAttributeAdminCmdlet : AmazonCognitoIdentityP /// the value of that attribute. After your user receives and responds to a verification /// message to verify the new value, Amazon Cognito updates the attribute value. Your /// user can sign in and receive messages with the original attribute value until they - /// verify the new value.To update the value of an attribute that requires verification in the same API request, - /// include the email_verified or phone_number_verified attribute, with - /// a value of true. If you set the email_verified or phone_number_verified + /// verify the new value.To skip the verification message and update the value of an attribute that requires + /// verification in the same API request, include the email_verified or phone_number_verified + /// attribute, with a value of true. If you set the email_verified or phone_number_verified /// value for an email or phone_number attribute that requires verification /// to true, Amazon Cognito doesn’t send a verification message to your user. /// diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPool-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPool-Cmdlet.cs index a1bcc5e4e..899bcc648 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPool-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPool-Cmdlet.cs @@ -38,7 +38,7 @@ namespace Amazon.PowerShell.Cmdlets.CGIP /// their accounts, or sign in. /// /// If you have never used SMS text messages with Amazon Cognito or any other Amazon Web - /// Servicesservice, Amazon Simple Notification Service might place your account in the + /// Services service, Amazon Simple Notification Service might place your account in the /// SMS sandbox. In sandbox /// mode, you can send messages only to verified phone numbers. After you test /// your app while in the sandbox environment, you can move out of the sandbox and into @@ -87,14 +87,29 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter AdminCreateUserConfig_AllowAdminCreateUserOnly /// /// - /// Set to True if only the administrator is allowed to create user profiles. Set - /// to False if users can sign themselves up via an app. + /// The setting for allowing self-service sign-up. When true, only administrators + /// can create new user profiles. When false, users can register themselves and + /// create a new user profile with the SignUp + /// operation. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.Boolean? AdminCreateUserConfig_AllowAdminCreateUserOnly { get; set; } #endregion + #region Parameter SignInPolicy_AllowedFirstAuthFactor + /// + /// + /// The sign-in methods that a user pool supports as the first factor. You can permit + /// users to start authentication with a standard username and password, or with other + /// one-time password and hardware factors. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Policies_SignInPolicy_AllowedFirstAuthFactors")] + public System.String[] SignInPolicy_AllowedFirstAuthFactor { get; set; } + #endregion + #region Parameter UserAttributeUpdateSettings_AttributesRequireVerificationBeforeUpdate /// /// @@ -162,7 +177,9 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_CreateAuthChallenge /// /// - /// Creates an authentication challenge. + /// The configuration of a create auth challenge Lambda trigger, one of three triggers + /// in the sequence of the custom + /// authentication challenge triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -185,7 +202,10 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_CustomMessage /// /// - /// A custom Message Lambda trigger. + /// A custom message Lambda trigger. This trigger is an opportunity to customize all SMS + /// and email messages from your user pool. When a custom message trigger is active, your + /// user pool routes all messages to a Lambda function that returns a runtime-customized + /// message subject and body for your user pool to deliver to a user. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -195,7 +215,10 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter VerificationMessageTemplate_DefaultEmailOption /// /// - /// The default email option. + /// The configuration of verification emails to contain a clickable link or a verification + /// code.For link, your template body must contain link text in the format {##Click here##}. + /// "Click here" in the example is a customizable string. For code, your template body + /// must contain a code placeholder in the format {####}. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -206,7 +229,9 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_DefineAuthChallenge /// /// - /// Defines the authentication challenge. + /// The configuration of a define auth challenge Lambda trigger, one of three triggers + /// in the sequence of the custom + /// authentication challenge triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -386,7 +411,7 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli /// authentication (MFA), Amazon Cognito creates a role with the required permissions /// and a trust policy that demonstrates use of the ExternalId.For more information about the ExternalId of a role, see How /// to use an external ID when granting access to your Amazon Web Services resources to - /// a third party + /// a third party. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -408,9 +433,9 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_KMSKeyID /// /// - /// The Amazon Resource Name (ARN) of an KMS + /// The ARN of an KMS /// key. Amazon Cognito uses the key to encrypt codes and temporary passwords sent - /// to CustomEmailSender and CustomSMSSender. + /// to custom sender Lambda triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -534,10 +559,22 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli public System.Int32? PasswordPolicy_PasswordHistorySize { get; set; } #endregion + #region Parameter PoolName + /// + /// + /// The updated name of your user pool. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String PoolName { get; set; } + #endregion + #region Parameter LambdaConfig_PostAuthentication /// /// - /// A post-authentication Lambda trigger. + /// The configuration of a post + /// authentication Lambda trigger in a user pool. This trigger can take custom actions + /// after a user signs in. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -547,7 +584,9 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_PostConfirmation /// /// - /// A post-confirmation Lambda trigger. + /// The configuration of a post + /// confirmation Lambda trigger in a user pool. This trigger can take custom actions + /// after a user confirms their user account and their email address or phone number. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -557,7 +596,9 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_PreAuthentication /// /// - /// A pre-authentication Lambda trigger. + /// The configuration of a pre + /// authentication trigger in a user pool. This trigger can evaluate and modify user + /// sign-in events. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -567,7 +608,10 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_PreSignUp /// /// - /// A pre-registration Lambda trigger. + /// The configuration of a pre + /// sign-up Lambda trigger in a user pool. This trigger evaluates new users and can + /// bypass confirmation, link + /// a federated user profile, or block sign-up requests. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -577,10 +621,10 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_PreTokenGeneration /// /// - /// The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda - /// trigger.Set this parameter for legacy purposes. If you also set an ARN in PreTokenGenerationConfig, + /// The legacy configuration of a pre + /// token generation Lambda trigger in a user pool.Set this parameter for legacy purposes. If you also set an ARN in PreTokenGenerationConfig, /// its value must be identical to PreTokenGeneration. For new instances of pre - /// token generation triggers, set the LambdaArn of PreTokenGenerationConfig.You can set + /// token generation triggers, set the LambdaArn of PreTokenGenerationConfig. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -590,7 +634,10 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter AccountRecoverySetting_RecoveryMechanism /// /// - /// The list of RecoveryOptionTypes. + /// The list of options and priorities for user message delivery in forgot-password operations. + /// Sets or displays user pool preferences for email or SMS message priority, whether + /// users should fall back to a second delivery method, and whether passwords should only + /// be reset by administrators. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -611,8 +658,8 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter PasswordPolicy_RequireLowercase /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one lowercase letter in their password. + /// The requirement in a password policy that users must include at least one lowercase + /// letter in their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -623,8 +670,8 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter PasswordPolicy_RequireNumber /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one number in their password. + /// The requirement in a password policy that users must include at least one number in + /// their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -635,8 +682,8 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter PasswordPolicy_RequireSymbol /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one symbol in their password. + /// The requirement in a password policy that users must include at least one symbol in + /// their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -647,8 +694,8 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter PasswordPolicy_RequireUppercase /// /// - /// In the password policy that you have set, refers to whether you have required users - /// to use at least one uppercase letter in their password. + /// The requirement in a password policy that users must include at least one uppercase + /// letter in their password. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -765,12 +812,13 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter AdminCreateUserConfig_UnusedAccountValidityDay /// /// - /// The user account expiration limit, in days, after which a new account that hasn't - /// signed in is no longer usable. To reset the account after that time limit, you must - /// call AdminCreateUser again, specifying "RESEND" for the MessageAction - /// parameter. The default value for this parameter is 7.If you set a value for TemporaryPasswordValidityDays in PasswordPolicy, - /// that value will be used, and UnusedAccountValidityDays will be no longer be - /// an available parameter for that user pool. + /// This parameter is no longer in use. Configure the duration of temporary passwords + /// with the TemporaryPasswordValidityDays parameter of PasswordPolicyType. + /// For older user pools that have a UnusedAccountValidityDays configuration, that + /// value is effective until you set a value for TemporaryPasswordValidityDays.The password expiration limit in days for administrator-created users. When this time + /// expires, the user can't sign in with their temporary password. To reset the account + /// after that time limit, you must call AdminCreateUser again, specifying RESEND + /// for the MessageAction parameter. The default value for this parameter is 7. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -781,7 +829,10 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli #region Parameter LambdaConfig_UserMigration /// /// - /// The user migration Lambda config type. + /// The configuration of a migrate + /// user Lambda trigger in a user pool. This trigger can create user profiles when + /// users sign in or attempt to reset their password with credentials that don't exist + /// yet. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -818,10 +869,26 @@ public partial class UpdateCGIPUserPoolCmdlet : AmazonCognitoIdentityProviderCli public System.Collections.Hashtable UserPoolTag { get; set; } #endregion + #region Parameter UserPoolTier + /// + /// + /// The user pool feature + /// plan, or tier. This parameter determines the eligibility of the user pool for + /// features like managed login, access-token customization, and threat protection. Defaults + /// to ESSENTIALS. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.CognitoIdentityProvider.UserPoolTierType")] + public Amazon.CognitoIdentityProvider.UserPoolTierType UserPoolTier { get; set; } + #endregion + #region Parameter LambdaConfig_VerifyAuthChallengeResponse /// /// - /// Verifies the authentication challenge response. + /// The configuration of a verify auth challenge Lambda trigger, one of three triggers + /// in the sequence of the custom + /// authentication challenge triggers. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -937,6 +1004,11 @@ protected override void ProcessRecord() context.PasswordPolicy_RequireSymbol = this.PasswordPolicy_RequireSymbol; context.PasswordPolicy_RequireUppercase = this.PasswordPolicy_RequireUppercase; context.PasswordPolicy_TemporaryPasswordValidityDay = this.PasswordPolicy_TemporaryPasswordValidityDay; + if (this.SignInPolicy_AllowedFirstAuthFactor != null) + { + context.SignInPolicy_AllowedFirstAuthFactor = new List(this.SignInPolicy_AllowedFirstAuthFactor); + } + context.PoolName = this.PoolName; context.SmsAuthenticationMessage = this.SmsAuthenticationMessage; context.SmsConfiguration_ExternalId = this.SmsConfiguration_ExternalId; context.SmsConfiguration_SnsCallerArn = this.SmsConfiguration_SnsCallerArn; @@ -963,6 +1035,7 @@ protected override void ProcessRecord() context.UserPoolTag.Add((String)hashKey, (System.String)(this.UserPoolTag[hashKey])); } } + context.UserPoolTier = this.UserPoolTier; context.VerificationMessageTemplate_DefaultEmailOption = this.VerificationMessageTemplate_DefaultEmailOption; context.VerificationMessageTemplate_EmailMessage = this.VerificationMessageTemplate_EmailMessage; context.VerificationMessageTemplate_EmailMessageByLink = this.VerificationMessageTemplate_EmailMessageByLink; @@ -1414,6 +1487,31 @@ public object Execute(ExecutorContext context) // populate Policies var requestPoliciesIsNull = true; request.Policies = new Amazon.CognitoIdentityProvider.Model.UserPoolPolicyType(); + Amazon.CognitoIdentityProvider.Model.SignInPolicyType requestPolicies_policies_SignInPolicy = null; + + // populate SignInPolicy + var requestPolicies_policies_SignInPolicyIsNull = true; + requestPolicies_policies_SignInPolicy = new Amazon.CognitoIdentityProvider.Model.SignInPolicyType(); + List requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor = null; + if (cmdletContext.SignInPolicy_AllowedFirstAuthFactor != null) + { + requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor = cmdletContext.SignInPolicy_AllowedFirstAuthFactor; + } + if (requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor != null) + { + requestPolicies_policies_SignInPolicy.AllowedFirstAuthFactors = requestPolicies_policies_SignInPolicy_signInPolicy_AllowedFirstAuthFactor; + requestPolicies_policies_SignInPolicyIsNull = false; + } + // determine if requestPolicies_policies_SignInPolicy should be set to null + if (requestPolicies_policies_SignInPolicyIsNull) + { + requestPolicies_policies_SignInPolicy = null; + } + if (requestPolicies_policies_SignInPolicy != null) + { + request.Policies.SignInPolicy = requestPolicies_policies_SignInPolicy; + requestPoliciesIsNull = false; + } Amazon.CognitoIdentityProvider.Model.PasswordPolicyType requestPolicies_policies_PasswordPolicy = null; // populate PasswordPolicy @@ -1504,6 +1602,10 @@ public object Execute(ExecutorContext context) { request.Policies = null; } + if (cmdletContext.PoolName != null) + { + request.PoolName = cmdletContext.PoolName; + } if (cmdletContext.SmsAuthenticationMessage != null) { request.SmsAuthenticationMessage = cmdletContext.SmsAuthenticationMessage; @@ -1622,6 +1724,10 @@ public object Execute(ExecutorContext context) { request.UserPoolTags = cmdletContext.UserPoolTag; } + if (cmdletContext.UserPoolTier != null) + { + request.UserPoolTier = cmdletContext.UserPoolTier; + } // populate VerificationMessageTemplate var requestVerificationMessageTemplateIsNull = true; @@ -1794,6 +1900,8 @@ internal partial class CmdletContext : ExecutorContext public System.Boolean? PasswordPolicy_RequireSymbol { get; set; } public System.Boolean? PasswordPolicy_RequireUppercase { get; set; } public System.Int32? PasswordPolicy_TemporaryPasswordValidityDay { get; set; } + public List SignInPolicy_AllowedFirstAuthFactor { get; set; } + public System.String PoolName { get; set; } public System.String SmsAuthenticationMessage { get; set; } public System.String SmsConfiguration_ExternalId { get; set; } public System.String SmsConfiguration_SnsCallerArn { get; set; } @@ -1804,6 +1912,7 @@ internal partial class CmdletContext : ExecutorContext public Amazon.CognitoIdentityProvider.AdvancedSecurityModeType UserPoolAddOns_AdvancedSecurityMode { get; set; } public System.String UserPoolId { get; set; } public Dictionary UserPoolTag { get; set; } + public Amazon.CognitoIdentityProvider.UserPoolTierType UserPoolTier { get; set; } public Amazon.CognitoIdentityProvider.DefaultEmailOptionType VerificationMessageTemplate_DefaultEmailOption { get; set; } public System.String VerificationMessageTemplate_EmailMessage { get; set; } public System.String VerificationMessageTemplate_EmailMessageByLink { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolClient-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolClient-Cmdlet.cs index 8d0108a31..aa01033e7 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolClient-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolClient-Cmdlet.cs @@ -64,10 +64,9 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter TokenValidityUnits_AccessToken /// /// - /// A time unit of seconds, minutes, hours, or days for the - /// value that you set in the AccessTokenValidity parameter. The default AccessTokenValidity - /// time unit is hours. AccessTokenValidity duration can range from five minutes - /// to one day. + /// A time unit for the value that you set in the AccessTokenValidity parameter. + /// The default AccessTokenValidity time unit is hours. AccessTokenValidity + /// duration can range from five minutes to one day. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -137,9 +136,11 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter AnalyticsConfiguration_ApplicationArn /// /// - /// The Amazon Resource Name (ARN) of an Amazon Pinpoint project. You can use the Amazon - /// Pinpoint project to integrate with the chosen user pool Client. Amazon Cognito publishes - /// events to the Amazon Pinpoint project that the app ARN declares. + /// The Amazon Resource Name (ARN) of an Amazon Pinpoint project that you want to connect + /// to your user pool app client. Amazon Cognito publishes events to the Amazon Pinpoint + /// project that ApplicationArn declares. You can also configure your application + /// to pass an endpoint ID in the AnalyticsMetadata parameter of sign-in operations. + /// The endpoint ID is information about the destination for push notifications /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -149,7 +150,7 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter AnalyticsConfiguration_ApplicationId /// /// - /// The application ID for an Amazon Pinpoint application. + /// Your Amazon Pinpoint project ID. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -224,7 +225,7 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi /// /// /// Activates the propagation of additional user context data. For more information about - /// propagation of user context data, see + /// propagation of user context data, see /// Adding advanced security to a user pool. If you don’t include this parameter, /// you can't send device fingerprint information, including source IP address, to Amazon /// Cognito advanced security. You can only activate EnablePropagateAdditionalUserContextData @@ -254,7 +255,12 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi /// or more flows, including with a user name and Secure Remote Password (SRP), a user /// name and password, or a custom authentication process that you define with Lambda /// functions.If you don't specify a value for ExplicitAuthFlows, your user client supports - /// ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH.Valid values include:
                  • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication + /// ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH.Valid values include:
                    • ALLOW_USER_AUTH: Enable selection-based sign-in with USER_AUTH. This + /// setting covers username-password, secure remote password (SRP), passwordless, and + /// passkey authentication. This authentiation flow can do username-password and SRP authentication + /// without other ExplicitAuthFlows permitting them. For example users can complete + /// an SRP challenge through USER_AUTH without the flow USER_SRP_AUTH being + /// active for the app client. This flow doesn't include CUSTOM_AUTH.
                    • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication /// flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH /// setting. With this authentication flow, your app passes a user name and password to /// Amazon Cognito in the request, instead of using the Secure Remote Password (SRP) protocol @@ -274,7 +280,8 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter AnalyticsConfiguration_ExternalId /// /// - /// The external ID. + /// The external + /// ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -284,10 +291,9 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter TokenValidityUnits_IdToken /// /// - /// A time unit of seconds, minutes, hours, or days for the - /// value that you set in the IdTokenValidity parameter. The default IdTokenValidity - /// time unit is hours. IdTokenValidity duration can range from five minutes to - /// one day. + /// A time unit for the value that you set in the IdTokenValidity parameter. The + /// default IdTokenValidity time unit is hours. IdTokenValidity duration + /// can range from five minutes to one day. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -364,10 +370,9 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter TokenValidityUnits_RefreshToken /// /// - /// A time unit of seconds, minutes, hours, or days for the - /// value that you set in the RefreshTokenValidity parameter. The default RefreshTokenValidity - /// time unit is days. RefreshTokenValidity duration can range from 60 minutes - /// to 10 years. + /// A time unit for the value that you set in the RefreshTokenValidity parameter. + /// The default RefreshTokenValidity time unit is days. RefreshTokenValidity + /// duration can range from 60 minutes to 10 years. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -397,8 +402,8 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter AnalyticsConfiguration_RoleArn /// /// - /// The ARN of an Identity and Access Management role that authorizes Amazon Cognito to - /// publish events to Amazon Pinpoint analytics. + /// The ARN of an Identity and Access Management role that has the permissions required + /// for Amazon Cognito to publish events to Amazon Pinpoint analytics. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] @@ -408,9 +413,16 @@ public partial class UpdateCGIPUserPoolClientCmdlet : AmazonCognitoIdentityProvi #region Parameter SupportedIdentityProvider /// /// - /// A list of provider names for the IdPs that this client supports. The following are - /// supported: COGNITO, Facebook, Google, SignInWithApple, - /// LoginWithAmazon, and the names of your own SAML and OIDC providers. + /// A list of provider names for the identity providers (IdPs) that are supported on this + /// client. The following are supported: COGNITO, Facebook, Google, + /// SignInWithApple, and LoginWithAmazon. You can also specify the names + /// that you configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP + /// or MyOIDCIdP.This setting applies to providers that you can access with the hosted + /// UI and OAuth 2.0 authorization server. The removal of COGNITO from this + /// list doesn't prevent authentication operations for local users with the user pools + /// API in an Amazon Web Services SDK. The only way to prevent API-based authentication + /// is to block access with a WAF + /// rule. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolDomain-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolDomain-Cmdlet.cs index 04e13b950..b02c46a46 100644 --- a/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolDomain-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CognitoIdentityProvider/Basic/Update-CGIPUserPoolDomain-Cmdlet.cs @@ -114,6 +114,19 @@ public partial class UpdateCGIPUserPoolDomainCmdlet : AmazonCognitoIdentityProvi public System.String Domain { get; set; } #endregion + #region Parameter ManagedLoginVersion + /// + /// + /// A version number that indicates the state of managed login for your domain. Version + /// 1 is hosted UI (classic). Version 2 is the newer managed login with + /// the branding designer. For more information, see Managed + /// login. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Int32? ManagedLoginVersion { get; set; } + #endregion + #region Parameter UserPoolId /// /// @@ -208,6 +221,7 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter Domain which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + context.ManagedLoginVersion = this.ManagedLoginVersion; context.UserPoolId = this.UserPoolId; #if MODULAR if (this.UserPoolId == null && ParameterWasBound(nameof(this.UserPoolId))) @@ -254,6 +268,10 @@ public object Execute(ExecutorContext context) { request.Domain = cmdletContext.Domain; } + if (cmdletContext.ManagedLoginVersion != null) + { + request.ManagedLoginVersion = cmdletContext.ManagedLoginVersion.Value; + } if (cmdletContext.UserPoolId != null) { request.UserPoolId = cmdletContext.UserPoolId; @@ -321,6 +339,7 @@ internal partial class CmdletContext : ExecutorContext { public System.String CustomDomainConfig_CertificateArn { get; set; } public System.String Domain { get; set; } + public System.Int32? ManagedLoginVersion { get; set; } public System.String UserPoolId { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response.CloudFrontDomain; diff --git a/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.Completers.psm1 index 1392cca67..ee231bd66 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.Completers.psm1 @@ -100,6 +100,13 @@ $CONN_Completers = { break } + # Amazon.Connect.Channel + "New-CONNContact/Channel" + { + $v = "CHAT","EMAIL","TASK","VOICE" + break + } + # Amazon.Connect.ChatEventType "Send-CONNChatIntegrationEvent/Event_Type" { @@ -147,6 +154,13 @@ $CONN_Completers = { break } + # Amazon.Connect.ContactInitiationMethod + "New-CONNContact/InitiationMethod" + { + $v = "AGENT_REPLY","API","CALLBACK","DISCONNECT","EXTERNAL_OUTBOUND","FLOW","INBOUND","MONITOR","OUTBOUND","QUEUE_TRANSFER","TRANSFER","WEBRTC_API" + break + } + # Amazon.Connect.DirectoryType "New-CONNInstance/IdentityManagementType" { @@ -172,7 +186,7 @@ $CONN_Completers = { ($_ -eq "Start-CONNOutboundChatContact/SourceEndpoint_Type") } { - $v = "CONNECT_PHONENUMBER_ARN","CONTACT_FLOW","TELEPHONE_NUMBER","VOIP" + $v = "CONNECT_PHONENUMBER_ARN","CONTACT_FLOW","EMAIL_ADDRESS","TELEPHONE_NUMBER","VOIP" break } @@ -209,7 +223,7 @@ $CONN_Completers = { # Amazon.Connect.FileUseCaseType "Start-CONNAttachedFileUpload/FileUseCaseType" { - $v = "ATTACHMENT" + $v = "ATTACHMENT","EMAIL_MESSAGE" break } @@ -220,7 +234,7 @@ $CONN_Completers = { ($_ -eq "Remove-CONNFlow/ResourceType") } { - $v = "SMS_PHONE_NUMBER" + $v = "INBOUND_EMAIL","OUTBOUND_EMAIL","SMS_PHONE_NUMBER" break } @@ -235,6 +249,20 @@ $CONN_Completers = { break } + # Amazon.Connect.InboundMessageSourceType + "Start-CONNEmailContact/EmailMessage_MessageSourceType" + { + $v = "RAW" + break + } + + # Amazon.Connect.InitiateAs + "New-CONNContact/InitiateAs" + { + $v = "CONNECTED_TO_USER" + break + } + # Amazon.Connect.InstanceAttributeType { ($_ -eq "Get-CONNInstanceAttribute/AttributeType") -Or @@ -254,7 +282,7 @@ $CONN_Completers = { ($_ -eq "Update-CONNInstanceStorageConfig/ResourceType") } { - $v = "AGENT_EVENTS","ATTACHMENTS","CALL_RECORDINGS","CHAT_TRANSCRIPTS","CONTACT_EVALUATIONS","CONTACT_TRACE_RECORDS","MEDIA_STREAMS","REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS","SCHEDULED_REPORTS","SCREEN_RECORDINGS" + $v = "AGENT_EVENTS","ATTACHMENTS","CALL_RECORDINGS","CHAT_TRANSCRIPTS","CONTACT_EVALUATIONS","CONTACT_TRACE_RECORDS","EMAIL_MESSAGES","MEDIA_STREAMS","REAL_TIME_CONTACT_ANALYSIS_CHAT_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_SEGMENTS","REAL_TIME_CONTACT_ANALYSIS_VOICE_SEGMENTS","SCHEDULED_REPORTS","SCREEN_RECORDINGS" break } @@ -264,7 +292,7 @@ $CONN_Completers = { ($_ -eq "New-CONNIntegrationAssociation/IntegrationType") } { - $v = "APPLICATION","CASES_DOMAIN","EVENT","FILE_SCANNER","PINPOINT_APP","Q_MESSAGE_TEMPLATES","VOICE_ID","WISDOM_ASSISTANT","WISDOM_KNOWLEDGE_BASE","WISDOM_QUICK_RESPONSES" + $v = "APPLICATION","CASES_DOMAIN","EVENT","FILE_SCANNER","PINPOINT_APP","Q_MESSAGE_TEMPLATES","SES_IDENTITY","VOICE_ID","WISDOM_ASSISTANT","WISDOM_KNOWLEDGE_BASE","WISDOM_QUICK_RESPONSES" break } @@ -288,7 +316,17 @@ $CONN_Completers = { ($_ -eq "Get-CONNFlowAssociationList/ResourceType") } { - $v = "VOICE_PHONE_NUMBER" + $v = "INBOUND_EMAIL","OUTBOUND_EMAIL","VOICE_PHONE_NUMBER" + break + } + + # Amazon.Connect.OutboundMessageSourceType + { + ($_ -eq "Send-CONNOutboundEmail/EmailMessage_MessageSourceType") -Or + ($_ -eq "Start-CONNOutboundEmailContact/EmailMessage_MessageSourceType") + } + { + $v = "RAW","TEMPLATE" break } @@ -378,6 +416,7 @@ $CONN_Completers = { # Amazon.Connect.SearchContactsMatchType { ($_ -eq "Search-CONNContact/SearchableContactAttributes_MatchType") -Or + ($_ -eq "Search-CONNContact/SearchableSegmentAttributes_MatchType") -Or ($_ -eq "Search-CONNContact/Transcript_MatchType") } { @@ -428,6 +467,7 @@ $CONN_Completers = { ($_ -eq "Search-CONNAgentStatus/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNContactFlow/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNContactFlowModule/StringCondition_ComparisonType") -Or + ($_ -eq "Search-CONNEmailAddress/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNHoursOfOperation/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNPredefinedAttribute/StringCondition_ComparisonType") -Or ($_ -eq "Search-CONNPrompt/StringCondition_ComparisonType") -Or @@ -464,7 +504,10 @@ $CONN_Completers = { } # Amazon.Connect.TrafficType - "Start-CONNOutboundVoiceContact/TrafficType" + { + ($_ -eq "Send-CONNOutboundEmail/TrafficType") -Or + ($_ -eq "Start-CONNOutboundVoiceContact/TrafficType") + } { $v = "CAMPAIGN","GENERAL" break @@ -543,16 +586,20 @@ $CONN_map = @{ "Agent_Video"=@("Start-CONNWebRTCContact") "AgentAvailabilityTimer"=@("New-CONNRoutingProfile","Update-CONNRoutingProfileAgentAvailabilityTimer") "AttributeType"=@("Get-CONNInstanceAttribute","Update-CONNInstanceAttribute") + "Channel"=@("New-CONNContact") "ContactFlowModuleState"=@("Get-CONNContactFlowModuleList") "ContactFlowState"=@("Update-CONNContactFlowMetadata") "Customer_ScreenShare"=@("Start-CONNWebRTCContact") "Customer_Video"=@("Start-CONNWebRTCContact") "DestinationEndpoint_Type"=@("Start-CONNOutboundChatContact") + "EmailMessage_MessageSourceType"=@("Send-CONNOutboundEmail","Start-CONNEmailContact","Start-CONNOutboundEmailContact") "Event_Type"=@("Send-CONNChatIntegrationEvent") "EventSourceName"=@("Get-CONNRuleList") "FileUseCaseType"=@("Start-CONNAttachedFileUpload") "HierarchyGroupCondition_HierarchyGroupMatchType"=@("Search-CONNUser") "IdentityManagementType"=@("New-CONNInstance") + "InitiateAs"=@("New-CONNContact") + "InitiationMethod"=@("New-CONNContact") "IntegrationType"=@("Get-CONNIntegrationAssociationList","New-CONNIntegrationAssociation") "Interval_IntervalPeriod"=@("Get-CONNMetricDataV2") "LanguageCode"=@("Add-CONNDefaultVocabulary","Get-CONNDefaultVocabularyList","New-CONNVocabulary","Search-CONNVocabulary") @@ -570,6 +617,7 @@ $CONN_map = @{ "ScoringStrategy_Mode"=@("New-CONNEvaluationForm","Update-CONNEvaluationForm") "ScoringStrategy_Status"=@("New-CONNEvaluationForm","Update-CONNEvaluationForm") "SearchableContactAttributes_MatchType"=@("Search-CONNContact") + "SearchableSegmentAttributes_MatchType"=@("Search-CONNContact") "SearchCriteria_QueueTypeCondition"=@("Search-CONNQueue") "SearchCriteria_StateCondition"=@("Search-CONNContactFlow") "SearchCriteria_StatusCondition"=@("Search-CONNContactFlow") @@ -585,11 +633,11 @@ $CONN_map = @{ "StorageConfig_StorageType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig") "StorageConfigKinesisVideoStreamConfigEncryptionConfigEncryptionType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig") "StorageConfigS3ConfigEncryptionConfigEncryptionType"=@("Add-CONNInstanceStorageConfig","Update-CONNInstanceStorageConfig") - "StringCondition_ComparisonType"=@("Search-CONNAgentStatus","Search-CONNContactFlow","Search-CONNContactFlowModule","Search-CONNHoursOfOperation","Search-CONNPredefinedAttribute","Search-CONNPrompt","Search-CONNQueue","Search-CONNQuickConnect","Search-CONNRoutingProfile","Search-CONNSecurityProfile","Search-CONNUser","Search-CONNUserHierarchyGroup") + "StringCondition_ComparisonType"=@("Search-CONNAgentStatus","Search-CONNContactFlow","Search-CONNContactFlowModule","Search-CONNEmailAddress","Search-CONNHoursOfOperation","Search-CONNPredefinedAttribute","Search-CONNPrompt","Search-CONNQueue","Search-CONNQuickConnect","Search-CONNRoutingProfile","Search-CONNSecurityProfile","Search-CONNUser","Search-CONNUserHierarchyGroup") "TagSearchCondition_TagKeyComparisonType"=@("Search-CONNResourceTag") "TagSearchCondition_TagValueComparisonType"=@("Search-CONNResourceTag") "TimeRange_Type"=@("Search-CONNContact") - "TrafficType"=@("Start-CONNOutboundVoiceContact") + "TrafficType"=@("Send-CONNOutboundEmail","Start-CONNOutboundVoiceContact") "Transcript_MatchType"=@("Search-CONNContact") "TriggerEventSource_EventSourceName"=@("New-CONNRule") "Type"=@("Get-CONNViewList","New-CONNContactFlow") @@ -670,9 +718,11 @@ $CONN_SelectMap = @{ "Request-CONNPhoneNumber", "Complete-CONNAttachedFileUpload", "New-CONNAgentStatus", + "New-CONNContact", "New-CONNContactFlow", "New-CONNContactFlowModule", "New-CONNContactFlowVersion", + "New-CONNEmailAddress", "New-CONNEvaluationForm", "New-CONNHoursOfOperation", "New-CONNInstance", @@ -699,6 +749,7 @@ $CONN_SelectMap = @{ "Remove-CONNContactEvaluation", "Remove-CONNContactFlow", "Remove-CONNContactFlowModule", + "Remove-CONNEmailAddress", "Remove-CONNEvaluationForm", "Remove-CONNHoursOfOperation", "Remove-CONNInstance", @@ -724,6 +775,7 @@ $CONN_SelectMap = @{ "Get-CONNContactEvaluation", "Get-CONNContactFlow", "Get-CONNContactFlowModule", + "Get-CONNEmailAddress", "Get-CONNEvaluationForm", "Get-CONNHoursOfOperation", "Get-CONNInstance", @@ -772,6 +824,7 @@ $CONN_SelectMap = @{ "Get-CONNAgentStatusList", "Get-CONNAnalyticsDataAssociationList", "Get-CONNApprovedOriginList", + "Get-CONNAssociatedContactList", "Get-CONNAuthenticationProfileList", "Get-CONNBotList", "Get-CONNContactEvaluationList", @@ -827,6 +880,7 @@ $CONN_SelectMap = @{ "Search-CONNContactFlowModule", "Search-CONNContactFlow", "Search-CONNContact", + "Search-CONNEmailAddress", "Search-CONNHoursOfOperation", "Search-CONNPredefinedAttribute", "Search-CONNPrompt", @@ -839,12 +893,15 @@ $CONN_SelectMap = @{ "Search-CONNUser", "Search-CONNVocabulary", "Send-CONNChatIntegrationEvent", + "Send-CONNOutboundEmail", "Start-CONNAttachedFileUpload", "Start-CONNChatContact", "Start-CONNContactEvaluation", "Start-CONNContactRecording", "Start-CONNContactStreaming", + "Start-CONNEmailContact", "Start-CONNOutboundChatContact", + "Start-CONNOutboundEmailContact", "Start-CONNOutboundVoiceContact", "Start-CONNScreenSharing", "Start-CONNTaskContact", @@ -871,6 +928,7 @@ $CONN_SelectMap = @{ "Update-CONNContactFlowName", "Update-CONNContactRoutingData", "Update-CONNContactSchedule", + "Update-CONNEmailAddressMetadata", "Update-CONNEvaluationForm", "Update-CONNHoursOfOperation", "Update-CONNInstanceAttribute", @@ -884,6 +942,7 @@ $CONN_SelectMap = @{ "Update-CONNQueueMaxContact", "Update-CONNQueueName", "Update-CONNQueueOutboundCallerConfig", + "Update-CONNQueueOutboundEmailConfig", "Update-CONNQueueStatus", "Update-CONNQuickConnectConfig", "Update-CONNQuickConnectName", diff --git a/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.psd1 b/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.psd1 index 3f8cee175..ad9d83620 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.psd1 +++ b/modules/AWSPowerShell/Cmdlets/Connect/AWS.Tools.Connect.psd1 @@ -109,6 +109,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-CONNAgentStatusList', 'Get-CONNAnalyticsDataAssociationList', 'Get-CONNApprovedOriginList', + 'Get-CONNAssociatedContactList', 'Get-CONNAttachedFile', 'Get-CONNAuthenticationProfile', 'Get-CONNAuthenticationProfileList', @@ -127,6 +128,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-CONNCurrentMetricData', 'Get-CONNCurrentUserData', 'Get-CONNDefaultVocabularyList', + 'Get-CONNEmailAddress', 'Get-CONNEvaluationForm', 'Get-CONNEvaluationFormList', 'Get-CONNEvaluationFormVersionList', @@ -195,9 +197,11 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Join-CONNRoutingProfileQueue', 'Move-CONNContact', 'New-CONNAgentStatus', + 'New-CONNContact', 'New-CONNContactFlow', 'New-CONNContactFlowModule', 'New-CONNContactFlowVersion', + 'New-CONNEmailAddress', 'New-CONNEvaluationForm', 'New-CONNHoursOfOperation', 'New-CONNInstance', @@ -228,6 +232,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Remove-CONNContactFlow', 'Remove-CONNContactFlowModule', 'Remove-CONNContactTag', + 'Remove-CONNEmailAddress', 'Remove-CONNEvaluationForm', 'Remove-CONNFlow', 'Remove-CONNHoursOfOperation', @@ -265,6 +270,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Search-CONNContact', 'Search-CONNContactFlow', 'Search-CONNContactFlowModule', + 'Search-CONNEmailAddress', 'Search-CONNHoursOfOperation', 'Search-CONNPredefinedAttribute', 'Search-CONNPrompt', @@ -277,6 +283,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Search-CONNUserHierarchyGroup', 'Search-CONNVocabulary', 'Send-CONNChatIntegrationEvent', + 'Send-CONNOutboundEmail', 'Set-CONNBatchPutContact', 'Start-CONNAttachedFileUpload', 'Start-CONNChatContact', @@ -284,7 +291,9 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Start-CONNContactMonitoring', 'Start-CONNContactRecording', 'Start-CONNContactStreaming', + 'Start-CONNEmailContact', 'Start-CONNOutboundChatContact', + 'Start-CONNOutboundEmailContact', 'Start-CONNOutboundVoiceContact', 'Start-CONNScreenSharing', 'Start-CONNTaskContact', @@ -308,6 +317,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Update-CONNContactFlowName', 'Update-CONNContactRoutingData', 'Update-CONNContactSchedule', + 'Update-CONNEmailAddressMetadata', 'Update-CONNEvaluationForm', 'Update-CONNHoursOfOperation', 'Update-CONNInstanceAttribute', @@ -321,6 +331,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Update-CONNQueueMaxContact', 'Update-CONNQueueName', 'Update-CONNQueueOutboundCallerConfig', + 'Update-CONNQueueOutboundEmailConfig', 'Update-CONNQueueStatus', 'Update-CONNQuickConnectConfig', 'Update-CONNQuickConnectName', diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Get-CONNAssociatedContactList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Get-CONNAssociatedContactList-Cmdlet.cs new file mode 100644 index 000000000..f4a2c89de --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Get-CONNAssociatedContactList-Cmdlet.cs @@ -0,0 +1,302 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + ///

                      This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration. + ///
                      + [Cmdlet("Get", "CONNAssociatedContactList")] + [OutputType("Amazon.Connect.Model.AssociatedContactSummary")] + [AWSCmdlet("Calls the Amazon Connect Service ListAssociatedContacts API operation.", Operation = new[] {"ListAssociatedContacts"}, SelectReturnType = typeof(Amazon.Connect.Model.ListAssociatedContactsResponse))] + [AWSCmdletOutput("Amazon.Connect.Model.AssociatedContactSummary or Amazon.Connect.Model.ListAssociatedContactsResponse", + "This cmdlet returns a collection of Amazon.Connect.Model.AssociatedContactSummary objects.", + "The service call response (type Amazon.Connect.Model.ListAssociatedContactsResponse) can be returned by specifying '-Select *'." + )] + public partial class GetCONNAssociatedContactListCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter ContactId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ContactId { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + ///
                      Note: This parameter is only used if you are manually controlling output pagination of the service API call. + ///
                      'NextToken' is only returned by the cmdlet when '-Select *' is specified. In order to manually control output pagination, set '-NextToken' to null for the first call then set the 'NextToken' using the same property output from the previous call for subsequent calls. + ///
                      + ///
                      + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'ContactSummaryList'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.ListAssociatedContactsResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.ListAssociatedContactsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "ContactSummaryList"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter NoAutoIteration + /// + /// By default the cmdlet will auto-iterate and retrieve all results to the pipeline by performing multiple + /// service calls. If set, the cmdlet will retrieve only the next 'page' of results using the value of NextToken + /// as the start point. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter NoAutoIteration { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ContactId = this.ContactId; + #if MODULAR + if (this.ContactId == null && ParameterWasBound(nameof(this.ContactId))) + { + WriteWarning("You are passing $null as a value for parameter ContactId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent; + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + + // create request and set iteration invariants + var request = new Amazon.Connect.Model.ListAssociatedContactsRequest(); + + if (cmdletContext.ContactId != null) + { + request.ContactId = cmdletContext.ContactId; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + + // Initialize loop variant and commence piping + var _nextToken = cmdletContext.NextToken; + var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); + + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + do + { + request.NextToken = _nextToken; + + CmdletOutput output; + + try + { + + var response = CallAWSServiceOperation(client, request); + + object pipelineOutput = null; + if (!useParameterSelect) + { + pipelineOutput = cmdletContext.Select(response, this); + } + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + + _nextToken = response.NextToken; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + ProcessOutput(output); + + } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken)); + + if (useParameterSelect) + { + WriteObject(cmdletContext.Select(null, this)); + } + + + return null; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.ListAssociatedContactsResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.ListAssociatedContactsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "ListAssociatedContacts"); + try + { + #if DESKTOP + return client.ListAssociatedContacts(request); + #elif CORECLR + return client.ListAssociatedContactsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ContactId { get; set; } + public System.String InstanceId { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.ContactSummaryList; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Get-CONNEmailAddress-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Get-CONNEmailAddress-Cmdlet.cs new file mode 100644 index 000000000..8b9459200 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Get-CONNEmailAddress-Cmdlet.cs @@ -0,0 +1,232 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("Get", "CONNEmailAddress")] + [OutputType("Amazon.Connect.Model.DescribeEmailAddressResponse")] + [AWSCmdlet("Calls the Amazon Connect Service DescribeEmailAddress API operation.", Operation = new[] {"DescribeEmailAddress"}, SelectReturnType = typeof(Amazon.Connect.Model.DescribeEmailAddressResponse))] + [AWSCmdletOutput("Amazon.Connect.Model.DescribeEmailAddressResponse", + "This cmdlet returns an Amazon.Connect.Model.DescribeEmailAddressResponse object containing multiple properties." + )] + public partial class GetCONNEmailAddressCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveResponse { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter EmailAddressId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String EmailAddressId { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.DescribeEmailAddressResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.DescribeEmailAddressResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.EmailAddressId = this.EmailAddressId; + #if MODULAR + if (this.EmailAddressId == null && ParameterWasBound(nameof(this.EmailAddressId))) + { + WriteWarning("You are passing $null as a value for parameter EmailAddressId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.DescribeEmailAddressRequest(); + + if (cmdletContext.EmailAddressId != null) + { + request.EmailAddressId = cmdletContext.EmailAddressId; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.DescribeEmailAddressResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.DescribeEmailAddressRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "DescribeEmailAddress"); + try + { + #if DESKTOP + return client.DescribeEmailAddress(request); + #elif CORECLR + return client.DescribeEmailAddressAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String EmailAddressId { get; set; } + public System.String InstanceId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNContact-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNContact-Cmdlet.cs new file mode 100644 index 000000000..d3536ae25 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNContact-Cmdlet.cs @@ -0,0 +1,478 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("New", "CONNContact", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.Connect.Model.CreateContactResponse")] + [AWSCmdlet("Calls the Amazon Connect Service CreateContact API operation.", Operation = new[] {"CreateContact"}, SelectReturnType = typeof(Amazon.Connect.Model.CreateContactResponse))] + [AWSCmdletOutput("Amazon.Connect.Model.CreateContactResponse", + "This cmdlet returns an Amazon.Connect.Model.CreateContactResponse object containing multiple properties." + )] + public partial class NewCONNContactCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Attribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Attributes")] + public System.Collections.Hashtable Attribute { get; set; } + #endregion + + #region Parameter Channel + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.Connect.Channel")] + public Amazon.Connect.Channel Channel { get; set; } + #endregion + + #region Parameter Description + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Description { get; set; } + #endregion + + #region Parameter ExpiryDurationInMinute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ExpiryDurationInMinutes")] + public System.Int32? ExpiryDurationInMinute { get; set; } + #endregion + + #region Parameter InitiateAs + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.Connect.InitiateAs")] + public Amazon.Connect.InitiateAs InitiateAs { get; set; } + #endregion + + #region Parameter InitiationMethod + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.Connect.ContactInitiationMethod")] + public Amazon.Connect.ContactInitiationMethod InitiationMethod { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter Name + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Name { get; set; } + #endregion + + #region Parameter Reference + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("References")] + public System.Collections.Hashtable Reference { get; set; } + #endregion + + #region Parameter RelatedContactId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String RelatedContactId { get; set; } + #endregion + + #region Parameter SegmentAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SegmentAttributes")] + public System.Collections.Hashtable SegmentAttribute { get; set; } + #endregion + + #region Parameter UserInfo_UserId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String UserInfo_UserId { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.CreateContactResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.CreateContactResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-CONNContact (CreateContact)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.Attribute != null) + { + context.Attribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Attribute.Keys) + { + context.Attribute.Add((String)hashKey, (System.String)(this.Attribute[hashKey])); + } + } + context.Channel = this.Channel; + #if MODULAR + if (this.Channel == null && ParameterWasBound(nameof(this.Channel))) + { + WriteWarning("You are passing $null as a value for parameter Channel which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.ClientToken = this.ClientToken; + context.Description = this.Description; + context.ExpiryDurationInMinute = this.ExpiryDurationInMinute; + context.InitiateAs = this.InitiateAs; + context.InitiationMethod = this.InitiationMethod; + #if MODULAR + if (this.InitiationMethod == null && ParameterWasBound(nameof(this.InitiationMethod))) + { + WriteWarning("You are passing $null as a value for parameter InitiationMethod which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Name = this.Name; + if (this.Reference != null) + { + context.Reference = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Reference.Keys) + { + context.Reference.Add((String)hashKey, (Amazon.Connect.Model.Reference)(this.Reference[hashKey])); + } + } + context.RelatedContactId = this.RelatedContactId; + if (this.SegmentAttribute != null) + { + context.SegmentAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.SegmentAttribute.Keys) + { + context.SegmentAttribute.Add((String)hashKey, (Amazon.Connect.Model.SegmentAttributeValue)(this.SegmentAttribute[hashKey])); + } + } + context.UserInfo_UserId = this.UserInfo_UserId; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.CreateContactRequest(); + + if (cmdletContext.Attribute != null) + { + request.Attributes = cmdletContext.Attribute; + } + if (cmdletContext.Channel != null) + { + request.Channel = cmdletContext.Channel; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Description != null) + { + request.Description = cmdletContext.Description; + } + if (cmdletContext.ExpiryDurationInMinute != null) + { + request.ExpiryDurationInMinutes = cmdletContext.ExpiryDurationInMinute.Value; + } + if (cmdletContext.InitiateAs != null) + { + request.InitiateAs = cmdletContext.InitiateAs; + } + if (cmdletContext.InitiationMethod != null) + { + request.InitiationMethod = cmdletContext.InitiationMethod; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + if (cmdletContext.Reference != null) + { + request.References = cmdletContext.Reference; + } + if (cmdletContext.RelatedContactId != null) + { + request.RelatedContactId = cmdletContext.RelatedContactId; + } + if (cmdletContext.SegmentAttribute != null) + { + request.SegmentAttributes = cmdletContext.SegmentAttribute; + } + + // populate UserInfo + var requestUserInfoIsNull = true; + request.UserInfo = new Amazon.Connect.Model.UserInfo(); + System.String requestUserInfo_userInfo_UserId = null; + if (cmdletContext.UserInfo_UserId != null) + { + requestUserInfo_userInfo_UserId = cmdletContext.UserInfo_UserId; + } + if (requestUserInfo_userInfo_UserId != null) + { + request.UserInfo.UserId = requestUserInfo_userInfo_UserId; + requestUserInfoIsNull = false; + } + // determine if request.UserInfo should be set to null + if (requestUserInfoIsNull) + { + request.UserInfo = null; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.CreateContactResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.CreateContactRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "CreateContact"); + try + { + #if DESKTOP + return client.CreateContact(request); + #elif CORECLR + return client.CreateContactAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public Dictionary Attribute { get; set; } + public Amazon.Connect.Channel Channel { get; set; } + public System.String ClientToken { get; set; } + public System.String Description { get; set; } + public System.Int32? ExpiryDurationInMinute { get; set; } + public Amazon.Connect.InitiateAs InitiateAs { get; set; } + public Amazon.Connect.ContactInitiationMethod InitiationMethod { get; set; } + public System.String InstanceId { get; set; } + public System.String Name { get; set; } + public Dictionary Reference { get; set; } + public System.String RelatedContactId { get; set; } + public Dictionary SegmentAttribute { get; set; } + public System.String UserInfo_UserId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNEmailAddress-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNEmailAddress-Cmdlet.cs new file mode 100644 index 000000000..3b81a62ea --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNEmailAddress-Cmdlet.cs @@ -0,0 +1,320 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("New", "CONNEmailAddress", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.Connect.Model.CreateEmailAddressResponse")] + [AWSCmdlet("Calls the Amazon Connect Service CreateEmailAddress API operation.", Operation = new[] {"CreateEmailAddress"}, SelectReturnType = typeof(Amazon.Connect.Model.CreateEmailAddressResponse))] + [AWSCmdletOutput("Amazon.Connect.Model.CreateEmailAddressResponse", + "This cmdlet returns an Amazon.Connect.Model.CreateEmailAddressResponse object containing multiple properties." + )] + public partial class NewCONNEmailAddressCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Description + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Description { get; set; } + #endregion + + #region Parameter DisplayName + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String DisplayName { get; set; } + #endregion + + #region Parameter EmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String EmailAddress { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter Tag + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Tags")] + public System.Collections.Hashtable Tag { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.CreateEmailAddressResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.CreateEmailAddressResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-CONNEmailAddress (CreateEmailAddress)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ClientToken = this.ClientToken; + context.Description = this.Description; + context.DisplayName = this.DisplayName; + context.EmailAddress = this.EmailAddress; + #if MODULAR + if (this.EmailAddress == null && ParameterWasBound(nameof(this.EmailAddress))) + { + WriteWarning("You are passing $null as a value for parameter EmailAddress which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Tag != null) + { + context.Tag = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Tag.Keys) + { + context.Tag.Add((String)hashKey, (System.String)(this.Tag[hashKey])); + } + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.CreateEmailAddressRequest(); + + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Description != null) + { + request.Description = cmdletContext.Description; + } + if (cmdletContext.DisplayName != null) + { + request.DisplayName = cmdletContext.DisplayName; + } + if (cmdletContext.EmailAddress != null) + { + request.EmailAddress = cmdletContext.EmailAddress; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + if (cmdletContext.Tag != null) + { + request.Tags = cmdletContext.Tag; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.CreateEmailAddressResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.CreateEmailAddressRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "CreateEmailAddress"); + try + { + #if DESKTOP + return client.CreateEmailAddress(request); + #elif CORECLR + return client.CreateEmailAddressAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ClientToken { get; set; } + public System.String Description { get; set; } + public System.String DisplayName { get; set; } + public System.String EmailAddress { get; set; } + public System.String InstanceId { get; set; } + public Dictionary Tag { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNQueue-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNQueue-Cmdlet.cs index e2bc288f2..d9aee765d 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNQueue-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNQueue-Cmdlet.cs @@ -157,6 +157,16 @@ public partial class NewCONNQueueCmdlet : AmazonConnectClientCmdlet, IExecutor public System.String OutboundCallerConfig_OutboundCallerIdNumberId { get; set; } #endregion + #region Parameter OutboundEmailConfig_OutboundEmailAddressId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String OutboundEmailConfig_OutboundEmailAddressId { get; set; } + #endregion + #region Parameter OutboundCallerConfig_OutboundFlowId /// /// @@ -278,6 +288,7 @@ protected override void ProcessRecord() context.OutboundCallerConfig_OutboundCallerIdName = this.OutboundCallerConfig_OutboundCallerIdName; context.OutboundCallerConfig_OutboundCallerIdNumberId = this.OutboundCallerConfig_OutboundCallerIdNumberId; context.OutboundCallerConfig_OutboundFlowId = this.OutboundCallerConfig_OutboundFlowId; + context.OutboundEmailConfig_OutboundEmailAddressId = this.OutboundEmailConfig_OutboundEmailAddressId; if (this.QuickConnectId != null) { context.QuickConnectId = new List(this.QuickConnectId); @@ -365,6 +376,25 @@ public object Execute(ExecutorContext context) { request.OutboundCallerConfig = null; } + + // populate OutboundEmailConfig + var requestOutboundEmailConfigIsNull = true; + request.OutboundEmailConfig = new Amazon.Connect.Model.OutboundEmailConfig(); + System.String requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId = null; + if (cmdletContext.OutboundEmailConfig_OutboundEmailAddressId != null) + { + requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId = cmdletContext.OutboundEmailConfig_OutboundEmailAddressId; + } + if (requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId != null) + { + request.OutboundEmailConfig.OutboundEmailAddressId = requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId; + requestOutboundEmailConfigIsNull = false; + } + // determine if request.OutboundEmailConfig should be set to null + if (requestOutboundEmailConfigIsNull) + { + request.OutboundEmailConfig = null; + } if (cmdletContext.QuickConnectId != null) { request.QuickConnectIds = cmdletContext.QuickConnectId; @@ -442,6 +472,7 @@ internal partial class CmdletContext : ExecutorContext public System.String OutboundCallerConfig_OutboundCallerIdName { get; set; } public System.String OutboundCallerConfig_OutboundCallerIdNumberId { get; set; } public System.String OutboundCallerConfig_OutboundFlowId { get; set; } + public System.String OutboundEmailConfig_OutboundEmailAddressId { get; set; } public List QuickConnectId { get; set; } public Dictionary Tag { get; set; } public System.Func Select { get; set; } = diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNTaskTemplate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNTaskTemplate-Cmdlet.cs index 4cb2dd66e..95764f782 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNTaskTemplate-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/New-CONNTaskTemplate-Cmdlet.cs @@ -159,6 +159,16 @@ public partial class NewCONNTaskTemplateCmdlet : AmazonConnectClientCmdlet, IExe public Amazon.Connect.Model.RequiredFieldInfo[] Constraints_RequiredField { get; set; } #endregion + #region Parameter SelfAssignFlowId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String SelfAssignFlowId { get; set; } + #endregion + #region Parameter Status /// /// @@ -290,6 +300,7 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter Name which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + context.SelfAssignFlowId = this.SelfAssignFlowId; context.Status = this.Status; // allow further manipulation of loaded context prior to processing @@ -389,6 +400,10 @@ public object Execute(ExecutorContext context) { request.Name = cmdletContext.Name; } + if (cmdletContext.SelfAssignFlowId != null) + { + request.SelfAssignFlowId = cmdletContext.SelfAssignFlowId; + } if (cmdletContext.Status != null) { request.Status = cmdletContext.Status; @@ -464,6 +479,7 @@ internal partial class CmdletContext : ExecutorContext public List Field { get; set; } public System.String InstanceId { get; set; } public System.String Name { get; set; } + public System.String SelfAssignFlowId { get; set; } public Amazon.Connect.TaskTemplateStatus Status { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response; diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Remove-CONNEmailAddress-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Remove-CONNEmailAddress-Cmdlet.cs new file mode 100644 index 000000000..6f56d497b --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Remove-CONNEmailAddress-Cmdlet.cs @@ -0,0 +1,246 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("Remove", "CONNEmailAddress", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the Amazon Connect Service DeleteEmailAddress API operation.", Operation = new[] {"DeleteEmailAddress"}, SelectReturnType = typeof(Amazon.Connect.Model.DeleteEmailAddressResponse))] + [AWSCmdletOutput("None or Amazon.Connect.Model.DeleteEmailAddressResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.Connect.Model.DeleteEmailAddressResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveCONNEmailAddressCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter EmailAddressId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String EmailAddressId { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.DeleteEmailAddressResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-CONNEmailAddress (DeleteEmailAddress)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.EmailAddressId = this.EmailAddressId; + #if MODULAR + if (this.EmailAddressId == null && ParameterWasBound(nameof(this.EmailAddressId))) + { + WriteWarning("You are passing $null as a value for parameter EmailAddressId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.DeleteEmailAddressRequest(); + + if (cmdletContext.EmailAddressId != null) + { + request.EmailAddressId = cmdletContext.EmailAddressId; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.DeleteEmailAddressResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.DeleteEmailAddressRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "DeleteEmailAddress"); + try + { + #if DESKTOP + return client.DeleteEmailAddress(request); + #elif CORECLR + return client.DeleteEmailAddressAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String EmailAddressId { get; set; } + public System.String InstanceId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Search-CONNContact-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Search-CONNContact-Cmdlet.cs index a18ae45a5..58a81a26b 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Search-CONNContact-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Search-CONNContact-Cmdlet.cs @@ -88,6 +88,17 @@ public partial class SearchCONNContactCmdlet : AmazonConnectClientCmdlet, IExecu public Amazon.Connect.Model.SearchableContactAttributesCriteria[] SearchableContactAttributes_Criterion { get; set; } #endregion + #region Parameter SearchableSegmentAttributes_Criterion + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchCriteria_SearchableSegmentAttributes_Criteria")] + public Amazon.Connect.Model.SearchableSegmentAttributesCriteria[] SearchableSegmentAttributes_Criterion { get; set; } + #endregion + #region Parameter TimeRange_EndTime /// /// @@ -223,6 +234,18 @@ public partial class SearchCONNContactCmdlet : AmazonConnectClientCmdlet, IExecu public Amazon.Connect.SearchContactsMatchType SearchableContactAttributes_MatchType { get; set; } #endregion + #region Parameter SearchableSegmentAttributes_MatchType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchCriteria_SearchableSegmentAttributes_MatchType")] + [AWSConstantClassSource("Amazon.Connect.SearchContactsMatchType")] + public Amazon.Connect.SearchContactsMatchType SearchableSegmentAttributes_MatchType { get; set; } + #endregion + #region Parameter Sort_Order /// /// @@ -431,6 +454,11 @@ protected override void ProcessRecord() context.SearchableContactAttributes_Criterion = new List(this.SearchableContactAttributes_Criterion); } context.SearchableContactAttributes_MatchType = this.SearchableContactAttributes_MatchType; + if (this.SearchableSegmentAttributes_Criterion != null) + { + context.SearchableSegmentAttributes_Criterion = new List(this.SearchableSegmentAttributes_Criterion); + } + context.SearchableSegmentAttributes_MatchType = this.SearchableSegmentAttributes_MatchType; context.Sort_FieldName = this.Sort_FieldName; context.Sort_Order = this.Sort_Order; context.TimeRange_EndTime = this.TimeRange_EndTime; @@ -611,6 +639,41 @@ public object Execute(ExecutorContext context) request.SearchCriteria.SearchableContactAttributes = requestSearchCriteria_searchCriteria_SearchableContactAttributes; requestSearchCriteriaIsNull = false; } + Amazon.Connect.Model.SearchableSegmentAttributes requestSearchCriteria_searchCriteria_SearchableSegmentAttributes = null; + + // populate SearchableSegmentAttributes + var requestSearchCriteria_searchCriteria_SearchableSegmentAttributesIsNull = true; + requestSearchCriteria_searchCriteria_SearchableSegmentAttributes = new Amazon.Connect.Model.SearchableSegmentAttributes(); + List requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_Criterion = null; + if (cmdletContext.SearchableSegmentAttributes_Criterion != null) + { + requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_Criterion = cmdletContext.SearchableSegmentAttributes_Criterion; + } + if (requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_Criterion != null) + { + requestSearchCriteria_searchCriteria_SearchableSegmentAttributes.Criteria = requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_Criterion; + requestSearchCriteria_searchCriteria_SearchableSegmentAttributesIsNull = false; + } + Amazon.Connect.SearchContactsMatchType requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_MatchType = null; + if (cmdletContext.SearchableSegmentAttributes_MatchType != null) + { + requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_MatchType = cmdletContext.SearchableSegmentAttributes_MatchType; + } + if (requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_MatchType != null) + { + requestSearchCriteria_searchCriteria_SearchableSegmentAttributes.MatchType = requestSearchCriteria_searchCriteria_SearchableSegmentAttributes_searchableSegmentAttributes_MatchType; + requestSearchCriteria_searchCriteria_SearchableSegmentAttributesIsNull = false; + } + // determine if requestSearchCriteria_searchCriteria_SearchableSegmentAttributes should be set to null + if (requestSearchCriteria_searchCriteria_SearchableSegmentAttributesIsNull) + { + requestSearchCriteria_searchCriteria_SearchableSegmentAttributes = null; + } + if (requestSearchCriteria_searchCriteria_SearchableSegmentAttributes != null) + { + request.SearchCriteria.SearchableSegmentAttributes = requestSearchCriteria_searchCriteria_SearchableSegmentAttributes; + requestSearchCriteriaIsNull = false; + } Amazon.Connect.Model.AgentHierarchyGroups requestSearchCriteria_searchCriteria_AgentHierarchyGroups = null; // populate AgentHierarchyGroups @@ -850,6 +913,8 @@ internal partial class CmdletContext : ExecutorContext public List SearchCriteria_QueueId { get; set; } public List SearchableContactAttributes_Criterion { get; set; } public Amazon.Connect.SearchContactsMatchType SearchableContactAttributes_MatchType { get; set; } + public List SearchableSegmentAttributes_Criterion { get; set; } + public Amazon.Connect.SearchContactsMatchType SearchableSegmentAttributes_MatchType { get; set; } public Amazon.Connect.SortableFieldName Sort_FieldName { get; set; } public Amazon.Connect.SortOrder Sort_Order { get; set; } public System.DateTime? TimeRange_EndTime { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Search-CONNEmailAddress-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Search-CONNEmailAddress-Cmdlet.cs new file mode 100644 index 000000000..dd16db993 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Search-CONNEmailAddress-Cmdlet.cs @@ -0,0 +1,578 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + ///

                      This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration. + ///
                      + [Cmdlet("Search", "CONNEmailAddress", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.Connect.Model.SearchEmailAddressesResponse")] + [AWSCmdlet("Calls the Amazon Connect Service SearchEmailAddresses API operation.", Operation = new[] {"SearchEmailAddresses"}, SelectReturnType = typeof(Amazon.Connect.Model.SearchEmailAddressesResponse))] + [AWSCmdletOutput("Amazon.Connect.Model.SearchEmailAddressesResponse", + "This cmdlet returns an Amazon.Connect.Model.SearchEmailAddressesResponse object containing multiple properties." + )] + public partial class SearchCONNEmailAddressCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveResponse { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter SearchCriteria_AndCondition + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchCriteria_AndConditions")] + public Amazon.Connect.Model.EmailAddressSearchCriteria[] SearchCriteria_AndCondition { get; set; } + #endregion + + #region Parameter TagFilter_AndCondition + /// + /// + /// A list of conditions which would be applied together with an AND condition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchFilter_TagFilter_AndConditions")] + public Amazon.Connect.Model.TagCondition[] TagFilter_AndCondition { get; set; } + #endregion + + #region Parameter StringCondition_ComparisonType + /// + /// + /// The type of comparison to be made when evaluating the string condition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchCriteria_StringCondition_ComparisonType")] + [AWSConstantClassSource("Amazon.Connect.StringComparisonType")] + public Amazon.Connect.StringComparisonType StringCondition_ComparisonType { get; set; } + #endregion + + #region Parameter StringCondition_FieldName + /// + /// + /// The name of the field in the string condition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchCriteria_StringCondition_FieldName")] + public System.String StringCondition_FieldName { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter SearchCriteria_OrCondition + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchCriteria_OrConditions")] + public Amazon.Connect.Model.EmailAddressSearchCriteria[] SearchCriteria_OrCondition { get; set; } + #endregion + + #region Parameter TagFilter_OrCondition + /// + /// + /// A list of conditions which would be applied together with an OR condition. + /// + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchFilter_TagFilter_OrConditions")] + public Amazon.Connect.Model.TagCondition[][] TagFilter_OrCondition { get; set; } + #endregion + + #region Parameter TagCondition_TagKey + /// + /// + /// The tag key in the tag condition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchFilter_TagFilter_TagCondition_TagKey")] + public System.String TagCondition_TagKey { get; set; } + #endregion + + #region Parameter TagCondition_TagValue + /// + /// + /// The tag value in the tag condition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchFilter_TagFilter_TagCondition_TagValue")] + public System.String TagCondition_TagValue { get; set; } + #endregion + + #region Parameter StringCondition_Value + /// + /// + /// The value of the string. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SearchCriteria_StringCondition_Value")] + public System.String StringCondition_Value { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + ///
                      Note: This parameter is only used if you are manually controlling output pagination of the service API call. + ///
                      'NextToken' is only returned by the cmdlet when '-Select *' is specified. In order to manually control output pagination, set '-NextToken' to null for the first call then set the 'NextToken' using the same property output from the previous call for subsequent calls. + ///
                      + ///
                      + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.SearchEmailAddressesResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.SearchEmailAddressesResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + #region Parameter NoAutoIteration + /// + /// By default the cmdlet will auto-iterate and retrieve all results to the pipeline by performing multiple + /// service calls. If set, the cmdlet will retrieve only the next 'page' of results using the value of NextToken + /// as the start point. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter NoAutoIteration { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Search-CONNEmailAddress (SearchEmailAddresses)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + if (this.SearchCriteria_AndCondition != null) + { + context.SearchCriteria_AndCondition = new List(this.SearchCriteria_AndCondition); + } + if (this.SearchCriteria_OrCondition != null) + { + context.SearchCriteria_OrCondition = new List(this.SearchCriteria_OrCondition); + } + context.StringCondition_ComparisonType = this.StringCondition_ComparisonType; + context.StringCondition_FieldName = this.StringCondition_FieldName; + context.StringCondition_Value = this.StringCondition_Value; + if (this.TagFilter_AndCondition != null) + { + context.TagFilter_AndCondition = new List(this.TagFilter_AndCondition); + } + if (this.TagFilter_OrCondition != null) + { + context.TagFilter_OrCondition = new List>(); + foreach (var innerList in this.TagFilter_OrCondition) + { + context.TagFilter_OrCondition.Add(new List(innerList)); + } + } + context.TagCondition_TagKey = this.TagCondition_TagKey; + context.TagCondition_TagValue = this.TagCondition_TagValue; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent; + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + + // create request and set iteration invariants + var request = new Amazon.Connect.Model.SearchEmailAddressesRequest(); + + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + + // populate SearchCriteria + var requestSearchCriteriaIsNull = true; + request.SearchCriteria = new Amazon.Connect.Model.EmailAddressSearchCriteria(); + List requestSearchCriteria_searchCriteria_AndCondition = null; + if (cmdletContext.SearchCriteria_AndCondition != null) + { + requestSearchCriteria_searchCriteria_AndCondition = cmdletContext.SearchCriteria_AndCondition; + } + if (requestSearchCriteria_searchCriteria_AndCondition != null) + { + request.SearchCriteria.AndConditions = requestSearchCriteria_searchCriteria_AndCondition; + requestSearchCriteriaIsNull = false; + } + List requestSearchCriteria_searchCriteria_OrCondition = null; + if (cmdletContext.SearchCriteria_OrCondition != null) + { + requestSearchCriteria_searchCriteria_OrCondition = cmdletContext.SearchCriteria_OrCondition; + } + if (requestSearchCriteria_searchCriteria_OrCondition != null) + { + request.SearchCriteria.OrConditions = requestSearchCriteria_searchCriteria_OrCondition; + requestSearchCriteriaIsNull = false; + } + Amazon.Connect.Model.StringCondition requestSearchCriteria_searchCriteria_StringCondition = null; + + // populate StringCondition + var requestSearchCriteria_searchCriteria_StringConditionIsNull = true; + requestSearchCriteria_searchCriteria_StringCondition = new Amazon.Connect.Model.StringCondition(); + Amazon.Connect.StringComparisonType requestSearchCriteria_searchCriteria_StringCondition_stringCondition_ComparisonType = null; + if (cmdletContext.StringCondition_ComparisonType != null) + { + requestSearchCriteria_searchCriteria_StringCondition_stringCondition_ComparisonType = cmdletContext.StringCondition_ComparisonType; + } + if (requestSearchCriteria_searchCriteria_StringCondition_stringCondition_ComparisonType != null) + { + requestSearchCriteria_searchCriteria_StringCondition.ComparisonType = requestSearchCriteria_searchCriteria_StringCondition_stringCondition_ComparisonType; + requestSearchCriteria_searchCriteria_StringConditionIsNull = false; + } + System.String requestSearchCriteria_searchCriteria_StringCondition_stringCondition_FieldName = null; + if (cmdletContext.StringCondition_FieldName != null) + { + requestSearchCriteria_searchCriteria_StringCondition_stringCondition_FieldName = cmdletContext.StringCondition_FieldName; + } + if (requestSearchCriteria_searchCriteria_StringCondition_stringCondition_FieldName != null) + { + requestSearchCriteria_searchCriteria_StringCondition.FieldName = requestSearchCriteria_searchCriteria_StringCondition_stringCondition_FieldName; + requestSearchCriteria_searchCriteria_StringConditionIsNull = false; + } + System.String requestSearchCriteria_searchCriteria_StringCondition_stringCondition_Value = null; + if (cmdletContext.StringCondition_Value != null) + { + requestSearchCriteria_searchCriteria_StringCondition_stringCondition_Value = cmdletContext.StringCondition_Value; + } + if (requestSearchCriteria_searchCriteria_StringCondition_stringCondition_Value != null) + { + requestSearchCriteria_searchCriteria_StringCondition.Value = requestSearchCriteria_searchCriteria_StringCondition_stringCondition_Value; + requestSearchCriteria_searchCriteria_StringConditionIsNull = false; + } + // determine if requestSearchCriteria_searchCriteria_StringCondition should be set to null + if (requestSearchCriteria_searchCriteria_StringConditionIsNull) + { + requestSearchCriteria_searchCriteria_StringCondition = null; + } + if (requestSearchCriteria_searchCriteria_StringCondition != null) + { + request.SearchCriteria.StringCondition = requestSearchCriteria_searchCriteria_StringCondition; + requestSearchCriteriaIsNull = false; + } + // determine if request.SearchCriteria should be set to null + if (requestSearchCriteriaIsNull) + { + request.SearchCriteria = null; + } + + // populate SearchFilter + var requestSearchFilterIsNull = true; + request.SearchFilter = new Amazon.Connect.Model.EmailAddressSearchFilter(); + Amazon.Connect.Model.ControlPlaneTagFilter requestSearchFilter_searchFilter_TagFilter = null; + + // populate TagFilter + var requestSearchFilter_searchFilter_TagFilterIsNull = true; + requestSearchFilter_searchFilter_TagFilter = new Amazon.Connect.Model.ControlPlaneTagFilter(); + List requestSearchFilter_searchFilter_TagFilter_tagFilter_AndCondition = null; + if (cmdletContext.TagFilter_AndCondition != null) + { + requestSearchFilter_searchFilter_TagFilter_tagFilter_AndCondition = cmdletContext.TagFilter_AndCondition; + } + if (requestSearchFilter_searchFilter_TagFilter_tagFilter_AndCondition != null) + { + requestSearchFilter_searchFilter_TagFilter.AndConditions = requestSearchFilter_searchFilter_TagFilter_tagFilter_AndCondition; + requestSearchFilter_searchFilter_TagFilterIsNull = false; + } + List> requestSearchFilter_searchFilter_TagFilter_tagFilter_OrCondition = null; + if (cmdletContext.TagFilter_OrCondition != null) + { + requestSearchFilter_searchFilter_TagFilter_tagFilter_OrCondition = cmdletContext.TagFilter_OrCondition; + } + if (requestSearchFilter_searchFilter_TagFilter_tagFilter_OrCondition != null) + { + requestSearchFilter_searchFilter_TagFilter.OrConditions = requestSearchFilter_searchFilter_TagFilter_tagFilter_OrCondition; + requestSearchFilter_searchFilter_TagFilterIsNull = false; + } + Amazon.Connect.Model.TagCondition requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition = null; + + // populate TagCondition + var requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagConditionIsNull = true; + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition = new Amazon.Connect.Model.TagCondition(); + System.String requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagKey = null; + if (cmdletContext.TagCondition_TagKey != null) + { + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagKey = cmdletContext.TagCondition_TagKey; + } + if (requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagKey != null) + { + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition.TagKey = requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagKey; + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagConditionIsNull = false; + } + System.String requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagValue = null; + if (cmdletContext.TagCondition_TagValue != null) + { + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagValue = cmdletContext.TagCondition_TagValue; + } + if (requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagValue != null) + { + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition.TagValue = requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition_tagCondition_TagValue; + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagConditionIsNull = false; + } + // determine if requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition should be set to null + if (requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagConditionIsNull) + { + requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition = null; + } + if (requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition != null) + { + requestSearchFilter_searchFilter_TagFilter.TagCondition = requestSearchFilter_searchFilter_TagFilter_searchFilter_TagFilter_TagCondition; + requestSearchFilter_searchFilter_TagFilterIsNull = false; + } + // determine if requestSearchFilter_searchFilter_TagFilter should be set to null + if (requestSearchFilter_searchFilter_TagFilterIsNull) + { + requestSearchFilter_searchFilter_TagFilter = null; + } + if (requestSearchFilter_searchFilter_TagFilter != null) + { + request.SearchFilter.TagFilter = requestSearchFilter_searchFilter_TagFilter; + requestSearchFilterIsNull = false; + } + // determine if request.SearchFilter should be set to null + if (requestSearchFilterIsNull) + { + request.SearchFilter = null; + } + + // Initialize loop variant and commence piping + var _nextToken = cmdletContext.NextToken; + var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); + + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + do + { + request.NextToken = _nextToken; + + CmdletOutput output; + + try + { + + var response = CallAWSServiceOperation(client, request); + + object pipelineOutput = null; + if (!useParameterSelect) + { + pipelineOutput = cmdletContext.Select(response, this); + } + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + + _nextToken = response.NextToken; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + ProcessOutput(output); + + } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken)); + + if (useParameterSelect) + { + WriteObject(cmdletContext.Select(null, this)); + } + + + return null; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.SearchEmailAddressesResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.SearchEmailAddressesRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "SearchEmailAddresses"); + try + { + #if DESKTOP + return client.SearchEmailAddresses(request); + #elif CORECLR + return client.SearchEmailAddressesAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String InstanceId { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public List SearchCriteria_AndCondition { get; set; } + public List SearchCriteria_OrCondition { get; set; } + public Amazon.Connect.StringComparisonType StringCondition_ComparisonType { get; set; } + public System.String StringCondition_FieldName { get; set; } + public System.String StringCondition_Value { get; set; } + public List TagFilter_AndCondition { get; set; } + public List> TagFilter_OrCondition { get; set; } + public System.String TagCondition_TagKey { get; set; } + public System.String TagCondition_TagValue { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Send-CONNOutboundEmail-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Send-CONNOutboundEmail-Cmdlet.cs new file mode 100644 index 000000000..9d4dbbb87 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Send-CONNOutboundEmail-Cmdlet.cs @@ -0,0 +1,741 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("Send", "CONNOutboundEmail", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("None")] + [AWSCmdlet("Calls the Amazon Connect Service SendOutboundEmail API operation.", Operation = new[] {"SendOutboundEmail"}, SelectReturnType = typeof(Amazon.Connect.Model.SendOutboundEmailResponse))] + [AWSCmdletOutput("None or Amazon.Connect.Model.SendOutboundEmailResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.Connect.Model.SendOutboundEmailResponse) be returned by specifying '-Select *'." + )] + public partial class SendCONNOutboundEmailCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter RawMessage_Body + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_Body")] + public System.String RawMessage_Body { get; set; } + #endregion + + #region Parameter SourceCampaign_CampaignId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String SourceCampaign_CampaignId { get; set; } + #endregion + + #region Parameter AdditionalRecipients_CcEmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("AdditionalRecipients_CcEmailAddresses")] + public Amazon.Connect.Model.EmailAddressInfo[] AdditionalRecipients_CcEmailAddress { get; set; } + #endregion + + #region Parameter RawMessage_ContentType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_ContentType")] + public System.String RawMessage_ContentType { get; set; } + #endregion + + #region Parameter TemplateAttributes_CustomAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_TemplateAttributes_CustomAttributes")] + public System.Collections.Hashtable TemplateAttributes_CustomAttribute { get; set; } + #endregion + + #region Parameter TemplateAttributes_CustomerProfileAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_TemplateAttributes_CustomerProfileAttributes")] + public System.String TemplateAttributes_CustomerProfileAttribute { get; set; } + #endregion + + #region Parameter DestinationEmailAddress_DisplayName + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String DestinationEmailAddress_DisplayName { get; set; } + #endregion + + #region Parameter FromEmailAddress_DisplayName + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String FromEmailAddress_DisplayName { get; set; } + #endregion + + #region Parameter DestinationEmailAddress_EmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String DestinationEmailAddress_EmailAddress { get; set; } + #endregion + + #region Parameter FromEmailAddress_EmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String FromEmailAddress_EmailAddress { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter TemplatedMessageConfig_KnowledgeBaseId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_KnowledgeBaseId")] + public System.String TemplatedMessageConfig_KnowledgeBaseId { get; set; } + #endregion + + #region Parameter EmailMessage_MessageSourceType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.Connect.OutboundMessageSourceType")] + public Amazon.Connect.OutboundMessageSourceType EmailMessage_MessageSourceType { get; set; } + #endregion + + #region Parameter TemplatedMessageConfig_MessageTemplateId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_MessageTemplateId")] + public System.String TemplatedMessageConfig_MessageTemplateId { get; set; } + #endregion + + #region Parameter SourceCampaign_OutboundRequestId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String SourceCampaign_OutboundRequestId { get; set; } + #endregion + + #region Parameter RawMessage_Subject + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_Subject")] + public System.String RawMessage_Subject { get; set; } + #endregion + + #region Parameter TrafficType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.Connect.TrafficType")] + public Amazon.Connect.TrafficType TrafficType { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.SendOutboundEmailResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Send-CONNOutboundEmail (SendOutboundEmail)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.AdditionalRecipients_CcEmailAddress != null) + { + context.AdditionalRecipients_CcEmailAddress = new List(this.AdditionalRecipients_CcEmailAddress); + } + context.ClientToken = this.ClientToken; + context.DestinationEmailAddress_DisplayName = this.DestinationEmailAddress_DisplayName; + context.DestinationEmailAddress_EmailAddress = this.DestinationEmailAddress_EmailAddress; + #if MODULAR + if (this.DestinationEmailAddress_EmailAddress == null && ParameterWasBound(nameof(this.DestinationEmailAddress_EmailAddress))) + { + WriteWarning("You are passing $null as a value for parameter DestinationEmailAddress_EmailAddress which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.EmailMessage_MessageSourceType = this.EmailMessage_MessageSourceType; + #if MODULAR + if (this.EmailMessage_MessageSourceType == null && ParameterWasBound(nameof(this.EmailMessage_MessageSourceType))) + { + WriteWarning("You are passing $null as a value for parameter EmailMessage_MessageSourceType which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.RawMessage_Body = this.RawMessage_Body; + context.RawMessage_ContentType = this.RawMessage_ContentType; + context.RawMessage_Subject = this.RawMessage_Subject; + context.TemplatedMessageConfig_KnowledgeBaseId = this.TemplatedMessageConfig_KnowledgeBaseId; + context.TemplatedMessageConfig_MessageTemplateId = this.TemplatedMessageConfig_MessageTemplateId; + if (this.TemplateAttributes_CustomAttribute != null) + { + context.TemplateAttributes_CustomAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.TemplateAttributes_CustomAttribute.Keys) + { + context.TemplateAttributes_CustomAttribute.Add((String)hashKey, (System.String)(this.TemplateAttributes_CustomAttribute[hashKey])); + } + } + context.TemplateAttributes_CustomerProfileAttribute = this.TemplateAttributes_CustomerProfileAttribute; + context.FromEmailAddress_DisplayName = this.FromEmailAddress_DisplayName; + context.FromEmailAddress_EmailAddress = this.FromEmailAddress_EmailAddress; + #if MODULAR + if (this.FromEmailAddress_EmailAddress == null && ParameterWasBound(nameof(this.FromEmailAddress_EmailAddress))) + { + WriteWarning("You are passing $null as a value for parameter FromEmailAddress_EmailAddress which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.SourceCampaign_CampaignId = this.SourceCampaign_CampaignId; + context.SourceCampaign_OutboundRequestId = this.SourceCampaign_OutboundRequestId; + context.TrafficType = this.TrafficType; + #if MODULAR + if (this.TrafficType == null && ParameterWasBound(nameof(this.TrafficType))) + { + WriteWarning("You are passing $null as a value for parameter TrafficType which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.SendOutboundEmailRequest(); + + + // populate AdditionalRecipients + var requestAdditionalRecipientsIsNull = true; + request.AdditionalRecipients = new Amazon.Connect.Model.OutboundAdditionalRecipients(); + List requestAdditionalRecipients_additionalRecipients_CcEmailAddress = null; + if (cmdletContext.AdditionalRecipients_CcEmailAddress != null) + { + requestAdditionalRecipients_additionalRecipients_CcEmailAddress = cmdletContext.AdditionalRecipients_CcEmailAddress; + } + if (requestAdditionalRecipients_additionalRecipients_CcEmailAddress != null) + { + request.AdditionalRecipients.CcEmailAddresses = requestAdditionalRecipients_additionalRecipients_CcEmailAddress; + requestAdditionalRecipientsIsNull = false; + } + // determine if request.AdditionalRecipients should be set to null + if (requestAdditionalRecipientsIsNull) + { + request.AdditionalRecipients = null; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + + // populate DestinationEmailAddress + var requestDestinationEmailAddressIsNull = true; + request.DestinationEmailAddress = new Amazon.Connect.Model.EmailAddressInfo(); + System.String requestDestinationEmailAddress_destinationEmailAddress_DisplayName = null; + if (cmdletContext.DestinationEmailAddress_DisplayName != null) + { + requestDestinationEmailAddress_destinationEmailAddress_DisplayName = cmdletContext.DestinationEmailAddress_DisplayName; + } + if (requestDestinationEmailAddress_destinationEmailAddress_DisplayName != null) + { + request.DestinationEmailAddress.DisplayName = requestDestinationEmailAddress_destinationEmailAddress_DisplayName; + requestDestinationEmailAddressIsNull = false; + } + System.String requestDestinationEmailAddress_destinationEmailAddress_EmailAddress = null; + if (cmdletContext.DestinationEmailAddress_EmailAddress != null) + { + requestDestinationEmailAddress_destinationEmailAddress_EmailAddress = cmdletContext.DestinationEmailAddress_EmailAddress; + } + if (requestDestinationEmailAddress_destinationEmailAddress_EmailAddress != null) + { + request.DestinationEmailAddress.EmailAddress = requestDestinationEmailAddress_destinationEmailAddress_EmailAddress; + requestDestinationEmailAddressIsNull = false; + } + // determine if request.DestinationEmailAddress should be set to null + if (requestDestinationEmailAddressIsNull) + { + request.DestinationEmailAddress = null; + } + + // populate EmailMessage + var requestEmailMessageIsNull = true; + request.EmailMessage = new Amazon.Connect.Model.OutboundEmailContent(); + Amazon.Connect.OutboundMessageSourceType requestEmailMessage_emailMessage_MessageSourceType = null; + if (cmdletContext.EmailMessage_MessageSourceType != null) + { + requestEmailMessage_emailMessage_MessageSourceType = cmdletContext.EmailMessage_MessageSourceType; + } + if (requestEmailMessage_emailMessage_MessageSourceType != null) + { + request.EmailMessage.MessageSourceType = requestEmailMessage_emailMessage_MessageSourceType; + requestEmailMessageIsNull = false; + } + Amazon.Connect.Model.OutboundRawMessage requestEmailMessage_emailMessage_RawMessage = null; + + // populate RawMessage + var requestEmailMessage_emailMessage_RawMessageIsNull = true; + requestEmailMessage_emailMessage_RawMessage = new Amazon.Connect.Model.OutboundRawMessage(); + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_Body = null; + if (cmdletContext.RawMessage_Body != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_Body = cmdletContext.RawMessage_Body; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_Body != null) + { + requestEmailMessage_emailMessage_RawMessage.Body = requestEmailMessage_emailMessage_RawMessage_rawMessage_Body; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType = null; + if (cmdletContext.RawMessage_ContentType != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType = cmdletContext.RawMessage_ContentType; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType != null) + { + requestEmailMessage_emailMessage_RawMessage.ContentType = requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject = null; + if (cmdletContext.RawMessage_Subject != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject = cmdletContext.RawMessage_Subject; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject != null) + { + requestEmailMessage_emailMessage_RawMessage.Subject = requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + // determine if requestEmailMessage_emailMessage_RawMessage should be set to null + if (requestEmailMessage_emailMessage_RawMessageIsNull) + { + requestEmailMessage_emailMessage_RawMessage = null; + } + if (requestEmailMessage_emailMessage_RawMessage != null) + { + request.EmailMessage.RawMessage = requestEmailMessage_emailMessage_RawMessage; + requestEmailMessageIsNull = false; + } + Amazon.Connect.Model.TemplatedMessageConfig requestEmailMessage_emailMessage_TemplatedMessageConfig = null; + + // populate TemplatedMessageConfig + var requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = true; + requestEmailMessage_emailMessage_TemplatedMessageConfig = new Amazon.Connect.Model.TemplatedMessageConfig(); + System.String requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId = null; + if (cmdletContext.TemplatedMessageConfig_KnowledgeBaseId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId = cmdletContext.TemplatedMessageConfig_KnowledgeBaseId; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig.KnowledgeBaseId = requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId; + requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = false; + } + System.String requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId = null; + if (cmdletContext.TemplatedMessageConfig_MessageTemplateId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId = cmdletContext.TemplatedMessageConfig_MessageTemplateId; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig.MessageTemplateId = requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId; + requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = false; + } + Amazon.Connect.Model.TemplateAttributes requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes = null; + + // populate TemplateAttributes + var requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull = true; + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes = new Amazon.Connect.Model.TemplateAttributes(); + Dictionary requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute = null; + if (cmdletContext.TemplateAttributes_CustomAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute = cmdletContext.TemplateAttributes_CustomAttribute; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes.CustomAttributes = requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute; + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull = false; + } + System.String requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute = null; + if (cmdletContext.TemplateAttributes_CustomerProfileAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute = cmdletContext.TemplateAttributes_CustomerProfileAttribute; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes.CustomerProfileAttributes = requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute; + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull = false; + } + // determine if requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes should be set to null + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes = null; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig.TemplateAttributes = requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes; + requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = false; + } + // determine if requestEmailMessage_emailMessage_TemplatedMessageConfig should be set to null + if (requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig = null; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig != null) + { + request.EmailMessage.TemplatedMessageConfig = requestEmailMessage_emailMessage_TemplatedMessageConfig; + requestEmailMessageIsNull = false; + } + // determine if request.EmailMessage should be set to null + if (requestEmailMessageIsNull) + { + request.EmailMessage = null; + } + + // populate FromEmailAddress + var requestFromEmailAddressIsNull = true; + request.FromEmailAddress = new Amazon.Connect.Model.EmailAddressInfo(); + System.String requestFromEmailAddress_fromEmailAddress_DisplayName = null; + if (cmdletContext.FromEmailAddress_DisplayName != null) + { + requestFromEmailAddress_fromEmailAddress_DisplayName = cmdletContext.FromEmailAddress_DisplayName; + } + if (requestFromEmailAddress_fromEmailAddress_DisplayName != null) + { + request.FromEmailAddress.DisplayName = requestFromEmailAddress_fromEmailAddress_DisplayName; + requestFromEmailAddressIsNull = false; + } + System.String requestFromEmailAddress_fromEmailAddress_EmailAddress = null; + if (cmdletContext.FromEmailAddress_EmailAddress != null) + { + requestFromEmailAddress_fromEmailAddress_EmailAddress = cmdletContext.FromEmailAddress_EmailAddress; + } + if (requestFromEmailAddress_fromEmailAddress_EmailAddress != null) + { + request.FromEmailAddress.EmailAddress = requestFromEmailAddress_fromEmailAddress_EmailAddress; + requestFromEmailAddressIsNull = false; + } + // determine if request.FromEmailAddress should be set to null + if (requestFromEmailAddressIsNull) + { + request.FromEmailAddress = null; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + + // populate SourceCampaign + var requestSourceCampaignIsNull = true; + request.SourceCampaign = new Amazon.Connect.Model.SourceCampaign(); + System.String requestSourceCampaign_sourceCampaign_CampaignId = null; + if (cmdletContext.SourceCampaign_CampaignId != null) + { + requestSourceCampaign_sourceCampaign_CampaignId = cmdletContext.SourceCampaign_CampaignId; + } + if (requestSourceCampaign_sourceCampaign_CampaignId != null) + { + request.SourceCampaign.CampaignId = requestSourceCampaign_sourceCampaign_CampaignId; + requestSourceCampaignIsNull = false; + } + System.String requestSourceCampaign_sourceCampaign_OutboundRequestId = null; + if (cmdletContext.SourceCampaign_OutboundRequestId != null) + { + requestSourceCampaign_sourceCampaign_OutboundRequestId = cmdletContext.SourceCampaign_OutboundRequestId; + } + if (requestSourceCampaign_sourceCampaign_OutboundRequestId != null) + { + request.SourceCampaign.OutboundRequestId = requestSourceCampaign_sourceCampaign_OutboundRequestId; + requestSourceCampaignIsNull = false; + } + // determine if request.SourceCampaign should be set to null + if (requestSourceCampaignIsNull) + { + request.SourceCampaign = null; + } + if (cmdletContext.TrafficType != null) + { + request.TrafficType = cmdletContext.TrafficType; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.SendOutboundEmailResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.SendOutboundEmailRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "SendOutboundEmail"); + try + { + #if DESKTOP + return client.SendOutboundEmail(request); + #elif CORECLR + return client.SendOutboundEmailAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List AdditionalRecipients_CcEmailAddress { get; set; } + public System.String ClientToken { get; set; } + public System.String DestinationEmailAddress_DisplayName { get; set; } + public System.String DestinationEmailAddress_EmailAddress { get; set; } + public Amazon.Connect.OutboundMessageSourceType EmailMessage_MessageSourceType { get; set; } + public System.String RawMessage_Body { get; set; } + public System.String RawMessage_ContentType { get; set; } + public System.String RawMessage_Subject { get; set; } + public System.String TemplatedMessageConfig_KnowledgeBaseId { get; set; } + public System.String TemplatedMessageConfig_MessageTemplateId { get; set; } + public Dictionary TemplateAttributes_CustomAttribute { get; set; } + public System.String TemplateAttributes_CustomerProfileAttribute { get; set; } + public System.String FromEmailAddress_DisplayName { get; set; } + public System.String FromEmailAddress_EmailAddress { get; set; } + public System.String InstanceId { get; set; } + public System.String SourceCampaign_CampaignId { get; set; } + public System.String SourceCampaign_OutboundRequestId { get; set; } + public Amazon.Connect.TrafficType TrafficType { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNEmailContact-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNEmailContact-Cmdlet.cs new file mode 100644 index 000000000..7894f79c1 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNEmailContact-Cmdlet.cs @@ -0,0 +1,706 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("Start", "CONNEmailContact", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("System.String")] + [AWSCmdlet("Calls the Amazon Connect Service StartEmailContact API operation.", Operation = new[] {"StartEmailContact"}, SelectReturnType = typeof(Amazon.Connect.Model.StartEmailContactResponse))] + [AWSCmdletOutput("System.String or Amazon.Connect.Model.StartEmailContactResponse", + "This cmdlet returns a System.String object.", + "The service call response (type Amazon.Connect.Model.StartEmailContactResponse) can be returned by specifying '-Select *'." + )] + public partial class StartCONNEmailContactCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Attachment + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Attachments")] + public Amazon.Connect.Model.EmailAttachment[] Attachment { get; set; } + #endregion + + #region Parameter Attribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Attributes")] + public System.Collections.Hashtable Attribute { get; set; } + #endregion + + #region Parameter RawMessage_Body + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_Body")] + public System.String RawMessage_Body { get; set; } + #endregion + + #region Parameter AdditionalRecipients_CcAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("AdditionalRecipients_CcAddresses")] + public Amazon.Connect.Model.EmailAddressInfo[] AdditionalRecipients_CcAddress { get; set; } + #endregion + + #region Parameter ContactFlowId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ContactFlowId { get; set; } + #endregion + + #region Parameter RawMessage_ContentType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_ContentType")] + public System.String RawMessage_ContentType { get; set; } + #endregion + + #region Parameter Description + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Description { get; set; } + #endregion + + #region Parameter DestinationEmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String DestinationEmailAddress { get; set; } + #endregion + + #region Parameter FromEmailAddress_DisplayName + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String FromEmailAddress_DisplayName { get; set; } + #endregion + + #region Parameter FromEmailAddress_EmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String FromEmailAddress_EmailAddress { get; set; } + #endregion + + #region Parameter RawMessage_Header + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_Headers")] + public System.Collections.Hashtable RawMessage_Header { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter EmailMessage_MessageSourceType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.Connect.InboundMessageSourceType")] + public Amazon.Connect.InboundMessageSourceType EmailMessage_MessageSourceType { get; set; } + #endregion + + #region Parameter Name + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Name { get; set; } + #endregion + + #region Parameter Reference + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("References")] + public System.Collections.Hashtable Reference { get; set; } + #endregion + + #region Parameter RelatedContactId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String RelatedContactId { get; set; } + #endregion + + #region Parameter SegmentAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SegmentAttributes")] + public System.Collections.Hashtable SegmentAttribute { get; set; } + #endregion + + #region Parameter RawMessage_Subject + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_Subject")] + public System.String RawMessage_Subject { get; set; } + #endregion + + #region Parameter AdditionalRecipients_ToAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("AdditionalRecipients_ToAddresses")] + public Amazon.Connect.Model.EmailAddressInfo[] AdditionalRecipients_ToAddress { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'ContactId'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.StartEmailContactResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.StartEmailContactResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "ContactId"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Start-CONNEmailContact (StartEmailContact)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.AdditionalRecipients_CcAddress != null) + { + context.AdditionalRecipients_CcAddress = new List(this.AdditionalRecipients_CcAddress); + } + if (this.AdditionalRecipients_ToAddress != null) + { + context.AdditionalRecipients_ToAddress = new List(this.AdditionalRecipients_ToAddress); + } + if (this.Attachment != null) + { + context.Attachment = new List(this.Attachment); + } + if (this.Attribute != null) + { + context.Attribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Attribute.Keys) + { + context.Attribute.Add((String)hashKey, (System.String)(this.Attribute[hashKey])); + } + } + context.ClientToken = this.ClientToken; + context.ContactFlowId = this.ContactFlowId; + context.Description = this.Description; + context.DestinationEmailAddress = this.DestinationEmailAddress; + #if MODULAR + if (this.DestinationEmailAddress == null && ParameterWasBound(nameof(this.DestinationEmailAddress))) + { + WriteWarning("You are passing $null as a value for parameter DestinationEmailAddress which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.EmailMessage_MessageSourceType = this.EmailMessage_MessageSourceType; + #if MODULAR + if (this.EmailMessage_MessageSourceType == null && ParameterWasBound(nameof(this.EmailMessage_MessageSourceType))) + { + WriteWarning("You are passing $null as a value for parameter EmailMessage_MessageSourceType which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.RawMessage_Body = this.RawMessage_Body; + context.RawMessage_ContentType = this.RawMessage_ContentType; + if (this.RawMessage_Header != null) + { + context.RawMessage_Header = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.RawMessage_Header.Keys) + { + context.RawMessage_Header.Add((String)hashKey, (System.String)(this.RawMessage_Header[hashKey])); + } + } + context.RawMessage_Subject = this.RawMessage_Subject; + context.FromEmailAddress_DisplayName = this.FromEmailAddress_DisplayName; + context.FromEmailAddress_EmailAddress = this.FromEmailAddress_EmailAddress; + #if MODULAR + if (this.FromEmailAddress_EmailAddress == null && ParameterWasBound(nameof(this.FromEmailAddress_EmailAddress))) + { + WriteWarning("You are passing $null as a value for parameter FromEmailAddress_EmailAddress which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Name = this.Name; + if (this.Reference != null) + { + context.Reference = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Reference.Keys) + { + context.Reference.Add((String)hashKey, (Amazon.Connect.Model.Reference)(this.Reference[hashKey])); + } + } + context.RelatedContactId = this.RelatedContactId; + if (this.SegmentAttribute != null) + { + context.SegmentAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.SegmentAttribute.Keys) + { + context.SegmentAttribute.Add((String)hashKey, (Amazon.Connect.Model.SegmentAttributeValue)(this.SegmentAttribute[hashKey])); + } + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.StartEmailContactRequest(); + + + // populate AdditionalRecipients + var requestAdditionalRecipientsIsNull = true; + request.AdditionalRecipients = new Amazon.Connect.Model.InboundAdditionalRecipients(); + List requestAdditionalRecipients_additionalRecipients_CcAddress = null; + if (cmdletContext.AdditionalRecipients_CcAddress != null) + { + requestAdditionalRecipients_additionalRecipients_CcAddress = cmdletContext.AdditionalRecipients_CcAddress; + } + if (requestAdditionalRecipients_additionalRecipients_CcAddress != null) + { + request.AdditionalRecipients.CcAddresses = requestAdditionalRecipients_additionalRecipients_CcAddress; + requestAdditionalRecipientsIsNull = false; + } + List requestAdditionalRecipients_additionalRecipients_ToAddress = null; + if (cmdletContext.AdditionalRecipients_ToAddress != null) + { + requestAdditionalRecipients_additionalRecipients_ToAddress = cmdletContext.AdditionalRecipients_ToAddress; + } + if (requestAdditionalRecipients_additionalRecipients_ToAddress != null) + { + request.AdditionalRecipients.ToAddresses = requestAdditionalRecipients_additionalRecipients_ToAddress; + requestAdditionalRecipientsIsNull = false; + } + // determine if request.AdditionalRecipients should be set to null + if (requestAdditionalRecipientsIsNull) + { + request.AdditionalRecipients = null; + } + if (cmdletContext.Attachment != null) + { + request.Attachments = cmdletContext.Attachment; + } + if (cmdletContext.Attribute != null) + { + request.Attributes = cmdletContext.Attribute; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.ContactFlowId != null) + { + request.ContactFlowId = cmdletContext.ContactFlowId; + } + if (cmdletContext.Description != null) + { + request.Description = cmdletContext.Description; + } + if (cmdletContext.DestinationEmailAddress != null) + { + request.DestinationEmailAddress = cmdletContext.DestinationEmailAddress; + } + + // populate EmailMessage + var requestEmailMessageIsNull = true; + request.EmailMessage = new Amazon.Connect.Model.InboundEmailContent(); + Amazon.Connect.InboundMessageSourceType requestEmailMessage_emailMessage_MessageSourceType = null; + if (cmdletContext.EmailMessage_MessageSourceType != null) + { + requestEmailMessage_emailMessage_MessageSourceType = cmdletContext.EmailMessage_MessageSourceType; + } + if (requestEmailMessage_emailMessage_MessageSourceType != null) + { + request.EmailMessage.MessageSourceType = requestEmailMessage_emailMessage_MessageSourceType; + requestEmailMessageIsNull = false; + } + Amazon.Connect.Model.InboundRawMessage requestEmailMessage_emailMessage_RawMessage = null; + + // populate RawMessage + var requestEmailMessage_emailMessage_RawMessageIsNull = true; + requestEmailMessage_emailMessage_RawMessage = new Amazon.Connect.Model.InboundRawMessage(); + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_Body = null; + if (cmdletContext.RawMessage_Body != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_Body = cmdletContext.RawMessage_Body; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_Body != null) + { + requestEmailMessage_emailMessage_RawMessage.Body = requestEmailMessage_emailMessage_RawMessage_rawMessage_Body; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType = null; + if (cmdletContext.RawMessage_ContentType != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType = cmdletContext.RawMessage_ContentType; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType != null) + { + requestEmailMessage_emailMessage_RawMessage.ContentType = requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + Dictionary requestEmailMessage_emailMessage_RawMessage_rawMessage_Header = null; + if (cmdletContext.RawMessage_Header != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_Header = cmdletContext.RawMessage_Header; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_Header != null) + { + requestEmailMessage_emailMessage_RawMessage.Headers = requestEmailMessage_emailMessage_RawMessage_rawMessage_Header; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject = null; + if (cmdletContext.RawMessage_Subject != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject = cmdletContext.RawMessage_Subject; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject != null) + { + requestEmailMessage_emailMessage_RawMessage.Subject = requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + // determine if requestEmailMessage_emailMessage_RawMessage should be set to null + if (requestEmailMessage_emailMessage_RawMessageIsNull) + { + requestEmailMessage_emailMessage_RawMessage = null; + } + if (requestEmailMessage_emailMessage_RawMessage != null) + { + request.EmailMessage.RawMessage = requestEmailMessage_emailMessage_RawMessage; + requestEmailMessageIsNull = false; + } + // determine if request.EmailMessage should be set to null + if (requestEmailMessageIsNull) + { + request.EmailMessage = null; + } + + // populate FromEmailAddress + var requestFromEmailAddressIsNull = true; + request.FromEmailAddress = new Amazon.Connect.Model.EmailAddressInfo(); + System.String requestFromEmailAddress_fromEmailAddress_DisplayName = null; + if (cmdletContext.FromEmailAddress_DisplayName != null) + { + requestFromEmailAddress_fromEmailAddress_DisplayName = cmdletContext.FromEmailAddress_DisplayName; + } + if (requestFromEmailAddress_fromEmailAddress_DisplayName != null) + { + request.FromEmailAddress.DisplayName = requestFromEmailAddress_fromEmailAddress_DisplayName; + requestFromEmailAddressIsNull = false; + } + System.String requestFromEmailAddress_fromEmailAddress_EmailAddress = null; + if (cmdletContext.FromEmailAddress_EmailAddress != null) + { + requestFromEmailAddress_fromEmailAddress_EmailAddress = cmdletContext.FromEmailAddress_EmailAddress; + } + if (requestFromEmailAddress_fromEmailAddress_EmailAddress != null) + { + request.FromEmailAddress.EmailAddress = requestFromEmailAddress_fromEmailAddress_EmailAddress; + requestFromEmailAddressIsNull = false; + } + // determine if request.FromEmailAddress should be set to null + if (requestFromEmailAddressIsNull) + { + request.FromEmailAddress = null; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + if (cmdletContext.Reference != null) + { + request.References = cmdletContext.Reference; + } + if (cmdletContext.RelatedContactId != null) + { + request.RelatedContactId = cmdletContext.RelatedContactId; + } + if (cmdletContext.SegmentAttribute != null) + { + request.SegmentAttributes = cmdletContext.SegmentAttribute; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.StartEmailContactResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.StartEmailContactRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "StartEmailContact"); + try + { + #if DESKTOP + return client.StartEmailContact(request); + #elif CORECLR + return client.StartEmailContactAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List AdditionalRecipients_CcAddress { get; set; } + public List AdditionalRecipients_ToAddress { get; set; } + public List Attachment { get; set; } + public Dictionary Attribute { get; set; } + public System.String ClientToken { get; set; } + public System.String ContactFlowId { get; set; } + public System.String Description { get; set; } + public System.String DestinationEmailAddress { get; set; } + public Amazon.Connect.InboundMessageSourceType EmailMessage_MessageSourceType { get; set; } + public System.String RawMessage_Body { get; set; } + public System.String RawMessage_ContentType { get; set; } + public Dictionary RawMessage_Header { get; set; } + public System.String RawMessage_Subject { get; set; } + public System.String FromEmailAddress_DisplayName { get; set; } + public System.String FromEmailAddress_EmailAddress { get; set; } + public System.String InstanceId { get; set; } + public System.String Name { get; set; } + public Dictionary Reference { get; set; } + public System.String RelatedContactId { get; set; } + public Dictionary SegmentAttribute { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.ContactId; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNOutboundEmailContact-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNOutboundEmailContact-Cmdlet.cs new file mode 100644 index 000000000..be31a98f0 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNOutboundEmailContact-Cmdlet.cs @@ -0,0 +1,676 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("Start", "CONNOutboundEmailContact", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("System.String")] + [AWSCmdlet("Calls the Amazon Connect Service StartOutboundEmailContact API operation.", Operation = new[] {"StartOutboundEmailContact"}, SelectReturnType = typeof(Amazon.Connect.Model.StartOutboundEmailContactResponse))] + [AWSCmdletOutput("System.String or Amazon.Connect.Model.StartOutboundEmailContactResponse", + "This cmdlet returns a System.String object.", + "The service call response (type Amazon.Connect.Model.StartOutboundEmailContactResponse) can be returned by specifying '-Select *'." + )] + public partial class StartCONNOutboundEmailContactCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter RawMessage_Body + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_Body")] + public System.String RawMessage_Body { get; set; } + #endregion + + #region Parameter AdditionalRecipients_CcEmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("AdditionalRecipients_CcEmailAddresses")] + public Amazon.Connect.Model.EmailAddressInfo[] AdditionalRecipients_CcEmailAddress { get; set; } + #endregion + + #region Parameter ContactId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String ContactId { get; set; } + #endregion + + #region Parameter RawMessage_ContentType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_ContentType")] + public System.String RawMessage_ContentType { get; set; } + #endregion + + #region Parameter TemplateAttributes_CustomAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_TemplateAttributes_CustomAttributes")] + public System.Collections.Hashtable TemplateAttributes_CustomAttribute { get; set; } + #endregion + + #region Parameter TemplateAttributes_CustomerProfileAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_TemplateAttributes_CustomerProfileAttributes")] + public System.String TemplateAttributes_CustomerProfileAttribute { get; set; } + #endregion + + #region Parameter DestinationEmailAddress_DisplayName + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String DestinationEmailAddress_DisplayName { get; set; } + #endregion + + #region Parameter FromEmailAddress_DisplayName + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String FromEmailAddress_DisplayName { get; set; } + #endregion + + #region Parameter DestinationEmailAddress_EmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String DestinationEmailAddress_EmailAddress { get; set; } + #endregion + + #region Parameter FromEmailAddress_EmailAddress + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String FromEmailAddress_EmailAddress { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter TemplatedMessageConfig_KnowledgeBaseId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_KnowledgeBaseId")] + public System.String TemplatedMessageConfig_KnowledgeBaseId { get; set; } + #endregion + + #region Parameter EmailMessage_MessageSourceType + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.Connect.OutboundMessageSourceType")] + public Amazon.Connect.OutboundMessageSourceType EmailMessage_MessageSourceType { get; set; } + #endregion + + #region Parameter TemplatedMessageConfig_MessageTemplateId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_TemplatedMessageConfig_MessageTemplateId")] + public System.String TemplatedMessageConfig_MessageTemplateId { get; set; } + #endregion + + #region Parameter RawMessage_Subject + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("EmailMessage_RawMessage_Subject")] + public System.String RawMessage_Subject { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'ContactId'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.StartOutboundEmailContactResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.StartOutboundEmailContactResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "ContactId"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Start-CONNOutboundEmailContact (StartOutboundEmailContact)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (this.AdditionalRecipients_CcEmailAddress != null) + { + context.AdditionalRecipients_CcEmailAddress = new List(this.AdditionalRecipients_CcEmailAddress); + } + context.ClientToken = this.ClientToken; + context.ContactId = this.ContactId; + #if MODULAR + if (this.ContactId == null && ParameterWasBound(nameof(this.ContactId))) + { + WriteWarning("You are passing $null as a value for parameter ContactId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.DestinationEmailAddress_DisplayName = this.DestinationEmailAddress_DisplayName; + context.DestinationEmailAddress_EmailAddress = this.DestinationEmailAddress_EmailAddress; + #if MODULAR + if (this.DestinationEmailAddress_EmailAddress == null && ParameterWasBound(nameof(this.DestinationEmailAddress_EmailAddress))) + { + WriteWarning("You are passing $null as a value for parameter DestinationEmailAddress_EmailAddress which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.EmailMessage_MessageSourceType = this.EmailMessage_MessageSourceType; + #if MODULAR + if (this.EmailMessage_MessageSourceType == null && ParameterWasBound(nameof(this.EmailMessage_MessageSourceType))) + { + WriteWarning("You are passing $null as a value for parameter EmailMessage_MessageSourceType which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.RawMessage_Body = this.RawMessage_Body; + context.RawMessage_ContentType = this.RawMessage_ContentType; + context.RawMessage_Subject = this.RawMessage_Subject; + context.TemplatedMessageConfig_KnowledgeBaseId = this.TemplatedMessageConfig_KnowledgeBaseId; + context.TemplatedMessageConfig_MessageTemplateId = this.TemplatedMessageConfig_MessageTemplateId; + if (this.TemplateAttributes_CustomAttribute != null) + { + context.TemplateAttributes_CustomAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.TemplateAttributes_CustomAttribute.Keys) + { + context.TemplateAttributes_CustomAttribute.Add((String)hashKey, (System.String)(this.TemplateAttributes_CustomAttribute[hashKey])); + } + } + context.TemplateAttributes_CustomerProfileAttribute = this.TemplateAttributes_CustomerProfileAttribute; + context.FromEmailAddress_DisplayName = this.FromEmailAddress_DisplayName; + context.FromEmailAddress_EmailAddress = this.FromEmailAddress_EmailAddress; + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.StartOutboundEmailContactRequest(); + + + // populate AdditionalRecipients + var requestAdditionalRecipientsIsNull = true; + request.AdditionalRecipients = new Amazon.Connect.Model.OutboundAdditionalRecipients(); + List requestAdditionalRecipients_additionalRecipients_CcEmailAddress = null; + if (cmdletContext.AdditionalRecipients_CcEmailAddress != null) + { + requestAdditionalRecipients_additionalRecipients_CcEmailAddress = cmdletContext.AdditionalRecipients_CcEmailAddress; + } + if (requestAdditionalRecipients_additionalRecipients_CcEmailAddress != null) + { + request.AdditionalRecipients.CcEmailAddresses = requestAdditionalRecipients_additionalRecipients_CcEmailAddress; + requestAdditionalRecipientsIsNull = false; + } + // determine if request.AdditionalRecipients should be set to null + if (requestAdditionalRecipientsIsNull) + { + request.AdditionalRecipients = null; + } + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.ContactId != null) + { + request.ContactId = cmdletContext.ContactId; + } + + // populate DestinationEmailAddress + var requestDestinationEmailAddressIsNull = true; + request.DestinationEmailAddress = new Amazon.Connect.Model.EmailAddressInfo(); + System.String requestDestinationEmailAddress_destinationEmailAddress_DisplayName = null; + if (cmdletContext.DestinationEmailAddress_DisplayName != null) + { + requestDestinationEmailAddress_destinationEmailAddress_DisplayName = cmdletContext.DestinationEmailAddress_DisplayName; + } + if (requestDestinationEmailAddress_destinationEmailAddress_DisplayName != null) + { + request.DestinationEmailAddress.DisplayName = requestDestinationEmailAddress_destinationEmailAddress_DisplayName; + requestDestinationEmailAddressIsNull = false; + } + System.String requestDestinationEmailAddress_destinationEmailAddress_EmailAddress = null; + if (cmdletContext.DestinationEmailAddress_EmailAddress != null) + { + requestDestinationEmailAddress_destinationEmailAddress_EmailAddress = cmdletContext.DestinationEmailAddress_EmailAddress; + } + if (requestDestinationEmailAddress_destinationEmailAddress_EmailAddress != null) + { + request.DestinationEmailAddress.EmailAddress = requestDestinationEmailAddress_destinationEmailAddress_EmailAddress; + requestDestinationEmailAddressIsNull = false; + } + // determine if request.DestinationEmailAddress should be set to null + if (requestDestinationEmailAddressIsNull) + { + request.DestinationEmailAddress = null; + } + + // populate EmailMessage + var requestEmailMessageIsNull = true; + request.EmailMessage = new Amazon.Connect.Model.OutboundEmailContent(); + Amazon.Connect.OutboundMessageSourceType requestEmailMessage_emailMessage_MessageSourceType = null; + if (cmdletContext.EmailMessage_MessageSourceType != null) + { + requestEmailMessage_emailMessage_MessageSourceType = cmdletContext.EmailMessage_MessageSourceType; + } + if (requestEmailMessage_emailMessage_MessageSourceType != null) + { + request.EmailMessage.MessageSourceType = requestEmailMessage_emailMessage_MessageSourceType; + requestEmailMessageIsNull = false; + } + Amazon.Connect.Model.OutboundRawMessage requestEmailMessage_emailMessage_RawMessage = null; + + // populate RawMessage + var requestEmailMessage_emailMessage_RawMessageIsNull = true; + requestEmailMessage_emailMessage_RawMessage = new Amazon.Connect.Model.OutboundRawMessage(); + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_Body = null; + if (cmdletContext.RawMessage_Body != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_Body = cmdletContext.RawMessage_Body; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_Body != null) + { + requestEmailMessage_emailMessage_RawMessage.Body = requestEmailMessage_emailMessage_RawMessage_rawMessage_Body; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType = null; + if (cmdletContext.RawMessage_ContentType != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType = cmdletContext.RawMessage_ContentType; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType != null) + { + requestEmailMessage_emailMessage_RawMessage.ContentType = requestEmailMessage_emailMessage_RawMessage_rawMessage_ContentType; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + System.String requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject = null; + if (cmdletContext.RawMessage_Subject != null) + { + requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject = cmdletContext.RawMessage_Subject; + } + if (requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject != null) + { + requestEmailMessage_emailMessage_RawMessage.Subject = requestEmailMessage_emailMessage_RawMessage_rawMessage_Subject; + requestEmailMessage_emailMessage_RawMessageIsNull = false; + } + // determine if requestEmailMessage_emailMessage_RawMessage should be set to null + if (requestEmailMessage_emailMessage_RawMessageIsNull) + { + requestEmailMessage_emailMessage_RawMessage = null; + } + if (requestEmailMessage_emailMessage_RawMessage != null) + { + request.EmailMessage.RawMessage = requestEmailMessage_emailMessage_RawMessage; + requestEmailMessageIsNull = false; + } + Amazon.Connect.Model.TemplatedMessageConfig requestEmailMessage_emailMessage_TemplatedMessageConfig = null; + + // populate TemplatedMessageConfig + var requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = true; + requestEmailMessage_emailMessage_TemplatedMessageConfig = new Amazon.Connect.Model.TemplatedMessageConfig(); + System.String requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId = null; + if (cmdletContext.TemplatedMessageConfig_KnowledgeBaseId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId = cmdletContext.TemplatedMessageConfig_KnowledgeBaseId; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig.KnowledgeBaseId = requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_KnowledgeBaseId; + requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = false; + } + System.String requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId = null; + if (cmdletContext.TemplatedMessageConfig_MessageTemplateId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId = cmdletContext.TemplatedMessageConfig_MessageTemplateId; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig.MessageTemplateId = requestEmailMessage_emailMessage_TemplatedMessageConfig_templatedMessageConfig_MessageTemplateId; + requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = false; + } + Amazon.Connect.Model.TemplateAttributes requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes = null; + + // populate TemplateAttributes + var requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull = true; + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes = new Amazon.Connect.Model.TemplateAttributes(); + Dictionary requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute = null; + if (cmdletContext.TemplateAttributes_CustomAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute = cmdletContext.TemplateAttributes_CustomAttribute; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes.CustomAttributes = requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomAttribute; + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull = false; + } + System.String requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute = null; + if (cmdletContext.TemplateAttributes_CustomerProfileAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute = cmdletContext.TemplateAttributes_CustomerProfileAttribute; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes.CustomerProfileAttributes = requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes_templateAttributes_CustomerProfileAttribute; + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull = false; + } + // determine if requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes should be set to null + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributesIsNull) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes = null; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes != null) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig.TemplateAttributes = requestEmailMessage_emailMessage_TemplatedMessageConfig_emailMessage_TemplatedMessageConfig_TemplateAttributes; + requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull = false; + } + // determine if requestEmailMessage_emailMessage_TemplatedMessageConfig should be set to null + if (requestEmailMessage_emailMessage_TemplatedMessageConfigIsNull) + { + requestEmailMessage_emailMessage_TemplatedMessageConfig = null; + } + if (requestEmailMessage_emailMessage_TemplatedMessageConfig != null) + { + request.EmailMessage.TemplatedMessageConfig = requestEmailMessage_emailMessage_TemplatedMessageConfig; + requestEmailMessageIsNull = false; + } + // determine if request.EmailMessage should be set to null + if (requestEmailMessageIsNull) + { + request.EmailMessage = null; + } + + // populate FromEmailAddress + var requestFromEmailAddressIsNull = true; + request.FromEmailAddress = new Amazon.Connect.Model.EmailAddressInfo(); + System.String requestFromEmailAddress_fromEmailAddress_DisplayName = null; + if (cmdletContext.FromEmailAddress_DisplayName != null) + { + requestFromEmailAddress_fromEmailAddress_DisplayName = cmdletContext.FromEmailAddress_DisplayName; + } + if (requestFromEmailAddress_fromEmailAddress_DisplayName != null) + { + request.FromEmailAddress.DisplayName = requestFromEmailAddress_fromEmailAddress_DisplayName; + requestFromEmailAddressIsNull = false; + } + System.String requestFromEmailAddress_fromEmailAddress_EmailAddress = null; + if (cmdletContext.FromEmailAddress_EmailAddress != null) + { + requestFromEmailAddress_fromEmailAddress_EmailAddress = cmdletContext.FromEmailAddress_EmailAddress; + } + if (requestFromEmailAddress_fromEmailAddress_EmailAddress != null) + { + request.FromEmailAddress.EmailAddress = requestFromEmailAddress_fromEmailAddress_EmailAddress; + requestFromEmailAddressIsNull = false; + } + // determine if request.FromEmailAddress should be set to null + if (requestFromEmailAddressIsNull) + { + request.FromEmailAddress = null; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.StartOutboundEmailContactResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.StartOutboundEmailContactRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "StartOutboundEmailContact"); + try + { + #if DESKTOP + return client.StartOutboundEmailContact(request); + #elif CORECLR + return client.StartOutboundEmailContactAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public List AdditionalRecipients_CcEmailAddress { get; set; } + public System.String ClientToken { get; set; } + public System.String ContactId { get; set; } + public System.String DestinationEmailAddress_DisplayName { get; set; } + public System.String DestinationEmailAddress_EmailAddress { get; set; } + public Amazon.Connect.OutboundMessageSourceType EmailMessage_MessageSourceType { get; set; } + public System.String RawMessage_Body { get; set; } + public System.String RawMessage_ContentType { get; set; } + public System.String RawMessage_Subject { get; set; } + public System.String TemplatedMessageConfig_KnowledgeBaseId { get; set; } + public System.String TemplatedMessageConfig_MessageTemplateId { get; set; } + public Dictionary TemplateAttributes_CustomAttribute { get; set; } + public System.String TemplateAttributes_CustomerProfileAttribute { get; set; } + public System.String FromEmailAddress_DisplayName { get; set; } + public System.String FromEmailAddress_EmailAddress { get; set; } + public System.String InstanceId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.ContactId; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNTaskContact-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNTaskContact-Cmdlet.cs index 84aabe42f..aa1261744 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNTaskContact-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Start-CONNTaskContact-Cmdlet.cs @@ -218,6 +218,17 @@ public partial class StartCONNTaskContactCmdlet : AmazonConnectClientCmdlet, IEx public System.DateTime? ScheduledTime { get; set; } #endregion + #region Parameter SegmentAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SegmentAttributes")] + public System.Collections.Hashtable SegmentAttribute { get; set; } + #endregion + #region Parameter TaskTemplateId /// /// @@ -342,6 +353,14 @@ protected override void ProcessRecord() } context.RelatedContactId = this.RelatedContactId; context.ScheduledTime = this.ScheduledTime; + if (this.SegmentAttribute != null) + { + context.SegmentAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.SegmentAttribute.Keys) + { + context.SegmentAttribute.Add((String)hashKey, (Amazon.Connect.Model.SegmentAttributeValue)(this.SegmentAttribute[hashKey])); + } + } context.TaskTemplateId = this.TaskTemplateId; // allow further manipulation of loaded context prior to processing @@ -403,6 +422,10 @@ public object Execute(ExecutorContext context) { request.ScheduledTime = cmdletContext.ScheduledTime.Value; } + if (cmdletContext.SegmentAttribute != null) + { + request.SegmentAttributes = cmdletContext.SegmentAttribute; + } if (cmdletContext.TaskTemplateId != null) { request.TaskTemplateId = cmdletContext.TaskTemplateId; @@ -479,6 +502,7 @@ internal partial class CmdletContext : ExecutorContext public Dictionary Reference { get; set; } public System.String RelatedContactId { get; set; } public System.DateTime? ScheduledTime { get; set; } + public Dictionary SegmentAttribute { get; set; } public System.String TaskTemplateId { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response.ContactId; diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNContact-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNContact-Cmdlet.cs index d95bd55da..b6d45d4ef 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNContact-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNContact-Cmdlet.cs @@ -120,6 +120,17 @@ public partial class UpdateCONNContactCmdlet : AmazonConnectClientCmdlet, IExecu public System.Collections.Hashtable Reference { get; set; } #endregion + #region Parameter SegmentAttribute + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("SegmentAttributes")] + public System.Collections.Hashtable SegmentAttribute { get; set; } + #endregion + #region Parameter Select /// /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. @@ -205,6 +216,14 @@ protected override void ProcessRecord() context.Reference.Add((String)hashKey, (Amazon.Connect.Model.Reference)(this.Reference[hashKey])); } } + if (this.SegmentAttribute != null) + { + context.SegmentAttribute = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.SegmentAttribute.Keys) + { + context.SegmentAttribute.Add((String)hashKey, (Amazon.Connect.Model.SegmentAttributeValue)(this.SegmentAttribute[hashKey])); + } + } // allow further manipulation of loaded context prior to processing PostExecutionContextLoad(context); @@ -241,6 +260,10 @@ public object Execute(ExecutorContext context) { request.References = cmdletContext.Reference; } + if (cmdletContext.SegmentAttribute != null) + { + request.SegmentAttributes = cmdletContext.SegmentAttribute; + } CmdletOutput output; @@ -307,6 +330,7 @@ internal partial class CmdletContext : ExecutorContext public System.String InstanceId { get; set; } public System.String Name { get; set; } public Dictionary Reference { get; set; } + public Dictionary SegmentAttribute { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => null; } diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNEmailAddressMetadata-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNEmailAddressMetadata-Cmdlet.cs new file mode 100644 index 000000000..e7a1ee3f3 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNEmailAddressMetadata-Cmdlet.cs @@ -0,0 +1,296 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("Update", "CONNEmailAddressMetadata", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.Connect.Model.UpdateEmailAddressMetadataResponse")] + [AWSCmdlet("Calls the Amazon Connect Service UpdateEmailAddressMetadata API operation.", Operation = new[] {"UpdateEmailAddressMetadata"}, SelectReturnType = typeof(Amazon.Connect.Model.UpdateEmailAddressMetadataResponse))] + [AWSCmdletOutput("Amazon.Connect.Model.UpdateEmailAddressMetadataResponse", + "This cmdlet returns an Amazon.Connect.Model.UpdateEmailAddressMetadataResponse object containing multiple properties." + )] + public partial class UpdateCONNEmailAddressMetadataCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsSensitiveRequest { get; set; } = true; + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Description + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Description { get; set; } + #endregion + + #region Parameter DisplayName + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String DisplayName { get; set; } + #endregion + + #region Parameter EmailAddressId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String EmailAddressId { get; set; } + #endregion + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.UpdateEmailAddressMetadataResponse). + /// Specifying the name of a property of type Amazon.Connect.Model.UpdateEmailAddressMetadataResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-CONNEmailAddressMetadata (UpdateEmailAddressMetadata)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ClientToken = this.ClientToken; + context.Description = this.Description; + context.DisplayName = this.DisplayName; + context.EmailAddressId = this.EmailAddressId; + #if MODULAR + if (this.EmailAddressId == null && ParameterWasBound(nameof(this.EmailAddressId))) + { + WriteWarning("You are passing $null as a value for parameter EmailAddressId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.UpdateEmailAddressMetadataRequest(); + + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Description != null) + { + request.Description = cmdletContext.Description; + } + if (cmdletContext.DisplayName != null) + { + request.DisplayName = cmdletContext.DisplayName; + } + if (cmdletContext.EmailAddressId != null) + { + request.EmailAddressId = cmdletContext.EmailAddressId; + } + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.UpdateEmailAddressMetadataResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.UpdateEmailAddressMetadataRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "UpdateEmailAddressMetadata"); + try + { + #if DESKTOP + return client.UpdateEmailAddressMetadata(request); + #elif CORECLR + return client.UpdateEmailAddressMetadataAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ClientToken { get; set; } + public System.String Description { get; set; } + public System.String DisplayName { get; set; } + public System.String EmailAddressId { get; set; } + public System.String InstanceId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNQueueOutboundEmailConfig-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNQueueOutboundEmailConfig-Cmdlet.cs new file mode 100644 index 000000000..a0e10734d --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNQueueOutboundEmailConfig-Cmdlet.cs @@ -0,0 +1,277 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Connect; +using Amazon.Connect.Model; + +namespace Amazon.PowerShell.Cmdlets.CONN +{ + /// + + /// + [Cmdlet("Update", "CONNQueueOutboundEmailConfig", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("None")] + [AWSCmdlet("Calls the Amazon Connect Service UpdateQueueOutboundEmailConfig API operation.", Operation = new[] {"UpdateQueueOutboundEmailConfig"}, SelectReturnType = typeof(Amazon.Connect.Model.UpdateQueueOutboundEmailConfigResponse))] + [AWSCmdletOutput("None or Amazon.Connect.Model.UpdateQueueOutboundEmailConfigResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.Connect.Model.UpdateQueueOutboundEmailConfigResponse) be returned by specifying '-Select *'." + )] + public partial class UpdateCONNQueueOutboundEmailConfigCmdlet : AmazonConnectClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter InstanceId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String InstanceId { get; set; } + #endregion + + #region Parameter OutboundEmailConfig_OutboundEmailAddressId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String OutboundEmailConfig_OutboundEmailAddressId { get; set; } + #endregion + + #region Parameter QueueId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String QueueId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Connect.Model.UpdateQueueOutboundEmailConfigResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the InstanceId parameter. + /// The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^InstanceId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.InstanceId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-CONNQueueOutboundEmailConfig (UpdateQueueOutboundEmailConfig)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.InstanceId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.InstanceId = this.InstanceId; + #if MODULAR + if (this.InstanceId == null && ParameterWasBound(nameof(this.InstanceId))) + { + WriteWarning("You are passing $null as a value for parameter InstanceId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.OutboundEmailConfig_OutboundEmailAddressId = this.OutboundEmailConfig_OutboundEmailAddressId; + context.QueueId = this.QueueId; + #if MODULAR + if (this.QueueId == null && ParameterWasBound(nameof(this.QueueId))) + { + WriteWarning("You are passing $null as a value for parameter QueueId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Connect.Model.UpdateQueueOutboundEmailConfigRequest(); + + if (cmdletContext.InstanceId != null) + { + request.InstanceId = cmdletContext.InstanceId; + } + + // populate OutboundEmailConfig + var requestOutboundEmailConfigIsNull = true; + request.OutboundEmailConfig = new Amazon.Connect.Model.OutboundEmailConfig(); + System.String requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId = null; + if (cmdletContext.OutboundEmailConfig_OutboundEmailAddressId != null) + { + requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId = cmdletContext.OutboundEmailConfig_OutboundEmailAddressId; + } + if (requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId != null) + { + request.OutboundEmailConfig.OutboundEmailAddressId = requestOutboundEmailConfig_outboundEmailConfig_OutboundEmailAddressId; + requestOutboundEmailConfigIsNull = false; + } + // determine if request.OutboundEmailConfig should be set to null + if (requestOutboundEmailConfigIsNull) + { + request.OutboundEmailConfig = null; + } + if (cmdletContext.QueueId != null) + { + request.QueueId = cmdletContext.QueueId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Connect.Model.UpdateQueueOutboundEmailConfigResponse CallAWSServiceOperation(IAmazonConnect client, Amazon.Connect.Model.UpdateQueueOutboundEmailConfigRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Connect Service", "UpdateQueueOutboundEmailConfig"); + try + { + #if DESKTOP + return client.UpdateQueueOutboundEmailConfig(request); + #elif CORECLR + return client.UpdateQueueOutboundEmailConfigAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String InstanceId { get; set; } + public System.String OutboundEmailConfig_OutboundEmailAddressId { get; set; } + public System.String QueueId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNTaskTemplate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNTaskTemplate-Cmdlet.cs index 8d0bc6549..c8f395064 100644 --- a/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNTaskTemplate-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Connect/Basic/Update-CONNTaskTemplate-Cmdlet.cs @@ -147,6 +147,16 @@ public partial class UpdateCONNTaskTemplateCmdlet : AmazonConnectClientCmdlet, I public Amazon.Connect.Model.RequiredFieldInfo[] Constraints_RequiredField { get; set; } #endregion + #region Parameter SelfAssignFlowId + /// + /// + /// The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String SelfAssignFlowId { get; set; } + #endregion + #region Parameter Status /// /// @@ -269,6 +279,7 @@ protected override void ProcessRecord() } #endif context.Name = this.Name; + context.SelfAssignFlowId = this.SelfAssignFlowId; context.Status = this.Status; context.TaskTemplateId = this.TaskTemplateId; #if MODULAR @@ -371,6 +382,10 @@ public object Execute(ExecutorContext context) { request.Name = cmdletContext.Name; } + if (cmdletContext.SelfAssignFlowId != null) + { + request.SelfAssignFlowId = cmdletContext.SelfAssignFlowId; + } if (cmdletContext.Status != null) { request.Status = cmdletContext.Status; @@ -449,6 +464,7 @@ internal partial class CmdletContext : ExecutorContext public List Field { get; set; } public System.String InstanceId { get; set; } public System.String Name { get; set; } + public System.String SelfAssignFlowId { get; set; } public Amazon.Connect.TaskTemplateStatus Status { get; set; } public System.String TaskTemplateId { get; set; } public System.Func Select { get; set; } = diff --git a/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Get-CECommitmentPurchaseAnalysisList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Get-CECommitmentPurchaseAnalysisList-Cmdlet.cs index d0c570632..45d2a19a4 100644 --- a/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Get-CECommitmentPurchaseAnalysisList-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Get-CECommitmentPurchaseAnalysisList-Cmdlet.cs @@ -28,7 +28,7 @@ namespace Amazon.PowerShell.Cmdlets.CE { /// - /// Lists the commitment purchase analyses for your account based on the last 30 days.

                      This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration. + /// Lists the commitment purchase analyses for your account.

                      This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration. ///
                      [Cmdlet("Get", "CECommitmentPurchaseAnalysisList")] [OutputType("Amazon.CostExplorer.Model.AnalysisSummary")] diff --git a/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Start-CECommitmentPurchaseAnalysis-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Start-CECommitmentPurchaseAnalysis-Cmdlet.cs index 29698d379..430abca03 100644 --- a/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Start-CECommitmentPurchaseAnalysis-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/CostExplorer/Basic/Start-CECommitmentPurchaseAnalysis-Cmdlet.cs @@ -30,8 +30,7 @@ namespace Amazon.PowerShell.Cmdlets.CE /// /// Specifies the parameters of a planned commitment purchase and starts the generation /// of the analysis. This enables you to estimate the cost, coverage, and utilization - /// impact of your planned commitment purchases. You can request up to 20 analysis runs - /// per day. + /// impact of your planned commitment purchases. /// [Cmdlet("Start", "CECommitmentPurchaseAnalysis", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] [OutputType("Amazon.CostExplorer.Model.StartCommitmentPurchaseAnalysisResponse")] diff --git a/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/AWS.Tools.ElasticLoadBalancingV2.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/AWS.Tools.ElasticLoadBalancingV2.Completers.psm1 index a7efe0364..efa68cb6f 100644 --- a/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/AWS.Tools.ElasticLoadBalancingV2.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/AWS.Tools.ElasticLoadBalancingV2.Completers.psm1 @@ -80,6 +80,16 @@ $ELB2_Completers = { switch ($("$commandName/$parameterName")) { + # Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum + { + ($_ -eq "Edit-ELB2Listener/MutualAuthentication_AdvertiseTrustStoreCaName") -Or + ($_ -eq "New-ELB2Listener/MutualAuthentication_AdvertiseTrustStoreCaName") + } + { + $v = "off","on" + break + } + # Amazon.ElasticLoadBalancingV2.EnablePrefixForIpv6SourceNatEnum { ($_ -eq "New-ELB2LoadBalancer/EnablePrefixForIpv6SourceNat") -Or @@ -176,6 +186,7 @@ $ELB2_map = @{ "HealthCheckProtocol"=@("Edit-ELB2TargetGroup","New-ELB2TargetGroup") "IpAddressType"=@("New-ELB2LoadBalancer","New-ELB2TargetGroup","Set-ELB2IpAddressType","Set-ELB2Subnet") "LoadBalancerType"=@("Get-ELB2SSLPolicy") + "MutualAuthentication_AdvertiseTrustStoreCaName"=@("Edit-ELB2Listener","New-ELB2Listener") "MutualAuthentication_TrustStoreAssociationStatus"=@("Edit-ELB2Listener","New-ELB2Listener") "Protocol"=@("Edit-ELB2Listener","New-ELB2Listener","New-ELB2TargetGroup") "Scheme"=@("New-ELB2LoadBalancer") diff --git a/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/Edit-ELB2Listener-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/Edit-ELB2Listener-Cmdlet.cs index 34e9c4171..db94600cc 100644 --- a/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/Edit-ELB2Listener-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/Edit-ELB2Listener-Cmdlet.cs @@ -55,6 +55,18 @@ public partial class EditELB2ListenerCmdlet : AmazonElasticLoadBalancingV2Client protected override bool IsGeneratedCmdlet { get; set; } = true; + #region Parameter MutualAuthentication_AdvertiseTrustStoreCaName + /// + /// + /// Indicates whether trust store CA certificate names are advertised. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MutualAuthentication_AdvertiseTrustStoreCaNames")] + [AWSConstantClassSource("Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum")] + public Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum MutualAuthentication_AdvertiseTrustStoreCaName { get; set; } + #endregion + #region Parameter AlpnPolicy /// /// @@ -269,6 +281,7 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter ListenerArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + context.MutualAuthentication_AdvertiseTrustStoreCaName = this.MutualAuthentication_AdvertiseTrustStoreCaName; context.MutualAuthentication_IgnoreClientCertificateExpiry = this.MutualAuthentication_IgnoreClientCertificateExpiry; context.MutualAuthentication_Mode = this.MutualAuthentication_Mode; context.MutualAuthentication_TrustStoreArn = this.MutualAuthentication_TrustStoreArn; @@ -312,6 +325,16 @@ public object Execute(ExecutorContext context) // populate MutualAuthentication var requestMutualAuthenticationIsNull = true; request.MutualAuthentication = new Amazon.ElasticLoadBalancingV2.Model.MutualAuthenticationAttributes(); + Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName = null; + if (cmdletContext.MutualAuthentication_AdvertiseTrustStoreCaName != null) + { + requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName = cmdletContext.MutualAuthentication_AdvertiseTrustStoreCaName; + } + if (requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName != null) + { + request.MutualAuthentication.AdvertiseTrustStoreCaNames = requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName; + requestMutualAuthenticationIsNull = false; + } System.Boolean? requestMutualAuthentication_mutualAuthentication_IgnoreClientCertificateExpiry = null; if (cmdletContext.MutualAuthentication_IgnoreClientCertificateExpiry != null) { @@ -434,6 +457,7 @@ internal partial class CmdletContext : ExecutorContext public List Certificate { get; set; } public List DefaultAction { get; set; } public System.String ListenerArn { get; set; } + public Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum MutualAuthentication_AdvertiseTrustStoreCaName { get; set; } public System.Boolean? MutualAuthentication_IgnoreClientCertificateExpiry { get; set; } public System.String MutualAuthentication_Mode { get; set; } public System.String MutualAuthentication_TrustStoreArn { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/New-ELB2Listener-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/New-ELB2Listener-Cmdlet.cs index 4a1576c5e..1d0e03e3d 100644 --- a/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/New-ELB2Listener-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/ElasticLoadBalancingV2/Basic/New-ELB2Listener-Cmdlet.cs @@ -54,6 +54,18 @@ public partial class NewELB2ListenerCmdlet : AmazonElasticLoadBalancingV2ClientC protected override bool IsGeneratedCmdlet { get; set; } = true; + #region Parameter MutualAuthentication_AdvertiseTrustStoreCaName + /// + /// + /// Indicates whether trust store CA certificate names are advertised. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MutualAuthentication_AdvertiseTrustStoreCaNames")] + [AWSConstantClassSource("Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum")] + public Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum MutualAuthentication_AdvertiseTrustStoreCaName { get; set; } + #endregion + #region Parameter AlpnPolicy /// /// @@ -293,6 +305,7 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter LoadBalancerArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + context.MutualAuthentication_AdvertiseTrustStoreCaName = this.MutualAuthentication_AdvertiseTrustStoreCaName; context.MutualAuthentication_IgnoreClientCertificateExpiry = this.MutualAuthentication_IgnoreClientCertificateExpiry; context.MutualAuthentication_Mode = this.MutualAuthentication_Mode; context.MutualAuthentication_TrustStoreArn = this.MutualAuthentication_TrustStoreArn; @@ -340,6 +353,16 @@ public object Execute(ExecutorContext context) // populate MutualAuthentication var requestMutualAuthenticationIsNull = true; request.MutualAuthentication = new Amazon.ElasticLoadBalancingV2.Model.MutualAuthenticationAttributes(); + Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName = null; + if (cmdletContext.MutualAuthentication_AdvertiseTrustStoreCaName != null) + { + requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName = cmdletContext.MutualAuthentication_AdvertiseTrustStoreCaName; + } + if (requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName != null) + { + request.MutualAuthentication.AdvertiseTrustStoreCaNames = requestMutualAuthentication_mutualAuthentication_AdvertiseTrustStoreCaName; + requestMutualAuthenticationIsNull = false; + } System.Boolean? requestMutualAuthentication_mutualAuthentication_IgnoreClientCertificateExpiry = null; if (cmdletContext.MutualAuthentication_IgnoreClientCertificateExpiry != null) { @@ -466,6 +489,7 @@ internal partial class CmdletContext : ExecutorContext public List Certificate { get; set; } public List DefaultAction { get; set; } public System.String LoadBalancerArn { get; set; } + public Amazon.ElasticLoadBalancingV2.AdvertiseTrustStoreCaNamesEnum MutualAuthentication_AdvertiseTrustStoreCaName { get; set; } public System.Boolean? MutualAuthentication_IgnoreClientCertificateExpiry { get; set; } public System.String MutualAuthentication_Mode { get; set; } public System.String MutualAuthentication_TrustStoreArn { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/AWS.Tools.ElasticMapReduce.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/AWS.Tools.ElasticMapReduce.Completers.psm1 index 9c2362664..86ef4b453 100644 --- a/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/AWS.Tools.ElasticMapReduce.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/AWS.Tools.ElasticMapReduce.Completers.psm1 @@ -195,6 +195,16 @@ $EMR_Completers = { break } + # Amazon.ElasticMapReduce.ScalingStrategy + { + ($_ -eq "Start-EMRJobFlow/ManagedScalingPolicy_ScalingStrategy") -Or + ($_ -eq "Write-EMRManagedScalingPolicy/ManagedScalingPolicy_ScalingStrategy") + } + { + $v = "ADVANCED","DEFAULT" + break + } + # Amazon.ElasticMapReduce.SpotProvisioningAllocationStrategy { ($_ -eq "Add-EMRInstanceFleet/SpotResizeSpecification_AllocationStrategy") -Or @@ -240,6 +250,7 @@ $EMR_map = @{ "InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_CapacityReservationPreference"=@("Add-EMRInstanceFleet") "InstanceFleet_ResizeSpecifications_OnDemandResizeSpecification_CapacityReservationOptions_UsageStrategy"=@("Add-EMRInstanceFleet") "InstanceFleetType"=@("Get-EMRInstanceList") + "ManagedScalingPolicy_ScalingStrategy"=@("Start-EMRJobFlow","Write-EMRManagedScalingPolicy") "OnDemandResizeSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet","Edit-EMRInstanceFleet") "OnDemandSpecification_AllocationStrategy"=@("Add-EMRInstanceFleet") "OutputNotebookFormat"=@("Start-EMRNotebookExecution") diff --git a/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Start-EMRJobFlow-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Start-EMRJobFlow-Cmdlet.cs index 46e9d267b..c0a3ef7df 100644 --- a/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Start-EMRJobFlow-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Start-EMRJobFlow-Cmdlet.cs @@ -634,6 +634,18 @@ public partial class StartEMRJobFlowCmdlet : AmazonElasticMapReduceClientCmdlet, public Amazon.ElasticMapReduce.ScaleDownBehavior ScaleDownBehavior { get; set; } #endregion + #region Parameter ManagedScalingPolicy_ScalingStrategy + /// + /// + /// Determines whether a custom scaling utilization performance index can be set. Possible + /// values include ADVANCED or DEFAULT. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.ElasticMapReduce.ScalingStrategy")] + public Amazon.ElasticMapReduce.ScalingStrategy ManagedScalingPolicy_ScalingStrategy { get; set; } + #endregion + #region Parameter SecurityConfiguration /// /// @@ -757,6 +769,19 @@ public partial class StartEMRJobFlowCmdlet : AmazonElasticMapReduceClientCmdlet, public Amazon.ElasticMapReduce.ComputeLimitsUnitType ComputeLimits_UnitType { get; set; } #endregion + #region Parameter ManagedScalingPolicy_UtilizationPerformanceIndex + /// + /// + /// An integer value that represents an advanced scaling strategy. Setting a higher value + /// optimizes for performance. Setting a lower value optimizes for resource conservation. + /// Setting the value to 50 balances performance and resource conservation. Possible values + /// are 1, 25, 50, 75, and 100. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Int32? ManagedScalingPolicy_UtilizationPerformanceIndex { get; set; } + #endregion + #region Parameter VisibleToAllUser /// /// @@ -910,6 +935,8 @@ protected override void ProcessRecord() context.ComputeLimits_MaximumOnDemandCapacityUnit = this.ComputeLimits_MaximumOnDemandCapacityUnit; context.ComputeLimits_MinimumCapacityUnit = this.ComputeLimits_MinimumCapacityUnit; context.ComputeLimits_UnitType = this.ComputeLimits_UnitType; + context.ManagedScalingPolicy_ScalingStrategy = this.ManagedScalingPolicy_ScalingStrategy; + context.ManagedScalingPolicy_UtilizationPerformanceIndex = this.ManagedScalingPolicy_UtilizationPerformanceIndex; context.Name = this.Name; #if MODULAR if (this.Name == null && ParameterWasBound(nameof(this.Name))) @@ -1309,6 +1336,26 @@ public object Execute(ExecutorContext context) // populate ManagedScalingPolicy var requestManagedScalingPolicyIsNull = true; request.ManagedScalingPolicy = new Amazon.ElasticMapReduce.Model.ManagedScalingPolicy(); + Amazon.ElasticMapReduce.ScalingStrategy requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy = null; + if (cmdletContext.ManagedScalingPolicy_ScalingStrategy != null) + { + requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy = cmdletContext.ManagedScalingPolicy_ScalingStrategy; + } + if (requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy != null) + { + request.ManagedScalingPolicy.ScalingStrategy = requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy; + requestManagedScalingPolicyIsNull = false; + } + System.Int32? requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex = null; + if (cmdletContext.ManagedScalingPolicy_UtilizationPerformanceIndex != null) + { + requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex = cmdletContext.ManagedScalingPolicy_UtilizationPerformanceIndex.Value; + } + if (requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex != null) + { + request.ManagedScalingPolicy.UtilizationPerformanceIndex = requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex.Value; + requestManagedScalingPolicyIsNull = false; + } Amazon.ElasticMapReduce.Model.ComputeLimits requestManagedScalingPolicy_managedScalingPolicy_ComputeLimits = null; // populate ComputeLimits @@ -1539,6 +1586,8 @@ internal partial class CmdletContext : ExecutorContext public System.Int32? ComputeLimits_MaximumOnDemandCapacityUnit { get; set; } public System.Int32? ComputeLimits_MinimumCapacityUnit { get; set; } public Amazon.ElasticMapReduce.ComputeLimitsUnitType ComputeLimits_UnitType { get; set; } + public Amazon.ElasticMapReduce.ScalingStrategy ManagedScalingPolicy_ScalingStrategy { get; set; } + public System.Int32? ManagedScalingPolicy_UtilizationPerformanceIndex { get; set; } public System.String Name { get; set; } public List NewSupportedProduct { get; set; } public System.String OSReleaseLabel { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Write-EMRManagedScalingPolicy-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Write-EMRManagedScalingPolicy-Cmdlet.cs index a7cb53dc8..51c3847be 100644 --- a/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Write-EMRManagedScalingPolicy-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/ElasticMapReduce/Basic/Write-EMRManagedScalingPolicy-Cmdlet.cs @@ -119,6 +119,18 @@ public partial class WriteEMRManagedScalingPolicyCmdlet : AmazonElasticMapReduce public System.Int32? ComputeLimits_MinimumCapacityUnit { get; set; } #endregion + #region Parameter ManagedScalingPolicy_ScalingStrategy + /// + /// + /// Determines whether a custom scaling utilization performance index can be set. Possible + /// values include ADVANCED or DEFAULT. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.ElasticMapReduce.ScalingStrategy")] + public Amazon.ElasticMapReduce.ScalingStrategy ManagedScalingPolicy_ScalingStrategy { get; set; } + #endregion + #region Parameter ComputeLimits_UnitType /// /// @@ -131,6 +143,19 @@ public partial class WriteEMRManagedScalingPolicyCmdlet : AmazonElasticMapReduce public Amazon.ElasticMapReduce.ComputeLimitsUnitType ComputeLimits_UnitType { get; set; } #endregion + #region Parameter ManagedScalingPolicy_UtilizationPerformanceIndex + /// + /// + /// An integer value that represents an advanced scaling strategy. Setting a higher value + /// optimizes for performance. Setting a lower value optimizes for resource conservation. + /// Setting the value to 50 balances performance and resource conservation. Possible values + /// are 1, 25, 50, 75, and 100. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Int32? ManagedScalingPolicy_UtilizationPerformanceIndex { get; set; } + #endregion + #region Parameter Select /// /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. @@ -204,6 +229,8 @@ protected override void ProcessRecord() context.ComputeLimits_MaximumOnDemandCapacityUnit = this.ComputeLimits_MaximumOnDemandCapacityUnit; context.ComputeLimits_MinimumCapacityUnit = this.ComputeLimits_MinimumCapacityUnit; context.ComputeLimits_UnitType = this.ComputeLimits_UnitType; + context.ManagedScalingPolicy_ScalingStrategy = this.ManagedScalingPolicy_ScalingStrategy; + context.ManagedScalingPolicy_UtilizationPerformanceIndex = this.ManagedScalingPolicy_UtilizationPerformanceIndex; // allow further manipulation of loaded context prior to processing PostExecutionContextLoad(context); @@ -228,6 +255,26 @@ public object Execute(ExecutorContext context) // populate ManagedScalingPolicy var requestManagedScalingPolicyIsNull = true; request.ManagedScalingPolicy = new Amazon.ElasticMapReduce.Model.ManagedScalingPolicy(); + Amazon.ElasticMapReduce.ScalingStrategy requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy = null; + if (cmdletContext.ManagedScalingPolicy_ScalingStrategy != null) + { + requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy = cmdletContext.ManagedScalingPolicy_ScalingStrategy; + } + if (requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy != null) + { + request.ManagedScalingPolicy.ScalingStrategy = requestManagedScalingPolicy_managedScalingPolicy_ScalingStrategy; + requestManagedScalingPolicyIsNull = false; + } + System.Int32? requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex = null; + if (cmdletContext.ManagedScalingPolicy_UtilizationPerformanceIndex != null) + { + requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex = cmdletContext.ManagedScalingPolicy_UtilizationPerformanceIndex.Value; + } + if (requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex != null) + { + request.ManagedScalingPolicy.UtilizationPerformanceIndex = requestManagedScalingPolicy_managedScalingPolicy_UtilizationPerformanceIndex.Value; + requestManagedScalingPolicyIsNull = false; + } Amazon.ElasticMapReduce.Model.ComputeLimits requestManagedScalingPolicy_managedScalingPolicy_ComputeLimits = null; // populate ComputeLimits @@ -365,6 +412,8 @@ internal partial class CmdletContext : ExecutorContext public System.Int32? ComputeLimits_MaximumOnDemandCapacityUnit { get; set; } public System.Int32? ComputeLimits_MinimumCapacityUnit { get; set; } public Amazon.ElasticMapReduce.ComputeLimitsUnitType ComputeLimits_UnitType { get; set; } + public Amazon.ElasticMapReduce.ScalingStrategy ManagedScalingPolicy_ScalingStrategy { get; set; } + public System.Int32? ManagedScalingPolicy_UtilizationPerformanceIndex { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => null; } diff --git a/modules/AWSPowerShell/Cmdlets/Inspector2/Basic/Register-INS2Member-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Inspector2/Basic/Register-INS2Member-Cmdlet.cs index 30b57f34a..c8927fdc2 100644 --- a/modules/AWSPowerShell/Cmdlets/Inspector2/Basic/Register-INS2Member-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Inspector2/Basic/Register-INS2Member-Cmdlet.cs @@ -29,11 +29,12 @@ namespace Amazon.PowerShell.Cmdlets.INS2 { /// /// Associates an Amazon Web Services account with an Amazon Inspector delegated administrator. - /// An HTTP 200 response indicates the association was successfully started, but doesn’t - /// indicate whether it was completed. You can check if the association completed by using - /// ListMembers + /// An HTTP 200 response indicates the association was started but doesn’t indicate whether + /// it completed. You can check if the association completed using ListMembers /// for multiple accounts or GetMembers - /// for a single account. + /// for a single account. An HTTP 402 response indicates the association failed because + /// the organization size exceeded its limit. For information on limits, see Amazon + /// Inspector quotas. /// [Cmdlet("Register", "INS2Member", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] [OutputType("System.String")] diff --git a/modules/AWSPowerShell/Cmdlets/Lambda/Basic/New-LMEventSourceMapping-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Lambda/Basic/New-LMEventSourceMapping-Cmdlet.cs index 4fc76026b..589af86ba 100644 --- a/modules/AWSPowerShell/Cmdlets/Lambda/Basic/New-LMEventSourceMapping-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Lambda/Basic/New-LMEventSourceMapping-Cmdlet.cs @@ -316,6 +316,17 @@ public partial class NewLMEventSourceMappingCmdlet : AmazonLambdaClientCmdlet, I public System.Int32? ScalingConfig_MaximumConcurrency { get; set; } #endregion + #region Parameter ProvisionedPollerConfig_MaximumPoller + /// + /// + /// The maximum number of event pollers this event source can scale up to. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ProvisionedPollerConfig_MaximumPollers")] + public System.Int32? ProvisionedPollerConfig_MaximumPoller { get; set; } + #endregion + #region Parameter MaximumRecordAgeInSecond /// /// @@ -355,6 +366,17 @@ public partial class NewLMEventSourceMappingCmdlet : AmazonLambdaClientCmdlet, I public System.String[] MetricsConfig_Metric { get; set; } #endregion + #region Parameter ProvisionedPollerConfig_MinimumPoller + /// + /// + /// The minimum number of event pollers this event source can scale down to. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ProvisionedPollerConfig_MinimumPollers")] + public System.Int32? ProvisionedPollerConfig_MinimumPoller { get; set; } + #endregion + #region Parameter ParallelizationFactor /// /// @@ -544,6 +566,8 @@ protected override void ProcessRecord() context.MetricsConfig_Metric = new List(this.MetricsConfig_Metric); } context.ParallelizationFactor = this.ParallelizationFactor; + context.ProvisionedPollerConfig_MaximumPoller = this.ProvisionedPollerConfig_MaximumPoller; + context.ProvisionedPollerConfig_MinimumPoller = this.ProvisionedPollerConfig_MinimumPoller; if (this.Queue != null) { context.Queue = new List(this.Queue); @@ -804,6 +828,35 @@ public object Execute(ExecutorContext context) { request.ParallelizationFactor = cmdletContext.ParallelizationFactor.Value; } + + // populate ProvisionedPollerConfig + var requestProvisionedPollerConfigIsNull = true; + request.ProvisionedPollerConfig = new Amazon.Lambda.Model.ProvisionedPollerConfig(); + System.Int32? requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller = null; + if (cmdletContext.ProvisionedPollerConfig_MaximumPoller != null) + { + requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller = cmdletContext.ProvisionedPollerConfig_MaximumPoller.Value; + } + if (requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller != null) + { + request.ProvisionedPollerConfig.MaximumPollers = requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller.Value; + requestProvisionedPollerConfigIsNull = false; + } + System.Int32? requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller = null; + if (cmdletContext.ProvisionedPollerConfig_MinimumPoller != null) + { + requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller = cmdletContext.ProvisionedPollerConfig_MinimumPoller.Value; + } + if (requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller != null) + { + request.ProvisionedPollerConfig.MinimumPollers = requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller.Value; + requestProvisionedPollerConfigIsNull = false; + } + // determine if request.ProvisionedPollerConfig should be set to null + if (requestProvisionedPollerConfigIsNull) + { + request.ProvisionedPollerConfig = null; + } if (cmdletContext.Queue != null) { request.Queues = cmdletContext.Queue; @@ -969,6 +1022,8 @@ internal partial class CmdletContext : ExecutorContext public System.Int32? MaximumRetryAttempt { get; set; } public List MetricsConfig_Metric { get; set; } public System.Int32? ParallelizationFactor { get; set; } + public System.Int32? ProvisionedPollerConfig_MaximumPoller { get; set; } + public System.Int32? ProvisionedPollerConfig_MinimumPoller { get; set; } public List Queue { get; set; } public System.Int32? ScalingConfig_MaximumConcurrency { get; set; } public Dictionary> SelfManagedEventSource_Endpoint { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/Lambda/Basic/Update-LMEventSourceMapping-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Lambda/Basic/Update-LMEventSourceMapping-Cmdlet.cs index 61575c015..01c3f28ab 100644 --- a/modules/AWSPowerShell/Cmdlets/Lambda/Basic/Update-LMEventSourceMapping-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Lambda/Basic/Update-LMEventSourceMapping-Cmdlet.cs @@ -257,6 +257,17 @@ public partial class UpdateLMEventSourceMappingCmdlet : AmazonLambdaClientCmdlet public System.Int32? ScalingConfig_MaximumConcurrency { get; set; } #endregion + #region Parameter ProvisionedPollerConfig_MaximumPoller + /// + /// + /// The maximum number of event pollers this event source can scale up to. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ProvisionedPollerConfig_MaximumPollers")] + public System.Int32? ProvisionedPollerConfig_MaximumPoller { get; set; } + #endregion + #region Parameter MaximumRecordAgeInSecond /// /// @@ -296,6 +307,17 @@ public partial class UpdateLMEventSourceMappingCmdlet : AmazonLambdaClientCmdlet public System.String[] MetricsConfig_Metric { get; set; } #endregion + #region Parameter ProvisionedPollerConfig_MinimumPoller + /// + /// + /// The minimum number of event pollers this event source can scale down to. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("ProvisionedPollerConfig_MinimumPollers")] + public System.Int32? ProvisionedPollerConfig_MinimumPoller { get; set; } + #endregion + #region Parameter ParallelizationFactor /// /// @@ -437,6 +459,8 @@ protected override void ProcessRecord() context.MetricsConfig_Metric = new List(this.MetricsConfig_Metric); } context.ParallelizationFactor = this.ParallelizationFactor; + context.ProvisionedPollerConfig_MaximumPoller = this.ProvisionedPollerConfig_MaximumPoller; + context.ProvisionedPollerConfig_MinimumPoller = this.ProvisionedPollerConfig_MinimumPoller; context.ScalingConfig_MaximumConcurrency = this.ScalingConfig_MaximumConcurrency; if (this.SourceAccessConfiguration != null) { @@ -643,6 +667,35 @@ public object Execute(ExecutorContext context) request.ParallelizationFactor = cmdletContext.ParallelizationFactor.Value; } + // populate ProvisionedPollerConfig + var requestProvisionedPollerConfigIsNull = true; + request.ProvisionedPollerConfig = new Amazon.Lambda.Model.ProvisionedPollerConfig(); + System.Int32? requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller = null; + if (cmdletContext.ProvisionedPollerConfig_MaximumPoller != null) + { + requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller = cmdletContext.ProvisionedPollerConfig_MaximumPoller.Value; + } + if (requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller != null) + { + request.ProvisionedPollerConfig.MaximumPollers = requestProvisionedPollerConfig_provisionedPollerConfig_MaximumPoller.Value; + requestProvisionedPollerConfigIsNull = false; + } + System.Int32? requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller = null; + if (cmdletContext.ProvisionedPollerConfig_MinimumPoller != null) + { + requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller = cmdletContext.ProvisionedPollerConfig_MinimumPoller.Value; + } + if (requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller != null) + { + request.ProvisionedPollerConfig.MinimumPollers = requestProvisionedPollerConfig_provisionedPollerConfig_MinimumPoller.Value; + requestProvisionedPollerConfigIsNull = false; + } + // determine if request.ProvisionedPollerConfig should be set to null + if (requestProvisionedPollerConfigIsNull) + { + request.ProvisionedPollerConfig = null; + } + // populate ScalingConfig var requestScalingConfigIsNull = true; request.ScalingConfig = new Amazon.Lambda.Model.ScalingConfig(); @@ -751,6 +804,8 @@ internal partial class CmdletContext : ExecutorContext public System.Int32? MaximumRetryAttempt { get; set; } public List MetricsConfig_Metric { get; set; } public System.Int32? ParallelizationFactor { get; set; } + public System.Int32? ProvisionedPollerConfig_MaximumPoller { get; set; } + public System.Int32? ProvisionedPollerConfig_MinimumPoller { get; set; } public System.Int32? ScalingConfig_MaximumConcurrency { get; set; } public List SourceAccessConfiguration { get; set; } public System.Int32? TumblingWindowInSecond { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.Completers.psm1 index 2f8252492..ae0445a8f 100644 --- a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.Completers.psm1 @@ -97,13 +97,20 @@ $NEPTG_Completers = { break } + # Amazon.NeptuneGraph.ExportFormat + "Start-NEPTGExportTask/Format" + { + $v = "CSV","PARQUET" + break + } + # Amazon.NeptuneGraph.Format { ($_ -eq "New-NEPTGGraphUsingImportTask/Format") -Or ($_ -eq "Start-NEPTGImportTask/Format") } { - $v = "CSV","NTRIPLES","OPEN_CYPHER" + $v = "CSV","NTRIPLES","OPEN_CYPHER","PARQUET" break } @@ -114,6 +121,17 @@ $NEPTG_Completers = { break } + # Amazon.NeptuneGraph.ParquetType + { + ($_ -eq "New-NEPTGGraphUsingImportTask/ParquetType") -Or + ($_ -eq "Start-NEPTGExportTask/ParquetType") -Or + ($_ -eq "Start-NEPTGImportTask/ParquetType") + } + { + $v = "COLUMNAR" + break + } + # Amazon.NeptuneGraph.PlanCacheType "Invoke-NEPTGQuery/PlanCache" { @@ -146,9 +164,10 @@ $NEPTG_Completers = { $NEPTG_map = @{ "BlankNodeHandling"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGImportTask") "ExplainMode"=@("Invoke-NEPTGQuery") - "Format"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGImportTask") + "Format"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGExportTask","Start-NEPTGImportTask") "Language"=@("Invoke-NEPTGQuery") "Mode"=@("Get-NEPTGGraphSummary") + "ParquetType"=@("New-NEPTGGraphUsingImportTask","Start-NEPTGExportTask","Start-NEPTGImportTask") "PlanCache"=@("Invoke-NEPTGQuery") "State"=@("Get-NEPTGQueryList") } @@ -203,7 +222,8 @@ $NEPTG_SelectCompleters = { } $NEPTG_SelectMap = @{ - "Select"=@("Stop-NEPTGImportTask", + "Select"=@("Stop-NEPTGExportTask", + "Stop-NEPTGImportTask", "Stop-NEPTGQuery", "New-NEPTGGraph", "New-NEPTGGraphSnapshot", @@ -213,12 +233,14 @@ $NEPTG_SelectMap = @{ "Remove-NEPTGGraphSnapshot", "Remove-NEPTGPrivateGraphEndpoint", "Invoke-NEPTGQuery", + "Get-NEPTGExportTask", "Get-NEPTGGraph", "Get-NEPTGGraphSnapshot", "Get-NEPTGGraphSummary", "Get-NEPTGImportTask", "Get-NEPTGPrivateGraphEndpoint", "Get-NEPTGQuery", + "Get-NEPTGExportTaskList", "Get-NEPTGGraphList", "Get-NEPTGGraphSnapshotList", "Get-NEPTGImportTaskList", @@ -227,6 +249,7 @@ $NEPTG_SelectMap = @{ "Get-NEPTGResourceTag", "Reset-NEPTGGraph", "Restore-NEPTGGraphFromSnapshot", + "Start-NEPTGExportTask", "Start-NEPTGImportTask", "Add-NEPTGResourceTag", "Remove-NEPTGResourceTag", diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.psd1 b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.psd1 index 6bd271676..079394f2e 100644 --- a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.psd1 +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/AWS.Tools.NeptuneGraph.psd1 @@ -87,6 +87,8 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 # Cmdlets to export from this module CmdletsToExport = @( 'Add-NEPTGResourceTag', + 'Get-NEPTGExportTask', + 'Get-NEPTGExportTaskList', 'Get-NEPTGGraph', 'Get-NEPTGGraphList', 'Get-NEPTGGraphSnapshot', @@ -110,7 +112,9 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Remove-NEPTGResourceTag', 'Reset-NEPTGGraph', 'Restore-NEPTGGraphFromSnapshot', + 'Start-NEPTGExportTask', 'Start-NEPTGImportTask', + 'Stop-NEPTGExportTask', 'Stop-NEPTGImportTask', 'Stop-NEPTGQuery', 'Update-NEPTGGraph') diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Get-NEPTGExportTask-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Get-NEPTGExportTask-Cmdlet.cs new file mode 100644 index 000000000..7e151b88a --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Get-NEPTGExportTask-Cmdlet.cs @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.NeptuneGraph; +using Amazon.NeptuneGraph.Model; + +namespace Amazon.PowerShell.Cmdlets.NEPTG +{ + /// + /// Retrieves a specified export task. + /// + [Cmdlet("Get", "NEPTGExportTask")] + [OutputType("Amazon.NeptuneGraph.Model.GetExportTaskResponse")] + [AWSCmdlet("Calls the Amazon Neptune Graph GetExportTask API operation.", Operation = new[] {"GetExportTask"}, SelectReturnType = typeof(Amazon.NeptuneGraph.Model.GetExportTaskResponse))] + [AWSCmdletOutput("Amazon.NeptuneGraph.Model.GetExportTaskResponse", + "This cmdlet returns an Amazon.NeptuneGraph.Model.GetExportTaskResponse object containing multiple properties." + )] + public partial class GetNEPTGExportTaskCmdlet : AmazonNeptuneGraphClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter TaskIdentifier + /// + /// + /// The unique identifier of the export task. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String TaskIdentifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.NeptuneGraph.Model.GetExportTaskResponse). + /// Specifying the name of a property of type Amazon.NeptuneGraph.Model.GetExportTaskResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the TaskIdentifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^TaskIdentifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^TaskIdentifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.TaskIdentifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.TaskIdentifier = this.TaskIdentifier; + #if MODULAR + if (this.TaskIdentifier == null && ParameterWasBound(nameof(this.TaskIdentifier))) + { + WriteWarning("You are passing $null as a value for parameter TaskIdentifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.NeptuneGraph.Model.GetExportTaskRequest(); + + if (cmdletContext.TaskIdentifier != null) + { + request.TaskIdentifier = cmdletContext.TaskIdentifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.NeptuneGraph.Model.GetExportTaskResponse CallAWSServiceOperation(IAmazonNeptuneGraph client, Amazon.NeptuneGraph.Model.GetExportTaskRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Neptune Graph", "GetExportTask"); + try + { + #if DESKTOP + return client.GetExportTask(request); + #elif CORECLR + return client.GetExportTaskAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String TaskIdentifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Get-NEPTGExportTaskList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Get-NEPTGExportTaskList-Cmdlet.cs new file mode 100644 index 000000000..4061b1889 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Get-NEPTGExportTaskList-Cmdlet.cs @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.NeptuneGraph; +using Amazon.NeptuneGraph.Model; + +namespace Amazon.PowerShell.Cmdlets.NEPTG +{ + /// + /// Retrieves a list of export tasks. + /// + [Cmdlet("Get", "NEPTGExportTaskList")] + [OutputType("Amazon.NeptuneGraph.Model.ExportTaskSummary")] + [AWSCmdlet("Calls the Amazon Neptune Graph ListExportTasks API operation.", Operation = new[] {"ListExportTasks"}, SelectReturnType = typeof(Amazon.NeptuneGraph.Model.ListExportTasksResponse))] + [AWSCmdletOutput("Amazon.NeptuneGraph.Model.ExportTaskSummary or Amazon.NeptuneGraph.Model.ListExportTasksResponse", + "This cmdlet returns a collection of Amazon.NeptuneGraph.Model.ExportTaskSummary objects.", + "The service call response (type Amazon.NeptuneGraph.Model.ListExportTasksResponse) can be returned by specifying '-Select *'." + )] + public partial class GetNEPTGExportTaskListCmdlet : AmazonNeptuneGraphClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter MaxResult + /// + /// + /// The maximum number of export tasks to return. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// Pagination token used to paginate input. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'Tasks'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.NeptuneGraph.Model.ListExportTasksResponse). + /// Specifying the name of a property of type Amazon.NeptuneGraph.Model.ListExportTasksResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "Tasks"; + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + } + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.NeptuneGraph.Model.ListExportTasksRequest(); + + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + if (cmdletContext.NextToken != null) + { + request.NextToken = cmdletContext.NextToken; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.NeptuneGraph.Model.ListExportTasksResponse CallAWSServiceOperation(IAmazonNeptuneGraph client, Amazon.NeptuneGraph.Model.ListExportTasksRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Neptune Graph", "ListExportTasks"); + try + { + #if DESKTOP + return client.ListExportTasks(request); + #elif CORECLR + return client.ListExportTasksAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.Tasks; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/New-NEPTGGraphUsingImportTask-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/New-NEPTGGraphUsingImportTask-Cmdlet.cs index 848ed21d8..8550c297e 100644 --- a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/New-NEPTGGraphUsingImportTask-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/New-NEPTGGraphUsingImportTask-Cmdlet.cs @@ -163,6 +163,17 @@ public partial class NewNEPTGGraphUsingImportTaskCmdlet : AmazonNeptuneGraphClie public System.Int32? MinProvisionedMemory { get; set; } #endregion + #region Parameter ParquetType + /// + /// + /// The parquet type of the import task. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.NeptuneGraph.ParquetType")] + public Amazon.NeptuneGraph.ParquetType ParquetType { get; set; } + #endregion + #region Parameter Neptune_PreserveDefaultVertexLabel /// /// @@ -345,6 +356,7 @@ protected override void ProcessRecord() context.KmsKeyIdentifier = this.KmsKeyIdentifier; context.MaxProvisionedMemory = this.MaxProvisionedMemory; context.MinProvisionedMemory = this.MinProvisionedMemory; + context.ParquetType = this.ParquetType; context.PublicConnectivity = this.PublicConnectivity; context.ReplicaCount = this.ReplicaCount; context.RoleArn = this.RoleArn; @@ -482,6 +494,10 @@ public object Execute(ExecutorContext context) { request.MinProvisionedMemory = cmdletContext.MinProvisionedMemory.Value; } + if (cmdletContext.ParquetType != null) + { + request.ParquetType = cmdletContext.ParquetType; + } if (cmdletContext.PublicConnectivity != null) { request.PublicConnectivity = cmdletContext.PublicConnectivity.Value; @@ -594,6 +610,7 @@ internal partial class CmdletContext : ExecutorContext public System.String KmsKeyIdentifier { get; set; } public System.Int32? MaxProvisionedMemory { get; set; } public System.Int32? MinProvisionedMemory { get; set; } + public Amazon.NeptuneGraph.ParquetType ParquetType { get; set; } public System.Boolean? PublicConnectivity { get; set; } public System.Int32? ReplicaCount { get; set; } public System.String RoleArn { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Start-NEPTGExportTask-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Start-NEPTGExportTask-Cmdlet.cs new file mode 100644 index 000000000..8485f3dfc --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Start-NEPTGExportTask-Cmdlet.cs @@ -0,0 +1,444 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.NeptuneGraph; +using Amazon.NeptuneGraph.Model; + +namespace Amazon.PowerShell.Cmdlets.NEPTG +{ + /// + /// Export data from an existing Neptune Analytics graph to Amazon S3. The graph state + /// should be AVAILABLE. + /// + [Cmdlet("Start", "NEPTGExportTask", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.NeptuneGraph.Model.StartExportTaskResponse")] + [AWSCmdlet("Calls the Amazon Neptune Graph StartExportTask API operation.", Operation = new[] {"StartExportTask"}, SelectReturnType = typeof(Amazon.NeptuneGraph.Model.StartExportTaskResponse))] + [AWSCmdletOutput("Amazon.NeptuneGraph.Model.StartExportTaskResponse", + "This cmdlet returns an Amazon.NeptuneGraph.Model.StartExportTaskResponse object containing multiple properties." + )] + public partial class StartNEPTGExportTaskCmdlet : AmazonNeptuneGraphClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter Destination + /// + /// + /// The Amazon S3 URI where data will be exported to. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Destination { get; set; } + #endregion + + #region Parameter ExportFilter_EdgeFilter + /// + /// + /// Used to specify filters on a per-label basis for edges. This allows you to control + /// which edge labels and properties are included in the export. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Collections.Hashtable ExportFilter_EdgeFilter { get; set; } + #endregion + + #region Parameter Format + /// + /// + /// The format of the export task. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.NeptuneGraph.ExportFormat")] + public Amazon.NeptuneGraph.ExportFormat Format { get; set; } + #endregion + + #region Parameter GraphIdentifier + /// + /// + /// The source graph identifier of the export task. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String GraphIdentifier { get; set; } + #endregion + + #region Parameter KmsKeyIdentifier + /// + /// + /// The KMS key identifier of the export task. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String KmsKeyIdentifier { get; set; } + #endregion + + #region Parameter ParquetType + /// + /// + /// The parquet type of the export task. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.NeptuneGraph.ParquetType")] + public Amazon.NeptuneGraph.ParquetType ParquetType { get; set; } + #endregion + + #region Parameter RoleArn + /// + /// + /// The ARN of the IAM role that will allow data to be exported to the destination. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String RoleArn { get; set; } + #endregion + + #region Parameter Tag + /// + /// + /// Tags to be applied to the export task. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Tags")] + public System.Collections.Hashtable Tag { get; set; } + #endregion + + #region Parameter ExportFilter_VertexFilter + /// + /// + /// Used to specify filters on a per-label basis for vertices. This allows you to control + /// which vertex labels and properties are included in the export. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.Collections.Hashtable ExportFilter_VertexFilter { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.NeptuneGraph.Model.StartExportTaskResponse). + /// Specifying the name of a property of type Amazon.NeptuneGraph.Model.StartExportTaskResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the GraphIdentifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^GraphIdentifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^GraphIdentifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.GraphIdentifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Start-NEPTGExportTask (StartExportTask)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.GraphIdentifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.Destination = this.Destination; + #if MODULAR + if (this.Destination == null && ParameterWasBound(nameof(this.Destination))) + { + WriteWarning("You are passing $null as a value for parameter Destination which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.ExportFilter_EdgeFilter != null) + { + context.ExportFilter_EdgeFilter = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.ExportFilter_EdgeFilter.Keys) + { + context.ExportFilter_EdgeFilter.Add((String)hashKey, (Amazon.NeptuneGraph.Model.ExportFilterElement)(this.ExportFilter_EdgeFilter[hashKey])); + } + } + if (this.ExportFilter_VertexFilter != null) + { + context.ExportFilter_VertexFilter = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.ExportFilter_VertexFilter.Keys) + { + context.ExportFilter_VertexFilter.Add((String)hashKey, (Amazon.NeptuneGraph.Model.ExportFilterElement)(this.ExportFilter_VertexFilter[hashKey])); + } + } + context.Format = this.Format; + #if MODULAR + if (this.Format == null && ParameterWasBound(nameof(this.Format))) + { + WriteWarning("You are passing $null as a value for parameter Format which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.GraphIdentifier = this.GraphIdentifier; + #if MODULAR + if (this.GraphIdentifier == null && ParameterWasBound(nameof(this.GraphIdentifier))) + { + WriteWarning("You are passing $null as a value for parameter GraphIdentifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.KmsKeyIdentifier = this.KmsKeyIdentifier; + #if MODULAR + if (this.KmsKeyIdentifier == null && ParameterWasBound(nameof(this.KmsKeyIdentifier))) + { + WriteWarning("You are passing $null as a value for parameter KmsKeyIdentifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.ParquetType = this.ParquetType; + context.RoleArn = this.RoleArn; + #if MODULAR + if (this.RoleArn == null && ParameterWasBound(nameof(this.RoleArn))) + { + WriteWarning("You are passing $null as a value for parameter RoleArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Tag != null) + { + context.Tag = new Dictionary(StringComparer.Ordinal); + foreach (var hashKey in this.Tag.Keys) + { + context.Tag.Add((String)hashKey, (System.String)(this.Tag[hashKey])); + } + } + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.NeptuneGraph.Model.StartExportTaskRequest(); + + if (cmdletContext.Destination != null) + { + request.Destination = cmdletContext.Destination; + } + + // populate ExportFilter + var requestExportFilterIsNull = true; + request.ExportFilter = new Amazon.NeptuneGraph.Model.ExportFilter(); + Dictionary requestExportFilter_exportFilter_EdgeFilter = null; + if (cmdletContext.ExportFilter_EdgeFilter != null) + { + requestExportFilter_exportFilter_EdgeFilter = cmdletContext.ExportFilter_EdgeFilter; + } + if (requestExportFilter_exportFilter_EdgeFilter != null) + { + request.ExportFilter.EdgeFilter = requestExportFilter_exportFilter_EdgeFilter; + requestExportFilterIsNull = false; + } + Dictionary requestExportFilter_exportFilter_VertexFilter = null; + if (cmdletContext.ExportFilter_VertexFilter != null) + { + requestExportFilter_exportFilter_VertexFilter = cmdletContext.ExportFilter_VertexFilter; + } + if (requestExportFilter_exportFilter_VertexFilter != null) + { + request.ExportFilter.VertexFilter = requestExportFilter_exportFilter_VertexFilter; + requestExportFilterIsNull = false; + } + // determine if request.ExportFilter should be set to null + if (requestExportFilterIsNull) + { + request.ExportFilter = null; + } + if (cmdletContext.Format != null) + { + request.Format = cmdletContext.Format; + } + if (cmdletContext.GraphIdentifier != null) + { + request.GraphIdentifier = cmdletContext.GraphIdentifier; + } + if (cmdletContext.KmsKeyIdentifier != null) + { + request.KmsKeyIdentifier = cmdletContext.KmsKeyIdentifier; + } + if (cmdletContext.ParquetType != null) + { + request.ParquetType = cmdletContext.ParquetType; + } + if (cmdletContext.RoleArn != null) + { + request.RoleArn = cmdletContext.RoleArn; + } + if (cmdletContext.Tag != null) + { + request.Tags = cmdletContext.Tag; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.NeptuneGraph.Model.StartExportTaskResponse CallAWSServiceOperation(IAmazonNeptuneGraph client, Amazon.NeptuneGraph.Model.StartExportTaskRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Neptune Graph", "StartExportTask"); + try + { + #if DESKTOP + return client.StartExportTask(request); + #elif CORECLR + return client.StartExportTaskAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String Destination { get; set; } + public Dictionary ExportFilter_EdgeFilter { get; set; } + public Dictionary ExportFilter_VertexFilter { get; set; } + public Amazon.NeptuneGraph.ExportFormat Format { get; set; } + public System.String GraphIdentifier { get; set; } + public System.String KmsKeyIdentifier { get; set; } + public Amazon.NeptuneGraph.ParquetType ParquetType { get; set; } + public System.String RoleArn { get; set; } + public Dictionary Tag { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Start-NEPTGImportTask-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Start-NEPTGImportTask-Cmdlet.cs index 0d64f81fa..6f952d19d 100644 --- a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Start-NEPTGImportTask-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Start-NEPTGImportTask-Cmdlet.cs @@ -97,6 +97,17 @@ public partial class StartNEPTGImportTaskCmdlet : AmazonNeptuneGraphClientCmdlet public System.String GraphIdentifier { get; set; } #endregion + #region Parameter ParquetType + /// + /// + /// The parquet type of the import task. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.NeptuneGraph.ParquetType")] + public Amazon.NeptuneGraph.ParquetType ParquetType { get; set; } + #endregion + #region Parameter Neptune_PreserveDefaultVertexLabel /// /// @@ -260,6 +271,7 @@ protected override void ProcessRecord() context.Neptune_PreserveEdgeId = this.Neptune_PreserveEdgeId; context.Neptune_S3ExportKmsKeyId = this.Neptune_S3ExportKmsKeyId; context.Neptune_S3ExportPath = this.Neptune_S3ExportPath; + context.ParquetType = this.ParquetType; context.RoleArn = this.RoleArn; #if MODULAR if (this.RoleArn == null && ParameterWasBound(nameof(this.RoleArn))) @@ -370,6 +382,10 @@ public object Execute(ExecutorContext context) { request.ImportOptions = null; } + if (cmdletContext.ParquetType != null) + { + request.ParquetType = cmdletContext.ParquetType; + } if (cmdletContext.RoleArn != null) { request.RoleArn = cmdletContext.RoleArn; @@ -447,6 +463,7 @@ internal partial class CmdletContext : ExecutorContext public System.Boolean? Neptune_PreserveEdgeId { get; set; } public System.String Neptune_S3ExportKmsKeyId { get; set; } public System.String Neptune_S3ExportPath { get; set; } + public Amazon.NeptuneGraph.ParquetType ParquetType { get; set; } public System.String RoleArn { get; set; } public System.String Source { get; set; } public System.Func Select { get; set; } = diff --git a/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Stop-NEPTGExportTask-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Stop-NEPTGExportTask-Cmdlet.cs new file mode 100644 index 000000000..944e79320 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/NeptuneGraph/Basic/Stop-NEPTGExportTask-Cmdlet.cs @@ -0,0 +1,217 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.NeptuneGraph; +using Amazon.NeptuneGraph.Model; + +namespace Amazon.PowerShell.Cmdlets.NEPTG +{ + /// + /// Cancel the specified export task. + /// + [Cmdlet("Stop", "NEPTGExportTask", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.NeptuneGraph.Model.CancelExportTaskResponse")] + [AWSCmdlet("Calls the Amazon Neptune Graph CancelExportTask API operation.", Operation = new[] {"CancelExportTask"}, SelectReturnType = typeof(Amazon.NeptuneGraph.Model.CancelExportTaskResponse))] + [AWSCmdletOutput("Amazon.NeptuneGraph.Model.CancelExportTaskResponse", + "This cmdlet returns an Amazon.NeptuneGraph.Model.CancelExportTaskResponse object containing multiple properties." + )] + public partial class StopNEPTGExportTaskCmdlet : AmazonNeptuneGraphClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter TaskIdentifier + /// + /// + /// The unique identifier of the export task. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String TaskIdentifier { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.NeptuneGraph.Model.CancelExportTaskResponse). + /// Specifying the name of a property of type Amazon.NeptuneGraph.Model.CancelExportTaskResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the TaskIdentifier parameter. + /// The -PassThru parameter is deprecated, use -Select '^TaskIdentifier' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^TaskIdentifier' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.TaskIdentifier), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Stop-NEPTGExportTask (CancelExportTask)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.TaskIdentifier; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.TaskIdentifier = this.TaskIdentifier; + #if MODULAR + if (this.TaskIdentifier == null && ParameterWasBound(nameof(this.TaskIdentifier))) + { + WriteWarning("You are passing $null as a value for parameter TaskIdentifier which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.NeptuneGraph.Model.CancelExportTaskRequest(); + + if (cmdletContext.TaskIdentifier != null) + { + request.TaskIdentifier = cmdletContext.TaskIdentifier; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.NeptuneGraph.Model.CancelExportTaskResponse CallAWSServiceOperation(IAmazonNeptuneGraph client, Amazon.NeptuneGraph.Model.CancelExportTaskRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Neptune Graph", "CancelExportTask"); + try + { + #if DESKTOP + return client.CancelExportTask(request); + #elif CORECLR + return client.CancelExportTaskAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String TaskIdentifier { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.Completers.psm1 index a4314939c..45b0ab909 100644 --- a/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.Completers.psm1 @@ -238,6 +238,13 @@ $OMICS_Completers = { break } + # Amazon.Omics.SequenceStoreStatus + "Get-OMICSSequenceStoreList/Filter_Status" + { + $v = "ACTIVE","CREATING","DELETING","FAILED","UPDATING" + break + } + # Amazon.Omics.StorageType "Start-OMICSRun/StorageType" { @@ -309,7 +316,7 @@ $OMICS_map = @{ "ETagAlgorithmFamily"=@("New-OMICSSequenceStore") "File"=@("Get-OMICSReadSet","Get-OMICSReference") "Filter_CreationType"=@("Get-OMICSReadSetList") - "Filter_Status"=@("Get-OMICSAnnotationImportJobList","Get-OMICSAnnotationStoreList","Get-OMICSAnnotationStoreVersionList","Get-OMICSReadSetActivationJobList","Get-OMICSReadSetExportJobList","Get-OMICSReadSetImportJobList","Get-OMICSReadSetList","Get-OMICSReferenceImportJobList","Get-OMICSVariantImportJobList","Get-OMICSVariantStoreList") + "Filter_Status"=@("Get-OMICSAnnotationImportJobList","Get-OMICSAnnotationStoreList","Get-OMICSAnnotationStoreVersionList","Get-OMICSReadSetActivationJobList","Get-OMICSReadSetExportJobList","Get-OMICSReadSetImportJobList","Get-OMICSReadSetList","Get-OMICSReferenceImportJobList","Get-OMICSSequenceStoreList","Get-OMICSVariantImportJobList","Get-OMICSVariantStoreList") "LogLevel"=@("Start-OMICSRun") "PartSource"=@("Get-OMICSReadSetUploadPartList","Set-OMICSReadSetPart") "ResourceOwner"=@("Get-OMICSShareList") @@ -399,6 +406,7 @@ $OMICS_SelectMap = @{ "Remove-OMICSRun", "Remove-OMICSRunCache", "Remove-OMICSRunGroup", + "Remove-OMICSS3AccessPolicy", "Remove-OMICSSequenceStore", "Remove-OMICSShare", "Remove-OMICSVariantStore", @@ -419,6 +427,7 @@ $OMICS_SelectMap = @{ "Get-OMICSRunCache", "Get-OMICSRunGroup", "Get-OMICSRunTask", + "Get-OMICSS3AccessPolicy", "Get-OMICSSequenceStore", "Get-OMICSShare", "Get-OMICSVariantImportJob", @@ -446,6 +455,7 @@ $OMICS_SelectMap = @{ "Get-OMICSVariantImportJobList", "Get-OMICSVariantStoreList", "Get-OMICSWorkflowList", + "Write-OMICSS3AccessPolicy", "Start-OMICSAnnotationImportJob", "Start-OMICSReadSetActivationJob", "Start-OMICSReadSetExportJob", @@ -459,6 +469,7 @@ $OMICS_SelectMap = @{ "Update-OMICSAnnotationStoreVersion", "Update-OMICSRunCache", "Update-OMICSRunGroup", + "Update-OMICSSequenceStore", "Update-OMICSVariantStore", "Update-OMICSWorkflow", "Set-OMICSReadSetPart") diff --git a/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.psd1 b/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.psd1 index d926351c4..3f0d8f63d 100644 --- a/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.psd1 +++ b/modules/AWSPowerShell/Cmdlets/Omics/AWS.Tools.Omics.psd1 @@ -121,6 +121,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-OMICSRunList', 'Get-OMICSRunTask', 'Get-OMICSRunTaskList', + 'Get-OMICSS3AccessPolicy', 'Get-OMICSSequenceStore', 'Get-OMICSSequenceStoreList', 'Get-OMICSShare', @@ -152,6 +153,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Remove-OMICSRun', 'Remove-OMICSRunCache', 'Remove-OMICSRunGroup', + 'Remove-OMICSS3AccessPolicy', 'Remove-OMICSSequenceStore', 'Remove-OMICSShare', 'Remove-OMICSVariantStore', @@ -171,8 +173,10 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Update-OMICSAnnotationStoreVersion', 'Update-OMICSRunCache', 'Update-OMICSRunGroup', + 'Update-OMICSSequenceStore', 'Update-OMICSVariantStore', - 'Update-OMICSWorkflow') + 'Update-OMICSWorkflow', + 'Write-OMICSS3AccessPolicy') # Variables to export from this module VariablesToExport = '*' diff --git a/modules/AWSPowerShell/Cmdlets/Omics/Basic/Get-OMICSS3AccessPolicy-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Get-OMICSS3AccessPolicy-Cmdlet.cs new file mode 100644 index 000000000..029c14d8b --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Get-OMICSS3AccessPolicy-Cmdlet.cs @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Omics; +using Amazon.Omics.Model; + +namespace Amazon.PowerShell.Cmdlets.OMICS +{ + /// + /// Retrieves details about an access policy on a given store. + /// + [Cmdlet("Get", "OMICSS3AccessPolicy")] + [OutputType("Amazon.Omics.Model.GetS3AccessPolicyResponse")] + [AWSCmdlet("Calls the Amazon Omics GetS3AccessPolicy API operation.", Operation = new[] {"GetS3AccessPolicy"}, SelectReturnType = typeof(Amazon.Omics.Model.GetS3AccessPolicyResponse))] + [AWSCmdletOutput("Amazon.Omics.Model.GetS3AccessPolicyResponse", + "This cmdlet returns an Amazon.Omics.Model.GetS3AccessPolicyResponse object containing multiple properties." + )] + public partial class GetOMICSS3AccessPolicyCmdlet : AmazonOmicsClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter S3AccessPointArn + /// + /// + /// The S3 access point ARN that has the access policy. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String S3AccessPointArn { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Omics.Model.GetS3AccessPolicyResponse). + /// Specifying the name of a property of type Amazon.Omics.Model.GetS3AccessPolicyResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the S3AccessPointArn parameter. + /// The -PassThru parameter is deprecated, use -Select '^S3AccessPointArn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^S3AccessPointArn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.S3AccessPointArn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.S3AccessPointArn = this.S3AccessPointArn; + #if MODULAR + if (this.S3AccessPointArn == null && ParameterWasBound(nameof(this.S3AccessPointArn))) + { + WriteWarning("You are passing $null as a value for parameter S3AccessPointArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Omics.Model.GetS3AccessPolicyRequest(); + + if (cmdletContext.S3AccessPointArn != null) + { + request.S3AccessPointArn = cmdletContext.S3AccessPointArn; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Omics.Model.GetS3AccessPolicyResponse CallAWSServiceOperation(IAmazonOmics client, Amazon.Omics.Model.GetS3AccessPolicyRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Omics", "GetS3AccessPolicy"); + try + { + #if DESKTOP + return client.GetS3AccessPolicy(request); + #elif CORECLR + return client.GetS3AccessPolicyAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String S3AccessPointArn { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Omics/Basic/Get-OMICSSequenceStoreList-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Get-OMICSSequenceStoreList-Cmdlet.cs index 885abb4c8..cdcd1a3b5 100644 --- a/modules/AWSPowerShell/Cmdlets/Omics/Basic/Get-OMICSSequenceStoreList-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Get-OMICSSequenceStoreList-Cmdlet.cs @@ -72,6 +72,37 @@ public partial class GetOMICSSequenceStoreListCmdlet : AmazonOmicsClientCmdlet, public System.String Filter_Name { get; set; } #endregion + #region Parameter Filter_Status + /// + /// + /// Filter results based on status. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [AWSConstantClassSource("Amazon.Omics.SequenceStoreStatus")] + public Amazon.Omics.SequenceStoreStatus Filter_Status { get; set; } + #endregion + + #region Parameter Filter_UpdatedAfter + /// + /// + /// Filter results based on stores updated after the specified time. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? Filter_UpdatedAfter { get; set; } + #endregion + + #region Parameter Filter_UpdatedBefore + /// + /// + /// Filter results based on stores updated before the specified time. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.DateTime? Filter_UpdatedBefore { get; set; } + #endregion + #region Parameter MaxResult /// /// @@ -123,6 +154,9 @@ protected override void ProcessRecord() context.Filter_CreatedAfter = this.Filter_CreatedAfter; context.Filter_CreatedBefore = this.Filter_CreatedBefore; context.Filter_Name = this.Filter_Name; + context.Filter_Status = this.Filter_Status; + context.Filter_UpdatedAfter = this.Filter_UpdatedAfter; + context.Filter_UpdatedBefore = this.Filter_UpdatedBefore; context.MaxResult = this.MaxResult; context.NextToken = this.NextToken; @@ -174,6 +208,36 @@ public object Execute(ExecutorContext context) { request.Filter.Name = requestFilter_filter_Name; requestFilterIsNull = false; + } + Amazon.Omics.SequenceStoreStatus requestFilter_filter_Status = null; + if (cmdletContext.Filter_Status != null) + { + requestFilter_filter_Status = cmdletContext.Filter_Status; + } + if (requestFilter_filter_Status != null) + { + request.Filter.Status = requestFilter_filter_Status; + requestFilterIsNull = false; + } + System.DateTime? requestFilter_filter_UpdatedAfter = null; + if (cmdletContext.Filter_UpdatedAfter != null) + { + requestFilter_filter_UpdatedAfter = cmdletContext.Filter_UpdatedAfter.Value; + } + if (requestFilter_filter_UpdatedAfter != null) + { + request.Filter.UpdatedAfter = requestFilter_filter_UpdatedAfter.Value; + requestFilterIsNull = false; + } + System.DateTime? requestFilter_filter_UpdatedBefore = null; + if (cmdletContext.Filter_UpdatedBefore != null) + { + requestFilter_filter_UpdatedBefore = cmdletContext.Filter_UpdatedBefore.Value; + } + if (requestFilter_filter_UpdatedBefore != null) + { + request.Filter.UpdatedBefore = requestFilter_filter_UpdatedBefore.Value; + requestFilterIsNull = false; } // determine if request.Filter should be set to null if (requestFilterIsNull) @@ -252,6 +316,9 @@ internal partial class CmdletContext : ExecutorContext public System.DateTime? Filter_CreatedAfter { get; set; } public System.DateTime? Filter_CreatedBefore { get; set; } public System.String Filter_Name { get; set; } + public Amazon.Omics.SequenceStoreStatus Filter_Status { get; set; } + public System.DateTime? Filter_UpdatedAfter { get; set; } + public System.DateTime? Filter_UpdatedBefore { get; set; } public System.Int32? MaxResult { get; set; } public System.String NextToken { get; set; } public System.Func Select { get; set; } = diff --git a/modules/AWSPowerShell/Cmdlets/Omics/Basic/New-OMICSSequenceStore-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Omics/Basic/New-OMICSSequenceStore-Cmdlet.cs index aa90a5526..cdaf4dad6 100644 --- a/modules/AWSPowerShell/Cmdlets/Omics/Basic/New-OMICSSequenceStore-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/Omics/Basic/New-OMICSSequenceStore-Cmdlet.cs @@ -41,6 +41,16 @@ public partial class NewOMICSSequenceStoreCmdlet : AmazonOmicsClientCmdlet, IExe protected override bool IsGeneratedCmdlet { get; set; } = true; + #region Parameter S3AccessConfig_AccessLogLocation + /// + /// + /// Location of the access logs. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String S3AccessConfig_AccessLogLocation { get; set; } + #endregion + #region Parameter Description /// /// @@ -99,6 +109,18 @@ public partial class NewOMICSSequenceStoreCmdlet : AmazonOmicsClientCmdlet, IExe public System.String Name { get; set; } #endregion + #region Parameter PropagatedSetLevelTag + /// + /// + /// The tags keys to propagate to the S3 objects associated with read sets in the sequence + /// store. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("PropagatedSetLevelTags")] + public System.String[] PropagatedSetLevelTag { get; set; } + #endregion + #region Parameter Tag /// /// @@ -205,6 +227,11 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter Name which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + if (this.PropagatedSetLevelTag != null) + { + context.PropagatedSetLevelTag = new List(this.PropagatedSetLevelTag); + } + context.S3AccessConfig_AccessLogLocation = this.S3AccessConfig_AccessLogLocation; context.SseConfig_KeyArn = this.SseConfig_KeyArn; context.SseConfig_Type = this.SseConfig_Type; if (this.Tag != null) @@ -251,6 +278,29 @@ public object Execute(ExecutorContext context) { request.Name = cmdletContext.Name; } + if (cmdletContext.PropagatedSetLevelTag != null) + { + request.PropagatedSetLevelTags = cmdletContext.PropagatedSetLevelTag; + } + + // populate S3AccessConfig + var requestS3AccessConfigIsNull = true; + request.S3AccessConfig = new Amazon.Omics.Model.S3AccessConfig(); + System.String requestS3AccessConfig_s3AccessConfig_AccessLogLocation = null; + if (cmdletContext.S3AccessConfig_AccessLogLocation != null) + { + requestS3AccessConfig_s3AccessConfig_AccessLogLocation = cmdletContext.S3AccessConfig_AccessLogLocation; + } + if (requestS3AccessConfig_s3AccessConfig_AccessLogLocation != null) + { + request.S3AccessConfig.AccessLogLocation = requestS3AccessConfig_s3AccessConfig_AccessLogLocation; + requestS3AccessConfigIsNull = false; + } + // determine if request.S3AccessConfig should be set to null + if (requestS3AccessConfigIsNull) + { + request.S3AccessConfig = null; + } // populate SseConfig var requestSseConfigIsNull = true; @@ -350,6 +400,8 @@ internal partial class CmdletContext : ExecutorContext public Amazon.Omics.ETagAlgorithmFamily ETagAlgorithmFamily { get; set; } public System.String FallbackLocation { get; set; } public System.String Name { get; set; } + public List PropagatedSetLevelTag { get; set; } + public System.String S3AccessConfig_AccessLogLocation { get; set; } public System.String SseConfig_KeyArn { get; set; } public Amazon.Omics.EncryptionType SseConfig_Type { get; set; } public Dictionary Tag { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/Omics/Basic/Remove-OMICSS3AccessPolicy-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Remove-OMICSS3AccessPolicy-Cmdlet.cs new file mode 100644 index 000000000..3aebf3314 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Remove-OMICSS3AccessPolicy-Cmdlet.cs @@ -0,0 +1,217 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Omics; +using Amazon.Omics.Model; + +namespace Amazon.PowerShell.Cmdlets.OMICS +{ + /// + /// Deletes an access policy for the specified store. + /// + [Cmdlet("Remove", "OMICSS3AccessPolicy", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] + [OutputType("None")] + [AWSCmdlet("Calls the Amazon Omics DeleteS3AccessPolicy API operation.", Operation = new[] {"DeleteS3AccessPolicy"}, SelectReturnType = typeof(Amazon.Omics.Model.DeleteS3AccessPolicyResponse))] + [AWSCmdletOutput("None or Amazon.Omics.Model.DeleteS3AccessPolicyResponse", + "This cmdlet does not generate any output." + + "The service response (type Amazon.Omics.Model.DeleteS3AccessPolicyResponse) be returned by specifying '-Select *'." + )] + public partial class RemoveOMICSS3AccessPolicyCmdlet : AmazonOmicsClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter S3AccessPointArn + /// + /// + /// The S3 access point ARN that has the access policy. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String S3AccessPointArn { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Omics.Model.DeleteS3AccessPolicyResponse). + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the S3AccessPointArn parameter. + /// The -PassThru parameter is deprecated, use -Select '^S3AccessPointArn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^S3AccessPointArn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.S3AccessPointArn), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Remove-OMICSS3AccessPolicy (DeleteS3AccessPolicy)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.S3AccessPointArn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.S3AccessPointArn = this.S3AccessPointArn; + #if MODULAR + if (this.S3AccessPointArn == null && ParameterWasBound(nameof(this.S3AccessPointArn))) + { + WriteWarning("You are passing $null as a value for parameter S3AccessPointArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Omics.Model.DeleteS3AccessPolicyRequest(); + + if (cmdletContext.S3AccessPointArn != null) + { + request.S3AccessPointArn = cmdletContext.S3AccessPointArn; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Omics.Model.DeleteS3AccessPolicyResponse CallAWSServiceOperation(IAmazonOmics client, Amazon.Omics.Model.DeleteS3AccessPolicyRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Omics", "DeleteS3AccessPolicy"); + try + { + #if DESKTOP + return client.DeleteS3AccessPolicy(request); + #elif CORECLR + return client.DeleteS3AccessPolicyAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String S3AccessPointArn { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => null; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Omics/Basic/Update-OMICSSequenceStore-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Update-OMICSSequenceStore-Cmdlet.cs new file mode 100644 index 000000000..5464fecee --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Update-OMICSSequenceStore-Cmdlet.cs @@ -0,0 +1,334 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Omics; +using Amazon.Omics.Model; + +namespace Amazon.PowerShell.Cmdlets.OMICS +{ + /// + /// Update one or more parameters for the sequence store. + /// + [Cmdlet("Update", "OMICSSequenceStore", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.Omics.Model.UpdateSequenceStoreResponse")] + [AWSCmdlet("Calls the Amazon Omics UpdateSequenceStore API operation.", Operation = new[] {"UpdateSequenceStore"}, SelectReturnType = typeof(Amazon.Omics.Model.UpdateSequenceStoreResponse))] + [AWSCmdletOutput("Amazon.Omics.Model.UpdateSequenceStoreResponse", + "This cmdlet returns an Amazon.Omics.Model.UpdateSequenceStoreResponse object containing multiple properties." + )] + public partial class UpdateOMICSSequenceStoreCmdlet : AmazonOmicsClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter S3AccessConfig_AccessLogLocation + /// + /// + /// Location of the access logs. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String S3AccessConfig_AccessLogLocation { get; set; } + #endregion + + #region Parameter Description + /// + /// + /// A description for the sequence store. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Description { get; set; } + #endregion + + #region Parameter FallbackLocation + /// + /// + /// The S3 URI of a bucket and folder to store Read Sets that fail to upload. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String FallbackLocation { get; set; } + #endregion + + #region Parameter Id + /// + /// + /// The ID of the sequence store. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String Id { get; set; } + #endregion + + #region Parameter Name + /// + /// + /// A name for the sequence store. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Name { get; set; } + #endregion + + #region Parameter PropagatedSetLevelTag + /// + /// + /// The tags keys to propagate to the S3 objects associated with read sets in the sequence + /// store. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("PropagatedSetLevelTags")] + public System.String[] PropagatedSetLevelTag { get; set; } + #endregion + + #region Parameter ClientToken + /// + /// + /// To ensure that requests don't run multiple times, specify a unique token for each + /// request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String ClientToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Omics.Model.UpdateSequenceStoreResponse). + /// Specifying the name of a property of type Amazon.Omics.Model.UpdateSequenceStoreResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the Id parameter. + /// The -PassThru parameter is deprecated, use -Select '^Id' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^Id' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.Id), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-OMICSSequenceStore (UpdateSequenceStore)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.Id; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.ClientToken = this.ClientToken; + context.Description = this.Description; + context.FallbackLocation = this.FallbackLocation; + context.Id = this.Id; + #if MODULAR + if (this.Id == null && ParameterWasBound(nameof(this.Id))) + { + WriteWarning("You are passing $null as a value for parameter Id which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.Name = this.Name; + if (this.PropagatedSetLevelTag != null) + { + context.PropagatedSetLevelTag = new List(this.PropagatedSetLevelTag); + } + context.S3AccessConfig_AccessLogLocation = this.S3AccessConfig_AccessLogLocation; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Omics.Model.UpdateSequenceStoreRequest(); + + if (cmdletContext.ClientToken != null) + { + request.ClientToken = cmdletContext.ClientToken; + } + if (cmdletContext.Description != null) + { + request.Description = cmdletContext.Description; + } + if (cmdletContext.FallbackLocation != null) + { + request.FallbackLocation = cmdletContext.FallbackLocation; + } + if (cmdletContext.Id != null) + { + request.Id = cmdletContext.Id; + } + if (cmdletContext.Name != null) + { + request.Name = cmdletContext.Name; + } + if (cmdletContext.PropagatedSetLevelTag != null) + { + request.PropagatedSetLevelTags = cmdletContext.PropagatedSetLevelTag; + } + + // populate S3AccessConfig + var requestS3AccessConfigIsNull = true; + request.S3AccessConfig = new Amazon.Omics.Model.S3AccessConfig(); + System.String requestS3AccessConfig_s3AccessConfig_AccessLogLocation = null; + if (cmdletContext.S3AccessConfig_AccessLogLocation != null) + { + requestS3AccessConfig_s3AccessConfig_AccessLogLocation = cmdletContext.S3AccessConfig_AccessLogLocation; + } + if (requestS3AccessConfig_s3AccessConfig_AccessLogLocation != null) + { + request.S3AccessConfig.AccessLogLocation = requestS3AccessConfig_s3AccessConfig_AccessLogLocation; + requestS3AccessConfigIsNull = false; + } + // determine if request.S3AccessConfig should be set to null + if (requestS3AccessConfigIsNull) + { + request.S3AccessConfig = null; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Omics.Model.UpdateSequenceStoreResponse CallAWSServiceOperation(IAmazonOmics client, Amazon.Omics.Model.UpdateSequenceStoreRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Omics", "UpdateSequenceStore"); + try + { + #if DESKTOP + return client.UpdateSequenceStore(request); + #elif CORECLR + return client.UpdateSequenceStoreAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String ClientToken { get; set; } + public System.String Description { get; set; } + public System.String FallbackLocation { get; set; } + public System.String Id { get; set; } + public System.String Name { get; set; } + public List PropagatedSetLevelTag { get; set; } + public System.String S3AccessConfig_AccessLogLocation { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/Omics/Basic/Write-OMICSS3AccessPolicy-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Write-OMICSS3AccessPolicy-Cmdlet.cs new file mode 100644 index 000000000..190945560 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/Omics/Basic/Write-OMICSS3AccessPolicy-Cmdlet.cs @@ -0,0 +1,246 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.Omics; +using Amazon.Omics.Model; + +namespace Amazon.PowerShell.Cmdlets.OMICS +{ + /// + /// Adds an access policy to the specified store. + /// + [Cmdlet("Write", "OMICSS3AccessPolicy", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.Omics.Model.PutS3AccessPolicyResponse")] + [AWSCmdlet("Calls the Amazon Omics PutS3AccessPolicy API operation.", Operation = new[] {"PutS3AccessPolicy"}, SelectReturnType = typeof(Amazon.Omics.Model.PutS3AccessPolicyResponse))] + [AWSCmdletOutput("Amazon.Omics.Model.PutS3AccessPolicyResponse", + "This cmdlet returns an Amazon.Omics.Model.PutS3AccessPolicyResponse object containing multiple properties." + )] + public partial class WriteOMICSS3AccessPolicyCmdlet : AmazonOmicsClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter S3AccessPointArn + /// + /// + /// The S3 access point ARN where you want to put the access policy. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String S3AccessPointArn { get; set; } + #endregion + + #region Parameter S3AccessPolicy + /// + /// + /// The resource policy that controls S3 access to the store. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String S3AccessPolicy { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is '*'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Omics.Model.PutS3AccessPolicyResponse). + /// Specifying the name of a property of type Amazon.Omics.Model.PutS3AccessPolicyResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "*"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the S3AccessPointArn parameter. + /// The -PassThru parameter is deprecated, use -Select '^S3AccessPointArn' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^S3AccessPointArn' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.S3AccessPointArn), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Write-OMICSS3AccessPolicy (PutS3AccessPolicy)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.S3AccessPointArn; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.S3AccessPointArn = this.S3AccessPointArn; + #if MODULAR + if (this.S3AccessPointArn == null && ParameterWasBound(nameof(this.S3AccessPointArn))) + { + WriteWarning("You are passing $null as a value for parameter S3AccessPointArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.S3AccessPolicy = this.S3AccessPolicy; + #if MODULAR + if (this.S3AccessPolicy == null && ParameterWasBound(nameof(this.S3AccessPolicy))) + { + WriteWarning("You are passing $null as a value for parameter S3AccessPolicy which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.Omics.Model.PutS3AccessPolicyRequest(); + + if (cmdletContext.S3AccessPointArn != null) + { + request.S3AccessPointArn = cmdletContext.S3AccessPointArn; + } + if (cmdletContext.S3AccessPolicy != null) + { + request.S3AccessPolicy = cmdletContext.S3AccessPolicy; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.Omics.Model.PutS3AccessPolicyResponse CallAWSServiceOperation(IAmazonOmics client, Amazon.Omics.Model.PutS3AccessPolicyRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Omics", "PutS3AccessPolicy"); + try + { + #if DESKTOP + return client.PutS3AccessPolicy(request); + #elif CORECLR + return client.PutS3AccessPolicyAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String S3AccessPointArn { get; set; } + public System.String S3AccessPolicy { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.Completers.psm1 b/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.Completers.psm1 index 31317d6a4..1e9dcbe47 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.Completers.psm1 +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.Completers.psm1 @@ -194,6 +194,13 @@ $QS_Completers = { break } + # Amazon.QuickSight.DashboardsQAStatus + "Update-QSDashboardsQAConfiguration/DashboardsQAStatus" + { + $v = "DISABLED","ENABLED" + break + } + # Amazon.QuickSight.DashboardUIState { ($_ -eq "New-QSDashboard/SheetControlsOption_VisibilityState") -Or @@ -560,6 +567,7 @@ $QS_map = @{ "Capabilities_ShareDataSource"=@("New-QSCustomPermission","Update-QSCustomPermission") "Capabilities_SubscribeDashboardEmailReport"=@("New-QSCustomPermission","Update-QSCustomPermission") "Capabilities_ViewAccountSPICECapacity"=@("New-QSCustomPermission","Update-QSCustomPermission") + "DashboardsQAStatus"=@("Update-QSDashboardsQAConfiguration") "DataPointDrillUpDownOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard") "DataPointMenuLabelOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard") "DataPointTooltipOption_AvailabilityStatus"=@("New-QSDashboard","Update-QSDashboard") @@ -733,6 +741,7 @@ $QS_SelectMap = @{ "Get-QSDashboardPermission", "Get-QSDashboardSnapshotJob", "Get-QSDashboardSnapshotJobResult", + "Get-QSDashboardsQAConfiguration", "Get-QSDataSet", "Get-QSDataSetPermission", "Get-QSDataSetRefreshProperty", @@ -811,6 +820,7 @@ $QS_SelectMap = @{ "Search-QSDataSource", "Search-QSFolder", "Find-QSGroup", + "Search-QSTopic", "Start-QSAssetBundleExportJob", "Start-QSAssetBundleImportJob", "Start-QSDashboardSnapshotJob", @@ -829,6 +839,7 @@ $QS_SelectMap = @{ "Update-QSDashboardLink", "Update-QSDashboardPermission", "Update-QSDashboardPublishedVersion", + "Update-QSDashboardsQAConfiguration", "Update-QSDataSet", "Update-QSDataSetPermission", "Update-QSDataSource", diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.psd1 b/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.psd1 index 6de63feba..d425a96e0 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.psd1 +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/AWS.Tools.QuickSight.psd1 @@ -112,6 +112,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Get-QSDashboardPermission', 'Get-QSDashboardSnapshotJob', 'Get-QSDashboardSnapshotJobResult', + 'Get-QSDashboardsQAConfiguration', 'Get-QSDashboardVersionList', 'Get-QSDataSet', 'Get-QSDataSetList', @@ -236,6 +237,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Search-QSDataSet', 'Search-QSDataSource', 'Search-QSFolder', + 'Search-QSTopic', 'Set-QSBatchCreateTopicReviewedAnswer', 'Set-QSBatchDeleteTopicReviewedAnswer', 'Start-QSAssetBundleExportJob', @@ -255,6 +257,7 @@ This version of AWS Tools for PowerShell is compatible with Windows PowerShell 5 'Update-QSDashboardLink', 'Update-QSDashboardPermission', 'Update-QSDashboardPublishedVersion', + 'Update-QSDashboardsQAConfiguration', 'Update-QSDataSet', 'Update-QSDataSetPermission', 'Update-QSDataSource', diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Get-QSDashboardsQAConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Get-QSDashboardsQAConfiguration-Cmdlet.cs new file mode 100644 index 000000000..5c048541c --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Get-QSDashboardsQAConfiguration-Cmdlet.cs @@ -0,0 +1,203 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.QuickSight; +using Amazon.QuickSight.Model; + +namespace Amazon.PowerShell.Cmdlets.QS +{ + /// + /// Describes an existing dashboard QA configuration. + /// + [Cmdlet("Get", "QSDashboardsQAConfiguration")] + [OutputType("Amazon.QuickSight.DashboardsQAStatus")] + [AWSCmdlet("Calls the Amazon QuickSight DescribeDashboardsQAConfiguration API operation.", Operation = new[] {"DescribeDashboardsQAConfiguration"}, SelectReturnType = typeof(Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationResponse))] + [AWSCmdletOutput("Amazon.QuickSight.DashboardsQAStatus or Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationResponse", + "This cmdlet returns an Amazon.QuickSight.DashboardsQAStatus object.", + "The service call response (type Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationResponse) can be returned by specifying '-Select *'." + )] + public partial class GetQSDashboardsQAConfigurationCmdlet : AmazonQuickSightClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AwsAccountId + /// + /// + /// The ID of the Amazon Web Services account that contains the dashboard QA configuration + /// that you want described. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AwsAccountId { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'DashboardsQAStatus'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationResponse). + /// Specifying the name of a property of type Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "DashboardsQAStatus"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the AwsAccountId parameter. + /// The -PassThru parameter is deprecated, use -Select '^AwsAccountId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^AwsAccountId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.AwsAccountId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AwsAccountId = this.AwsAccountId; + #if MODULAR + if (this.AwsAccountId == null && ParameterWasBound(nameof(this.AwsAccountId))) + { + WriteWarning("You are passing $null as a value for parameter AwsAccountId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationRequest(); + + if (cmdletContext.AwsAccountId != null) + { + request.AwsAccountId = cmdletContext.AwsAccountId; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationResponse CallAWSServiceOperation(IAmazonQuickSight client, Amazon.QuickSight.Model.DescribeDashboardsQAConfigurationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon QuickSight", "DescribeDashboardsQAConfiguration"); + try + { + #if DESKTOP + return client.DescribeDashboardsQAConfiguration(request); + #elif CORECLR + return client.DescribeDashboardsQAConfigurationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AwsAccountId { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.DashboardsQAStatus; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSAnalysis-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSAnalysis-Cmdlet.cs index 075099c5f..49494e55c 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSAnalysis-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSAnalysis-Cmdlet.cs @@ -378,6 +378,17 @@ public partial class NewQSAnalysisCmdlet : AmazonQuickSightClientCmdlet, IExecut public Amazon.QuickSight.Model.SheetDefinition[] Definition_Sheet { get; set; } #endregion + #region Parameter Definition_StaticFile + /// + /// + /// The static files for the definition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Definition_StaticFiles")] + public Amazon.QuickSight.Model.StaticFile[] Definition_StaticFile { get; set; } + #endregion + #region Parameter Parameters_StringParameter /// /// @@ -559,6 +570,10 @@ protected override void ProcessRecord() { context.Definition_Sheet = new List(this.Definition_Sheet); } + if (this.Definition_StaticFile != null) + { + context.Definition_StaticFile = new List(this.Definition_StaticFile); + } if (this.FolderArn != null) { context.FolderArn = new List(this.FolderArn); @@ -689,6 +704,16 @@ public object Execute(ExecutorContext context) request.Definition.Sheets = requestDefinition_definition_Sheet; requestDefinitionIsNull = false; } + List requestDefinition_definition_StaticFile = null; + if (cmdletContext.Definition_StaticFile != null) + { + requestDefinition_definition_StaticFile = cmdletContext.Definition_StaticFile; + } + if (requestDefinition_definition_StaticFile != null) + { + request.Definition.StaticFiles = requestDefinition_definition_StaticFile; + requestDefinitionIsNull = false; + } Amazon.QuickSight.Model.AnalysisDefaults requestDefinition_definition_AnalysisDefaults = null; // populate AnalysisDefaults @@ -1278,6 +1303,7 @@ internal partial class CmdletContext : ExecutorContext public List Definition_ParameterDeclaration { get; set; } public Amazon.QuickSight.QueryExecutionMode QueryExecutionOptions_QueryExecutionMode { get; set; } public List Definition_Sheet { get; set; } + public List Definition_StaticFile { get; set; } public List FolderArn { get; set; } public System.String Name { get; set; } public List Parameters_DateTimeParameter { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSDashboard-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSDashboard-Cmdlet.cs index 6bc847cf8..bdf061311 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSDashboard-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSDashboard-Cmdlet.cs @@ -515,6 +515,17 @@ public partial class NewQSDashboardCmdlet : AmazonQuickSightClientCmdlet, IExecu public Amazon.QuickSight.Model.SheetDefinition[] Definition_Sheet { get; set; } #endregion + #region Parameter Definition_StaticFile + /// + /// + /// The static files for the definition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Definition_StaticFiles")] + public Amazon.QuickSight.Model.StaticFile[] Definition_StaticFile { get; set; } + #endregion + #region Parameter Parameters_StringParameter /// /// @@ -730,6 +741,10 @@ protected override void ProcessRecord() { context.Definition_Sheet = new List(this.Definition_Sheet); } + if (this.Definition_StaticFile != null) + { + context.Definition_StaticFile = new List(this.Definition_StaticFile); + } if (this.FolderArn != null) { context.FolderArn = new List(this.FolderArn); @@ -1170,6 +1185,16 @@ public object Execute(ExecutorContext context) request.Definition.Sheets = requestDefinition_definition_Sheet; requestDefinitionIsNull = false; } + List requestDefinition_definition_StaticFile = null; + if (cmdletContext.Definition_StaticFile != null) + { + requestDefinition_definition_StaticFile = cmdletContext.Definition_StaticFile; + } + if (requestDefinition_definition_StaticFile != null) + { + request.Definition.StaticFiles = requestDefinition_definition_StaticFile; + requestDefinitionIsNull = false; + } Amazon.QuickSight.Model.AnalysisDefaults requestDefinition_definition_AnalysisDefaults = null; // populate AnalysisDefaults @@ -1771,6 +1796,7 @@ internal partial class CmdletContext : ExecutorContext public Amazon.QuickSight.DayOfTheWeek Options_WeekStart { get; set; } public List Definition_ParameterDeclaration { get; set; } public List Definition_Sheet { get; set; } + public List Definition_StaticFile { get; set; } public List FolderArn { get; set; } public List LinkEntity { get; set; } public List LinkSharingConfiguration_Permission { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTemplate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTemplate-Cmdlet.cs index 17f495356..613f67544 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTemplate-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTemplate-Cmdlet.cs @@ -329,6 +329,17 @@ public partial class NewQSTemplateCmdlet : AmazonQuickSightClientCmdlet, IExecut public Amazon.QuickSight.Model.SheetDefinition[] Definition_Sheet { get; set; } #endregion + #region Parameter Definition_StaticFile + /// + /// + /// The static files for the definition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Definition_StaticFiles")] + public Amazon.QuickSight.Model.StaticFile[] Definition_StaticFile { get; set; } + #endregion + #region Parameter Tag /// /// @@ -512,6 +523,10 @@ protected override void ProcessRecord() { context.Definition_Sheet = new List(this.Definition_Sheet); } + if (this.Definition_StaticFile != null) + { + context.Definition_StaticFile = new List(this.Definition_StaticFile); + } context.Name = this.Name; if (this.Permission != null) { @@ -620,6 +635,16 @@ public object Execute(ExecutorContext context) request.Definition.Sheets = requestDefinition_definition_Sheet; requestDefinitionIsNull = false; } + List requestDefinition_definition_StaticFile = null; + if (cmdletContext.Definition_StaticFile != null) + { + requestDefinition_definition_StaticFile = cmdletContext.Definition_StaticFile; + } + if (requestDefinition_definition_StaticFile != null) + { + request.Definition.StaticFiles = requestDefinition_definition_StaticFile; + requestDefinitionIsNull = false; + } Amazon.QuickSight.Model.AnalysisDefaults requestDefinition_definition_AnalysisDefaults = null; // populate AnalysisDefaults @@ -1184,6 +1209,7 @@ internal partial class CmdletContext : ExecutorContext public List Definition_ParameterDeclaration { get; set; } public Amazon.QuickSight.QueryExecutionMode QueryExecutionOptions_QueryExecutionMode { get; set; } public List Definition_Sheet { get; set; } + public List Definition_StaticFile { get; set; } public System.String Name { get; set; } public List Permission { get; set; } public System.String SourceAnalysis_Arn { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTopic-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTopic-Cmdlet.cs index 12c3bb06f..075048078 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTopic-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/New-QSTopic-Cmdlet.cs @@ -81,6 +81,17 @@ public partial class NewQSTopicCmdlet : AmazonQuickSightClientCmdlet, IExecutor public System.String Topic_Description { get; set; } #endregion + #region Parameter FolderArn + /// + /// + /// The Folder ARN of the folder that you want the topic to reside in. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("FolderArns")] + public System.String[] FolderArn { get; set; } + #endregion + #region Parameter Topic_Name /// /// @@ -212,6 +223,10 @@ protected override void ProcessRecord() WriteWarning("You are passing $null as a value for parameter AwsAccountId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif + if (this.FolderArn != null) + { + context.FolderArn = new List(this.FolderArn); + } if (this.Tag != null) { context.Tag = new List(this.Tag); @@ -251,6 +266,10 @@ public object Execute(ExecutorContext context) { request.AwsAccountId = cmdletContext.AwsAccountId; } + if (cmdletContext.FolderArn != null) + { + request.FolderArns = cmdletContext.FolderArn; + } if (cmdletContext.Tag != null) { request.Tags = cmdletContext.Tag; @@ -395,6 +414,7 @@ private Amazon.QuickSight.Model.CreateTopicResponse CallAWSServiceOperation(IAma internal partial class CmdletContext : ExecutorContext { public System.String AwsAccountId { get; set; } + public List FolderArn { get; set; } public List Tag { get; set; } public System.Boolean? ConfigOptions_QBusinessInsightsEnabled { get; set; } public List Topic_DataSet { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Search-QSTopic-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Search-QSTopic-Cmdlet.cs new file mode 100644 index 000000000..6e7f34f29 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Search-QSTopic-Cmdlet.cs @@ -0,0 +1,323 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.QuickSight; +using Amazon.QuickSight.Model; + +namespace Amazon.PowerShell.Cmdlets.QS +{ + /// + /// Searches for any Q topic that exists in an Amazon QuickSight account.

                      This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration. + ///
                      + [Cmdlet("Search", "QSTopic", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.QuickSight.Model.TopicSummary")] + [AWSCmdlet("Calls the Amazon QuickSight SearchTopics API operation.", Operation = new[] {"SearchTopics"}, SelectReturnType = typeof(Amazon.QuickSight.Model.SearchTopicsResponse))] + [AWSCmdletOutput("Amazon.QuickSight.Model.TopicSummary or Amazon.QuickSight.Model.SearchTopicsResponse", + "This cmdlet returns a collection of Amazon.QuickSight.Model.TopicSummary objects.", + "The service call response (type Amazon.QuickSight.Model.SearchTopicsResponse) can be returned by specifying '-Select *'." + )] + public partial class SearchQSTopicCmdlet : AmazonQuickSightClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AwsAccountId + /// + /// + /// The ID of the Amazon Web Services account that contains the topic that you want to + /// find. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AwsAccountId { get; set; } + #endregion + + #region Parameter Filter + /// + /// + /// The filters that you want to use to search for the topic. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyCollection] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [Alias("Filters")] + public Amazon.QuickSight.Model.TopicSearchFilter[] Filter { get; set; } + #endregion + + #region Parameter MaxResult + /// + /// + /// The maximum number of results to be returned per request. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("MaxResults")] + public System.Int32? MaxResult { get; set; } + #endregion + + #region Parameter NextToken + /// + /// + /// The token for the next set of results, or null if there are no more results. + /// + /// + ///
                      Note: This parameter is only used if you are manually controlling output pagination of the service API call. + ///
                      'NextToken' is only returned by the cmdlet when '-Select *' is specified. In order to manually control output pagination, set '-NextToken' to null for the first call then set the 'NextToken' using the same property output from the previous call for subsequent calls. + ///
                      + ///
                      + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String NextToken { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'TopicSummaryList'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.QuickSight.Model.SearchTopicsResponse). + /// Specifying the name of a property of type Amazon.QuickSight.Model.SearchTopicsResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "TopicSummaryList"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the AwsAccountId parameter. + /// The -PassThru parameter is deprecated, use -Select '^AwsAccountId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^AwsAccountId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + #region Parameter NoAutoIteration + /// + /// By default the cmdlet will auto-iterate and retrieve all results to the pipeline by performing multiple + /// service calls. If set, the cmdlet will retrieve only the next 'page' of results using the value of NextToken + /// as the start point. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter NoAutoIteration { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.AwsAccountId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Search-QSTopic (SearchTopics)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.AwsAccountId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AwsAccountId = this.AwsAccountId; + #if MODULAR + if (this.AwsAccountId == null && ParameterWasBound(nameof(this.AwsAccountId))) + { + WriteWarning("You are passing $null as a value for parameter AwsAccountId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + if (this.Filter != null) + { + context.Filter = new List(this.Filter); + } + #if MODULAR + if (this.Filter == null && ParameterWasBound(nameof(this.Filter))) + { + WriteWarning("You are passing $null as a value for parameter Filter which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.MaxResult = this.MaxResult; + context.NextToken = this.NextToken; + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent; + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + + // create request and set iteration invariants + var request = new Amazon.QuickSight.Model.SearchTopicsRequest(); + + if (cmdletContext.AwsAccountId != null) + { + request.AwsAccountId = cmdletContext.AwsAccountId; + } + if (cmdletContext.Filter != null) + { + request.Filters = cmdletContext.Filter; + } + if (cmdletContext.MaxResult != null) + { + request.MaxResults = cmdletContext.MaxResult.Value; + } + + // Initialize loop variant and commence piping + var _nextToken = cmdletContext.NextToken; + var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); + + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + do + { + request.NextToken = _nextToken; + + CmdletOutput output; + + try + { + + var response = CallAWSServiceOperation(client, request); + + object pipelineOutput = null; + if (!useParameterSelect) + { + pipelineOutput = cmdletContext.Select(response, this); + } + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + + _nextToken = response.NextToken; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + ProcessOutput(output); + + } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken)); + + if (useParameterSelect) + { + WriteObject(cmdletContext.Select(null, this)); + } + + + return null; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.QuickSight.Model.SearchTopicsResponse CallAWSServiceOperation(IAmazonQuickSight client, Amazon.QuickSight.Model.SearchTopicsRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon QuickSight", "SearchTopics"); + try + { + #if DESKTOP + return client.SearchTopics(request); + #elif CORECLR + return client.SearchTopicsAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AwsAccountId { get; set; } + public List Filter { get; set; } + public System.Int32? MaxResult { get; set; } + public System.String NextToken { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.TopicSummaryList; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Start-QSAssetBundleImportJob-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Start-QSAssetBundleImportJob-Cmdlet.cs index caedcb372..94a98934a 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Start-QSAssetBundleImportJob-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Start-QSAssetBundleImportJob-Cmdlet.cs @@ -128,7 +128,8 @@ public partial class StartQSAssetBundleImportJobCmdlet : AmazonQuickSightClientC /// /// /// The bytes of the base64 encoded asset bundle import zip file. This file can't exceed - /// 20 MB.If you are calling the API operations from the Amazon Web Services SDK for Java, JavaScript, + /// 20 MB. If the size of the file that you want to upload is more than 20 MB, add the + /// file to your Amazon S3 bucket and use S3Uri of the file for this operation.If you are calling the API operations from the Amazon Web Services SDK for Java, JavaScript, /// Python, or PHP, the SDK encodes base64 automatically to allow the direct setting of /// the zip file's bytes. If you are using an SDK for a different language or receiving /// related errors, try to base64 encode your data. @@ -327,7 +328,7 @@ public partial class StartQSAssetBundleImportJobCmdlet : AmazonQuickSightClientC /// /// The Amazon S3 URI for an asset bundle import file that exists in an Amazon S3 bucket /// that the caller has read access to. The file must be a zip format file and can't exceed - /// 20 MB. + /// 1 GB. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSAnalysis-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSAnalysis-Cmdlet.cs index aeea263eb..95cac6976 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSAnalysis-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSAnalysis-Cmdlet.cs @@ -352,6 +352,17 @@ public partial class UpdateQSAnalysisCmdlet : AmazonQuickSightClientCmdlet, IExe public Amazon.QuickSight.Model.SheetDefinition[] Definition_Sheet { get; set; } #endregion + #region Parameter Definition_StaticFile + /// + /// + /// The static files for the definition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Definition_StaticFiles")] + public Amazon.QuickSight.Model.StaticFile[] Definition_StaticFile { get; set; } + #endregion + #region Parameter Parameters_StringParameter /// /// @@ -522,6 +533,10 @@ protected override void ProcessRecord() { context.Definition_Sheet = new List(this.Definition_Sheet); } + if (this.Definition_StaticFile != null) + { + context.Definition_StaticFile = new List(this.Definition_StaticFile); + } context.Name = this.Name; #if MODULAR if (this.Name == null && ParameterWasBound(nameof(this.Name))) @@ -640,6 +655,16 @@ public object Execute(ExecutorContext context) request.Definition.Sheets = requestDefinition_definition_Sheet; requestDefinitionIsNull = false; } + List requestDefinition_definition_StaticFile = null; + if (cmdletContext.Definition_StaticFile != null) + { + requestDefinition_definition_StaticFile = cmdletContext.Definition_StaticFile; + } + if (requestDefinition_definition_StaticFile != null) + { + request.Definition.StaticFiles = requestDefinition_definition_StaticFile; + requestDefinitionIsNull = false; + } Amazon.QuickSight.Model.AnalysisDefaults requestDefinition_definition_AnalysisDefaults = null; // populate AnalysisDefaults @@ -1217,6 +1242,7 @@ internal partial class CmdletContext : ExecutorContext public List Definition_ParameterDeclaration { get; set; } public Amazon.QuickSight.QueryExecutionMode QueryExecutionOptions_QueryExecutionMode { get; set; } public List Definition_Sheet { get; set; } + public List Definition_StaticFile { get; set; } public System.String Name { get; set; } public List Parameters_DateTimeParameter { get; set; } public List Parameters_DecimalParameter { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSDashboard-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSDashboard-Cmdlet.cs index 75427409c..23c629945 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSDashboard-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSDashboard-Cmdlet.cs @@ -466,6 +466,17 @@ public partial class UpdateQSDashboardCmdlet : AmazonQuickSightClientCmdlet, IEx public Amazon.QuickSight.Model.SheetDefinition[] Definition_Sheet { get; set; } #endregion + #region Parameter Definition_StaticFile + /// + /// + /// The static files for the definition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Definition_StaticFiles")] + public Amazon.QuickSight.Model.StaticFile[] Definition_StaticFile { get; set; } + #endregion + #region Parameter Parameters_StringParameter /// /// @@ -669,6 +680,10 @@ protected override void ProcessRecord() { context.Definition_Sheet = new List(this.Definition_Sheet); } + if (this.Definition_StaticFile != null) + { + context.Definition_StaticFile = new List(this.Definition_StaticFile); + } context.Name = this.Name; #if MODULAR if (this.Name == null && ParameterWasBound(nameof(this.Name))) @@ -1089,6 +1104,16 @@ public object Execute(ExecutorContext context) request.Definition.Sheets = requestDefinition_definition_Sheet; requestDefinitionIsNull = false; } + List requestDefinition_definition_StaticFile = null; + if (cmdletContext.Definition_StaticFile != null) + { + requestDefinition_definition_StaticFile = cmdletContext.Definition_StaticFile; + } + if (requestDefinition_definition_StaticFile != null) + { + request.Definition.StaticFiles = requestDefinition_definition_StaticFile; + requestDefinitionIsNull = false; + } Amazon.QuickSight.Model.AnalysisDefaults requestDefinition_definition_AnalysisDefaults = null; // populate AnalysisDefaults @@ -1655,6 +1680,7 @@ internal partial class CmdletContext : ExecutorContext public Amazon.QuickSight.DayOfTheWeek Options_WeekStart { get; set; } public List Definition_ParameterDeclaration { get; set; } public List Definition_Sheet { get; set; } + public List Definition_StaticFile { get; set; } public System.String Name { get; set; } public List Parameters_DateTimeParameter { get; set; } public List Parameters_DecimalParameter { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSDashboardsQAConfiguration-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSDashboardsQAConfiguration-Cmdlet.cs new file mode 100644 index 000000000..2ccec7a94 --- /dev/null +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSDashboardsQAConfiguration-Cmdlet.cs @@ -0,0 +1,248 @@ +/******************************************************************************* + * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use + * this file except in compliance with the License. A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. + * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * ***************************************************************************** + * + * AWS Tools for Windows (TM) PowerShell (TM) + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using Amazon.PowerShell.Common; +using Amazon.Runtime; +using Amazon.QuickSight; +using Amazon.QuickSight.Model; + +namespace Amazon.PowerShell.Cmdlets.QS +{ + /// + /// Updates a Dashboard QA configuration. + /// + [Cmdlet("Update", "QSDashboardsQAConfiguration", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + [OutputType("Amazon.QuickSight.DashboardsQAStatus")] + [AWSCmdlet("Calls the Amazon QuickSight UpdateDashboardsQAConfiguration API operation.", Operation = new[] {"UpdateDashboardsQAConfiguration"}, SelectReturnType = typeof(Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationResponse))] + [AWSCmdletOutput("Amazon.QuickSight.DashboardsQAStatus or Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationResponse", + "This cmdlet returns an Amazon.QuickSight.DashboardsQAStatus object.", + "The service call response (type Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationResponse) can be returned by specifying '-Select *'." + )] + public partial class UpdateQSDashboardsQAConfigurationCmdlet : AmazonQuickSightClientCmdlet, IExecutor + { + + protected override bool IsGeneratedCmdlet { get; set; } = true; + + #region Parameter AwsAccountId + /// + /// + /// The ID of the Amazon Web Services account that contains the dashboard QA configuration + /// that you want to update. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] + #else + [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] + [System.Management.Automation.AllowEmptyString] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + public System.String AwsAccountId { get; set; } + #endregion + + #region Parameter DashboardsQAStatus + /// + /// + /// The status of dashboards QA configuration that you want to update. + /// + /// + #if !MODULAR + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + #else + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] + [System.Management.Automation.AllowNull] + #endif + [Amazon.PowerShell.Common.AWSRequiredParameter] + [AWSConstantClassSource("Amazon.QuickSight.DashboardsQAStatus")] + public Amazon.QuickSight.DashboardsQAStatus DashboardsQAStatus { get; set; } + #endregion + + #region Parameter Select + /// + /// Use the -Select parameter to control the cmdlet output. The default value is 'DashboardsQAStatus'. + /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationResponse). + /// Specifying the name of a property of type Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationResponse will result in that property being returned. + /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public string Select { get; set; } = "DashboardsQAStatus"; + #endregion + + #region Parameter PassThru + /// + /// Changes the cmdlet behavior to return the value passed to the AwsAccountId parameter. + /// The -PassThru parameter is deprecated, use -Select '^AwsAccountId' instead. This parameter will be removed in a future version. + /// + [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^AwsAccountId' instead. This parameter will be removed in a future version.")] + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter PassThru { get; set; } + #endregion + + #region Parameter Force + /// + /// This parameter overrides confirmation prompts to force + /// the cmdlet to continue its operation. This parameter should always + /// be used with caution. + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public SwitchParameter Force { get; set; } + #endregion + + protected override void ProcessRecord() + { + this._AWSSignerType = "v4"; + base.ProcessRecord(); + + var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.AwsAccountId), MyInvocation.BoundParameters); + if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "Update-QSDashboardsQAConfiguration (UpdateDashboardsQAConfiguration)")) + { + return; + } + + var context = new CmdletContext(); + + // allow for manipulation of parameters prior to loading into context + PreExecutionContextLoad(context); + + #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute + if (ParameterWasBound(nameof(this.Select))) + { + context.Select = CreateSelectDelegate(Select) ?? + throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); + if (this.PassThru.IsPresent) + { + throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); + } + } + else if (this.PassThru.IsPresent) + { + context.Select = (response, cmdlet) => this.AwsAccountId; + } + #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute + context.AwsAccountId = this.AwsAccountId; + #if MODULAR + if (this.AwsAccountId == null && ParameterWasBound(nameof(this.AwsAccountId))) + { + WriteWarning("You are passing $null as a value for parameter AwsAccountId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + context.DashboardsQAStatus = this.DashboardsQAStatus; + #if MODULAR + if (this.DashboardsQAStatus == null && ParameterWasBound(nameof(this.DashboardsQAStatus))) + { + WriteWarning("You are passing $null as a value for parameter DashboardsQAStatus which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); + } + #endif + + // allow further manipulation of loaded context prior to processing + PostExecutionContextLoad(context); + + var output = Execute(context) as CmdletOutput; + ProcessOutput(output); + } + + #region IExecutor Members + + public object Execute(ExecutorContext context) + { + var cmdletContext = context as CmdletContext; + // create request + var request = new Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationRequest(); + + if (cmdletContext.AwsAccountId != null) + { + request.AwsAccountId = cmdletContext.AwsAccountId; + } + if (cmdletContext.DashboardsQAStatus != null) + { + request.DashboardsQAStatus = cmdletContext.DashboardsQAStatus; + } + + CmdletOutput output; + + // issue call + var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); + try + { + var response = CallAWSServiceOperation(client, request); + object pipelineOutput = null; + pipelineOutput = cmdletContext.Select(response, this); + output = new CmdletOutput + { + PipelineOutput = pipelineOutput, + ServiceResponse = response + }; + } + catch (Exception e) + { + output = new CmdletOutput { ErrorResponse = e }; + } + + return output; + } + + public ExecutorContext CreateContext() + { + return new CmdletContext(); + } + + #endregion + + #region AWS Service Operation Call + + private Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationResponse CallAWSServiceOperation(IAmazonQuickSight client, Amazon.QuickSight.Model.UpdateDashboardsQAConfigurationRequest request) + { + Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon QuickSight", "UpdateDashboardsQAConfiguration"); + try + { + #if DESKTOP + return client.UpdateDashboardsQAConfiguration(request); + #elif CORECLR + return client.UpdateDashboardsQAConfigurationAsync(request).GetAwaiter().GetResult(); + #else + #error "Unknown build edition" + #endif + } + catch (AmazonServiceException exc) + { + var webException = exc.InnerException as System.Net.WebException; + if (webException != null) + { + throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); + } + throw; + } + } + + #endregion + + internal partial class CmdletContext : ExecutorContext + { + public System.String AwsAccountId { get; set; } + public Amazon.QuickSight.DashboardsQAStatus DashboardsQAStatus { get; set; } + public System.Func Select { get; set; } = + (response, cmdlet) => response.DashboardsQAStatus; + } + + } +} diff --git a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSTemplate-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSTemplate-Cmdlet.cs index aa9044d9a..a79c912e3 100644 --- a/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSTemplate-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/QuickSight/Basic/Update-QSTemplate-Cmdlet.cs @@ -305,6 +305,17 @@ public partial class UpdateQSTemplateCmdlet : AmazonQuickSightClientCmdlet, IExe public Amazon.QuickSight.Model.SheetDefinition[] Definition_Sheet { get; set; } #endregion + #region Parameter Definition_StaticFile + /// + /// + /// The static files for the definition. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Definition_StaticFiles")] + public Amazon.QuickSight.Model.StaticFile[] Definition_StaticFile { get; set; } + #endregion + #region Parameter TemplateId /// /// @@ -475,6 +486,10 @@ protected override void ProcessRecord() { context.Definition_Sheet = new List(this.Definition_Sheet); } + if (this.Definition_StaticFile != null) + { + context.Definition_StaticFile = new List(this.Definition_StaticFile); + } context.Name = this.Name; context.SourceAnalysis_Arn = this.SourceAnalysis_Arn; if (this.SourceAnalysis_DataSetReference != null) @@ -575,6 +590,16 @@ public object Execute(ExecutorContext context) request.Definition.Sheets = requestDefinition_definition_Sheet; requestDefinitionIsNull = false; } + List requestDefinition_definition_StaticFile = null; + if (cmdletContext.Definition_StaticFile != null) + { + requestDefinition_definition_StaticFile = cmdletContext.Definition_StaticFile; + } + if (requestDefinition_definition_StaticFile != null) + { + request.Definition.StaticFiles = requestDefinition_definition_StaticFile; + requestDefinitionIsNull = false; + } Amazon.QuickSight.Model.AnalysisDefaults requestDefinition_definition_AnalysisDefaults = null; // populate AnalysisDefaults @@ -1131,6 +1156,7 @@ internal partial class CmdletContext : ExecutorContext public List Definition_ParameterDeclaration { get; set; } public Amazon.QuickSight.QueryExecutionMode QueryExecutionOptions_QueryExecutionMode { get; set; } public List Definition_Sheet { get; set; } + public List Definition_StaticFile { get; set; } public System.String Name { get; set; } public System.String SourceAnalysis_Arn { get; set; } public List SourceAnalysis_DataSetReference { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/New-SMInferenceComponent-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/New-SMInferenceComponent-Cmdlet.cs index 5f6bd2fe4..babe62db6 100644 --- a/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/New-SMInferenceComponent-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/New-SMInferenceComponent-Cmdlet.cs @@ -61,6 +61,25 @@ public partial class NewSMInferenceComponentCmdlet : AmazonSageMakerClientCmdlet public System.String Container_ArtifactUrl { get; set; } #endregion + #region Parameter Specification_BaseInferenceComponentName + /// + /// + /// The name of an existing inference component that is to contain the inference component + /// that you're creating with your request.Specify this parameter only if your request is meant to create an adapter inference + /// component. An adapter inference component contains the path to an adapter model. The + /// purpose of the adapter model is to tailor the inference output of a base foundation + /// model, which is hosted by the base inference component. The adapter inference component + /// uses the compute resources that you assigned to the base inference component.When you create an adapter inference component, use the Container parameter + /// to specify the location of the adapter artifacts. In the parameter value, use the + /// ArtifactUrl parameter of the InferenceComponentContainerSpecification + /// data type.Before you can create an adapter inference component, you must have an existing inference + /// component that contains the foundation model that you want to adapt. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Specification_BaseInferenceComponentName { get; set; } + #endregion + #region Parameter StartupParameters_ContainerStartupHealthCheckTimeoutInSecond /// /// @@ -81,13 +100,7 @@ public partial class NewSMInferenceComponentCmdlet : AmazonSageMakerClientCmdlet /// Each copy can serve inference requests. /// /// - #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] - #else - [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] - [System.Management.Automation.AllowNull] - #endif - [Amazon.PowerShell.Common.AWSRequiredParameter] public System.Int32? RuntimeConfig_CopyCount { get; set; } #endregion @@ -169,13 +182,7 @@ public partial class NewSMInferenceComponentCmdlet : AmazonSageMakerClientCmdlet /// component. /// /// - #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] - #else - [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] - [System.Management.Automation.AllowNull] - #endif - [Amazon.PowerShell.Common.AWSRequiredParameter] [Alias("Specification_ComputeResourceRequirements_MinMemoryRequiredInMb")] public System.Int32? ComputeResourceRequirements_MinMemoryRequiredInMb { get; set; } #endregion @@ -246,14 +253,7 @@ public partial class NewSMInferenceComponentCmdlet : AmazonSageMakerClientCmdlet /// The name of an existing production variant where you host the inference component. /// /// - #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] - #else - [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] - [System.Management.Automation.AllowEmptyString] - [System.Management.Automation.AllowNull] - #endif - [Amazon.PowerShell.Common.AWSRequiredParameter] public System.String VariantName { get; set; } #endregion @@ -314,20 +314,9 @@ protected override void ProcessRecord() } #endif context.RuntimeConfig_CopyCount = this.RuntimeConfig_CopyCount; - #if MODULAR - if (this.RuntimeConfig_CopyCount == null && ParameterWasBound(nameof(this.RuntimeConfig_CopyCount))) - { - WriteWarning("You are passing $null as a value for parameter RuntimeConfig_CopyCount which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); - } - #endif + context.Specification_BaseInferenceComponentName = this.Specification_BaseInferenceComponentName; context.ComputeResourceRequirements_MaxMemoryRequiredInMb = this.ComputeResourceRequirements_MaxMemoryRequiredInMb; context.ComputeResourceRequirements_MinMemoryRequiredInMb = this.ComputeResourceRequirements_MinMemoryRequiredInMb; - #if MODULAR - if (this.ComputeResourceRequirements_MinMemoryRequiredInMb == null && ParameterWasBound(nameof(this.ComputeResourceRequirements_MinMemoryRequiredInMb))) - { - WriteWarning("You are passing $null as a value for parameter ComputeResourceRequirements_MinMemoryRequiredInMb which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); - } - #endif context.ComputeResourceRequirements_NumberOfAcceleratorDevicesRequired = this.ComputeResourceRequirements_NumberOfAcceleratorDevicesRequired; context.ComputeResourceRequirements_NumberOfCpuCoresRequired = this.ComputeResourceRequirements_NumberOfCpuCoresRequired; context.Container_ArtifactUrl = this.Container_ArtifactUrl; @@ -348,12 +337,6 @@ protected override void ProcessRecord() context.Tag = new List(this.Tag); } context.VariantName = this.VariantName; - #if MODULAR - if (this.VariantName == null && ParameterWasBound(nameof(this.VariantName))) - { - WriteWarning("You are passing $null as a value for parameter VariantName which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); - } - #endif // allow further manipulation of loaded context prior to processing PostExecutionContextLoad(context); @@ -401,6 +384,16 @@ public object Execute(ExecutorContext context) // populate Specification var requestSpecificationIsNull = true; request.Specification = new Amazon.SageMaker.Model.InferenceComponentSpecification(); + System.String requestSpecification_specification_BaseInferenceComponentName = null; + if (cmdletContext.Specification_BaseInferenceComponentName != null) + { + requestSpecification_specification_BaseInferenceComponentName = cmdletContext.Specification_BaseInferenceComponentName; + } + if (requestSpecification_specification_BaseInferenceComponentName != null) + { + request.Specification.BaseInferenceComponentName = requestSpecification_specification_BaseInferenceComponentName; + requestSpecificationIsNull = false; + } System.String requestSpecification_specification_ModelName = null; if (cmdletContext.Specification_ModelName != null) { @@ -623,6 +616,7 @@ internal partial class CmdletContext : ExecutorContext public System.String EndpointName { get; set; } public System.String InferenceComponentName { get; set; } public System.Int32? RuntimeConfig_CopyCount { get; set; } + public System.String Specification_BaseInferenceComponentName { get; set; } public System.Int32? ComputeResourceRequirements_MaxMemoryRequiredInMb { get; set; } public System.Int32? ComputeResourceRequirements_MinMemoryRequiredInMb { get; set; } public System.Single? ComputeResourceRequirements_NumberOfAcceleratorDevicesRequired { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/Update-SMInferenceComponent-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/Update-SMInferenceComponent-Cmdlet.cs index bac0e7725..70bb76cec 100644 --- a/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/Update-SMInferenceComponent-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/SageMaker/Basic/Update-SMInferenceComponent-Cmdlet.cs @@ -54,6 +54,25 @@ public partial class UpdateSMInferenceComponentCmdlet : AmazonSageMakerClientCmd public System.String Container_ArtifactUrl { get; set; } #endregion + #region Parameter Specification_BaseInferenceComponentName + /// + /// + /// The name of an existing inference component that is to contain the inference component + /// that you're creating with your request.Specify this parameter only if your request is meant to create an adapter inference + /// component. An adapter inference component contains the path to an adapter model. The + /// purpose of the adapter model is to tailor the inference output of a base foundation + /// model, which is hosted by the base inference component. The adapter inference component + /// uses the compute resources that you assigned to the base inference component.When you create an adapter inference component, use the Container parameter + /// to specify the location of the adapter artifacts. In the parameter value, use the + /// ArtifactUrl parameter of the InferenceComponentContainerSpecification + /// data type.Before you can create an adapter inference component, you must have an existing inference + /// component that contains the foundation model that you want to adapt. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + public System.String Specification_BaseInferenceComponentName { get; set; } + #endregion + #region Parameter StartupParameters_ContainerStartupHealthCheckTimeoutInSecond /// /// @@ -262,6 +281,7 @@ protected override void ProcessRecord() } #endif context.RuntimeConfig_CopyCount = this.RuntimeConfig_CopyCount; + context.Specification_BaseInferenceComponentName = this.Specification_BaseInferenceComponentName; context.ComputeResourceRequirements_MaxMemoryRequiredInMb = this.ComputeResourceRequirements_MaxMemoryRequiredInMb; context.ComputeResourceRequirements_MinMemoryRequiredInMb = this.ComputeResourceRequirements_MinMemoryRequiredInMb; context.ComputeResourceRequirements_NumberOfAcceleratorDevicesRequired = this.ComputeResourceRequirements_NumberOfAcceleratorDevicesRequired; @@ -322,6 +342,16 @@ public object Execute(ExecutorContext context) // populate Specification var requestSpecificationIsNull = true; request.Specification = new Amazon.SageMaker.Model.InferenceComponentSpecification(); + System.String requestSpecification_specification_BaseInferenceComponentName = null; + if (cmdletContext.Specification_BaseInferenceComponentName != null) + { + requestSpecification_specification_BaseInferenceComponentName = cmdletContext.Specification_BaseInferenceComponentName; + } + if (requestSpecification_specification_BaseInferenceComponentName != null) + { + request.Specification.BaseInferenceComponentName = requestSpecification_specification_BaseInferenceComponentName; + requestSpecificationIsNull = false; + } System.String requestSpecification_specification_ModelName = null; if (cmdletContext.Specification_ModelName != null) { @@ -535,6 +565,7 @@ internal partial class CmdletContext : ExecutorContext { public System.String InferenceComponentName { get; set; } public System.Int32? RuntimeConfig_CopyCount { get; set; } + public System.String Specification_BaseInferenceComponentName { get; set; } public System.Int32? ComputeResourceRequirements_MaxMemoryRequiredInMb { get; set; } public System.Int32? ComputeResourceRequirements_MinMemoryRequiredInMb { get; set; } public System.Single? ComputeResourceRequirements_NumberOfAcceleratorDevicesRequired { get; set; } diff --git a/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/New-SNSTopic-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/New-SNSTopic-Cmdlet.cs index eb84738df..e0e656ee4 100644 --- a/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/New-SNSTopic-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/New-SNSTopic-Cmdlet.cs @@ -64,10 +64,8 @@ public partial class NewSNSTopicCmdlet : AmazonSimpleNotificationServiceClientCm /// key (CMK) for Amazon SNS or a custom CMK. For more information, see Key /// Terms. For more examples, see KeyId /// in the Key Management Service API Reference.
                    The following attributes apply only to FIFO - /// topics:
                    • ArchivePolicy – Adds or updates an inline policy document to archive messages - /// stored in the specified Amazon SNS topic.
                    • BeginningArchiveTime – The earliest starting point at which a message in the - /// topic’s archive can be replayed from. This point in time is based on the configured - /// message retention period set by the topic’s message archiving policy.
                    • ContentBasedDeduplication – Enables content-based deduplication for FIFO topics.
                      • By default, ContentBasedDeduplication is set to false. If you create + /// topics:
                        • ArchivePolicy – The policy that sets the retention period for messages stored + /// in the message archive of an Amazon SNS FIFO topic.
                        • ContentBasedDeduplication – Enables content-based deduplication for FIFO topics.
                          • By default, ContentBasedDeduplication is set to false. If you create /// a FIFO topic and this attribute is false, you must specify a value for the /// MessageDeduplicationId parameter for the Publish /// action.
                          • When you set ContentBasedDeduplication to true, Amazon SNS uses a SHA-256 diff --git a/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/Set-SNSTopicAttribute-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/Set-SNSTopicAttribute-Cmdlet.cs index c0ba602ad..fea68e2fc 100644 --- a/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/Set-SNSTopicAttribute-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/SimpleNotificationService/Basic/Set-SNSTopicAttribute-Cmdlet.cs @@ -94,7 +94,8 @@ public partial class SetSNSTopicAttributeCmdlet : AmazonSimpleNotificationServic /// used while creating the signature of the notifications, subscription confirmations, /// or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion /// is set to 1.
                          The following attribute applies only to FIFO - /// topics:
                          • ContentBasedDeduplication – Enables content-based deduplication for FIFO topics.
                            • By default, ContentBasedDeduplication is set to false. If you create + /// topics:
                              • ArchivePolicy – The policy that sets the retention period for messages stored + /// in the message archive of an Amazon SNS FIFO topic.
                              • ContentBasedDeduplication – Enables content-based deduplication for FIFO topics.
                                • By default, ContentBasedDeduplication is set to false. If you create /// a FIFO topic and this attribute is false, you must specify a value for the /// MessageDeduplicationId parameter for the Publish /// action.
                                • When you set ContentBasedDeduplication to true, Amazon SNS uses a SHA-256 diff --git a/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNState-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNState-Cmdlet.cs index 6a974f960..5bff989b8 100644 --- a/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNState-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNState-Cmdlet.cs @@ -145,17 +145,22 @@ public partial class TestSFNStateCmdlet : AmazonStepFunctionsClientCmdlet, IExec /// for the state. /// ///
                  - #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] - #else - [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] - [System.Management.Automation.AllowEmptyString] - [System.Management.Automation.AllowNull] - #endif - [Amazon.PowerShell.Common.AWSRequiredParameter] public System.String RoleArn { get; set; } #endregion + #region Parameter Variable + /// + /// + /// JSON object literal that sets variables used in the state under test. Object keys + /// are the variable names and values are the variable values. + /// + /// + [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] + [Alias("Variables")] + public System.String Variable { get; set; } + #endregion + #region Parameter Select /// /// Use the -Select parameter to control the cmdlet output. The default value is '*'. @@ -193,12 +198,7 @@ protected override void ProcessRecord() context.InspectionLevel = this.InspectionLevel; context.RevealSecret = this.RevealSecret; context.RoleArn = this.RoleArn; - #if MODULAR - if (this.RoleArn == null && ParameterWasBound(nameof(this.RoleArn))) - { - WriteWarning("You are passing $null as a value for parameter RoleArn which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); - } - #endif + context.Variable = this.Variable; // allow further manipulation of loaded context prior to processing PostExecutionContextLoad(context); @@ -235,6 +235,10 @@ public object Execute(ExecutorContext context) { request.RoleArn = cmdletContext.RoleArn; } + if (cmdletContext.Variable != null) + { + request.Variables = cmdletContext.Variable; + } CmdletOutput output; @@ -301,6 +305,7 @@ internal partial class CmdletContext : ExecutorContext public Amazon.StepFunctions.InspectionLevel InspectionLevel { get; set; } public System.Boolean? RevealSecret { get; set; } public System.String RoleArn { get; set; } + public System.String Variable { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response; } diff --git a/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNStateMachineDefinitionValidation-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNStateMachineDefinitionValidation-Cmdlet.cs index 59ecc605f..6ddefa362 100644 --- a/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNStateMachineDefinitionValidation-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/StepFunctions/Basic/Test-SFNStateMachineDefinitionValidation-Cmdlet.cs @@ -28,27 +28,38 @@ namespace Amazon.PowerShell.Cmdlets.SFN { /// - /// Validates the syntax of a state machine definition. + /// Validates the syntax of a state machine definition specified in Amazon + /// States Language (ASL), a JSON-based, structured language. /// /// /// /// You can validate that a state machine definition is correct without creating a state - /// machine resource. Step Functions will implicitly perform the same syntax check when - /// you invoke CreateStateMachine and UpdateStateMachine. State machine - /// definitions are specified using a JSON-based, structured language. For more information - /// on Amazon States Language see Amazon - /// States Language (ASL). + /// machine resource. /// /// Suggested uses for ValidateStateMachineDefinition: ///
                  • /// Integrate automated checks into your code review or Continuous Integration (CI) process - /// to validate state machine definitions before starting deployments. + /// to check state machine definitions before starting deployments. ///
                  • - /// Run the validation from a Git pre-commit hook to check your state machine definitions - /// before committing them to your source repository. - ///
                  - /// Errors found in the state machine definition will be returned in the response as a - /// list of diagnostic elements, rather than raise an exception. + /// Run validation from a Git pre-commit hook to verify the definition before committing + /// to your source repository. + ///
                + /// Validation will look for problems in your state machine definition and return a result + /// and a list of diagnostic elements. + /// + /// The result value will be OK when your workflow definition can be successfully + /// created or updated. Note the result can be OK even when diagnostic warnings + /// are present in the response. The result value will be FAIL when the + /// workflow definition contains errors that would prevent you from creating or updating + /// your state machine. + /// + /// The list of ValidateStateMachineDefinitionDiagnostic + /// data elements can contain zero or more WARNING and/or ERROR elements. + /// + /// The ValidateStateMachineDefinition API might add new diagnostics in the future, + /// adjust diagnostic codes, or change the message wording. Your automated processes should + /// only rely on the value of the result field value (OK, FAIL). Do not + /// rely on the exact order, count, or wording of diagnostic messages. /// ///
            [Cmdlet("Test", "SFNStateMachineDefinitionValidation")] @@ -62,6 +73,8 @@ public partial class TestSFNStateMachineDefinitionValidationCmdlet : AmazonStepF protected override bool IsSensitiveRequest { get; set; } = true; + protected override bool IsSensitiveResponse { get; set; } = true; + protected override bool IsGeneratedCmdlet { get; set; } = true; #region Parameter Definition diff --git a/modules/AWSPowerShell/Cmdlets/WorkSpaces/Basic/Import-WKSWorkspaceImage-Cmdlet.cs b/modules/AWSPowerShell/Cmdlets/WorkSpaces/Basic/Import-WKSWorkspaceImage-Cmdlet.cs index f678953ef..57bfa0960 100644 --- a/modules/AWSPowerShell/Cmdlets/WorkSpaces/Basic/Import-WKSWorkspaceImage-Cmdlet.cs +++ b/modules/AWSPowerShell/Cmdlets/WorkSpaces/Basic/Import-WKSWorkspaceImage-Cmdlet.cs @@ -117,11 +117,11 @@ public partial class ImportWKSWorkspaceImageCmdlet : AmazonWorkSpacesClientCmdle /// /// /// The ingestion process to be used when importing the image, depending on which protocol - /// you want to use for your BYOL Workspace image, either PCoIP, DCV, or bring your own - /// protocol (BYOP). To use WSP, specify a value that ends in _DCV. To use PCoIP, - /// specify a value that does not end in _DCV. To use BYOP, specify a value that + /// you want to use for your BYOL Workspace image, either PCoIP, WSP, or bring your own + /// protocol (BYOP). To use DCV, specify a value that ends in _WSP. To use PCoIP, + /// specify a value that does not end in _WSP. To use BYOP, specify a value that /// ends in _BYOP.For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), specify - /// BYOL_REGULAR, BYOL_REGULAR_DCV, or BYOL_REGULAR_BYOP, depending + /// BYOL_REGULAR, BYOL_REGULAR_WSP, or BYOL_REGULAR_BYOP, depending /// on the protocol.The BYOL_REGULAR_BYOP and BYOL_GRAPHICS_G4DN_BYOP values are only supported /// by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use these /// values. For more information, see Amazon diff --git a/modules/AWSPowerShell/CmdletsList.dat b/modules/AWSPowerShell/CmdletsList.dat index d7a06512e..3d06461dc 100644 Binary files a/modules/AWSPowerShell/CmdletsList.dat and b/modules/AWSPowerShell/CmdletsList.dat differ diff --git a/modules/ModularAWSPowerShell/CmdletsList.dat b/modules/ModularAWSPowerShell/CmdletsList.dat index a04c15fc0..f9acacfe8 100644 Binary files a/modules/ModularAWSPowerShell/CmdletsList.dat and b/modules/ModularAWSPowerShell/CmdletsList.dat differ diff --git a/solutions/ModularAWSPowerShell.sln b/solutions/ModularAWSPowerShell.sln index aa2d8e98e..5b1b837f3 100644 --- a/solutions/ModularAWSPowerShell.sln +++ b/solutions/ModularAWSPowerShell.sln @@ -78,6 +78,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Tools.Batch", "..\modul EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Tools.BCMDataExports", "..\modules\AWSPowerShell\Cmdlets\BCMDataExports\AWS.Tools.BCMDataExports.csproj", "{5F88EF0D-2EE1-4A0A-8295-0E61DE86E4EE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Tools.BCMPricingCalculator", "..\modules\AWSPowerShell\Cmdlets\BCMPricingCalculator\AWS.Tools.BCMPricingCalculator.csproj", "{DB74072D-53AF-4FB4-82F9-935B02C3F5A7}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Tools.Bedrock", "..\modules\AWSPowerShell\Cmdlets\Bedrock\AWS.Tools.Bedrock.csproj", "{10BC4D1F-693A-417C-B960-36C347B2742C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Tools.BedrockAgent", "..\modules\AWSPowerShell\Cmdlets\BedrockAgent\AWS.Tools.BedrockAgent.csproj", "{29ED7572-F866-41D6-9D7C-3EE9994CAB63}" @@ -930,6 +932,10 @@ Global {5F88EF0D-2EE1-4A0A-8295-0E61DE86E4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU {5F88EF0D-2EE1-4A0A-8295-0E61DE86E4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU {5F88EF0D-2EE1-4A0A-8295-0E61DE86E4EE}.Release|Any CPU.Build.0 = Release|Any CPU + {DB74072D-53AF-4FB4-82F9-935B02C3F5A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB74072D-53AF-4FB4-82F9-935B02C3F5A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB74072D-53AF-4FB4-82F9-935B02C3F5A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB74072D-53AF-4FB4-82F9-935B02C3F5A7}.Release|Any CPU.Build.0 = Release|Any CPU {10BC4D1F-693A-417C-B960-36C347B2742C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {10BC4D1F-693A-417C-B960-36C347B2742C}.Debug|Any CPU.Build.0 = Debug|Any CPU {10BC4D1F-693A-417C-B960-36C347B2742C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -2356,6 +2362,7 @@ Global {AA0A389A-77F3-4687-BC13-BAF6C0AC6BCD} = {899FAE76-60BB-4E45-B106-4B2FACE6FC3A} {18BA627C-FC7C-41B2-BBB8-A23429961FFB} = {899FAE76-60BB-4E45-B106-4B2FACE6FC3A} {5F88EF0D-2EE1-4A0A-8295-0E61DE86E4EE} = {899FAE76-60BB-4E45-B106-4B2FACE6FC3A} + {DB74072D-53AF-4FB4-82F9-935B02C3F5A7} = {899FAE76-60BB-4E45-B106-4B2FACE6FC3A} {10BC4D1F-693A-417C-B960-36C347B2742C} = {899FAE76-60BB-4E45-B106-4B2FACE6FC3A} {29ED7572-F866-41D6-9D7C-3EE9994CAB63} = {899FAE76-60BB-4E45-B106-4B2FACE6FC3A} {12F91A83-4A1D-41A5-9A38-33FE99CE73CE} = {899FAE76-60BB-4E45-B106-4B2FACE6FC3A}