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
|
@@ -12,136 +12,222 @@
|
|
|
12
12
|
# language governing permissions and limitations under the License.
|
|
13
13
|
|
|
14
14
|
import re
|
|
15
|
+
|
|
16
|
+
from botocore.compat import json
|
|
17
|
+
|
|
15
18
|
from awscli.customizations.commands import BasicCommand
|
|
16
|
-
from awscli.customizations.emr import
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
from awscli.customizations.emr import (
|
|
20
|
+
applicationutils,
|
|
21
|
+
argumentschema,
|
|
22
|
+
constants,
|
|
23
|
+
emrfsutils,
|
|
24
|
+
emrutils,
|
|
25
|
+
exceptions,
|
|
26
|
+
hbaseutils,
|
|
27
|
+
helptext,
|
|
28
|
+
instancefleetsutils,
|
|
29
|
+
instancegroupsutils,
|
|
30
|
+
steputils,
|
|
31
|
+
)
|
|
27
32
|
from awscli.customizations.emr.command import Command
|
|
28
|
-
from awscli.customizations.emr.constants import EC2_ROLE_NAME
|
|
29
|
-
from awscli.customizations.emr.constants import EMR_ROLE_NAME
|
|
30
|
-
from botocore.compat import json
|
|
33
|
+
from awscli.customizations.emr.constants import EC2_ROLE_NAME, EMR_ROLE_NAME
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
class CreateCluster(Command):
|
|
34
37
|
NAME = 'create-cluster'
|
|
35
38
|
DESCRIPTION = helptext.CREATE_CLUSTER_DESCRIPTION
|
|
36
39
|
ARG_TABLE = [
|
|
37
|
-
{'name': 'release-label',
|
|
38
|
-
|
|
39
|
-
{'name': '
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{'name': 'instance-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{'name': '
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
40
|
+
{'name': 'release-label', 'help_text': helptext.RELEASE_LABEL},
|
|
41
|
+
{'name': 'os-release-label', 'help_text': helptext.OS_RELEASE_LABEL},
|
|
42
|
+
{'name': 'ami-version', 'help_text': helptext.AMI_VERSION},
|
|
43
|
+
{
|
|
44
|
+
'name': 'instance-groups',
|
|
45
|
+
'schema': argumentschema.INSTANCE_GROUPS_SCHEMA,
|
|
46
|
+
'help_text': helptext.INSTANCE_GROUPS,
|
|
47
|
+
},
|
|
48
|
+
{'name': 'instance-type', 'help_text': helptext.INSTANCE_TYPE},
|
|
49
|
+
{'name': 'instance-count', 'help_text': helptext.INSTANCE_COUNT},
|
|
50
|
+
{
|
|
51
|
+
'name': 'auto-terminate',
|
|
52
|
+
'action': 'store_true',
|
|
53
|
+
'group_name': 'auto_terminate',
|
|
54
|
+
'help_text': helptext.AUTO_TERMINATE,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
'name': 'no-auto-terminate',
|
|
58
|
+
'action': 'store_true',
|
|
59
|
+
'group_name': 'auto_terminate',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
'name': 'instance-fleets',
|
|
63
|
+
'schema': argumentschema.INSTANCE_FLEETS_SCHEMA,
|
|
64
|
+
'help_text': helptext.INSTANCE_FLEETS,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
'name': 'name',
|
|
68
|
+
'default': 'Development Cluster',
|
|
69
|
+
'help_text': helptext.CLUSTER_NAME,
|
|
70
|
+
},
|
|
71
|
+
{'name': 'log-uri', 'help_text': helptext.LOG_URI},
|
|
72
|
+
{
|
|
73
|
+
'name': 'log-encryption-kms-key-id',
|
|
74
|
+
'help_text': helptext.LOG_ENCRYPTION_KMS_KEY_ID,
|
|
75
|
+
},
|
|
76
|
+
{'name': 'service-role', 'help_text': helptext.SERVICE_ROLE},
|
|
77
|
+
{'name': 'auto-scaling-role', 'help_text': helptext.AUTOSCALING_ROLE},
|
|
78
|
+
{
|
|
79
|
+
'name': 'use-default-roles',
|
|
80
|
+
'action': 'store_true',
|
|
81
|
+
'help_text': helptext.USE_DEFAULT_ROLES,
|
|
82
|
+
},
|
|
83
|
+
{'name': 'configurations', 'help_text': helptext.CONFIGURATIONS},
|
|
84
|
+
{
|
|
85
|
+
'name': 'ec2-attributes',
|
|
86
|
+
'help_text': helptext.EC2_ATTRIBUTES,
|
|
87
|
+
'schema': argumentschema.EC2_ATTRIBUTES_SCHEMA,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
'name': 'termination-protected',
|
|
91
|
+
'action': 'store_true',
|
|
92
|
+
'group_name': 'termination_protected',
|
|
93
|
+
'help_text': helptext.TERMINATION_PROTECTED,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
'name': 'no-termination-protected',
|
|
97
|
+
'action': 'store_true',
|
|
98
|
+
'group_name': 'termination_protected',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
'name': 'unhealthy-node-replacement',
|
|
102
|
+
'action': 'store_true',
|
|
103
|
+
'group_name': 'unhealthy_node_replacement',
|
|
104
|
+
'help_text': helptext.UNHEALTHY_NODE_REPLACEMENT,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
'name': 'no-unhealthy-node-replacement',
|
|
108
|
+
'action': 'store_true',
|
|
109
|
+
'group_name': 'unhealthy_node_replacement',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
'name': 'scale-down-behavior',
|
|
113
|
+
'help_text': helptext.SCALE_DOWN_BEHAVIOR,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
'name': 'visible-to-all-users',
|
|
117
|
+
'action': 'store_true',
|
|
118
|
+
'group_name': 'visibility',
|
|
119
|
+
'help_text': helptext.VISIBILITY,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
'name': 'no-visible-to-all-users',
|
|
123
|
+
'action': 'store_true',
|
|
124
|
+
'group_name': 'visibility',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
'name': 'enable-debugging',
|
|
128
|
+
'action': 'store_true',
|
|
129
|
+
'group_name': 'debug',
|
|
130
|
+
'help_text': helptext.DEBUGGING,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
'name': 'no-enable-debugging',
|
|
134
|
+
'action': 'store_true',
|
|
135
|
+
'group_name': 'debug',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
'name': 'tags',
|
|
139
|
+
'nargs': '+',
|
|
140
|
+
'help_text': helptext.TAGS,
|
|
141
|
+
'schema': argumentschema.TAGS_SCHEMA,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
'name': 'bootstrap-actions',
|
|
145
|
+
'help_text': helptext.BOOTSTRAP_ACTIONS,
|
|
146
|
+
'schema': argumentschema.BOOTSTRAP_ACTIONS_SCHEMA,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
'name': 'applications',
|
|
150
|
+
'help_text': helptext.APPLICATIONS,
|
|
151
|
+
'schema': argumentschema.APPLICATIONS_SCHEMA,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
'name': 'emrfs',
|
|
155
|
+
'help_text': helptext.EMR_FS,
|
|
156
|
+
'schema': argumentschema.EMR_FS_SCHEMA,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
'name': 'steps',
|
|
160
|
+
'schema': argumentschema.STEPS_SCHEMA,
|
|
161
|
+
'help_text': helptext.STEPS,
|
|
162
|
+
},
|
|
163
|
+
{'name': 'additional-info', 'help_text': helptext.ADDITIONAL_INFO},
|
|
164
|
+
{
|
|
165
|
+
'name': 'restore-from-hbase-backup',
|
|
166
|
+
'schema': argumentschema.HBASE_RESTORE_FROM_BACKUP_SCHEMA,
|
|
167
|
+
'help_text': helptext.RESTORE_FROM_HBASE,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
'name': 'security-configuration',
|
|
171
|
+
'help_text': helptext.SECURITY_CONFIG,
|
|
172
|
+
},
|
|
173
|
+
{'name': 'custom-ami-id', 'help_text': helptext.CUSTOM_AMI_ID},
|
|
174
|
+
{
|
|
175
|
+
'name': 'ebs-root-volume-size',
|
|
176
|
+
'help_text': helptext.EBS_ROOT_VOLUME_SIZE,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
'name': 'ebs-root-volume-iops',
|
|
180
|
+
'help_text': helptext.EBS_ROOT_VOLUME_IOPS,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
'name': 'ebs-root-volume-throughput',
|
|
184
|
+
'help_text': helptext.EBS_ROOT_VOLUME_THROUGHPUT,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
'name': 'repo-upgrade-on-boot',
|
|
188
|
+
'help_text': helptext.REPO_UPGRADE_ON_BOOT,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
'name': 'kerberos-attributes',
|
|
192
|
+
'schema': argumentschema.KERBEROS_ATTRIBUTES_SCHEMA,
|
|
193
|
+
'help_text': helptext.KERBEROS_ATTRIBUTES,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
'name': 'step-concurrency-level',
|
|
197
|
+
'cli_type_name': 'integer',
|
|
198
|
+
'help_text': helptext.STEP_CONCURRENCY_LEVEL,
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
'name': 'managed-scaling-policy',
|
|
202
|
+
'schema': argumentschema.MANAGED_SCALING_POLICY_SCHEMA,
|
|
203
|
+
'help_text': helptext.MANAGED_SCALING_POLICY,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
'name': 'placement-group-configs',
|
|
207
|
+
'schema': argumentschema.PLACEMENT_GROUP_CONFIGS_SCHEMA,
|
|
208
|
+
'help_text': helptext.PLACEMENT_GROUP_CONFIGS,
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
'name': 'auto-termination-policy',
|
|
212
|
+
'schema': argumentschema.AUTO_TERMINATION_POLICY_SCHEMA,
|
|
213
|
+
'help_text': helptext.AUTO_TERMINATION_POLICY,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
'name': 'monitoring-configuration',
|
|
217
|
+
'schema': argumentschema.MONITORING_CONFIGURATION_SCHEMA,
|
|
218
|
+
'help_text': helptext.MONITORING_CONFIGURATION,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
'name': 'extended-support',
|
|
222
|
+
'action': 'store_true',
|
|
223
|
+
'group_name': 'extended-support',
|
|
224
|
+
'help_text': helptext.EXTENDED_SUPPORT,
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
'name': 'no-extended-support',
|
|
228
|
+
'action': 'store_true',
|
|
229
|
+
'group_name': 'extended-support',
|
|
230
|
+
},
|
|
145
231
|
]
|
|
146
232
|
SYNOPSIS = BasicCommand.FROM_FILE('emr', 'create-cluster-synopsis.txt')
|
|
147
233
|
EXAMPLES = BasicCommand.FROM_FILE('emr', 'create-cluster-examples.rst')
|
|
@@ -154,71 +240,95 @@ class CreateCluster(Command):
|
|
|
154
240
|
|
|
155
241
|
service_role_validation_message = (
|
|
156
242
|
" Either choose --use-default-roles or use both --service-role "
|
|
157
|
-
"<roleName> and --ec2-attributes InstanceProfile=<profileName>."
|
|
243
|
+
"<roleName> and --ec2-attributes InstanceProfile=<profileName>."
|
|
244
|
+
)
|
|
158
245
|
|
|
159
|
-
if
|
|
160
|
-
|
|
246
|
+
if (
|
|
247
|
+
parsed_args.use_default_roles is True
|
|
248
|
+
and parsed_args.service_role is not None
|
|
249
|
+
):
|
|
161
250
|
raise exceptions.MutualExclusiveOptionError(
|
|
162
251
|
option1="--use-default-roles",
|
|
163
252
|
option2="--service-role",
|
|
164
|
-
message=service_role_validation_message
|
|
253
|
+
message=service_role_validation_message,
|
|
254
|
+
)
|
|
165
255
|
|
|
166
|
-
if
|
|
167
|
-
|
|
168
|
-
|
|
256
|
+
if (
|
|
257
|
+
parsed_args.use_default_roles is True
|
|
258
|
+
and parsed_args.ec2_attributes is not None
|
|
259
|
+
and 'InstanceProfile' in parsed_args.ec2_attributes
|
|
260
|
+
):
|
|
169
261
|
raise exceptions.MutualExclusiveOptionError(
|
|
170
262
|
option1="--use-default-roles",
|
|
171
263
|
option2="--ec2-attributes InstanceProfile",
|
|
172
|
-
message=service_role_validation_message
|
|
264
|
+
message=service_role_validation_message,
|
|
265
|
+
)
|
|
173
266
|
|
|
174
|
-
if
|
|
175
|
-
|
|
267
|
+
if (
|
|
268
|
+
parsed_args.instance_groups is not None
|
|
269
|
+
and parsed_args.instance_fleets is not None
|
|
270
|
+
):
|
|
176
271
|
raise exceptions.MutualExclusiveOptionError(
|
|
177
|
-
option1="--instance-groups",
|
|
178
|
-
|
|
272
|
+
option1="--instance-groups", option2="--instance-fleets"
|
|
273
|
+
)
|
|
179
274
|
|
|
180
275
|
instances_config = {}
|
|
181
276
|
if parsed_args.instance_fleets is not None:
|
|
182
|
-
instances_config['InstanceFleets'] =
|
|
277
|
+
instances_config['InstanceFleets'] = (
|
|
183
278
|
instancefleetsutils.validate_and_build_instance_fleets(
|
|
184
|
-
parsed_args.instance_fleets
|
|
279
|
+
parsed_args.instance_fleets
|
|
280
|
+
)
|
|
281
|
+
)
|
|
185
282
|
else:
|
|
186
|
-
instances_config['InstanceGroups'] =
|
|
283
|
+
instances_config['InstanceGroups'] = (
|
|
187
284
|
instancegroupsutils.validate_and_build_instance_groups(
|
|
188
285
|
instance_groups=parsed_args.instance_groups,
|
|
189
286
|
instance_type=parsed_args.instance_type,
|
|
190
|
-
instance_count=parsed_args.instance_count
|
|
287
|
+
instance_count=parsed_args.instance_count,
|
|
288
|
+
)
|
|
289
|
+
)
|
|
191
290
|
|
|
192
291
|
if parsed_args.release_label is not None:
|
|
193
292
|
params["ReleaseLabel"] = parsed_args.release_label
|
|
194
293
|
if parsed_args.configurations is not None:
|
|
195
294
|
try:
|
|
196
295
|
params["Configurations"] = json.loads(
|
|
197
|
-
parsed_args.configurations
|
|
296
|
+
parsed_args.configurations
|
|
297
|
+
)
|
|
198
298
|
except ValueError:
|
|
199
|
-
raise ValueError(
|
|
200
|
-
|
|
299
|
+
raise ValueError(
|
|
300
|
+
'aws: error: invalid json argument for '
|
|
301
|
+
'option --configurations'
|
|
302
|
+
)
|
|
201
303
|
|
|
202
304
|
if (
|
|
203
305
|
parsed_args.release_label is None
|
|
204
306
|
and parsed_args.ami_version is not None
|
|
205
307
|
):
|
|
206
|
-
is_valid_ami_version = re.match(
|
|
308
|
+
is_valid_ami_version = re.match(
|
|
309
|
+
r'\d?\..*', parsed_args.ami_version
|
|
310
|
+
)
|
|
207
311
|
if is_valid_ami_version is None:
|
|
208
312
|
raise exceptions.InvalidAmiVersionError(
|
|
209
|
-
ami_version=parsed_args.ami_version
|
|
313
|
+
ami_version=parsed_args.ami_version
|
|
314
|
+
)
|
|
210
315
|
params['AmiVersion'] = parsed_args.ami_version
|
|
211
316
|
emrutils.apply_dict(
|
|
212
|
-
params, 'AdditionalInfo', parsed_args.additional_info
|
|
317
|
+
params, 'AdditionalInfo', parsed_args.additional_info
|
|
318
|
+
)
|
|
213
319
|
emrutils.apply_dict(params, 'LogUri', parsed_args.log_uri)
|
|
214
320
|
|
|
215
321
|
if parsed_args.os_release_label is not None:
|
|
216
|
-
emrutils.apply_dict(
|
|
217
|
-
parsed_args.os_release_label
|
|
322
|
+
emrutils.apply_dict(
|
|
323
|
+
params, 'OSReleaseLabel', parsed_args.os_release_label
|
|
324
|
+
)
|
|
218
325
|
|
|
219
326
|
if parsed_args.log_encryption_kms_key_id is not None:
|
|
220
|
-
emrutils.apply_dict(
|
|
221
|
-
|
|
327
|
+
emrutils.apply_dict(
|
|
328
|
+
params,
|
|
329
|
+
'LogEncryptionKmsKeyId',
|
|
330
|
+
parsed_args.log_encryption_kms_key_id,
|
|
331
|
+
)
|
|
222
332
|
|
|
223
333
|
if parsed_args.use_default_roles is True:
|
|
224
334
|
parsed_args.service_role = EMR_ROLE_NAME
|
|
@@ -234,61 +344,79 @@ class CreateCluster(Command):
|
|
|
234
344
|
if parsed_args.auto_scaling_role is None:
|
|
235
345
|
raise exceptions.MissingAutoScalingRoleError()
|
|
236
346
|
|
|
237
|
-
emrutils.apply_dict(
|
|
347
|
+
emrutils.apply_dict(
|
|
348
|
+
params, 'AutoScalingRole', parsed_args.auto_scaling_role
|
|
349
|
+
)
|
|
238
350
|
|
|
239
351
|
if parsed_args.scale_down_behavior is not None:
|
|
240
|
-
emrutils.apply_dict(
|
|
352
|
+
emrutils.apply_dict(
|
|
353
|
+
params, 'ScaleDownBehavior', parsed_args.scale_down_behavior
|
|
354
|
+
)
|
|
241
355
|
|
|
242
356
|
if (
|
|
243
|
-
|
|
244
|
-
|
|
357
|
+
parsed_args.no_auto_terminate is False
|
|
358
|
+
and parsed_args.auto_terminate is False
|
|
359
|
+
):
|
|
245
360
|
parsed_args.no_auto_terminate = True
|
|
246
361
|
|
|
247
|
-
instances_config['KeepJobFlowAliveWhenNoSteps'] =
|
|
362
|
+
instances_config['KeepJobFlowAliveWhenNoSteps'] = (
|
|
248
363
|
emrutils.apply_boolean_options(
|
|
249
364
|
parsed_args.no_auto_terminate,
|
|
250
365
|
'--no-auto-terminate',
|
|
251
366
|
parsed_args.auto_terminate,
|
|
252
|
-
'--auto-terminate'
|
|
367
|
+
'--auto-terminate',
|
|
368
|
+
)
|
|
369
|
+
)
|
|
253
370
|
|
|
254
|
-
instances_config['TerminationProtected'] =
|
|
371
|
+
instances_config['TerminationProtected'] = (
|
|
255
372
|
emrutils.apply_boolean_options(
|
|
256
373
|
parsed_args.termination_protected,
|
|
257
374
|
'--termination-protected',
|
|
258
375
|
parsed_args.no_termination_protected,
|
|
259
|
-
'--no-termination-protected'
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
376
|
+
'--no-termination-protected',
|
|
377
|
+
)
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
if (
|
|
381
|
+
parsed_args.unhealthy_node_replacement
|
|
382
|
+
or parsed_args.no_unhealthy_node_replacement
|
|
383
|
+
):
|
|
384
|
+
instances_config['UnhealthyNodeReplacement'] = (
|
|
385
|
+
emrutils.apply_boolean_options(
|
|
386
|
+
parsed_args.unhealthy_node_replacement,
|
|
387
|
+
'--unhealthy-node-replacement',
|
|
388
|
+
parsed_args.no_unhealthy_node_replacement,
|
|
389
|
+
'--no-unhealthy-node-replacement',
|
|
390
|
+
)
|
|
391
|
+
)
|
|
268
392
|
|
|
269
|
-
if (
|
|
270
|
-
|
|
393
|
+
if (
|
|
394
|
+
parsed_args.visible_to_all_users is False
|
|
395
|
+
and parsed_args.no_visible_to_all_users is False
|
|
396
|
+
):
|
|
271
397
|
parsed_args.visible_to_all_users = True
|
|
272
398
|
|
|
273
|
-
params['VisibleToAllUsers'] =
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
399
|
+
params['VisibleToAllUsers'] = emrutils.apply_boolean_options(
|
|
400
|
+
parsed_args.visible_to_all_users,
|
|
401
|
+
'--visible-to-all-users',
|
|
402
|
+
parsed_args.no_visible_to_all_users,
|
|
403
|
+
'--no-visible-to-all-users',
|
|
404
|
+
)
|
|
279
405
|
|
|
280
406
|
params['Tags'] = emrutils.parse_tags(parsed_args.tags)
|
|
281
407
|
params['Instances'] = instances_config
|
|
282
408
|
|
|
283
409
|
if parsed_args.ec2_attributes is not None:
|
|
284
410
|
self._build_ec2_attributes(
|
|
285
|
-
cluster=params, parsed_attrs=parsed_args.ec2_attributes
|
|
411
|
+
cluster=params, parsed_attrs=parsed_args.ec2_attributes
|
|
412
|
+
)
|
|
286
413
|
|
|
287
414
|
debugging_enabled = emrutils.apply_boolean_options(
|
|
288
415
|
parsed_args.enable_debugging,
|
|
289
416
|
'--enable-debugging',
|
|
290
417
|
parsed_args.no_enable_debugging,
|
|
291
|
-
'--no-enable-debugging'
|
|
418
|
+
'--no-enable-debugging',
|
|
419
|
+
)
|
|
292
420
|
|
|
293
421
|
if parsed_args.log_uri is None and debugging_enabled is True:
|
|
294
422
|
raise exceptions.LogUriError
|
|
@@ -298,21 +426,24 @@ class CreateCluster(Command):
|
|
|
298
426
|
cluster=params,
|
|
299
427
|
key='Steps',
|
|
300
428
|
value=[
|
|
301
|
-
self._build_enable_debugging(parsed_args, parsed_globals)
|
|
429
|
+
self._build_enable_debugging(parsed_args, parsed_globals)
|
|
430
|
+
],
|
|
431
|
+
)
|
|
302
432
|
|
|
303
433
|
if parsed_args.applications is not None:
|
|
304
434
|
if parsed_args.release_label is None:
|
|
305
|
-
app_list, ba_list, step_list =
|
|
435
|
+
app_list, ba_list, step_list = (
|
|
306
436
|
applicationutils.build_applications(
|
|
307
437
|
region=self.region,
|
|
308
438
|
parsed_applications=parsed_args.applications,
|
|
309
|
-
ami_version=params['AmiVersion']
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
self._update_cluster_dict(
|
|
313
|
-
params, 'BootstrapActions', ba_list)
|
|
439
|
+
ami_version=params['AmiVersion'],
|
|
440
|
+
)
|
|
441
|
+
)
|
|
314
442
|
self._update_cluster_dict(
|
|
315
|
-
params, '
|
|
443
|
+
params, 'NewSupportedProducts', app_list
|
|
444
|
+
)
|
|
445
|
+
self._update_cluster_dict(params, 'BootstrapActions', ba_list)
|
|
446
|
+
self._update_cluster_dict(params, 'Steps', step_list)
|
|
316
447
|
else:
|
|
317
448
|
params["Applications"] = []
|
|
318
449
|
for application in parsed_args.applications:
|
|
@@ -322,37 +453,45 @@ class CreateCluster(Command):
|
|
|
322
453
|
if hbase_restore_config is not None:
|
|
323
454
|
args = hbaseutils.build_hbase_restore_from_backup_args(
|
|
324
455
|
dir=hbase_restore_config.get('Dir'),
|
|
325
|
-
backup_version=hbase_restore_config.get('BackupVersion')
|
|
456
|
+
backup_version=hbase_restore_config.get('BackupVersion'),
|
|
457
|
+
)
|
|
326
458
|
step_config = emrutils.build_step(
|
|
327
459
|
jar=constants.HBASE_JAR_PATH,
|
|
328
460
|
name=constants.HBASE_RESTORE_STEP_NAME,
|
|
329
461
|
action_on_failure=constants.CANCEL_AND_WAIT,
|
|
330
|
-
args=args
|
|
331
|
-
|
|
332
|
-
|
|
462
|
+
args=args,
|
|
463
|
+
)
|
|
464
|
+
self._update_cluster_dict(params, 'Steps', [step_config])
|
|
333
465
|
|
|
334
466
|
if parsed_args.bootstrap_actions is not None:
|
|
335
467
|
self._build_bootstrap_actions(
|
|
336
468
|
cluster=params,
|
|
337
|
-
parsed_boostrap_actions=parsed_args.bootstrap_actions
|
|
469
|
+
parsed_boostrap_actions=parsed_args.bootstrap_actions,
|
|
470
|
+
)
|
|
338
471
|
|
|
339
472
|
if parsed_args.emrfs is not None:
|
|
340
473
|
self._handle_emrfs_parameters(
|
|
341
474
|
cluster=params,
|
|
342
475
|
emrfs_args=parsed_args.emrfs,
|
|
343
|
-
release_label=parsed_args.release_label
|
|
476
|
+
release_label=parsed_args.release_label,
|
|
477
|
+
)
|
|
344
478
|
|
|
345
479
|
if parsed_args.steps is not None:
|
|
346
480
|
steps_list = steputils.build_step_config_list(
|
|
347
481
|
parsed_step_list=parsed_args.steps,
|
|
348
482
|
region=self.region,
|
|
349
|
-
release_label=parsed_args.release_label
|
|
483
|
+
release_label=parsed_args.release_label,
|
|
484
|
+
)
|
|
350
485
|
self._update_cluster_dict(
|
|
351
|
-
cluster=params, key='Steps', value=steps_list
|
|
486
|
+
cluster=params, key='Steps', value=steps_list
|
|
487
|
+
)
|
|
352
488
|
|
|
353
489
|
if parsed_args.security_configuration is not None:
|
|
354
490
|
emrutils.apply_dict(
|
|
355
|
-
params,
|
|
491
|
+
params,
|
|
492
|
+
'SecurityConfiguration',
|
|
493
|
+
parsed_args.security_configuration,
|
|
494
|
+
)
|
|
356
495
|
|
|
357
496
|
if parsed_args.custom_ami_id is not None:
|
|
358
497
|
emrutils.apply_dict(
|
|
@@ -360,15 +499,21 @@ class CreateCluster(Command):
|
|
|
360
499
|
)
|
|
361
500
|
if parsed_args.ebs_root_volume_size is not None:
|
|
362
501
|
emrutils.apply_dict(
|
|
363
|
-
params,
|
|
502
|
+
params,
|
|
503
|
+
'EbsRootVolumeSize',
|
|
504
|
+
int(parsed_args.ebs_root_volume_size),
|
|
364
505
|
)
|
|
365
506
|
if parsed_args.ebs_root_volume_iops is not None:
|
|
366
507
|
emrutils.apply_dict(
|
|
367
|
-
params,
|
|
508
|
+
params,
|
|
509
|
+
'EbsRootVolumeIops',
|
|
510
|
+
int(parsed_args.ebs_root_volume_iops),
|
|
368
511
|
)
|
|
369
512
|
if parsed_args.ebs_root_volume_throughput is not None:
|
|
370
513
|
emrutils.apply_dict(
|
|
371
|
-
params,
|
|
514
|
+
params,
|
|
515
|
+
'EbsRootVolumeThroughput',
|
|
516
|
+
int(parsed_args.ebs_root_volume_throughput),
|
|
372
517
|
)
|
|
373
518
|
|
|
374
519
|
if parsed_args.repo_upgrade_on_boot is not None:
|
|
@@ -378,34 +523,63 @@ class CreateCluster(Command):
|
|
|
378
523
|
|
|
379
524
|
if parsed_args.kerberos_attributes is not None:
|
|
380
525
|
emrutils.apply_dict(
|
|
381
|
-
params, 'KerberosAttributes', parsed_args.kerberos_attributes
|
|
526
|
+
params, 'KerberosAttributes', parsed_args.kerberos_attributes
|
|
527
|
+
)
|
|
382
528
|
|
|
383
529
|
if parsed_args.step_concurrency_level is not None:
|
|
384
530
|
params['StepConcurrencyLevel'] = parsed_args.step_concurrency_level
|
|
385
531
|
|
|
532
|
+
if parsed_args.extended_support or parsed_args.no_extended_support:
|
|
533
|
+
params['ExtendedSupport'] = emrutils.apply_boolean_options(
|
|
534
|
+
parsed_args.extended_support,
|
|
535
|
+
'--extended-support',
|
|
536
|
+
parsed_args.no_extended_support,
|
|
537
|
+
'--no-extended-support',
|
|
538
|
+
)
|
|
539
|
+
|
|
386
540
|
if parsed_args.managed_scaling_policy is not None:
|
|
387
541
|
emrutils.apply_dict(
|
|
388
|
-
params,
|
|
542
|
+
params,
|
|
543
|
+
'ManagedScalingPolicy',
|
|
544
|
+
parsed_args.managed_scaling_policy,
|
|
545
|
+
)
|
|
389
546
|
|
|
390
547
|
if parsed_args.placement_group_configs is not None:
|
|
391
548
|
emrutils.apply_dict(
|
|
392
|
-
params,
|
|
393
|
-
|
|
549
|
+
params,
|
|
550
|
+
'PlacementGroupConfigs',
|
|
551
|
+
parsed_args.placement_group_configs,
|
|
552
|
+
)
|
|
394
553
|
|
|
395
554
|
if parsed_args.auto_termination_policy is not None:
|
|
396
555
|
emrutils.apply_dict(
|
|
397
|
-
params,
|
|
398
|
-
|
|
556
|
+
params,
|
|
557
|
+
'AutoTerminationPolicy',
|
|
558
|
+
parsed_args.auto_termination_policy,
|
|
559
|
+
)
|
|
560
|
+
|
|
561
|
+
if parsed_args.monitoring_configuration is not None:
|
|
562
|
+
emrutils.apply_dict(
|
|
563
|
+
params,
|
|
564
|
+
'MonitoringConfiguration',
|
|
565
|
+
parsed_args.monitoring_configuration,
|
|
566
|
+
)
|
|
399
567
|
|
|
400
568
|
self._validate_required_applications(parsed_args)
|
|
401
569
|
|
|
402
570
|
run_job_flow_response = emrutils.call(
|
|
403
|
-
self._session,
|
|
404
|
-
|
|
571
|
+
self._session,
|
|
572
|
+
'run_job_flow',
|
|
573
|
+
params,
|
|
574
|
+
self.region,
|
|
575
|
+
parsed_globals.endpoint_url,
|
|
576
|
+
parsed_globals.verify_ssl,
|
|
577
|
+
)
|
|
405
578
|
|
|
406
579
|
constructed_result = self._construct_result(run_job_flow_response)
|
|
407
|
-
emrutils.display_response(
|
|
408
|
-
|
|
580
|
+
emrutils.display_response(
|
|
581
|
+
self._session, 'run_job_flow', constructed_result, parsed_globals
|
|
582
|
+
)
|
|
409
583
|
|
|
410
584
|
return 0
|
|
411
585
|
|
|
@@ -417,8 +591,7 @@ class CreateCluster(Command):
|
|
|
417
591
|
clusterArn = run_job_flow_result.get('ClusterArn')
|
|
418
592
|
|
|
419
593
|
if jobFlowId is not None:
|
|
420
|
-
return {'ClusterId': jobFlowId,
|
|
421
|
-
'ClusterArn': clusterArn }
|
|
594
|
+
return {'ClusterId': jobFlowId, 'ClusterArn': clusterArn}
|
|
422
595
|
else:
|
|
423
596
|
return {}
|
|
424
597
|
|
|
@@ -426,83 +599,118 @@ class CreateCluster(Command):
|
|
|
426
599
|
keys = parsed_attrs.keys()
|
|
427
600
|
instances = cluster['Instances']
|
|
428
601
|
|
|
429
|
-
if
|
|
602
|
+
if 'SubnetId' in keys and 'SubnetIds' in keys:
|
|
430
603
|
raise exceptions.MutualExclusiveOptionError(
|
|
431
|
-
option1="SubnetId",
|
|
432
|
-
|
|
604
|
+
option1="SubnetId", option2="SubnetIds"
|
|
605
|
+
)
|
|
433
606
|
|
|
434
|
-
if
|
|
607
|
+
if 'AvailabilityZone' in keys and 'AvailabilityZones' in keys:
|
|
435
608
|
raise exceptions.MutualExclusiveOptionError(
|
|
436
|
-
option1="AvailabilityZone",
|
|
437
|
-
|
|
609
|
+
option1="AvailabilityZone", option2="AvailabilityZones"
|
|
610
|
+
)
|
|
438
611
|
|
|
439
|
-
if ('SubnetId' in keys or 'SubnetIds' in keys)
|
|
440
|
-
|
|
612
|
+
if ('SubnetId' in keys or 'SubnetIds' in keys) and (
|
|
613
|
+
'AvailabilityZone' in keys or 'AvailabilityZones' in keys
|
|
614
|
+
):
|
|
441
615
|
raise exceptions.SubnetAndAzValidationError
|
|
442
616
|
|
|
443
617
|
emrutils.apply_params(
|
|
444
|
-
src_params=parsed_attrs,
|
|
445
|
-
|
|
618
|
+
src_params=parsed_attrs,
|
|
619
|
+
src_key='KeyName',
|
|
620
|
+
dest_params=instances,
|
|
621
|
+
dest_key='Ec2KeyName',
|
|
622
|
+
)
|
|
446
623
|
emrutils.apply_params(
|
|
447
|
-
src_params=parsed_attrs,
|
|
448
|
-
|
|
624
|
+
src_params=parsed_attrs,
|
|
625
|
+
src_key='SubnetId',
|
|
626
|
+
dest_params=instances,
|
|
627
|
+
dest_key='Ec2SubnetId',
|
|
628
|
+
)
|
|
449
629
|
emrutils.apply_params(
|
|
450
|
-
src_params=parsed_attrs,
|
|
451
|
-
|
|
630
|
+
src_params=parsed_attrs,
|
|
631
|
+
src_key='SubnetIds',
|
|
632
|
+
dest_params=instances,
|
|
633
|
+
dest_key='Ec2SubnetIds',
|
|
634
|
+
)
|
|
452
635
|
|
|
453
636
|
if 'AvailabilityZone' in keys:
|
|
454
637
|
instances['Placement'] = dict()
|
|
455
638
|
emrutils.apply_params(
|
|
456
|
-
src_params=parsed_attrs,
|
|
639
|
+
src_params=parsed_attrs,
|
|
640
|
+
src_key='AvailabilityZone',
|
|
457
641
|
dest_params=instances['Placement'],
|
|
458
|
-
dest_key='AvailabilityZone'
|
|
642
|
+
dest_key='AvailabilityZone',
|
|
643
|
+
)
|
|
459
644
|
|
|
460
645
|
if 'AvailabilityZones' in keys:
|
|
461
646
|
instances['Placement'] = dict()
|
|
462
647
|
emrutils.apply_params(
|
|
463
|
-
src_params=parsed_attrs,
|
|
648
|
+
src_params=parsed_attrs,
|
|
649
|
+
src_key='AvailabilityZones',
|
|
464
650
|
dest_params=instances['Placement'],
|
|
465
|
-
dest_key='AvailabilityZones'
|
|
651
|
+
dest_key='AvailabilityZones',
|
|
652
|
+
)
|
|
466
653
|
|
|
467
654
|
emrutils.apply_params(
|
|
468
|
-
src_params=parsed_attrs,
|
|
469
|
-
|
|
655
|
+
src_params=parsed_attrs,
|
|
656
|
+
src_key='InstanceProfile',
|
|
657
|
+
dest_params=cluster,
|
|
658
|
+
dest_key='JobFlowRole',
|
|
659
|
+
)
|
|
470
660
|
|
|
471
661
|
emrutils.apply_params(
|
|
472
|
-
src_params=parsed_attrs,
|
|
473
|
-
|
|
662
|
+
src_params=parsed_attrs,
|
|
663
|
+
src_key='EmrManagedMasterSecurityGroup',
|
|
664
|
+
dest_params=instances,
|
|
665
|
+
dest_key='EmrManagedMasterSecurityGroup',
|
|
666
|
+
)
|
|
474
667
|
|
|
475
668
|
emrutils.apply_params(
|
|
476
|
-
src_params=parsed_attrs,
|
|
477
|
-
|
|
669
|
+
src_params=parsed_attrs,
|
|
670
|
+
src_key='EmrManagedSlaveSecurityGroup',
|
|
671
|
+
dest_params=instances,
|
|
672
|
+
dest_key='EmrManagedSlaveSecurityGroup',
|
|
673
|
+
)
|
|
478
674
|
|
|
479
675
|
emrutils.apply_params(
|
|
480
|
-
src_params=parsed_attrs,
|
|
481
|
-
|
|
676
|
+
src_params=parsed_attrs,
|
|
677
|
+
src_key='ServiceAccessSecurityGroup',
|
|
678
|
+
dest_params=instances,
|
|
679
|
+
dest_key='ServiceAccessSecurityGroup',
|
|
680
|
+
)
|
|
482
681
|
|
|
483
682
|
emrutils.apply_params(
|
|
484
|
-
src_params=parsed_attrs,
|
|
485
|
-
|
|
683
|
+
src_params=parsed_attrs,
|
|
684
|
+
src_key='AdditionalMasterSecurityGroups',
|
|
685
|
+
dest_params=instances,
|
|
686
|
+
dest_key='AdditionalMasterSecurityGroups',
|
|
687
|
+
)
|
|
486
688
|
|
|
487
689
|
emrutils.apply_params(
|
|
488
|
-
src_params=parsed_attrs,
|
|
489
|
-
|
|
690
|
+
src_params=parsed_attrs,
|
|
691
|
+
src_key='AdditionalSlaveSecurityGroups',
|
|
692
|
+
dest_params=instances,
|
|
693
|
+
dest_key='AdditionalSlaveSecurityGroups',
|
|
694
|
+
)
|
|
490
695
|
|
|
491
696
|
emrutils.apply(params=cluster, key='Instances', value=instances)
|
|
492
697
|
|
|
493
698
|
return cluster
|
|
494
699
|
|
|
495
|
-
def _build_bootstrap_actions(
|
|
496
|
-
self, cluster, parsed_boostrap_actions):
|
|
700
|
+
def _build_bootstrap_actions(self, cluster, parsed_boostrap_actions):
|
|
497
701
|
cluster_ba_list = cluster.get('BootstrapActions')
|
|
498
702
|
if cluster_ba_list is None:
|
|
499
703
|
cluster_ba_list = []
|
|
500
704
|
|
|
501
705
|
bootstrap_actions = []
|
|
502
|
-
if
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
706
|
+
if (
|
|
707
|
+
len(cluster_ba_list) + len(parsed_boostrap_actions)
|
|
708
|
+
> constants.MAX_BOOTSTRAP_ACTION_NUMBER
|
|
709
|
+
):
|
|
710
|
+
raise ValueError(
|
|
711
|
+
'aws: error: maximum number of '
|
|
712
|
+
'bootstrap actions for a cluster exceeded.'
|
|
713
|
+
)
|
|
506
714
|
|
|
507
715
|
for ba in parsed_boostrap_actions:
|
|
508
716
|
ba_config = {}
|
|
@@ -512,15 +720,22 @@ class CreateCluster(Command):
|
|
|
512
720
|
ba_config['Name'] = constants.BOOTSTRAP_ACTION_NAME
|
|
513
721
|
script_arg_config = {}
|
|
514
722
|
emrutils.apply_params(
|
|
515
|
-
src_params=ba,
|
|
516
|
-
|
|
723
|
+
src_params=ba,
|
|
724
|
+
src_key='Path',
|
|
725
|
+
dest_params=script_arg_config,
|
|
726
|
+
dest_key='Path',
|
|
727
|
+
)
|
|
517
728
|
emrutils.apply_params(
|
|
518
|
-
src_params=ba,
|
|
519
|
-
|
|
729
|
+
src_params=ba,
|
|
730
|
+
src_key='Args',
|
|
731
|
+
dest_params=script_arg_config,
|
|
732
|
+
dest_key='Args',
|
|
733
|
+
)
|
|
520
734
|
emrutils.apply(
|
|
521
735
|
params=ba_config,
|
|
522
736
|
key='ScriptBootstrapAction',
|
|
523
|
-
value=script_arg_config
|
|
737
|
+
value=script_arg_config,
|
|
738
|
+
)
|
|
524
739
|
bootstrap_actions.append(ba_config)
|
|
525
740
|
|
|
526
741
|
result = cluster_ba_list + bootstrap_actions
|
|
@@ -535,15 +750,18 @@ class CreateCluster(Command):
|
|
|
535
750
|
args = [constants.DEBUGGING_COMMAND]
|
|
536
751
|
else:
|
|
537
752
|
jar = emrutils.get_script_runner(self.region)
|
|
538
|
-
args = [
|
|
539
|
-
|
|
540
|
-
|
|
753
|
+
args = [
|
|
754
|
+
emrutils.build_s3_link(
|
|
755
|
+
relative_path=constants.DEBUGGING_PATH, region=self.region
|
|
756
|
+
)
|
|
757
|
+
]
|
|
541
758
|
|
|
542
759
|
return emrutils.build_step(
|
|
543
760
|
name=constants.DEBUGGING_NAME,
|
|
544
761
|
action_on_failure=constants.TERMINATE_CLUSTER,
|
|
545
762
|
jar=jar,
|
|
546
|
-
args=args
|
|
763
|
+
args=args,
|
|
764
|
+
)
|
|
547
765
|
|
|
548
766
|
def _update_cluster_dict(self, cluster, key, value):
|
|
549
767
|
if key in cluster:
|
|
@@ -553,29 +771,34 @@ class CreateCluster(Command):
|
|
|
553
771
|
return cluster
|
|
554
772
|
|
|
555
773
|
def _validate_release_label_ami_version(self, parsed_args):
|
|
556
|
-
if
|
|
557
|
-
|
|
774
|
+
if (
|
|
775
|
+
parsed_args.ami_version is not None
|
|
776
|
+
and parsed_args.release_label is not None
|
|
777
|
+
):
|
|
558
778
|
raise exceptions.MutualExclusiveOptionError(
|
|
559
|
-
option1="--ami-version",
|
|
560
|
-
|
|
779
|
+
option1="--ami-version", option2="--release-label"
|
|
780
|
+
)
|
|
561
781
|
|
|
562
|
-
if
|
|
563
|
-
|
|
782
|
+
if (
|
|
783
|
+
parsed_args.ami_version is None
|
|
784
|
+
and parsed_args.release_label is None
|
|
785
|
+
):
|
|
564
786
|
raise exceptions.RequiredOptionsError(
|
|
565
|
-
option1="--ami-version",
|
|
566
|
-
|
|
787
|
+
option1="--ami-version", option2="--release-label"
|
|
788
|
+
)
|
|
567
789
|
|
|
568
790
|
# Checks if the applications required by steps are specified
|
|
569
791
|
# using the --applications option.
|
|
570
792
|
def _validate_required_applications(self, parsed_args):
|
|
571
|
-
|
|
572
793
|
specified_apps = set([])
|
|
573
794
|
if parsed_args.applications is not None:
|
|
574
|
-
specified_apps =
|
|
575
|
-
|
|
795
|
+
specified_apps = set(
|
|
796
|
+
[app['Name'].lower() for app in parsed_args.applications]
|
|
797
|
+
)
|
|
576
798
|
|
|
577
|
-
missing_apps = self._get_missing_applications_for_steps(
|
|
578
|
-
|
|
799
|
+
missing_apps = self._get_missing_applications_for_steps(
|
|
800
|
+
specified_apps, parsed_args
|
|
801
|
+
)
|
|
579
802
|
# Check for HBase.
|
|
580
803
|
if parsed_args.restore_from_hbase_backup is not None:
|
|
581
804
|
if constants.HBASE not in specified_apps:
|
|
@@ -583,11 +806,13 @@ class CreateCluster(Command):
|
|
|
583
806
|
|
|
584
807
|
if missing_apps:
|
|
585
808
|
raise exceptions.MissingApplicationsError(
|
|
586
|
-
applications=missing_apps
|
|
809
|
+
applications=missing_apps
|
|
810
|
+
)
|
|
587
811
|
|
|
588
812
|
def _get_missing_applications_for_steps(self, specified_apps, parsed_args):
|
|
589
|
-
allowed_app_steps = set(
|
|
590
|
-
|
|
813
|
+
allowed_app_steps = set(
|
|
814
|
+
[constants.HIVE, constants.PIG, constants.IMPALA]
|
|
815
|
+
)
|
|
591
816
|
missing_apps = set()
|
|
592
817
|
if parsed_args.steps is not None:
|
|
593
818
|
for step in parsed_args.steps:
|
|
@@ -597,38 +822,51 @@ class CreateCluster(Command):
|
|
|
597
822
|
|
|
598
823
|
if step_type is not None:
|
|
599
824
|
step_type = step_type.lower()
|
|
600
|
-
if
|
|
601
|
-
|
|
825
|
+
if (
|
|
826
|
+
step_type in allowed_app_steps
|
|
827
|
+
and step_type not in specified_apps
|
|
828
|
+
):
|
|
602
829
|
missing_apps.add(step['Type'].title())
|
|
603
830
|
return missing_apps
|
|
604
831
|
|
|
605
|
-
def _filter_configurations_in_special_cases(
|
|
606
|
-
|
|
832
|
+
def _filter_configurations_in_special_cases(
|
|
833
|
+
self, configurations, parsed_args, parsed_configs
|
|
834
|
+
):
|
|
607
835
|
if parsed_args.use_default_roles:
|
|
608
|
-
configurations = [
|
|
609
|
-
|
|
610
|
-
|
|
836
|
+
configurations = [
|
|
837
|
+
x
|
|
838
|
+
for x in configurations
|
|
839
|
+
if x.name != 'service_role' and x.name != 'instance_profile'
|
|
840
|
+
]
|
|
611
841
|
return configurations
|
|
612
842
|
|
|
613
843
|
def _handle_emrfs_parameters(self, cluster, emrfs_args, release_label):
|
|
614
844
|
if release_label:
|
|
615
845
|
self.validate_no_emrfs_configuration(cluster)
|
|
616
846
|
emrfs_configuration = emrfsutils.build_emrfs_confiuration(
|
|
617
|
-
emrfs_args
|
|
847
|
+
emrfs_args
|
|
848
|
+
)
|
|
618
849
|
|
|
619
850
|
self._update_cluster_dict(
|
|
620
|
-
cluster=cluster,
|
|
621
|
-
|
|
851
|
+
cluster=cluster,
|
|
852
|
+
key='Configurations',
|
|
853
|
+
value=[emrfs_configuration],
|
|
854
|
+
)
|
|
622
855
|
else:
|
|
623
856
|
emrfs_ba_config_list = emrfsutils.build_bootstrap_action_configs(
|
|
624
|
-
self.region, emrfs_args
|
|
857
|
+
self.region, emrfs_args
|
|
858
|
+
)
|
|
625
859
|
self._update_cluster_dict(
|
|
626
|
-
cluster=cluster,
|
|
627
|
-
|
|
860
|
+
cluster=cluster,
|
|
861
|
+
key='BootstrapActions',
|
|
862
|
+
value=emrfs_ba_config_list,
|
|
863
|
+
)
|
|
628
864
|
|
|
629
865
|
def validate_no_emrfs_configuration(self, cluster):
|
|
630
866
|
if 'Configurations' in cluster:
|
|
631
867
|
for config in cluster['Configurations']:
|
|
632
|
-
if
|
|
633
|
-
|
|
868
|
+
if (
|
|
869
|
+
config is not None
|
|
870
|
+
and config.get('Classification') == constants.EMRFS_SITE
|
|
871
|
+
):
|
|
634
872
|
raise exceptions.DuplicateEmrFsConfigurationError
|