awscli 1.40.17__py3-none-any.whl → 1.44.26__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- awscli/__init__.py +1 -1
- awscli/alias.py +3 -3
- awscli/argprocess.py +7 -2
- awscli/arguments.py +1 -1
- awscli/bcdoc/docevents.py +3 -0
- awscli/clidocs.py +19 -2
- awscli/clidriver.py +57 -10
- awscli/compat.py +11 -0
- awscli/customizations/argrename.py +1 -3
- awscli/customizations/cliinputjson.py +4 -0
- awscli/customizations/cloudformation/deploy.py +23 -6
- awscli/customizations/cloudformation/deployer.py +2 -2
- awscli/customizations/cloudformation/package.py +3 -2
- awscli/customizations/cloudfront.py +3 -1
- awscli/customizations/cloudtrail/subscribe.py +5 -5
- awscli/customizations/cloudtrail/validation.py +32 -11
- awscli/customizations/codecommit.py +2 -3
- awscli/customizations/codedeploy/deregister.py +5 -2
- awscli/customizations/codedeploy/push.py +7 -6
- awscli/customizations/codedeploy/register.py +5 -2
- awscli/customizations/codedeploy/systems.py +3 -1
- awscli/customizations/commands.py +2 -1
- awscli/customizations/configservice/getstatus.py +3 -3
- awscli/customizations/datapipeline/__init__.py +7 -4
- awscli/customizations/datapipeline/createdefaultroles.py +4 -2
- awscli/customizations/dlm/createdefaultrole.py +4 -2
- awscli/customizations/ec2/bundleinstance.py +2 -1
- awscli/customizations/eks/get_token.py +6 -4
- awscli/customizations/eks/update_kubeconfig.py +15 -3
- awscli/customizations/emr/argumentschema.py +355 -344
- awscli/customizations/emr/createcluster.py +520 -282
- awscli/customizations/emr/emrutils.py +83 -50
- awscli/customizations/emr/helptext.py +132 -74
- awscli/customizations/emr/steputils.py +92 -52
- awscli/customizations/gamelift/getlog.py +3 -2
- awscli/customizations/gamelift/uploadbuild.py +30 -15
- awscli/customizations/globalargs.py +169 -0
- awscli/customizations/logs/startlivetail.py +3 -3
- awscli/customizations/paginate.py +66 -1
- awscli/customizations/rds.py +3 -1
- awscli/customizations/removals.py +4 -0
- awscli/customizations/s3/filegenerator.py +7 -1
- awscli/customizations/s3/fileinfo.py +5 -1
- awscli/customizations/s3/fileinfobuilder.py +7 -0
- awscli/customizations/s3/s3handler.py +11 -0
- awscli/customizations/s3/subcommands.py +147 -6
- awscli/customizations/s3/syncstrategy/base.py +9 -0
- awscli/customizations/s3/syncstrategy/caseconflict.py +96 -0
- awscli/customizations/s3/utils.py +25 -0
- awscli/customizations/s3uploader.py +18 -8
- awscli/customizations/scalarparse.py +48 -9
- awscli/customizations/utils.py +2 -1
- awscli/customizations/waiters.py +3 -2
- awscli/data/cli.json +5 -0
- awscli/examples/apigateway/update-vpc-link.rst +47 -0
- awscli/examples/apigatewayv2/create-routing-rule.rst +52 -0
- awscli/examples/apigatewayv2/delete-routing-rule.rst +11 -0
- awscli/examples/apigatewayv2/get-routing-rule.rst +35 -0
- awscli/examples/apigatewayv2/list-routing-rules.rst +38 -0
- awscli/examples/apigatewayv2/put-routing-rule.rst +52 -0
- awscli/examples/application-signals/batch-get-service-level-objective-budget-report.rst +99 -0
- awscli/examples/application-signals/create-service-level-objective.rst +88 -0
- awscli/examples/application-signals/delete-service-level-objective.rst +10 -0
- awscli/examples/application-signals/get-service-level-objective.rst +53 -0
- awscli/examples/application-signals/get-service.rst +72 -0
- awscli/examples/application-signals/list-service-dependencies.rst +96 -0
- awscli/examples/application-signals/list-service-dependents.rst +36 -0
- awscli/examples/application-signals/list-service-level-objectives.rst +17 -0
- awscli/examples/application-signals/list-service-operations.rst +63 -0
- awscli/examples/application-signals/list-services.rst +61 -0
- awscli/examples/application-signals/list-tags-for-resource.rst +17 -0
- awscli/examples/application-signals/start-discovery.rst +9 -0
- awscli/examples/application-signals/tag-resource.rst +11 -0
- awscli/examples/application-signals/untag-resource.rst +11 -0
- awscli/examples/application-signals/update-service-level-objective.rst +69 -0
- awscli/examples/cloudformation/_package_description.rst +4 -4
- awscli/examples/cloudformation/create-generated-template.rst +50 -0
- awscli/examples/cloudformation/create-stack-refactor.rst +16 -0
- awscli/examples/cloudformation/delete-generated-template.rst +10 -0
- awscli/examples/cloudformation/describe-generated-template.rst +62 -0
- awscli/examples/cloudformation/describe-resource-scan.rst +38 -0
- awscli/examples/cloudformation/describe-stack-refactor.rst +20 -0
- awscli/examples/cloudformation/execute-stack-refactor.rst +10 -0
- awscli/examples/cloudformation/list-generated-templates.rst +41 -0
- awscli/examples/cloudformation/list-resource-scan-related-resources.rst +47 -0
- awscli/examples/cloudformation/list-resource-scan-resources.rst +30 -0
- awscli/examples/cloudformation/list-stack-refactor-actions.rst +71 -0
- awscli/examples/cloudformation/start-resource-scan.rst +14 -0
- awscli/examples/cloudfront/associate-distribution-tenant-web-acl.rst +18 -0
- awscli/examples/cloudfront/associate-distribution-web-acl.rst +18 -0
- awscli/examples/cloudfront/create-connection-group.rst +39 -0
- awscli/examples/cloudfront/create-distribution-tenant.rst +275 -0
- awscli/examples/cloudfront/create-distribution.rst +625 -235
- awscli/examples/cloudfront/create-invalidation-for-distribution-tenant.rst +29 -0
- awscli/examples/cloudfront/delete-connection-group.rst +11 -0
- awscli/examples/cloudfront/delete-distribution-tenant.rst +11 -0
- awscli/examples/cloudfront/disassociate-distribution-tenant-web-acl.rst +16 -0
- awscli/examples/cloudfront/disassociate-distribution-web-acl.rst +16 -0
- awscli/examples/cloudfront/get-connection-group-by-routing-endpoint.rst +26 -0
- awscli/examples/cloudfront/get-connection-group.rst +26 -0
- awscli/examples/cloudfront/get-distribution-tenant-by-domain.rst +37 -0
- awscli/examples/cloudfront/get-distribution-tenant.rst +31 -0
- awscli/examples/cloudfront/get-invalidation-for-distribution-tenant.rst +29 -0
- awscli/examples/cloudfront/get-managed-certificate-details.rst +25 -0
- awscli/examples/cloudfront/list-connection-groups.rst +38 -0
- awscli/examples/cloudfront/list-distribution-tenants-by-customization.rst +45 -0
- awscli/examples/cloudfront/list-distribution-tenants.rst +90 -0
- awscli/examples/cloudfront/list-distributions-by-connection-mode.rst +115 -0
- awscli/examples/cloudfront/list-domain-conflicts.rst +22 -0
- awscli/examples/cloudfront/list-invalidations-for-distribution-tenant.rst +22 -0
- awscli/examples/cloudfront/update-connection-group.rst +29 -0
- awscli/examples/cloudfront/update-distribution-tenant.rst +76 -0
- awscli/examples/cloudfront/update-domain-association.rst +18 -0
- awscli/examples/cloudfront/verify-dns-configuration.rst +20 -0
- awscli/examples/ec2/associate-ipam-resource-discovery.rst +1 -1
- awscli/examples/ec2/authorize-security-group-ingress.rst +1 -1
- awscli/examples/ec2/create-ipam-resource-discovery.rst +1 -1
- awscli/examples/ec2/delete-ipam-pool.rst +1 -1
- awscli/examples/ec2/describe-addresses-attribute.rst +1 -1
- awscli/examples/ec2/get-ipam-discovered-public-addresses.rst +1 -1
- awscli/examples/ec2/modify-ipam-resource-discovery.rst +1 -1
- awscli/examples/ec2/modify-ipam-scope.rst +1 -1
- awscli/examples/ec2/release-ipam-pool-allocation.rst +3 -3
- awscli/examples/eks/associate-access-policy.rst +29 -0
- awscli/examples/eks/create-access-entry.rst +54 -0
- awscli/examples/eks/create-pod-identity-association.rst +59 -0
- awscli/examples/eks/delete-access-entry.rst +11 -0
- awscli/examples/eks/delete-pod-identity-association.rst +28 -0
- awscli/examples/eks/describe-access-entry.rst +25 -0
- awscli/examples/eks/describe-insight.rst +36 -0
- awscli/examples/eks/describe-pod-identity-association.rst +28 -0
- awscli/examples/eks/disassociate-access-policy.rst +12 -0
- awscli/examples/eks/list-access-entries.rst +19 -0
- awscli/examples/eks/list-access-policies.rst +90 -0
- awscli/examples/eks/list-associated-access-policies.rst +27 -0
- awscli/examples/eks/list-insights.rst +67 -0
- awscli/examples/eks/list-pod-identity-associations.rst +61 -0
- awscli/examples/eks/update-access-entry.rst +28 -0
- awscli/examples/eks/update-pod-identity-association.rst +29 -0
- awscli/examples/elbv2/modify-listener.rst +95 -86
- awscli/examples/emr/create-cluster-synopsis.txt +1 -0
- awscli/examples/global_options.rst +4 -0
- awscli/examples/global_synopsis.rst +1 -0
- awscli/examples/guardduty/update-detector.rst +23 -0
- awscli/examples/ivs-realtime/create-stage.rst +6 -3
- awscli/examples/ivs-realtime/get-composition.rst +7 -4
- awscli/examples/ivs-realtime/get-participant.rst +99 -31
- awscli/examples/ivs-realtime/get-stage.rst +3 -2
- awscli/examples/ivs-realtime/list-participant-events.rst +54 -2
- awscli/examples/ivs-realtime/list-participant-replicas.rst +24 -0
- awscli/examples/ivs-realtime/list-participants.rst +61 -3
- awscli/examples/ivs-realtime/start-composition.rst +88 -3
- awscli/examples/ivs-realtime/start-participant-replication.rst +24 -0
- awscli/examples/ivs-realtime/stop-participant-replication.rst +24 -0
- awscli/examples/ivs-realtime/update-stage.rst +51 -3
- awscli/examples/kms/create-key.rst +42 -7
- awscli/examples/kms/delete-imported-key-material.rst +8 -2
- awscli/examples/kms/describe-key.rst +2 -0
- awscli/examples/kms/disable-key.rst +1 -1
- awscli/examples/kms/generate-data-key-pair-without-plaintext.rst +1 -0
- awscli/examples/kms/generate-data-key-pair.rst +1 -0
- awscli/examples/kms/generate-data-key-without-plaintext.rst +2 -1
- awscli/examples/kms/generate-data-key.rst +5 -4
- awscli/examples/kms/generate-mac.rst +45 -0
- awscli/examples/kms/generate-random.rst +1 -1
- awscli/examples/kms/get-public-key.rst +2 -3
- awscli/examples/kms/import-key-material.rst +6 -1
- awscli/examples/kms/re-encrypt.rst +3 -3
- awscli/examples/kms/sign.rst +1 -1
- awscli/examples/kms/verify-mac.rst +27 -0
- awscli/examples/kms/verify.rst +5 -1
- awscli/examples/lambda/create-function.rst +4 -4
- awscli/examples/lambda/get-function.rst +3 -3
- awscli/examples/lambda/list-functions.rst +6 -6
- awscli/examples/medical-imaging/create-datastore.rst +19 -2
- awscli/examples/medical-imaging/get-datastore.rst +24 -1
- awscli/examples/networkmanager/get-vpc-attachment.rst +1 -1
- awscli/examples/omics/cancel-run.rst +1 -1
- awscli/examples/omics/create-run-group.rst +4 -2
- awscli/examples/omics/create-workflow.rst +1 -1
- awscli/examples/omics/delete-run-group.rst +1 -1
- awscli/examples/omics/delete-run.rst +1 -1
- awscli/examples/omics/delete-workflow.rst +1 -1
- awscli/examples/omics/get-run-group.rst +1 -1
- awscli/examples/omics/get-run-task.rst +1 -1
- awscli/examples/omics/get-run.rst +1 -1
- awscli/examples/omics/get-workflow.rst +1 -1
- awscli/examples/omics/list-run-groups.rst +1 -1
- awscli/examples/omics/list-run-tasks.rst +1 -1
- awscli/examples/omics/list-runs.rst +1 -1
- awscli/examples/omics/list-workflows.rst +1 -1
- awscli/examples/omics/start-run.rst +1 -2
- awscli/examples/omics/update-workflow.rst +1 -1
- awscli/examples/pi/create-performance-analysis-report.rst +17 -0
- awscli/examples/pi/delete-performance-analysis-report.rst +12 -0
- awscli/examples/pi/describe-dimension-keys.rst +33 -1
- awscli/examples/pi/get-dimension-key-details.rst +25 -0
- awscli/examples/pi/get-performance-analysis-report.rst +27 -0
- awscli/examples/pi/get-resource-metadata.rst +20 -0
- awscli/examples/pi/list-available-resource-dimensions.rst +48 -0
- awscli/examples/pi/list-available-resource-metrics.rst +29 -0
- awscli/examples/pi/list-performance-analysis-reports.rst +44 -0
- awscli/examples/pi/list-tags-for-resource.rst +20 -0
- awscli/examples/pi/tag-resource.rst +12 -0
- awscli/examples/pi/untag-resource.rst +12 -0
- awscli/examples/route53domains/get-domain-detail.rst +3 -3
- awscli/examples/securityhub/describe-hub.rst +6 -4
- awscli/examples/servicediscovery/create-service.rst +50 -10
- awscli/examples/servicediscovery/delete-namespace.rst +18 -4
- awscli/examples/servicediscovery/delete-service-attributes.rst +15 -3
- awscli/examples/servicediscovery/delete-service.rst +13 -3
- awscli/examples/servicediscovery/deregister-instance.rst +18 -2
- awscli/examples/servicediscovery/discover-instances-revision.rst +18 -1
- awscli/examples/servicediscovery/discover-instances.rst +32 -2
- awscli/examples/servicediscovery/get-instance.rst +30 -4
- awscli/examples/servicediscovery/get-instances-health-status.rst +19 -1
- awscli/examples/servicediscovery/get-namespace.rst +40 -9
- awscli/examples/servicediscovery/get-operation.rst +32 -6
- awscli/examples/servicediscovery/get-service-attributes.rst +25 -3
- awscli/examples/servicediscovery/get-service.rst +35 -7
- awscli/examples/servicediscovery/list-instances.rst +38 -3
- awscli/examples/servicediscovery/list-namespaces.rst +45 -22
- awscli/examples/servicediscovery/list-services.rst +30 -2
- awscli/examples/servicediscovery/register-instance.rst +18 -2
- awscli/examples/servicediscovery/update-http-namespace.rst +22 -5
- awscli/examples/servicediscovery/update-instance-custom-health-status.rst +14 -1
- awscli/examples/servicediscovery/update-private-dns-namespace.rst +22 -5
- awscli/examples/servicediscovery/update-public-dns-namespace.rst +22 -5
- awscli/examples/servicediscovery/update-service-attributes.rst +14 -2
- awscli/examples/servicediscovery/update-service.rst +20 -4
- awscli/examples/ssm/put-parameter.rst +6 -6
- awscli/examples/verifiedpermissions/update-policy.rst +10 -78
- awscli/examples/workspaces/describe-workspace-directories.rst +1 -2
- awscli/examples/workspaces/register-workspace-directory.rst +2 -3
- awscli/handlers.py +0 -4
- awscli/paramfile.py +21 -4
- awscli/testutils.py +22 -4
- awscli/topics/config-vars.rst +1 -1
- awscli/topics/s3-case-insensitivity.rst +105 -0
- awscli/topics/topic-tags.json +16 -0
- awscli/utils.py +33 -2
- {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/METADATA +18 -3
- {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/RECORD +251 -308
- awscli/customizations/opsworks.py +0 -543
- awscli/customizations/opsworkscm.py +0 -21
- awscli/examples/elastictranscoder/cancel-job.rst +0 -8
- awscli/examples/elastictranscoder/create-job.rst +0 -94
- awscli/examples/elastictranscoder/create-pipeline.rst +0 -94
- awscli/examples/elastictranscoder/create-preset.rst +0 -141
- awscli/examples/elastictranscoder/delete-pipeline.rst +0 -13
- awscli/examples/elastictranscoder/delete-preset.rst +0 -8
- awscli/examples/elastictranscoder/list-jobs-by-pipeline.rst +0 -13
- awscli/examples/elastictranscoder/list-jobs-by-status.rst +0 -14
- awscli/examples/elastictranscoder/list-pipelines.rst +0 -84
- awscli/examples/elastictranscoder/list-presets.rst +0 -95
- awscli/examples/elastictranscoder/read-job.rst +0 -65
- awscli/examples/elastictranscoder/read-pipeline.rst +0 -59
- awscli/examples/elastictranscoder/read-preset.rst +0 -100
- awscli/examples/elastictranscoder/update-pipeline-notifications.rst +0 -52
- awscli/examples/elastictranscoder/update-pipeline-status.rst +0 -53
- awscli/examples/elastictranscoder/update-pipeline.rst +0 -95
- awscli/examples/opsworks/assign-instance.rst +0 -14
- awscli/examples/opsworks/assign-volume.rst +0 -17
- awscli/examples/opsworks/associate-elastic-ip.rst +0 -14
- awscli/examples/opsworks/attach-elastic-load-balancer.rst +0 -14
- awscli/examples/opsworks/create-app.rst +0 -64
- awscli/examples/opsworks/create-deployment.rst +0 -66
- awscli/examples/opsworks/create-instance.rst +0 -25
- awscli/examples/opsworks/create-layer.rst +0 -17
- awscli/examples/opsworks/create-server.rst +0 -43
- awscli/examples/opsworks/create-stack.rst +0 -25
- awscli/examples/opsworks/create-user-profile.rst +0 -24
- awscli/examples/opsworks/delete-app.rst +0 -17
- awscli/examples/opsworks/delete-instance.rst +0 -15
- awscli/examples/opsworks/delete-layer.rst +0 -17
- awscli/examples/opsworks/delete-stack.rst +0 -18
- awscli/examples/opsworks/delete-user-profile.rst +0 -17
- awscli/examples/opsworks/deregister-elastic-ip.rst +0 -13
- awscli/examples/opsworks/deregister-instance.rst +0 -14
- awscli/examples/opsworks/deregister-rds-db-instance.rst +0 -20
- awscli/examples/opsworks/deregister-volume.rst +0 -15
- awscli/examples/opsworks/describe-apps.rst +0 -38
- awscli/examples/opsworks/describe-commands.rst +0 -43
- awscli/examples/opsworks/describe-deployments.rst +0 -52
- awscli/examples/opsworks/describe-elastic-ips.rst +0 -24
- awscli/examples/opsworks/describe-elastic-load-balancers.rst +0 -37
- awscli/examples/opsworks/describe-instances.rst +0 -95
- awscli/examples/opsworks/describe-layers.rst +0 -171
- awscli/examples/opsworks/describe-load-based-auto-scaling.rst +0 -37
- awscli/examples/opsworks/describe-my-user-profile.rst +0 -24
- awscli/examples/opsworks/describe-permissions.rst +0 -26
- awscli/examples/opsworks/describe-raid-arrays.rst +0 -31
- awscli/examples/opsworks/describe-rds-db-instances.rst +0 -29
- awscli/examples/opsworks/describe-stack-provisioning-parameters.rst +0 -32
- awscli/examples/opsworks/describe-stack-summary.rst +0 -27
- awscli/examples/opsworks/describe-stacks.rst +0 -65
- awscli/examples/opsworks/describe-timebased-auto-scaling.rst +0 -39
- awscli/examples/opsworks/describe-user-profiles.rst +0 -32
- awscli/examples/opsworks/describe-volumes.rst +0 -31
- awscli/examples/opsworks/detach-elastic-load-balancer.rst +0 -14
- awscli/examples/opsworks/disassociate-elastic-ip.rst +0 -14
- awscli/examples/opsworks/get-hostname-suggestion.rst +0 -21
- awscli/examples/opsworks/reboot-instance.rst +0 -14
- awscli/examples/opsworks/register-elastic-ip.rst +0 -19
- awscli/examples/opsworks/register-rds-db-instance.rst +0 -15
- awscli/examples/opsworks/register-volume.rst +0 -18
- awscli/examples/opsworks/register.rst +0 -105
- awscli/examples/opsworks/set-load-based-auto-scaling.rst +0 -38
- awscli/examples/opsworks/set-permission.rst +0 -23
- awscli/examples/opsworks/set-time-based-auto-scaling.rst +0 -33
- awscli/examples/opsworks/start-instance.rst +0 -20
- awscli/examples/opsworks/start-stack.rst +0 -15
- awscli/examples/opsworks/stop-instance.rst +0 -20
- awscli/examples/opsworks/stop-stack.rst +0 -15
- awscli/examples/opsworks/unassign-instance.rst +0 -14
- awscli/examples/opsworks/unassign-volume.rst +0 -16
- awscli/examples/opsworks/update-app.rst +0 -14
- awscli/examples/opsworks/update-elastic-ip.rst +0 -14
- awscli/examples/opsworks/update-instance.rst +0 -14
- awscli/examples/opsworks/update-layer.rst +0 -14
- awscli/examples/opsworks/update-my-user-profile.rst +0 -16
- awscli/examples/opsworks/update-rds-db-instance.rst +0 -18
- awscli/examples/opsworks/update-volume.rst +0 -16
- awscli/examples/opsworkscm/associate-node.rst +0 -22
- awscli/examples/opsworkscm/create-backup.rst +0 -46
- awscli/examples/opsworkscm/create-server.rst +0 -48
- awscli/examples/opsworkscm/delete-backup.rst +0 -17
- awscli/examples/opsworkscm/delete-server.rst +0 -16
- awscli/examples/opsworkscm/describe-account-attributes.rst +0 -26
- awscli/examples/opsworkscm/describe-backups.rst +0 -44
- awscli/examples/opsworkscm/describe-events.rst +0 -21
- awscli/examples/opsworkscm/describe-node-association-status.rst +0 -20
- awscli/examples/opsworkscm/describe-servers.rst +0 -48
- awscli/examples/opsworkscm/disassociate-node.rst +0 -19
- awscli/examples/opsworkscm/restore-server.rst +0 -20
- awscli/examples/opsworkscm/start-maintenance.rst +0 -39
- awscli/examples/opsworkscm/update-server-engine-attributes.rst +0 -43
- awscli/examples/opsworkscm/update-server.rst +0 -42
- awscli/examples/qldb/cancel-journal-kinesis-stream.rst +0 -15
- awscli/examples/qldb/create-ledger.rst +0 -43
- awscli/examples/qldb/delete-ledger.rst +0 -10
- awscli/examples/qldb/describe-journal-kinesis-stream.rst +0 -29
- awscli/examples/qldb/describe-journal-s3-export.rst +0 -30
- awscli/examples/qldb/describe-ledger.rst +0 -23
- awscli/examples/qldb/export-journal-to-s3.rst +0 -28
- awscli/examples/qldb/get-block.rst +0 -55
- awscli/examples/qldb/get-digest.rst +0 -17
- awscli/examples/qldb/get-revision.rst +0 -57
- awscli/examples/qldb/list-journal-kinesis-streams-for-ledger.rst +0 -30
- awscli/examples/qldb/list-journal-s3-exports-for-ledger.rst +0 -31
- awscli/examples/qldb/list-journal-s3-exports.rst +0 -46
- awscli/examples/qldb/list-ledgers.rst +0 -24
- awscli/examples/qldb/list-tags-for-resource.rst +0 -17
- awscli/examples/qldb/stream-journal-to-kinesis.rst +0 -46
- awscli/examples/qldb/tag-resource.rst +0 -11
- awscli/examples/qldb/untag-resource.rst +0 -11
- awscli/examples/qldb/update-ledger-permissions-mode.rst +0 -34
- awscli/examples/qldb/update-ledger.rst +0 -63
- awscli/examples/robomaker/batch-describe-simulation-job.rst +0 -150
- awscli/examples/robomaker/cancel-simulation-job.rst +0 -6
- awscli/examples/robomaker/create-deployment-job.rst +0 -37
- awscli/examples/robomaker/create-fleet.rst +0 -18
- awscli/examples/robomaker/create-robot-application-version.rst +0 -31
- awscli/examples/robomaker/create-robot-application.rst +0 -29
- awscli/examples/robomaker/create-robot.rst +0 -20
- awscli/examples/robomaker/create-simulation-application-version.rst +0 -39
- awscli/examples/robomaker/create-simulation-application.rst +0 -38
- awscli/examples/robomaker/create-simulation-job.rst +0 -43
- awscli/examples/robomaker/delete-fleet.rst +0 -7
- awscli/examples/robomaker/delete-robot-application.rst +0 -7
- awscli/examples/robomaker/delete-robot.rst +0 -7
- awscli/examples/robomaker/delete-simulation-application.rst +0 -7
- awscli/examples/robomaker/deregister-robot.rst +0 -14
- awscli/examples/robomaker/describe-deployment-job.rst +0 -38
- awscli/examples/robomaker/describe-fleet.rst +0 -28
- awscli/examples/robomaker/describe-robot-application.rst +0 -29
- awscli/examples/robomaker/describe-robot.rst +0 -21
- awscli/examples/robomaker/describe-simulation-application.rst +0 -37
- awscli/examples/robomaker/describe-simulation-job.rst +0 -45
- awscli/examples/robomaker/list-deployment-jobs.rst +0 -57
- awscli/examples/robomaker/list-fleets.rst +0 -22
- awscli/examples/robomaker/list-robot-applications.rst +0 -32
- awscli/examples/robomaker/list-robots.rst +0 -45
- awscli/examples/robomaker/list-simulation-applications.rst +0 -50
- awscli/examples/robomaker/list-simulation-jobs.rst +0 -80
- awscli/examples/robomaker/list-tags-for-resource.rst +0 -16
- awscli/examples/robomaker/register-robot.rst +0 -14
- awscli/examples/robomaker/restart-simulation-job.rst +0 -7
- awscli/examples/robomaker/sync-deployment-job.rst +0 -30
- awscli/examples/robomaker/tag-resource.rst +0 -7
- awscli/examples/robomaker/untag-resource.rst +0 -7
- awscli/examples/robomaker/update-robot-application.rst +0 -28
- awscli/examples/robomaker/update-simulation-application.rst +0 -36
- {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws +0 -0
- {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws.cmd +0 -0
- {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws_bash_completer +0 -0
- {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws_completer +0 -0
- {awscli-1.40.17.data → awscli-1.44.26.data}/scripts/aws_zsh_completer.sh +0 -0
- {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/LICENSE.txt +0 -0
- {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/WHEEL +0 -0
- {awscli-1.40.17.dist-info → awscli-1.44.26.dist-info}/top_level.txt +0 -0
awscli/__init__.py
CHANGED
awscli/alias.py
CHANGED
|
@@ -183,7 +183,7 @@ class ServiceAliasCommand(BaseAliasCommand):
|
|
|
183
183
|
parsed_alias_args, remaining = self._parser.parse_known_args(
|
|
184
184
|
alias_args
|
|
185
185
|
)
|
|
186
|
-
self._update_parsed_globals(parsed_alias_args, parsed_globals)
|
|
186
|
+
self._update_parsed_globals(parsed_alias_args, parsed_globals, remaining)
|
|
187
187
|
# Take any of the remaining arguments that were not parsed out and
|
|
188
188
|
# prepend them to the remaining args provided to the alias.
|
|
189
189
|
remaining.extend(args)
|
|
@@ -228,7 +228,7 @@ class ServiceAliasCommand(BaseAliasCommand):
|
|
|
228
228
|
)
|
|
229
229
|
return alias_args
|
|
230
230
|
|
|
231
|
-
def _update_parsed_globals(self, parsed_alias_args, parsed_globals):
|
|
231
|
+
def _update_parsed_globals(self, parsed_alias_args, parsed_globals, remaining):
|
|
232
232
|
global_params_to_update = self._get_global_parameters_to_update(
|
|
233
233
|
parsed_alias_args
|
|
234
234
|
)
|
|
@@ -237,7 +237,7 @@ class ServiceAliasCommand(BaseAliasCommand):
|
|
|
237
237
|
# global parameters provided in the alias before updating
|
|
238
238
|
# the original provided global parameter values
|
|
239
239
|
# and passing those onto subsequent commands.
|
|
240
|
-
emit_top_level_args_parsed_event(self._session, parsed_alias_args)
|
|
240
|
+
emit_top_level_args_parsed_event(self._session, parsed_alias_args, remaining)
|
|
241
241
|
for param_name in global_params_to_update:
|
|
242
242
|
updated_param_value = getattr(parsed_alias_args, param_name)
|
|
243
243
|
setattr(parsed_globals, param_name, updated_param_value)
|
awscli/argprocess.py
CHANGED
|
@@ -65,7 +65,7 @@ class TooComplexError(Exception):
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
def unpack_argument(
|
|
68
|
-
session, service_name, operation_name, cli_argument, value
|
|
68
|
+
session, service_name, operation_name, cli_argument, value, parsed_globals
|
|
69
69
|
):
|
|
70
70
|
"""
|
|
71
71
|
Unpack an argument's value from the commandline. This is part one of a two
|
|
@@ -83,6 +83,7 @@ def unpack_argument(
|
|
|
83
83
|
value=value,
|
|
84
84
|
service_name=service_name,
|
|
85
85
|
operation_name=operation_name,
|
|
86
|
+
parsed_globals=parsed_globals,
|
|
86
87
|
)
|
|
87
88
|
|
|
88
89
|
if value_override is not None:
|
|
@@ -535,7 +536,11 @@ class ParamShorthandDocGen(ParamShorthand):
|
|
|
535
536
|
|
|
536
537
|
def _map_docs(self, argument_model, stack):
|
|
537
538
|
k = argument_model.key
|
|
538
|
-
|
|
539
|
+
stack.append(argument_model.value.name)
|
|
540
|
+
try:
|
|
541
|
+
value_docs = self._shorthand_docs(argument_model.value, stack)
|
|
542
|
+
finally:
|
|
543
|
+
stack.pop()
|
|
539
544
|
start = 'KeyName1=%s,KeyName2=%s' % (value_docs, value_docs)
|
|
540
545
|
if k.enum and not stack:
|
|
541
546
|
start += '\n\nWhere valid key names are:\n'
|
awscli/arguments.py
CHANGED
awscli/bcdoc/docevents.py
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
DOC_EVENTS = {
|
|
16
|
+
'doc-meta-description': '.%s',
|
|
16
17
|
'doc-breadcrumbs': '.%s',
|
|
17
18
|
'doc-title': '.%s',
|
|
18
19
|
'doc-description': '.%s',
|
|
@@ -39,6 +40,8 @@ def generate_events(session, help_command):
|
|
|
39
40
|
# Now generate the documentation events
|
|
40
41
|
session.emit('doc-breadcrumbs.%s' % help_command.event_class,
|
|
41
42
|
help_command=help_command)
|
|
43
|
+
session.emit('doc-meta-description.%s' % help_command.event_class,
|
|
44
|
+
help_command=help_command)
|
|
42
45
|
session.emit('doc-title.%s' % help_command.event_class,
|
|
43
46
|
help_command=help_command)
|
|
44
47
|
session.emit('doc-description.%s' % help_command.event_class,
|
awscli/clidocs.py
CHANGED
|
@@ -17,7 +17,7 @@ import re
|
|
|
17
17
|
from botocore.model import StringShape
|
|
18
18
|
from botocore.utils import is_json_value_header
|
|
19
19
|
|
|
20
|
-
from awscli import SCALAR_TYPES
|
|
20
|
+
from awscli import SCALAR_TYPES, __version__ as AWS_CLI_VERSION
|
|
21
21
|
from awscli.argprocess import ParamShorthandDocGen
|
|
22
22
|
from awscli.bcdoc.docevents import DOC_EVENTS
|
|
23
23
|
from awscli.topictags import TopicTagDB
|
|
@@ -114,7 +114,8 @@ class CLIDocumentEventHandler:
|
|
|
114
114
|
full_cmd_list.append(cmd)
|
|
115
115
|
full_cmd_name = ' '.join(full_cmd_list)
|
|
116
116
|
doc.write(f':ref:`{cmd} <cli:{full_cmd_name}>`')
|
|
117
|
-
doc.
|
|
117
|
+
doc.writeln(' ]')
|
|
118
|
+
doc.writeln('')
|
|
118
119
|
|
|
119
120
|
def doc_title(self, help_command, **kwargs):
|
|
120
121
|
doc = help_command.doc
|
|
@@ -223,6 +224,9 @@ class CLIDocumentEventHandler:
|
|
|
223
224
|
)
|
|
224
225
|
doc.write('\n')
|
|
225
226
|
|
|
227
|
+
def doc_meta_description(self, help_command, **kwargs):
|
|
228
|
+
pass
|
|
229
|
+
|
|
226
230
|
def _document_enums(self, model, doc):
|
|
227
231
|
"""Documents top-level parameter enums"""
|
|
228
232
|
if isinstance(model, StringShape):
|
|
@@ -402,6 +406,13 @@ class ServiceDocumentEventHandler(CLIDocumentEventHandler):
|
|
|
402
406
|
else:
|
|
403
407
|
doc.style.tocitem(command_name)
|
|
404
408
|
|
|
409
|
+
def doc_meta_description(self, help_command, **kwargs):
|
|
410
|
+
doc = help_command.doc
|
|
411
|
+
reference = help_command.event_class.replace('.', ' ')
|
|
412
|
+
doc.writeln(".. meta::")
|
|
413
|
+
doc.writeln(f" :description: Learn about the AWS CLI {AWS_CLI_VERSION} {reference} commands.")
|
|
414
|
+
doc.writeln("")
|
|
415
|
+
|
|
405
416
|
|
|
406
417
|
class OperationDocumentEventHandler(CLIDocumentEventHandler):
|
|
407
418
|
AWS_DOC_BASE = 'https://docs.aws.amazon.com/goto/WebAPI'
|
|
@@ -618,6 +629,12 @@ class OperationDocumentEventHandler(CLIDocumentEventHandler):
|
|
|
618
629
|
for member_name, member_shape in output_shape.members.items():
|
|
619
630
|
self._doc_member(doc, member_name, member_shape, stack=[])
|
|
620
631
|
|
|
632
|
+
def doc_meta_description(self, help_command, **kwargs):
|
|
633
|
+
doc = help_command.doc
|
|
634
|
+
reference = help_command.event_class.replace('.', ' ')
|
|
635
|
+
doc.writeln(".. meta::")
|
|
636
|
+
doc.writeln(f" :description: Use the AWS CLI {AWS_CLI_VERSION} to run the {reference} command.")
|
|
637
|
+
doc.writeln("")
|
|
621
638
|
|
|
622
639
|
class TopicListerDocumentEventHandler(CLIDocumentEventHandler):
|
|
623
640
|
DESCRIPTION = (
|
awscli/clidriver.py
CHANGED
|
@@ -48,7 +48,7 @@ from awscli.help import (
|
|
|
48
48
|
ServiceHelpCommand,
|
|
49
49
|
)
|
|
50
50
|
from awscli.plugin import load_plugins
|
|
51
|
-
from awscli.utils import emit_top_level_args_parsed_event, write_exception
|
|
51
|
+
from awscli.utils import emit_top_level_args_parsed_event, write_exception, create_nested_client, resolve_v2_debug_mode
|
|
52
52
|
from botocore import __version__ as botocore_version
|
|
53
53
|
from botocore import xform_name
|
|
54
54
|
|
|
@@ -225,7 +225,7 @@ class CLIDriver:
|
|
|
225
225
|
# that exceptions can be raised, which should have the same
|
|
226
226
|
# general exception handling logic as calling into the
|
|
227
227
|
# command table. This is why it's in the try/except clause.
|
|
228
|
-
self._handle_top_level_args(parsed_args)
|
|
228
|
+
self._handle_top_level_args(parsed_args, remaining)
|
|
229
229
|
self._emit_session_event(parsed_args)
|
|
230
230
|
HISTORY_RECORDER.record(
|
|
231
231
|
'CLI_VERSION', self.session.user_agent(), 'CLI'
|
|
@@ -279,8 +279,8 @@ class CLIDriver:
|
|
|
279
279
|
sys.stderr.write(msg)
|
|
280
280
|
sys.stderr.write('\n')
|
|
281
281
|
|
|
282
|
-
def _handle_top_level_args(self, args):
|
|
283
|
-
emit_top_level_args_parsed_event(self.session, args)
|
|
282
|
+
def _handle_top_level_args(self, args, remaining):
|
|
283
|
+
emit_top_level_args_parsed_event(self.session, args, remaining)
|
|
284
284
|
if args.profile:
|
|
285
285
|
self.session.set_config_variable('profile', args.profile)
|
|
286
286
|
if args.region:
|
|
@@ -542,9 +542,15 @@ class ServiceOperation:
|
|
|
542
542
|
event, parsed_args=parsed_args, parsed_globals=parsed_globals
|
|
543
543
|
)
|
|
544
544
|
call_parameters = self._build_call_parameters(
|
|
545
|
-
parsed_args, self.arg_table
|
|
545
|
+
parsed_args, self.arg_table, parsed_globals
|
|
546
546
|
)
|
|
547
547
|
|
|
548
|
+
self._detect_binary_file_migration_change(
|
|
549
|
+
self._session,
|
|
550
|
+
parsed_args,
|
|
551
|
+
parsed_globals,
|
|
552
|
+
self.arg_table
|
|
553
|
+
)
|
|
548
554
|
event = f'calling-command.{self._parent_name}.{self._name}'
|
|
549
555
|
override = self._emit_first_non_none_response(
|
|
550
556
|
event,
|
|
@@ -590,7 +596,7 @@ class ServiceOperation:
|
|
|
590
596
|
# CLIArguments for values.
|
|
591
597
|
parser.add_argument('help', nargs='?')
|
|
592
598
|
|
|
593
|
-
def _build_call_parameters(self, args, arg_table):
|
|
599
|
+
def _build_call_parameters(self, args, arg_table, parsed_globals):
|
|
594
600
|
# We need to convert the args specified on the command
|
|
595
601
|
# line as valid **kwargs we can hand to botocore.
|
|
596
602
|
service_params = {}
|
|
@@ -601,11 +607,11 @@ class ServiceOperation:
|
|
|
601
607
|
py_name = arg_object.py_name
|
|
602
608
|
if py_name in parsed_args:
|
|
603
609
|
value = parsed_args[py_name]
|
|
604
|
-
value = self._unpack_arg(arg_object, value)
|
|
610
|
+
value = self._unpack_arg(arg_object, value, parsed_globals)
|
|
605
611
|
arg_object.add_to_params(service_params, value)
|
|
606
612
|
return service_params
|
|
607
613
|
|
|
608
|
-
def _unpack_arg(self, cli_argument, value):
|
|
614
|
+
def _unpack_arg(self, cli_argument, value, parsed_globals):
|
|
609
615
|
# Unpacks a commandline argument into a Python value by firing the
|
|
610
616
|
# load-cli-arg.service-name.operation-name event.
|
|
611
617
|
session = self._session
|
|
@@ -613,7 +619,7 @@ class ServiceOperation:
|
|
|
613
619
|
operation_name = xform_name(self._name, '-')
|
|
614
620
|
|
|
615
621
|
return unpack_argument(
|
|
616
|
-
session, service_name, operation_name, cli_argument, value
|
|
622
|
+
session, service_name, operation_name, cli_argument, value, parsed_globals
|
|
617
623
|
)
|
|
618
624
|
|
|
619
625
|
def _create_argument_table(self):
|
|
@@ -661,6 +667,46 @@ class ServiceOperation:
|
|
|
661
667
|
parser = ArgTableArgParser(arg_table)
|
|
662
668
|
return parser
|
|
663
669
|
|
|
670
|
+
def _detect_binary_file_migration_change(
|
|
671
|
+
self,
|
|
672
|
+
session,
|
|
673
|
+
parsed_args,
|
|
674
|
+
parsed_globals,
|
|
675
|
+
arg_table
|
|
676
|
+
):
|
|
677
|
+
if (
|
|
678
|
+
session.get_scoped_config()
|
|
679
|
+
.get('cli_binary_format', None) == 'raw-in-base64-out'
|
|
680
|
+
):
|
|
681
|
+
# if cli_binary_format is set to raw-in-base64-out, then v2 behavior will
|
|
682
|
+
# be the same as v1, so there is no breaking change in this case.
|
|
683
|
+
return
|
|
684
|
+
if resolve_v2_debug_mode(parsed_globals):
|
|
685
|
+
parsed_args_to_check = {
|
|
686
|
+
arg: getattr(parsed_args, arg)
|
|
687
|
+
for arg in vars(parsed_args) if getattr(parsed_args, arg)
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
arg_values_to_check = [
|
|
691
|
+
arg.py_name for arg in arg_table.values()
|
|
692
|
+
if arg.py_name in parsed_args_to_check
|
|
693
|
+
and arg.argument_model.type_name == 'blob'
|
|
694
|
+
]
|
|
695
|
+
if arg_values_to_check:
|
|
696
|
+
print(
|
|
697
|
+
'\nAWS CLI v2 UPGRADE WARNING: When specifying a '
|
|
698
|
+
'blob-type parameter, AWS CLI v2 will assume the '
|
|
699
|
+
'parameter value is base64-encoded. This is different '
|
|
700
|
+
'from v1 behavior, where the AWS CLI will automatically '
|
|
701
|
+
'encode the value to base64. To retain v1 behavior in '
|
|
702
|
+
'AWS CLI v2, set the `cli_binary_format` configuration '
|
|
703
|
+
'variable to `raw-in-base64-out`. See '
|
|
704
|
+
'https://docs.aws.amazon.com/cli/latest/userguide/'
|
|
705
|
+
'cliv2-migration-changes.html'
|
|
706
|
+
'#cliv2-migration-binaryparam.\n',
|
|
707
|
+
file=sys.stderr
|
|
708
|
+
)
|
|
709
|
+
|
|
664
710
|
|
|
665
711
|
class CLIOperationCaller:
|
|
666
712
|
"""Call an AWS operation and format the response."""
|
|
@@ -692,7 +738,8 @@ class CLIOperationCaller:
|
|
|
692
738
|
value is returned.
|
|
693
739
|
|
|
694
740
|
"""
|
|
695
|
-
client =
|
|
741
|
+
client = create_nested_client(
|
|
742
|
+
self._session,
|
|
696
743
|
service_name,
|
|
697
744
|
region_name=parsed_globals.region,
|
|
698
745
|
endpoint_url=parsed_globals.endpoint_url,
|
awscli/compat.py
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import collections.abc as collections_abc
|
|
15
15
|
import contextlib
|
|
16
|
+
import datetime
|
|
16
17
|
import io
|
|
17
18
|
import locale
|
|
18
19
|
import os
|
|
@@ -502,3 +503,13 @@ except ImportError:
|
|
|
502
503
|
if _id:
|
|
503
504
|
id = _id
|
|
504
505
|
return distname, version, id
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
def get_current_datetime(remove_tzinfo=True):
|
|
509
|
+
# TODO: Consolidate to botocore.compat.get_current_datetime
|
|
510
|
+
# after it's had time to bake to avoid import errors with
|
|
511
|
+
# mismatched versions.
|
|
512
|
+
datetime_now = datetime.datetime.now(datetime.timezone.utc)
|
|
513
|
+
if remove_tzinfo:
|
|
514
|
+
datetime_now = datetime_now.replace(tzinfo=None)
|
|
515
|
+
return datetime_now
|
|
@@ -26,8 +26,6 @@ ARGUMENT_RENAMES = {
|
|
|
26
26
|
'ec2.create-image.no-no-reboot': 'reboot',
|
|
27
27
|
'ec2.*.no-egress': 'ingress',
|
|
28
28
|
'ec2.*.no-disable-api-termination': 'enable-api-termination',
|
|
29
|
-
'opsworks.*.region': 'stack-region',
|
|
30
|
-
'elastictranscoder.*.output': 'job-output',
|
|
31
29
|
'swf.register-activity-type.version': 'activity-version',
|
|
32
30
|
'swf.register-workflow-type.version': 'workflow-version',
|
|
33
31
|
'datapipeline.*.query': 'objects-query',
|
|
@@ -96,6 +94,7 @@ ARGUMENT_RENAMES = {
|
|
|
96
94
|
'eks.update-cluster-version.version': 'kubernetes-version',
|
|
97
95
|
'eks.create-nodegroup.version': 'kubernetes-version',
|
|
98
96
|
'eks.update-nodegroup-version.version': 'kubernetes-version',
|
|
97
|
+
'eks.update-cluster-components-version.version': 'kubernetes-version',
|
|
99
98
|
'schemas.*.version': 'schema-version',
|
|
100
99
|
'sagemaker.delete-image-version.version': 'version-number',
|
|
101
100
|
'sagemaker.describe-image-version.version': 'version-number',
|
|
@@ -140,7 +139,6 @@ HIDDEN_ALIASES = {
|
|
|
140
139
|
'importexport.get-shipping-label.street3': 'street-3',
|
|
141
140
|
'lambda.publish-version.code-sha256': 'code-sha-256',
|
|
142
141
|
'lightsail.import-key-pair.public-key-base64': 'public-key-base-64',
|
|
143
|
-
'opsworks.register-volume.ec2-volume-id': 'ec-2-volume-id',
|
|
144
142
|
'mgn.*.replication-servers-security-groups-ids':
|
|
145
143
|
'replication-servers-security-groups-i-ds',
|
|
146
144
|
'mgn.*.source-server-ids': 'source-server-i-ds',
|
|
@@ -70,6 +70,10 @@ class CliInputJSONArgument(OverrideRequiredArgsArgument):
|
|
|
70
70
|
try:
|
|
71
71
|
# Try to load the JSON string into a python dictionary
|
|
72
72
|
input_data = json.loads(retrieved_json)
|
|
73
|
+
self._session.register(
|
|
74
|
+
f"get-cli-input-json-data",
|
|
75
|
+
lambda **inner_kwargs: input_data
|
|
76
|
+
)
|
|
73
77
|
except ValueError as e:
|
|
74
78
|
raise ParamError(
|
|
75
79
|
self.name, "Invalid JSON: %s\nJSON received: %s"
|
|
@@ -24,7 +24,8 @@ from awscli.customizations.cloudformation.yamlhelper import yaml_parse
|
|
|
24
24
|
|
|
25
25
|
from awscli.customizations.commands import BasicCommand
|
|
26
26
|
from awscli.compat import get_stdout_text_writer
|
|
27
|
-
from awscli.utils import
|
|
27
|
+
from awscli.customizations.utils import uni_print
|
|
28
|
+
from awscli.utils import create_nested_client, write_exception, resolve_v2_debug_mode
|
|
28
29
|
|
|
29
30
|
LOG = logging.getLogger(__name__)
|
|
30
31
|
|
|
@@ -267,8 +268,8 @@ class DeployCommand(BasicCommand):
|
|
|
267
268
|
|
|
268
269
|
def _run_main(self, parsed_args, parsed_globals):
|
|
269
270
|
cloudformation_client = \
|
|
270
|
-
|
|
271
|
-
'cloudformation', region_name=parsed_globals.region,
|
|
271
|
+
create_nested_client(
|
|
272
|
+
self._session, 'cloudformation', region_name=parsed_globals.region,
|
|
272
273
|
endpoint_url=parsed_globals.endpoint_url,
|
|
273
274
|
verify=parsed_globals.verify_ssl)
|
|
274
275
|
|
|
@@ -300,7 +301,8 @@ class DeployCommand(BasicCommand):
|
|
|
300
301
|
|
|
301
302
|
bucket = parsed_args.s3_bucket
|
|
302
303
|
if bucket:
|
|
303
|
-
s3_client =
|
|
304
|
+
s3_client = create_nested_client(
|
|
305
|
+
self._session,
|
|
304
306
|
"s3",
|
|
305
307
|
config=Config(signature_version='s3v4'),
|
|
306
308
|
region_name=parsed_globals.region,
|
|
@@ -315,18 +317,33 @@ class DeployCommand(BasicCommand):
|
|
|
315
317
|
s3_uploader = None
|
|
316
318
|
|
|
317
319
|
deployer = Deployer(cloudformation_client)
|
|
320
|
+
v2_debug = resolve_v2_debug_mode(parsed_globals)
|
|
318
321
|
return self.deploy(deployer, stack_name, template_str,
|
|
319
322
|
parameters, parsed_args.capabilities,
|
|
320
323
|
parsed_args.execute_changeset, parsed_args.role_arn,
|
|
321
324
|
parsed_args.notification_arns, s3_uploader,
|
|
322
325
|
tags, parsed_args.fail_on_empty_changeset,
|
|
323
|
-
parsed_args.disable_rollback)
|
|
326
|
+
parsed_args.disable_rollback, v2_debug)
|
|
324
327
|
|
|
325
328
|
def deploy(self, deployer, stack_name, template_str,
|
|
326
329
|
parameters, capabilities, execute_changeset, role_arn,
|
|
327
330
|
notification_arns, s3_uploader, tags,
|
|
328
|
-
fail_on_empty_changeset=True, disable_rollback=False
|
|
331
|
+
fail_on_empty_changeset=True, disable_rollback=False,
|
|
332
|
+
v2_debug=False):
|
|
329
333
|
try:
|
|
334
|
+
if v2_debug and fail_on_empty_changeset:
|
|
335
|
+
uni_print(
|
|
336
|
+
'\nAWS CLI v2 UPGRADE WARNING: In AWS CLI v2, deploying '
|
|
337
|
+
'an AWS CloudFormation Template that results in an empty '
|
|
338
|
+
'changeset will NOT result in an error by default. This '
|
|
339
|
+
'is different from v1 behavior, where empty changesets '
|
|
340
|
+
'result in an error by default. To migrate to v2 behavior '
|
|
341
|
+
'and resolve this warning, you can add the '
|
|
342
|
+
'`--no-fail-on-empty-changeset` flag to the command. '
|
|
343
|
+
'See https://docs.aws.amazon.com/cli/latest/userguide/'
|
|
344
|
+
'cliv2-migration-changes.html#cliv2-migration-cfn.\n',
|
|
345
|
+
out_file=sys.stderr
|
|
346
|
+
)
|
|
330
347
|
result = deployer.create_and_wait_for_changeset(
|
|
331
348
|
stack_name=stack_name,
|
|
332
349
|
cfn_template=template_str,
|
|
@@ -17,10 +17,10 @@ import logging
|
|
|
17
17
|
import botocore
|
|
18
18
|
import collections
|
|
19
19
|
|
|
20
|
+
from awscli.compat import get_current_datetime
|
|
20
21
|
from awscli.customizations.cloudformation import exceptions
|
|
21
22
|
from awscli.customizations.cloudformation.artifact_exporter import mktempfile, parse_s3_url
|
|
22
23
|
|
|
23
|
-
from datetime import datetime
|
|
24
24
|
|
|
25
25
|
LOG = logging.getLogger(__name__)
|
|
26
26
|
|
|
@@ -85,7 +85,7 @@ class Deployer(object):
|
|
|
85
85
|
:return:
|
|
86
86
|
"""
|
|
87
87
|
|
|
88
|
-
now =
|
|
88
|
+
now = get_current_datetime().isoformat()
|
|
89
89
|
description = "Created by AWS CLI at {0} UTC".format(now)
|
|
90
90
|
|
|
91
91
|
# Each changeset will get a unique name based on time
|
|
@@ -24,6 +24,7 @@ from awscli.customizations.cloudformation.yamlhelper import yaml_dump
|
|
|
24
24
|
from awscli.customizations.cloudformation import exceptions
|
|
25
25
|
from awscli.customizations.commands import BasicCommand
|
|
26
26
|
from awscli.customizations.s3uploader import S3Uploader
|
|
27
|
+
from awscli.utils import create_nested_client
|
|
27
28
|
|
|
28
29
|
LOG = logging.getLogger(__name__)
|
|
29
30
|
|
|
@@ -124,8 +125,8 @@ class PackageCommand(BasicCommand):
|
|
|
124
125
|
]
|
|
125
126
|
|
|
126
127
|
def _run_main(self, parsed_args, parsed_globals):
|
|
127
|
-
s3_client =
|
|
128
|
-
"s3",
|
|
128
|
+
s3_client = create_nested_client(
|
|
129
|
+
self._session, "s3",
|
|
129
130
|
config=Config(signature_version='s3v4'),
|
|
130
131
|
region_name=parsed_globals.region,
|
|
131
132
|
verify=parsed_globals.verify_ssl)
|
|
@@ -21,6 +21,7 @@ from botocore.signers import CloudFrontSigner
|
|
|
21
21
|
from awscli.arguments import CustomArgument
|
|
22
22
|
from awscli.customizations.utils import validate_mutually_exclusive_handler
|
|
23
23
|
from awscli.customizations.commands import BasicCommand
|
|
24
|
+
from awscli.utils import create_nested_client
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def register(event_handler):
|
|
@@ -172,7 +173,8 @@ class UpdateDefaultRootObject(CreateDefaultRootObject):
|
|
|
172
173
|
|
|
173
174
|
def add_to_params(self, parameters, value):
|
|
174
175
|
if value is not None:
|
|
175
|
-
client =
|
|
176
|
+
client = create_nested_client(
|
|
177
|
+
self.context['session'],
|
|
176
178
|
'cloudfront',
|
|
177
179
|
region_name=self.context['parsed_args'].region,
|
|
178
180
|
endpoint_url=self.context['parsed_args'].endpoint_url,
|
|
@@ -17,9 +17,9 @@ import sys
|
|
|
17
17
|
from .utils import get_account_id
|
|
18
18
|
from awscli.customizations.commands import BasicCommand
|
|
19
19
|
from awscli.customizations.utils import s3_bucket_exists
|
|
20
|
+
from awscli.utils import create_nested_client
|
|
20
21
|
from botocore.exceptions import ClientError
|
|
21
22
|
|
|
22
|
-
|
|
23
23
|
LOG = logging.getLogger(__name__)
|
|
24
24
|
S3_POLICY_TEMPLATE = 'policy/S3/AWSCloudTrail-S3BucketPolicy-2014-12-17.json'
|
|
25
25
|
SNS_POLICY_TEMPLATE = 'policy/SNS/AWSCloudTrail-SnsTopicPolicy-2014-12-17.json'
|
|
@@ -80,16 +80,16 @@ class CloudTrailSubscribe(BasicCommand):
|
|
|
80
80
|
|
|
81
81
|
# Initialize services
|
|
82
82
|
LOG.debug('Initializing S3, SNS and CloudTrail...')
|
|
83
|
-
self.sts = self._session
|
|
84
|
-
self.s3 = self._session
|
|
85
|
-
self.sns = self._session
|
|
83
|
+
self.sts = create_nested_client(self._session, 'sts', **client_args)
|
|
84
|
+
self.s3 = create_nested_client(self._session, 's3', **client_args)
|
|
85
|
+
self.sns = create_nested_client(self._session, 'sns', **client_args)
|
|
86
86
|
self.region_name = self.s3.meta.region_name
|
|
87
87
|
|
|
88
88
|
# If the endpoint is specified, it is designated for the cloudtrail
|
|
89
89
|
# service. Not all of the other services will use it.
|
|
90
90
|
if parsed_globals.endpoint_url is not None:
|
|
91
91
|
client_args['endpoint_url'] = parsed_globals.endpoint_url
|
|
92
|
-
self.cloudtrail = self._session
|
|
92
|
+
self.cloudtrail = create_nested_client(self._session, 'cloudtrail', **client_args)
|
|
93
93
|
|
|
94
94
|
def _call(self, options, parsed_globals):
|
|
95
95
|
"""
|
|
@@ -19,7 +19,7 @@ import re
|
|
|
19
19
|
import sys
|
|
20
20
|
import zlib
|
|
21
21
|
from zlib import error as ZLibError
|
|
22
|
-
from datetime import
|
|
22
|
+
from datetime import timedelta
|
|
23
23
|
from dateutil import tz, parser
|
|
24
24
|
|
|
25
25
|
from pyasn1.error import PyAsn1Error
|
|
@@ -29,8 +29,9 @@ from awscli.customizations.cloudtrail.utils import get_trail_by_arn, \
|
|
|
29
29
|
get_account_id_from_arn
|
|
30
30
|
from awscli.customizations.commands import BasicCommand
|
|
31
31
|
from botocore.exceptions import ClientError
|
|
32
|
+
from awscli.compat import get_current_datetime
|
|
32
33
|
from awscli.schema import ParameterRequiredError
|
|
33
|
-
|
|
34
|
+
from awscli.utils import create_nested_client
|
|
34
35
|
|
|
35
36
|
LOG = logging.getLogger(__name__)
|
|
36
37
|
DATE_FORMAT = '%Y%m%dT%H%M%SZ'
|
|
@@ -193,7 +194,7 @@ class S3ClientProvider(object):
|
|
|
193
194
|
def _create_client(self, region_name):
|
|
194
195
|
"""Creates an Amazon S3 client for the given region name"""
|
|
195
196
|
if region_name not in self._client_cache:
|
|
196
|
-
client = self._session
|
|
197
|
+
client = create_nested_client(self._session, 's3', region_name=region_name)
|
|
197
198
|
# Remove the CLI error event that prevents exceptions.
|
|
198
199
|
self._client_cache[region_name] = client
|
|
199
200
|
return self._client_cache[region_name]
|
|
@@ -281,9 +282,10 @@ class DigestProvider(object):
|
|
|
281
282
|
"""
|
|
282
283
|
digests = []
|
|
283
284
|
marker = self._create_digest_key(start_date, prefix)
|
|
285
|
+
s3_digest_files_prefix = self._create_digest_prefix(start_date, prefix)
|
|
284
286
|
client = self._client_provider.get_client(bucket)
|
|
285
287
|
paginator = client.get_paginator('list_objects')
|
|
286
|
-
page_iterator = paginator.paginate(Bucket=bucket, Marker=marker)
|
|
288
|
+
page_iterator = paginator.paginate(Bucket=bucket, Marker=marker, Prefix=s3_digest_files_prefix)
|
|
287
289
|
key_filter = page_iterator.search('Contents[*].Key')
|
|
288
290
|
# Create a target start end end date
|
|
289
291
|
target_start_date = format_date(normalize_date(start_date))
|
|
@@ -293,7 +295,7 @@ class DigestProvider(object):
|
|
|
293
295
|
# Ensure digests are from the same trail.
|
|
294
296
|
digest_key_regex = re.compile(self._create_digest_key_regex(prefix))
|
|
295
297
|
for key in key_filter:
|
|
296
|
-
if digest_key_regex.match(key):
|
|
298
|
+
if key and digest_key_regex.match(key):
|
|
297
299
|
# Use a lexicographic comparison to know when to stop.
|
|
298
300
|
extracted_date = extract_digest_key_date(key)
|
|
299
301
|
if extracted_date > target_end_date:
|
|
@@ -360,6 +362,25 @@ class DigestProvider(object):
|
|
|
360
362
|
key = key_prefix + '/' + key
|
|
361
363
|
return key
|
|
362
364
|
|
|
365
|
+
def _create_digest_prefix(self, start_date, key_prefix):
|
|
366
|
+
"""Creates an S3 prefix to scope listing to trail's region.
|
|
367
|
+
|
|
368
|
+
:return: Returns a prefix string to limit S3 listing scope.
|
|
369
|
+
"""
|
|
370
|
+
template = 'AWSLogs/'
|
|
371
|
+
template_params = {
|
|
372
|
+
'account_id': self.account_id,
|
|
373
|
+
'source_region': self.trail_source_region
|
|
374
|
+
}
|
|
375
|
+
if self.organization_id:
|
|
376
|
+
template += '{organization_id}/'
|
|
377
|
+
template_params['organization_id'] = self.organization_id
|
|
378
|
+
template += '{account_id}/CloudTrail-Digest/{source_region}'
|
|
379
|
+
prefix = template.format(**template_params)
|
|
380
|
+
if key_prefix:
|
|
381
|
+
prefix = key_prefix + '/' + prefix
|
|
382
|
+
return prefix
|
|
383
|
+
|
|
363
384
|
def _create_digest_key_regex(self, key_prefix):
|
|
364
385
|
"""Creates a regular expression used to match against S3 keys"""
|
|
365
386
|
template = 'AWSLogs/'
|
|
@@ -432,7 +453,7 @@ class DigestTraverser(object):
|
|
|
432
453
|
:param end_date: Date to stop validating at (inclusive).
|
|
433
454
|
"""
|
|
434
455
|
if end_date is None:
|
|
435
|
-
end_date =
|
|
456
|
+
end_date = get_current_datetime()
|
|
436
457
|
end_date = normalize_date(end_date)
|
|
437
458
|
start_date = normalize_date(start_date)
|
|
438
459
|
bucket = self.starting_bucket
|
|
@@ -735,7 +756,7 @@ class CloudTrailValidateLogs(BasicCommand):
|
|
|
735
756
|
if args.end_time:
|
|
736
757
|
self.end_time = normalize_date(parse_date(args.end_time))
|
|
737
758
|
else:
|
|
738
|
-
self.end_time = normalize_date(
|
|
759
|
+
self.end_time = normalize_date(get_current_datetime())
|
|
739
760
|
if self.start_time > self.end_time:
|
|
740
761
|
raise ValueError(('Invalid time range specified: start-time must '
|
|
741
762
|
'occur before end-time'))
|
|
@@ -753,13 +774,13 @@ class CloudTrailValidateLogs(BasicCommand):
|
|
|
753
774
|
self._session, self._source_region)
|
|
754
775
|
client_args = {'region_name': parsed_globals.region,
|
|
755
776
|
'verify': parsed_globals.verify_ssl}
|
|
756
|
-
self.organization_client =
|
|
757
|
-
'organizations', **client_args)
|
|
777
|
+
self.organization_client = create_nested_client(
|
|
778
|
+
self._session, 'organizations', **client_args)
|
|
758
779
|
|
|
759
780
|
if parsed_globals.endpoint_url is not None:
|
|
760
781
|
client_args['endpoint_url'] = parsed_globals.endpoint_url
|
|
761
|
-
self.cloudtrail_client =
|
|
762
|
-
'cloudtrail', **client_args)
|
|
782
|
+
self.cloudtrail_client = create_nested_client(
|
|
783
|
+
self._session, 'cloudtrail', **client_args)
|
|
763
784
|
|
|
764
785
|
def _call(self):
|
|
765
786
|
traverser = create_digest_traverser(
|
|
@@ -16,13 +16,12 @@ import re
|
|
|
16
16
|
import sys
|
|
17
17
|
import logging
|
|
18
18
|
import fileinput
|
|
19
|
-
import datetime
|
|
20
19
|
|
|
21
20
|
from botocore.auth import SigV4Auth
|
|
22
21
|
from botocore.awsrequest import AWSRequest
|
|
23
22
|
from botocore.compat import urlsplit
|
|
24
23
|
from awscli.customizations.commands import BasicCommand
|
|
25
|
-
from awscli.compat import NonTranslatedStdout
|
|
24
|
+
from awscli.compat import NonTranslatedStdout, get_current_datetime
|
|
26
25
|
|
|
27
26
|
logger = logging.getLogger('botocore.credentials')
|
|
28
27
|
|
|
@@ -150,7 +149,7 @@ class CodeCommitGetCommand(BasicCommand):
|
|
|
150
149
|
request = AWSRequest()
|
|
151
150
|
request.url = url_to_sign
|
|
152
151
|
request.method = 'GIT'
|
|
153
|
-
now =
|
|
152
|
+
now = get_current_datetime()
|
|
154
153
|
request.context['timestamp'] = now.strftime('%Y%m%dT%H%M%S')
|
|
155
154
|
split = urlsplit(request.url)
|
|
156
155
|
# we don't want to include the port number in the signature
|
|
@@ -18,6 +18,7 @@ from botocore.exceptions import ClientError
|
|
|
18
18
|
from awscli.customizations.commands import BasicCommand
|
|
19
19
|
from awscli.customizations.codedeploy.utils import \
|
|
20
20
|
validate_region, validate_instance_name, INSTANCE_NAME_ARG
|
|
21
|
+
from awscli.utils import create_nested_client
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
class Deregister(BasicCommand):
|
|
@@ -48,13 +49,15 @@ class Deregister(BasicCommand):
|
|
|
48
49
|
validate_region(params, parsed_globals)
|
|
49
50
|
validate_instance_name(params)
|
|
50
51
|
|
|
51
|
-
self.codedeploy =
|
|
52
|
+
self.codedeploy = create_nested_client(
|
|
53
|
+
self._session,
|
|
52
54
|
'codedeploy',
|
|
53
55
|
region_name=params.region,
|
|
54
56
|
endpoint_url=parsed_globals.endpoint_url,
|
|
55
57
|
verify=parsed_globals.verify_ssl
|
|
56
58
|
)
|
|
57
|
-
self.iam =
|
|
59
|
+
self.iam = create_nested_client(
|
|
60
|
+
self._session,
|
|
58
61
|
'iam',
|
|
59
62
|
region_name=params.region
|
|
60
63
|
)
|