capo-codedeploy 0.1.0__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.
- capo_codedeploy/__init__.py +70 -0
- capo_codedeploy/_async.py +25 -0
- capo_codedeploy/_auth/_identity.py +16 -0
- capo_codedeploy/_auth/_providers.py +886 -0
- capo_codedeploy/_auth/_signers.py +88 -0
- capo_codedeploy/_auth/_sigv4.py +434 -0
- capo_codedeploy/_auth/_zapros_handler.py +80 -0
- capo_codedeploy/_iter.py +113 -0
- capo_codedeploy/_operations/code_deploy_20141006/add_tags_to_on_premises_instances.py +153 -0
- capo_codedeploy/_operations/code_deploy_20141006/batch_get_application_revisions.py +173 -0
- capo_codedeploy/_operations/code_deploy_20141006/batch_get_applications.py +163 -0
- capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployment_groups.py +178 -0
- capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployment_instances.py +178 -0
- capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployment_targets.py +188 -0
- capo_codedeploy/_operations/code_deploy_20141006/batch_get_deployments.py +158 -0
- capo_codedeploy/_operations/code_deploy_20141006/batch_get_on_premises_instances.py +158 -0
- capo_codedeploy/_operations/code_deploy_20141006/continue_deployment.py +155 -0
- capo_codedeploy/_operations/code_deploy_20141006/create_application.py +175 -0
- capo_codedeploy/_operations/code_deploy_20141006/create_deployment.py +278 -0
- capo_codedeploy/_operations/code_deploy_20141006/create_deployment_config.py +185 -0
- capo_codedeploy/_operations/code_deploy_20141006/create_deployment_group.py +320 -0
- capo_codedeploy/_operations/code_deploy_20141006/delete_application.py +129 -0
- capo_codedeploy/_operations/code_deploy_20141006/delete_deployment_config.py +136 -0
- capo_codedeploy/_operations/code_deploy_20141006/delete_deployment_group.py +167 -0
- capo_codedeploy/_operations/code_deploy_20141006/delete_git_hub_account_token.py +166 -0
- capo_codedeploy/_operations/code_deploy_20141006/delete_resources_by_external_id.py +137 -0
- capo_codedeploy/_operations/code_deploy_20141006/deregister_on_premises_instance.py +126 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_application.py +157 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_application_revision.py +173 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_deployment.py +157 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_deployment_config.py +162 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_deployment_group.py +179 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_deployment_instance.py +177 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_deployment_target.py +182 -0
- capo_codedeploy/_operations/code_deploy_20141006/get_on_premises_instance.py +157 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_application_revisions.py +195 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_applications.py +149 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_deployment_configs.py +147 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_deployment_groups.py +162 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_deployment_instances.py +198 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_deployment_targets.py +188 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_deployments.py +199 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_git_hub_account_token_names.py +157 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_on_premises_instances.py +159 -0
- capo_codedeploy/_operations/code_deploy_20141006/list_tags_for_resource.py +157 -0
- capo_codedeploy/_operations/code_deploy_20141006/put_lifecycle_event_hook_execution_status.py +177 -0
- capo_codedeploy/_operations/code_deploy_20141006/register_application_revision.py +147 -0
- capo_codedeploy/_operations/code_deploy_20141006/register_on_premises_instance.py +166 -0
- capo_codedeploy/_operations/code_deploy_20141006/remove_tags_from_on_premises_instances.py +153 -0
- capo_codedeploy/_operations/code_deploy_20141006/skip_wait_time_for_instance_termination.py +146 -0
- capo_codedeploy/_operations/code_deploy_20141006/stop_deployment.py +172 -0
- capo_codedeploy/_operations/code_deploy_20141006/tag_resource.py +174 -0
- capo_codedeploy/_operations/code_deploy_20141006/untag_resource.py +174 -0
- capo_codedeploy/_operations/code_deploy_20141006/update_application.py +134 -0
- capo_codedeploy/_operations/code_deploy_20141006/update_deployment_group.py +310 -0
- capo_codedeploy/_pagination.py +21 -0
- capo_codedeploy/_protocol/__init__.py +1 -0
- capo_codedeploy/_protocol/errors.py +93 -0
- capo_codedeploy/_protocol/eventstream.py +238 -0
- capo_codedeploy/_protocol/serialize.py +47 -0
- capo_codedeploy/_protocol/xml.py +33 -0
- capo_codedeploy/_rule_engine/__init__.py +0 -0
- capo_codedeploy/_rule_engine/_aws_partition.py +160 -0
- capo_codedeploy/_rule_engine/_endpoint_rule_set.py +138 -0
- capo_codedeploy/_rule_engine/_endpoint_runtime.py +389 -0
- capo_codedeploy/_services/_aws_config.py +160 -0
- capo_codedeploy/_services/_pipeline.py +198 -0
- capo_codedeploy/_services/async_code_deploy.py +3278 -0
- capo_codedeploy/_services/code_deploy.py +3229 -0
- capo_codedeploy/errors/__init__.py +335 -0
- capo_codedeploy/errors/_base.py +94 -0
- capo_codedeploy/errors/alarms_limit_exceeded_exception.py +52 -0
- capo_codedeploy/errors/application_already_exists_exception.py +54 -0
- capo_codedeploy/errors/application_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/application_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/application_name_required_exception.py +54 -0
- capo_codedeploy/errors/arn_not_supported_exception.py +52 -0
- capo_codedeploy/errors/batch_limit_exceeded_exception.py +52 -0
- capo_codedeploy/errors/bucket_name_filter_required_exception.py +54 -0
- capo_codedeploy/errors/deployment_already_completed_exception.py +54 -0
- capo_codedeploy/errors/deployment_config_already_exists_exception.py +54 -0
- capo_codedeploy/errors/deployment_config_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/deployment_config_in_use_exception.py +54 -0
- capo_codedeploy/errors/deployment_config_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/deployment_config_name_required_exception.py +54 -0
- capo_codedeploy/errors/deployment_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/deployment_group_already_exists_exception.py +54 -0
- capo_codedeploy/errors/deployment_group_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/deployment_group_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/deployment_group_name_required_exception.py +54 -0
- capo_codedeploy/errors/deployment_id_required_exception.py +54 -0
- capo_codedeploy/errors/deployment_is_not_in_ready_state_exception.py +54 -0
- capo_codedeploy/errors/deployment_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/deployment_not_started_exception.py +54 -0
- capo_codedeploy/errors/deployment_target_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/deployment_target_id_required_exception.py +54 -0
- capo_codedeploy/errors/deployment_target_list_size_exceeded_exception.py +56 -0
- capo_codedeploy/errors/description_too_long_exception.py +52 -0
- capo_codedeploy/errors/ecs_service_mapping_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/git_hub_account_token_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/git_hub_account_token_name_required_exception.py +54 -0
- capo_codedeploy/errors/iam_arn_required_exception.py +52 -0
- capo_codedeploy/errors/iam_session_arn_already_registered_exception.py +54 -0
- capo_codedeploy/errors/iam_user_arn_already_registered_exception.py +54 -0
- capo_codedeploy/errors/iam_user_arn_required_exception.py +52 -0
- capo_codedeploy/errors/instance_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/instance_id_required_exception.py +52 -0
- capo_codedeploy/errors/instance_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/instance_name_already_registered_exception.py +54 -0
- capo_codedeploy/errors/instance_name_required_exception.py +54 -0
- capo_codedeploy/errors/instance_not_registered_exception.py +54 -0
- capo_codedeploy/errors/invalid_alarm_config_exception.py +52 -0
- capo_codedeploy/errors/invalid_application_name_exception.py +54 -0
- capo_codedeploy/errors/invalid_arn_exception.py +52 -0
- capo_codedeploy/errors/invalid_auto_rollback_config_exception.py +54 -0
- capo_codedeploy/errors/invalid_auto_scaling_group_exception.py +54 -0
- capo_codedeploy/errors/invalid_blue_green_deployment_configuration_exception.py +60 -0
- capo_codedeploy/errors/invalid_bucket_name_filter_exception.py +54 -0
- capo_codedeploy/errors/invalid_compute_platform_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployed_state_filter_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployment_config_name_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployment_group_name_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployment_id_exception.py +52 -0
- capo_codedeploy/errors/invalid_deployment_instance_type_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployment_status_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployment_style_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployment_target_id_exception.py +54 -0
- capo_codedeploy/errors/invalid_deployment_wait_type_exception.py +54 -0
- capo_codedeploy/errors/invalid_ec2_tag_combination_exception.py +54 -0
- capo_codedeploy/errors/invalid_ec2_tag_exception.py +52 -0
- capo_codedeploy/errors/invalid_ecs_service_exception.py +52 -0
- capo_codedeploy/errors/invalid_external_id_exception.py +52 -0
- capo_codedeploy/errors/invalid_file_exists_behavior_exception.py +54 -0
- capo_codedeploy/errors/invalid_git_hub_account_token_exception.py +54 -0
- capo_codedeploy/errors/invalid_git_hub_account_token_name_exception.py +54 -0
- capo_codedeploy/errors/invalid_iam_session_arn_exception.py +54 -0
- capo_codedeploy/errors/invalid_iam_user_arn_exception.py +52 -0
- capo_codedeploy/errors/invalid_ignore_application_stop_failures_value_exception.py +60 -0
- capo_codedeploy/errors/invalid_input_exception.py +52 -0
- capo_codedeploy/errors/invalid_instance_name_exception.py +52 -0
- capo_codedeploy/errors/invalid_instance_status_exception.py +54 -0
- capo_codedeploy/errors/invalid_instance_type_exception.py +52 -0
- capo_codedeploy/errors/invalid_key_prefix_filter_exception.py +54 -0
- capo_codedeploy/errors/invalid_lifecycle_event_hook_execution_id_exception.py +60 -0
- capo_codedeploy/errors/invalid_lifecycle_event_hook_execution_status_exception.py +60 -0
- capo_codedeploy/errors/invalid_load_balancer_info_exception.py +54 -0
- capo_codedeploy/errors/invalid_minimum_healthy_host_value_exception.py +54 -0
- capo_codedeploy/errors/invalid_next_token_exception.py +52 -0
- capo_codedeploy/errors/invalid_on_premises_tag_combination_exception.py +56 -0
- capo_codedeploy/errors/invalid_operation_exception.py +52 -0
- capo_codedeploy/errors/invalid_registration_status_exception.py +54 -0
- capo_codedeploy/errors/invalid_revision_exception.py +52 -0
- capo_codedeploy/errors/invalid_role_exception.py +52 -0
- capo_codedeploy/errors/invalid_sort_by_exception.py +52 -0
- capo_codedeploy/errors/invalid_sort_order_exception.py +52 -0
- capo_codedeploy/errors/invalid_tag_exception.py +52 -0
- capo_codedeploy/errors/invalid_tag_filter_exception.py +52 -0
- capo_codedeploy/errors/invalid_tags_to_add_exception.py +52 -0
- capo_codedeploy/errors/invalid_target_filter_name_exception.py +54 -0
- capo_codedeploy/errors/invalid_target_group_pair_exception.py +54 -0
- capo_codedeploy/errors/invalid_target_instances_exception.py +54 -0
- capo_codedeploy/errors/invalid_time_range_exception.py +52 -0
- capo_codedeploy/errors/invalid_traffic_routing_configuration_exception.py +58 -0
- capo_codedeploy/errors/invalid_trigger_config_exception.py +54 -0
- capo_codedeploy/errors/invalid_update_outdated_instances_only_value_exception.py +60 -0
- capo_codedeploy/errors/invalid_zonal_deployment_configuration_exception.py +60 -0
- capo_codedeploy/errors/lifecycle_event_already_completed_exception.py +54 -0
- capo_codedeploy/errors/lifecycle_hook_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/multiple_iam_arns_provided_exception.py +54 -0
- capo_codedeploy/errors/operation_not_supported_exception.py +54 -0
- capo_codedeploy/errors/resource_arn_required_exception.py +52 -0
- capo_codedeploy/errors/resource_validation_exception.py +52 -0
- capo_codedeploy/errors/revision_does_not_exist_exception.py +54 -0
- capo_codedeploy/errors/revision_required_exception.py +52 -0
- capo_codedeploy/errors/role_required_exception.py +52 -0
- capo_codedeploy/errors/tag_limit_exceeded_exception.py +52 -0
- capo_codedeploy/errors/tag_required_exception.py +52 -0
- capo_codedeploy/errors/tag_set_list_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/throttling_exception.py +52 -0
- capo_codedeploy/errors/trigger_targets_limit_exceeded_exception.py +54 -0
- capo_codedeploy/errors/unsupported_action_for_deployment_type_exception.py +58 -0
- capo_codedeploy/py.typed +0 -0
- capo_codedeploy/types/_prelude/blob.py +12 -0
- capo_codedeploy/types/_prelude/timestamp.py +17 -0
- capo_codedeploy/types/add_tags_to_on_premises_instances_input.py +59 -0
- capo_codedeploy/types/additional_deployment_status_info.py +5 -0
- capo_codedeploy/types/alarm.py +28 -0
- capo_codedeploy/types/alarm_configuration.py +51 -0
- capo_codedeploy/types/alarm_list.py +29 -0
- capo_codedeploy/types/alarm_name.py +5 -0
- capo_codedeploy/types/app_spec_content.py +35 -0
- capo_codedeploy/types/application_id.py +5 -0
- capo_codedeploy/types/application_info.py +90 -0
- capo_codedeploy/types/application_name.py +5 -0
- capo_codedeploy/types/application_revision_sort_by.py +18 -0
- capo_codedeploy/types/applications_info_list.py +33 -0
- capo_codedeploy/types/applications_list.py +19 -0
- capo_codedeploy/types/arn.py +5 -0
- capo_codedeploy/types/auto_rollback_configuration.py +50 -0
- capo_codedeploy/types/auto_rollback_event.py +18 -0
- capo_codedeploy/types/auto_rollback_events_list.py +35 -0
- capo_codedeploy/types/auto_scaling_group.py +47 -0
- capo_codedeploy/types/auto_scaling_group_hook.py +5 -0
- capo_codedeploy/types/auto_scaling_group_list.py +35 -0
- capo_codedeploy/types/auto_scaling_group_name.py +5 -0
- capo_codedeploy/types/auto_scaling_group_name_list.py +19 -0
- capo_codedeploy/types/batch_get_application_revisions_input.py +55 -0
- capo_codedeploy/types/batch_get_application_revisions_output.py +56 -0
- capo_codedeploy/types/batch_get_applications_input.py +45 -0
- capo_codedeploy/types/batch_get_applications_output.py +42 -0
- capo_codedeploy/types/batch_get_deployment_groups_input.py +57 -0
- capo_codedeploy/types/batch_get_deployment_groups_output.py +49 -0
- capo_codedeploy/types/batch_get_deployment_instances_input.py +53 -0
- capo_codedeploy/types/batch_get_deployment_instances_output.py +49 -0
- capo_codedeploy/types/batch_get_deployment_targets_input.py +51 -0
- capo_codedeploy/types/batch_get_deployment_targets_output.py +42 -0
- capo_codedeploy/types/batch_get_deployments_input.py +43 -0
- capo_codedeploy/types/batch_get_deployments_output.py +42 -0
- capo_codedeploy/types/batch_get_on_premises_instances_input.py +45 -0
- capo_codedeploy/types/batch_get_on_premises_instances_output.py +42 -0
- capo_codedeploy/types/blue_green_deployment_configuration.py +84 -0
- capo_codedeploy/types/blue_instance_termination_option.py +46 -0
- capo_codedeploy/types/boolean.py +5 -0
- capo_codedeploy/types/bundle_type.py +20 -0
- capo_codedeploy/types/cloud_formation_resource_type.py +5 -0
- capo_codedeploy/types/cloud_formation_target.py +112 -0
- capo_codedeploy/types/commit_id.py +5 -0
- capo_codedeploy/types/compute_platform.py +18 -0
- capo_codedeploy/types/continue_deployment_input.py +49 -0
- capo_codedeploy/types/create_application_input.py +67 -0
- capo_codedeploy/types/create_application_output.py +28 -0
- capo_codedeploy/types/create_deployment_config_input.py +115 -0
- capo_codedeploy/types/create_deployment_config_output.py +30 -0
- capo_codedeploy/types/create_deployment_group_input.py +353 -0
- capo_codedeploy/types/create_deployment_group_output.py +30 -0
- capo_codedeploy/types/create_deployment_input.py +178 -0
- capo_codedeploy/types/create_deployment_output.py +28 -0
- capo_codedeploy/types/delete_application_input.py +31 -0
- capo_codedeploy/types/delete_deployment_config_input.py +35 -0
- capo_codedeploy/types/delete_deployment_group_input.py +45 -0
- capo_codedeploy/types/delete_deployment_group_output.py +42 -0
- capo_codedeploy/types/delete_git_hub_account_token_input.py +30 -0
- capo_codedeploy/types/delete_git_hub_account_token_output.py +30 -0
- capo_codedeploy/types/delete_resources_by_external_id_input.py +28 -0
- capo_codedeploy/types/delete_resources_by_external_id_output.py +18 -0
- capo_codedeploy/types/deployment_config_id.py +5 -0
- capo_codedeploy/types/deployment_config_info.py +134 -0
- capo_codedeploy/types/deployment_config_name.py +5 -0
- capo_codedeploy/types/deployment_configs_list.py +19 -0
- capo_codedeploy/types/deployment_creator.py +23 -0
- capo_codedeploy/types/deployment_group_id.py +5 -0
- capo_codedeploy/types/deployment_group_info.py +420 -0
- capo_codedeploy/types/deployment_group_info_list.py +35 -0
- capo_codedeploy/types/deployment_group_name.py +5 -0
- capo_codedeploy/types/deployment_groups_list.py +19 -0
- capo_codedeploy/types/deployment_id.py +5 -0
- capo_codedeploy/types/deployment_info.py +499 -0
- capo_codedeploy/types/deployment_option.py +17 -0
- capo_codedeploy/types/deployment_overview.py +64 -0
- capo_codedeploy/types/deployment_ready_action.py +17 -0
- capo_codedeploy/types/deployment_ready_option.py +50 -0
- capo_codedeploy/types/deployment_status.py +23 -0
- capo_codedeploy/types/deployment_status_list.py +33 -0
- capo_codedeploy/types/deployment_status_message_list.py +19 -0
- capo_codedeploy/types/deployment_style.py +61 -0
- capo_codedeploy/types/deployment_target.py +115 -0
- capo_codedeploy/types/deployment_target_list.py +33 -0
- capo_codedeploy/types/deployment_target_type.py +19 -0
- capo_codedeploy/types/deployment_type.py +17 -0
- capo_codedeploy/types/deployment_wait_type.py +17 -0
- capo_codedeploy/types/deployments_info_list.py +31 -0
- capo_codedeploy/types/deployments_list.py +17 -0
- capo_codedeploy/types/deregister_on_premises_instance_input.py +33 -0
- capo_codedeploy/types/description.py +5 -0
- capo_codedeploy/types/diagnostics.py +63 -0
- capo_codedeploy/types/duration.py +5 -0
- capo_codedeploy/types/e_tag.py +5 -0
- capo_codedeploy/types/ec2_tag_filter.py +52 -0
- capo_codedeploy/types/ec2_tag_filter_list.py +29 -0
- capo_codedeploy/types/ec2_tag_filter_type.py +18 -0
- capo_codedeploy/types/ec2_tag_set.py +42 -0
- capo_codedeploy/types/ec2_tag_set_list.py +35 -0
- capo_codedeploy/types/ecs_cluster_name.py +5 -0
- capo_codedeploy/types/ecs_service.py +35 -0
- capo_codedeploy/types/ecs_service_list.py +29 -0
- capo_codedeploy/types/ecs_service_name.py +5 -0
- capo_codedeploy/types/ecs_target.py +114 -0
- capo_codedeploy/types/ecs_task_set.py +111 -0
- capo_codedeploy/types/ecs_task_set_count.py +5 -0
- capo_codedeploy/types/ecs_task_set_identifier.py +5 -0
- capo_codedeploy/types/ecs_task_set_list.py +29 -0
- capo_codedeploy/types/ecs_task_set_status.py +5 -0
- capo_codedeploy/types/elb_info.py +28 -0
- capo_codedeploy/types/elb_info_list.py +29 -0
- capo_codedeploy/types/elb_name.py +5 -0
- capo_codedeploy/types/error_code.py +49 -0
- capo_codedeploy/types/error_information.py +43 -0
- capo_codedeploy/types/error_message.py +5 -0
- capo_codedeploy/types/external_id.py +5 -0
- capo_codedeploy/types/file_exists_behavior.py +18 -0
- capo_codedeploy/types/filter_value.py +5 -0
- capo_codedeploy/types/filter_value_list.py +17 -0
- capo_codedeploy/types/generic_revision_info.py +96 -0
- capo_codedeploy/types/get_application_input.py +31 -0
- capo_codedeploy/types/get_application_output.py +40 -0
- capo_codedeploy/types/get_application_revision_input.py +51 -0
- capo_codedeploy/types/get_application_revision_output.py +70 -0
- capo_codedeploy/types/get_deployment_config_input.py +35 -0
- capo_codedeploy/types/get_deployment_config_output.py +42 -0
- capo_codedeploy/types/get_deployment_group_input.py +43 -0
- capo_codedeploy/types/get_deployment_group_output.py +42 -0
- capo_codedeploy/types/get_deployment_input.py +31 -0
- capo_codedeploy/types/get_deployment_instance_input.py +39 -0
- capo_codedeploy/types/get_deployment_instance_output.py +42 -0
- capo_codedeploy/types/get_deployment_output.py +40 -0
- capo_codedeploy/types/get_deployment_target_input.py +39 -0
- capo_codedeploy/types/get_deployment_target_output.py +42 -0
- capo_codedeploy/types/get_on_premises_instance_input.py +31 -0
- capo_codedeploy/types/get_on_premises_instance_output.py +40 -0
- capo_codedeploy/types/git_hub_account_token_name.py +5 -0
- capo_codedeploy/types/git_hub_account_token_name_list.py +19 -0
- capo_codedeploy/types/git_hub_location.py +35 -0
- capo_codedeploy/types/green_fleet_provisioning_action.py +17 -0
- capo_codedeploy/types/green_fleet_provisioning_option.py +42 -0
- capo_codedeploy/types/iam_session_arn.py +5 -0
- capo_codedeploy/types/iam_user_arn.py +5 -0
- capo_codedeploy/types/instance_action.py +17 -0
- capo_codedeploy/types/instance_arn.py +5 -0
- capo_codedeploy/types/instance_count.py +5 -0
- capo_codedeploy/types/instance_id.py +5 -0
- capo_codedeploy/types/instance_info.py +95 -0
- capo_codedeploy/types/instance_info_list.py +29 -0
- capo_codedeploy/types/instance_name.py +5 -0
- capo_codedeploy/types/instance_name_list.py +17 -0
- capo_codedeploy/types/instance_status.py +22 -0
- capo_codedeploy/types/instance_status_list.py +31 -0
- capo_codedeploy/types/instance_summary.py +107 -0
- capo_codedeploy/types/instance_summary_list.py +33 -0
- capo_codedeploy/types/instance_target.py +112 -0
- capo_codedeploy/types/instance_type.py +17 -0
- capo_codedeploy/types/instance_type_list.py +29 -0
- capo_codedeploy/types/instances_list.py +17 -0
- capo_codedeploy/types/key.py +5 -0
- capo_codedeploy/types/lambda_function_alias.py +5 -0
- capo_codedeploy/types/lambda_function_info.py +69 -0
- capo_codedeploy/types/lambda_function_name.py +5 -0
- capo_codedeploy/types/lambda_target.py +114 -0
- capo_codedeploy/types/last_deployment_info.py +74 -0
- capo_codedeploy/types/lifecycle_error_code.py +21 -0
- capo_codedeploy/types/lifecycle_event.py +95 -0
- capo_codedeploy/types/lifecycle_event_hook_execution_id.py +5 -0
- capo_codedeploy/types/lifecycle_event_list.py +31 -0
- capo_codedeploy/types/lifecycle_event_name.py +5 -0
- capo_codedeploy/types/lifecycle_event_status.py +21 -0
- capo_codedeploy/types/lifecycle_message.py +5 -0
- capo_codedeploy/types/list_application_revisions_input.py +111 -0
- capo_codedeploy/types/list_application_revisions_output.py +49 -0
- capo_codedeploy/types/list_applications_input.py +28 -0
- capo_codedeploy/types/list_applications_output.py +49 -0
- capo_codedeploy/types/list_deployment_configs_input.py +28 -0
- capo_codedeploy/types/list_deployment_configs_output.py +49 -0
- capo_codedeploy/types/list_deployment_groups_input.py +40 -0
- capo_codedeploy/types/list_deployment_groups_output.py +58 -0
- capo_codedeploy/types/list_deployment_instances_input.py +82 -0
- capo_codedeploy/types/list_deployment_instances_output.py +47 -0
- capo_codedeploy/types/list_deployment_targets_input.py +57 -0
- capo_codedeploy/types/list_deployment_targets_output.py +45 -0
- capo_codedeploy/types/list_deployments_input.py +93 -0
- capo_codedeploy/types/list_deployments_output.py +47 -0
- capo_codedeploy/types/list_git_hub_account_token_names_input.py +28 -0
- capo_codedeploy/types/list_git_hub_account_token_names_output.py +49 -0
- capo_codedeploy/types/list_on_premises_instances_input.py +68 -0
- capo_codedeploy/types/list_on_premises_instances_output.py +49 -0
- capo_codedeploy/types/list_state_filter_action.py +18 -0
- capo_codedeploy/types/list_tags_for_resource_input.py +38 -0
- capo_codedeploy/types/list_tags_for_resource_output.py +43 -0
- capo_codedeploy/types/listener_arn.py +5 -0
- capo_codedeploy/types/listener_arn_list.py +17 -0
- capo_codedeploy/types/load_balancer_info.py +80 -0
- capo_codedeploy/types/log_tail.py +5 -0
- capo_codedeploy/types/message.py +5 -0
- capo_codedeploy/types/minimum_healthy_hosts.py +50 -0
- capo_codedeploy/types/minimum_healthy_hosts_per_zone.py +50 -0
- capo_codedeploy/types/minimum_healthy_hosts_per_zone_type.py +17 -0
- capo_codedeploy/types/minimum_healthy_hosts_per_zone_value.py +5 -0
- capo_codedeploy/types/minimum_healthy_hosts_type.py +17 -0
- capo_codedeploy/types/minimum_healthy_hosts_value.py +5 -0
- capo_codedeploy/types/next_token.py +5 -0
- capo_codedeploy/types/nullable_boolean.py +5 -0
- capo_codedeploy/types/on_premises_tag_set.py +42 -0
- capo_codedeploy/types/on_premises_tag_set_list.py +31 -0
- capo_codedeploy/types/outdated_instances_strategy.py +17 -0
- capo_codedeploy/types/percentage.py +5 -0
- capo_codedeploy/types/put_lifecycle_event_hook_execution_status_input.py +60 -0
- capo_codedeploy/types/put_lifecycle_event_hook_execution_status_output.py +32 -0
- capo_codedeploy/types/raw_string.py +35 -0
- capo_codedeploy/types/raw_string_content.py +5 -0
- capo_codedeploy/types/raw_string_sha256.py +5 -0
- capo_codedeploy/types/register_application_revision_input.py +58 -0
- capo_codedeploy/types/register_on_premises_instance_input.py +47 -0
- capo_codedeploy/types/registration_status.py +17 -0
- capo_codedeploy/types/related_deployments.py +55 -0
- capo_codedeploy/types/remove_tags_from_on_premises_instances_input.py +61 -0
- capo_codedeploy/types/repository.py +5 -0
- capo_codedeploy/types/revision_info.py +63 -0
- capo_codedeploy/types/revision_info_list.py +29 -0
- capo_codedeploy/types/revision_location.py +114 -0
- capo_codedeploy/types/revision_location_list.py +33 -0
- capo_codedeploy/types/revision_location_type.py +19 -0
- capo_codedeploy/types/role.py +5 -0
- capo_codedeploy/types/rollback_info.py +49 -0
- capo_codedeploy/types/s3_bucket.py +5 -0
- capo_codedeploy/types/s3_key.py +5 -0
- capo_codedeploy/types/s3_location.py +64 -0
- capo_codedeploy/types/script_name.py +5 -0
- capo_codedeploy/types/skip_wait_time_for_instance_termination_input.py +28 -0
- capo_codedeploy/types/sort_order.py +17 -0
- capo_codedeploy/types/stop_deployment_input.py +40 -0
- capo_codedeploy/types/stop_deployment_output.py +43 -0
- capo_codedeploy/types/stop_status.py +17 -0
- capo_codedeploy/types/tag.py +35 -0
- capo_codedeploy/types/tag_filter.py +50 -0
- capo_codedeploy/types/tag_filter_list.py +29 -0
- capo_codedeploy/types/tag_filter_type.py +18 -0
- capo_codedeploy/types/tag_key_list.py +17 -0
- capo_codedeploy/types/tag_list.py +29 -0
- capo_codedeploy/types/tag_resource_input.py +45 -0
- capo_codedeploy/types/tag_resource_output.py +18 -0
- capo_codedeploy/types/target_arn.py +5 -0
- capo_codedeploy/types/target_filter_name.py +17 -0
- capo_codedeploy/types/target_filters.py +40 -0
- capo_codedeploy/types/target_group_info.py +28 -0
- capo_codedeploy/types/target_group_info_list.py +33 -0
- capo_codedeploy/types/target_group_name.py +5 -0
- capo_codedeploy/types/target_group_pair_info.py +79 -0
- capo_codedeploy/types/target_group_pair_info_list.py +35 -0
- capo_codedeploy/types/target_id.py +5 -0
- capo_codedeploy/types/target_id_list.py +17 -0
- capo_codedeploy/types/target_instances.py +78 -0
- capo_codedeploy/types/target_label.py +17 -0
- capo_codedeploy/types/target_status.py +22 -0
- capo_codedeploy/types/time.py +20 -0
- capo_codedeploy/types/time_based_canary.py +37 -0
- capo_codedeploy/types/time_based_linear.py +37 -0
- capo_codedeploy/types/time_range.py +50 -0
- capo_codedeploy/types/timestamp.py +20 -0
- capo_codedeploy/types/traffic_route.py +42 -0
- capo_codedeploy/types/traffic_routing_config.py +80 -0
- capo_codedeploy/types/traffic_routing_type.py +18 -0
- capo_codedeploy/types/traffic_weight.py +5 -0
- capo_codedeploy/types/trigger_config.py +58 -0
- capo_codedeploy/types/trigger_config_list.py +31 -0
- capo_codedeploy/types/trigger_event_type.py +25 -0
- capo_codedeploy/types/trigger_event_type_list.py +35 -0
- capo_codedeploy/types/trigger_name.py +5 -0
- capo_codedeploy/types/trigger_target_arn.py +5 -0
- capo_codedeploy/types/untag_resource_input.py +47 -0
- capo_codedeploy/types/untag_resource_output.py +18 -0
- capo_codedeploy/types/update_application_input.py +38 -0
- capo_codedeploy/types/update_deployment_group_input.py +343 -0
- capo_codedeploy/types/update_deployment_group_output.py +42 -0
- capo_codedeploy/types/value.py +5 -0
- capo_codedeploy/types/version.py +5 -0
- capo_codedeploy/types/version_id.py +5 -0
- capo_codedeploy/types/wait_time_in_mins.py +5 -0
- capo_codedeploy/types/wait_time_in_seconds.py +5 -0
- capo_codedeploy/types/zonal_config.py +63 -0
- capo_codedeploy-0.1.0.dist-info/METADATA +102 -0
- capo_codedeploy-0.1.0.dist-info/RECORD +472 -0
- capo_codedeploy-0.1.0.dist-info/WHEEL +5 -0
- capo_codedeploy-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_codedeploy-0.1.0.dist-info/top_level.txt +1 -0
capo_codedeploy/_iter.py
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"""Iterator helpers used by generated streaming operations.
|
|
2
|
+
|
|
3
|
+
Hand-written, not regenerated.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from collections.abc import AsyncIterable, AsyncIterator, Callable, Iterable, Iterator
|
|
9
|
+
from typing import Generic, TypeVar, cast
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T")
|
|
12
|
+
U = TypeVar("U")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class AnyIterator(AsyncIterator[T], Iterator[T], Generic[T]):
|
|
16
|
+
"""A type that is both a synchronous and asynchronous iterator.
|
|
17
|
+
|
|
18
|
+
Streaming output fields use this so the same TypedDict type works for
|
|
19
|
+
both sync and async operation variants.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class StaticAnyIterator(AnyIterator[T], Generic[T]):
|
|
26
|
+
"""An :class:`AnyIterator` backed by static, in-memory content.
|
|
27
|
+
|
|
28
|
+
Used when streaming output is produced from already-materialized bytes
|
|
29
|
+
rather than a live stream. The ``content`` is yielded once and remains
|
|
30
|
+
accessible as a public attribute.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, content: T) -> None:
|
|
34
|
+
self.content = content
|
|
35
|
+
self._consumed = False
|
|
36
|
+
|
|
37
|
+
def __next__(self) -> T:
|
|
38
|
+
if self._consumed:
|
|
39
|
+
raise StopIteration
|
|
40
|
+
self._consumed = True
|
|
41
|
+
return self.content
|
|
42
|
+
|
|
43
|
+
async def __anext__(self) -> T:
|
|
44
|
+
if self._consumed:
|
|
45
|
+
raise StopAsyncIteration
|
|
46
|
+
self._consumed = True
|
|
47
|
+
return self.content
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def map_sync_iterator(iterable: Iterable[T], fn: Callable[[T], U]) -> Iterator[U]:
|
|
51
|
+
"""Map ``fn`` over a synchronous iterable, yielding results lazily."""
|
|
52
|
+
for item in iterable:
|
|
53
|
+
yield fn(item)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
async def map_async_iterator(
|
|
57
|
+
async_iterable: AsyncIterable[T], fn: Callable[[T], U]
|
|
58
|
+
) -> AsyncIterator[U]:
|
|
59
|
+
"""Map ``fn`` over an asynchronous iterable, yielding results lazily."""
|
|
60
|
+
async for item in async_iterable:
|
|
61
|
+
yield fn(item)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def chain_sync_iterator(*iterables: Iterable[T]) -> Iterator[T]:
|
|
65
|
+
"""Yield items from each iterable in order."""
|
|
66
|
+
for iterable in iterables:
|
|
67
|
+
yield from iterable
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
async def chain_async_iterator(
|
|
71
|
+
prefix: Iterable[T], rest: AsyncIterable[T]
|
|
72
|
+
) -> AsyncIterator[T]:
|
|
73
|
+
"""Yield the synchronous ``prefix`` items, then the async ``rest`` items."""
|
|
74
|
+
for item in prefix:
|
|
75
|
+
yield item
|
|
76
|
+
async for item in rest:
|
|
77
|
+
yield item
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def ensure_async_iterator(value: AsyncIterator[T] | T) -> AnyIterator[T]:
|
|
81
|
+
"""Return ``value`` as an :class:`AnyIterator`.
|
|
82
|
+
|
|
83
|
+
An async iterator is returned unchanged; a single value is wrapped in a
|
|
84
|
+
fresh single-item async iterator.
|
|
85
|
+
"""
|
|
86
|
+
if isinstance(value, AsyncIterator):
|
|
87
|
+
return cast(AnyIterator[T], value)
|
|
88
|
+
|
|
89
|
+
return StaticAnyIterator(value)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def ensure_sync_iterator(value: Iterator[T] | T) -> AnyIterator[T]:
|
|
93
|
+
"""Return ``value`` as an :class:`AnyIterator`.
|
|
94
|
+
|
|
95
|
+
A sync iterator is returned unchanged; a single value is wrapped in a
|
|
96
|
+
fresh single-item sync iterator.
|
|
97
|
+
"""
|
|
98
|
+
if isinstance(value, Iterator):
|
|
99
|
+
return cast(AnyIterator[T], value)
|
|
100
|
+
|
|
101
|
+
return StaticAnyIterator(value)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
__all__ = [
|
|
105
|
+
"AnyIterator",
|
|
106
|
+
"StaticAnyIterator",
|
|
107
|
+
"chain_async_iterator",
|
|
108
|
+
"chain_sync_iterator",
|
|
109
|
+
"ensure_async_iterator",
|
|
110
|
+
"ensure_sync_iterator",
|
|
111
|
+
"map_async_iterator",
|
|
112
|
+
"map_sync_iterator",
|
|
113
|
+
]
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codedeploy#AddTagsToOnPremisesInstances``."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
import zapros
|
|
9
|
+
from typing_extensions import Never
|
|
10
|
+
|
|
11
|
+
import capo_codedeploy._auth._signers
|
|
12
|
+
import capo_codedeploy._auth._sigv4
|
|
13
|
+
import capo_codedeploy._protocol.eventstream
|
|
14
|
+
import capo_codedeploy.errors.instance_limit_exceeded_exception
|
|
15
|
+
import capo_codedeploy.errors.instance_name_required_exception
|
|
16
|
+
import capo_codedeploy.errors.instance_not_registered_exception
|
|
17
|
+
import capo_codedeploy.errors.invalid_instance_name_exception
|
|
18
|
+
import capo_codedeploy.errors.invalid_tag_exception
|
|
19
|
+
import capo_codedeploy.errors.tag_limit_exceeded_exception
|
|
20
|
+
import capo_codedeploy.errors.tag_required_exception
|
|
21
|
+
import capo_codedeploy.types.add_tags_to_on_premises_instances_input
|
|
22
|
+
import capo_codedeploy.types.instance_name_list
|
|
23
|
+
import capo_codedeploy.types.tag_list
|
|
24
|
+
from capo_codedeploy._protocol.errors import parse_error_metadata_json
|
|
25
|
+
from capo_codedeploy._rule_engine._endpoint_rule_set import EndpointParams, resolve
|
|
26
|
+
from capo_codedeploy._services._pipeline import AsyncOperationOptions, OperationOptions
|
|
27
|
+
from capo_codedeploy.errors import UnknownServiceError
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def handle_error(response: zapros.Response) -> Never:
|
|
31
|
+
data = json.loads(response.read())
|
|
32
|
+
code, message = parse_error_metadata_json(response, data)
|
|
33
|
+
match code:
|
|
34
|
+
case "InstanceLimitExceededException":
|
|
35
|
+
raise capo_codedeploy.errors.instance_limit_exceeded_exception.InstanceLimitExceededException.from_aws_json_1_1(
|
|
36
|
+
data, message
|
|
37
|
+
)
|
|
38
|
+
case "InstanceNameRequiredException":
|
|
39
|
+
raise capo_codedeploy.errors.instance_name_required_exception.InstanceNameRequiredException.from_aws_json_1_1(
|
|
40
|
+
data, message
|
|
41
|
+
)
|
|
42
|
+
case "InstanceNotRegisteredException":
|
|
43
|
+
raise capo_codedeploy.errors.instance_not_registered_exception.InstanceNotRegisteredException.from_aws_json_1_1(
|
|
44
|
+
data, message
|
|
45
|
+
)
|
|
46
|
+
case "InvalidInstanceNameException":
|
|
47
|
+
raise capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException.from_aws_json_1_1(
|
|
48
|
+
data, message
|
|
49
|
+
)
|
|
50
|
+
case "InvalidTagException":
|
|
51
|
+
raise capo_codedeploy.errors.invalid_tag_exception.InvalidTagException.from_aws_json_1_1(
|
|
52
|
+
data, message
|
|
53
|
+
)
|
|
54
|
+
case "TagLimitExceededException":
|
|
55
|
+
raise capo_codedeploy.errors.tag_limit_exceeded_exception.TagLimitExceededException.from_aws_json_1_1(
|
|
56
|
+
data, message
|
|
57
|
+
)
|
|
58
|
+
case "TagRequiredException":
|
|
59
|
+
raise capo_codedeploy.errors.tag_required_exception.TagRequiredException.from_aws_json_1_1(
|
|
60
|
+
data, message
|
|
61
|
+
)
|
|
62
|
+
case _:
|
|
63
|
+
raise UnknownServiceError(code=code, message=message, response=response)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def get_signer(
|
|
67
|
+
options: AsyncOperationOptions | OperationOptions,
|
|
68
|
+
auth_schemes: list[dict[str, Any]] | None = None,
|
|
69
|
+
) -> capo_codedeploy._auth._signers.Signer | None:
|
|
70
|
+
name_to_schema = {s["name"]: s for s in (auth_schemes or [])} # noqa: F841
|
|
71
|
+
if (
|
|
72
|
+
options.credentials_provider is not None
|
|
73
|
+
and name_to_schema
|
|
74
|
+
and not name_to_schema.keys() & {"sigv4", "sigv4-s3express"}
|
|
75
|
+
):
|
|
76
|
+
raise RuntimeError(
|
|
77
|
+
"Endpoint requires an unsupported auth scheme: " + ", ".join(name_to_schema)
|
|
78
|
+
)
|
|
79
|
+
if options.credentials_provider is not None:
|
|
80
|
+
endpoint_scheme = name_to_schema.get("sigv4") or name_to_schema.get(
|
|
81
|
+
"sigv4-s3express"
|
|
82
|
+
)
|
|
83
|
+
if endpoint_scheme is not None or not name_to_schema:
|
|
84
|
+
sigv4_config = capo_codedeploy._auth._sigv4.build_sigv4_auth_scheme(
|
|
85
|
+
"codedeploy", options.region, endpoint_scheme
|
|
86
|
+
)
|
|
87
|
+
if sigv4_config is not None:
|
|
88
|
+
return capo_codedeploy._auth._signers.SigV4Signer(
|
|
89
|
+
options.credentials_provider, auth_scheme=sigv4_config
|
|
90
|
+
)
|
|
91
|
+
raise RuntimeError("Auth was not resolved")
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def build_request(
|
|
95
|
+
options: OperationOptions | AsyncOperationOptions,
|
|
96
|
+
input_: capo_codedeploy.types.add_tags_to_on_premises_instances_input.AddTagsToOnPremisesInstancesInput,
|
|
97
|
+
) -> zapros.Request:
|
|
98
|
+
endpoint = resolve(
|
|
99
|
+
EndpointParams(
|
|
100
|
+
Region=options.region,
|
|
101
|
+
UseDualStack=options.use_dual_stack,
|
|
102
|
+
UseFIPS=options.use_fips,
|
|
103
|
+
Endpoint=options.endpoint,
|
|
104
|
+
)
|
|
105
|
+
) # noqa: F841
|
|
106
|
+
url = endpoint.url.rstrip("/") + ""
|
|
107
|
+
params: list[tuple[str, str]] = []
|
|
108
|
+
headers: dict[str, str] = {k: ", ".join(v) for k, v in endpoint.headers.items()}
|
|
109
|
+
headers["X-Amz-Target"] = "CodeDeploy_20141006.AddTagsToOnPremisesInstances"
|
|
110
|
+
body: bytes | None = json.dumps(
|
|
111
|
+
capo_codedeploy.types.add_tags_to_on_premises_instances_input.serialize_aws_json_1_1(
|
|
112
|
+
input_
|
|
113
|
+
),
|
|
114
|
+
allow_nan=False,
|
|
115
|
+
).encode()
|
|
116
|
+
headers["content-type"] = "application/x-amz-json-1.1"
|
|
117
|
+
signer = get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
|
|
118
|
+
normalized_url = zapros.URL(url)
|
|
119
|
+
for k, v in params:
|
|
120
|
+
normalized_url.search_params.append(k, v)
|
|
121
|
+
return zapros.Request(
|
|
122
|
+
normalized_url, "POST", headers=headers, body=body, context={"signer": signer}
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def add_tags_to_on_premises_instances(
|
|
127
|
+
options: OperationOptions,
|
|
128
|
+
input_: capo_codedeploy.types.add_tags_to_on_premises_instances_input.AddTagsToOnPremisesInstancesInput,
|
|
129
|
+
) -> tuple[None, zapros.Response]:
|
|
130
|
+
response = options.client.handler.handle(build_request(options, input_))
|
|
131
|
+
try:
|
|
132
|
+
if response.status >= 300:
|
|
133
|
+
response.read()
|
|
134
|
+
handle_error(response)
|
|
135
|
+
return None, response
|
|
136
|
+
except BaseException:
|
|
137
|
+
response.close()
|
|
138
|
+
raise
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
async def async_add_tags_to_on_premises_instances(
|
|
142
|
+
options: AsyncOperationOptions,
|
|
143
|
+
input_: capo_codedeploy.types.add_tags_to_on_premises_instances_input.AddTagsToOnPremisesInstancesInput,
|
|
144
|
+
) -> tuple[None, zapros.Response]:
|
|
145
|
+
response = await options.client.handler.ahandle(build_request(options, input_))
|
|
146
|
+
try:
|
|
147
|
+
if response.status >= 300:
|
|
148
|
+
await response.aread()
|
|
149
|
+
handle_error(response)
|
|
150
|
+
return None, response
|
|
151
|
+
except BaseException:
|
|
152
|
+
await response.aclose()
|
|
153
|
+
raise
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codedeploy#BatchGetApplicationRevisions``."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
import zapros
|
|
9
|
+
from typing_extensions import Never
|
|
10
|
+
|
|
11
|
+
import capo_codedeploy._auth._signers
|
|
12
|
+
import capo_codedeploy._auth._sigv4
|
|
13
|
+
import capo_codedeploy._protocol.eventstream
|
|
14
|
+
import capo_codedeploy.errors.application_does_not_exist_exception
|
|
15
|
+
import capo_codedeploy.errors.application_name_required_exception
|
|
16
|
+
import capo_codedeploy.errors.batch_limit_exceeded_exception
|
|
17
|
+
import capo_codedeploy.errors.invalid_application_name_exception
|
|
18
|
+
import capo_codedeploy.errors.invalid_revision_exception
|
|
19
|
+
import capo_codedeploy.errors.revision_required_exception
|
|
20
|
+
import capo_codedeploy.types.batch_get_application_revisions_input
|
|
21
|
+
import capo_codedeploy.types.batch_get_application_revisions_output
|
|
22
|
+
import capo_codedeploy.types.revision_info_list
|
|
23
|
+
import capo_codedeploy.types.revision_location_list
|
|
24
|
+
from capo_codedeploy._protocol.errors import parse_error_metadata_json
|
|
25
|
+
from capo_codedeploy._rule_engine._endpoint_rule_set import EndpointParams, resolve
|
|
26
|
+
from capo_codedeploy._services._pipeline import AsyncOperationOptions, OperationOptions
|
|
27
|
+
from capo_codedeploy.errors import UnknownServiceError
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def handle_error(response: zapros.Response) -> Never:
|
|
31
|
+
data = json.loads(response.read())
|
|
32
|
+
code, message = parse_error_metadata_json(response, data)
|
|
33
|
+
match code:
|
|
34
|
+
case "ApplicationDoesNotExistException":
|
|
35
|
+
raise capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException.from_aws_json_1_1(
|
|
36
|
+
data, message
|
|
37
|
+
)
|
|
38
|
+
case "ApplicationNameRequiredException":
|
|
39
|
+
raise capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException.from_aws_json_1_1(
|
|
40
|
+
data, message
|
|
41
|
+
)
|
|
42
|
+
case "BatchLimitExceededException":
|
|
43
|
+
raise capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException.from_aws_json_1_1(
|
|
44
|
+
data, message
|
|
45
|
+
)
|
|
46
|
+
case "InvalidApplicationNameException":
|
|
47
|
+
raise capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException.from_aws_json_1_1(
|
|
48
|
+
data, message
|
|
49
|
+
)
|
|
50
|
+
case "InvalidRevisionException":
|
|
51
|
+
raise capo_codedeploy.errors.invalid_revision_exception.InvalidRevisionException.from_aws_json_1_1(
|
|
52
|
+
data, message
|
|
53
|
+
)
|
|
54
|
+
case "RevisionRequiredException":
|
|
55
|
+
raise capo_codedeploy.errors.revision_required_exception.RevisionRequiredException.from_aws_json_1_1(
|
|
56
|
+
data, message
|
|
57
|
+
)
|
|
58
|
+
case _:
|
|
59
|
+
raise UnknownServiceError(code=code, message=message, response=response)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def handle_response(
|
|
63
|
+
response: zapros.Response,
|
|
64
|
+
) -> capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput:
|
|
65
|
+
out: capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput = capo_codedeploy.types.batch_get_application_revisions_output.deserialize_aws_json_1_1(
|
|
66
|
+
json.loads(response.read())
|
|
67
|
+
)
|
|
68
|
+
return out
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
async def async_handle_response(
|
|
72
|
+
response: zapros.Response,
|
|
73
|
+
) -> capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput:
|
|
74
|
+
out: capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput = capo_codedeploy.types.batch_get_application_revisions_output.deserialize_aws_json_1_1(
|
|
75
|
+
json.loads(await response.aread())
|
|
76
|
+
)
|
|
77
|
+
return out
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def get_signer(
|
|
81
|
+
options: AsyncOperationOptions | OperationOptions,
|
|
82
|
+
auth_schemes: list[dict[str, Any]] | None = None,
|
|
83
|
+
) -> capo_codedeploy._auth._signers.Signer | None:
|
|
84
|
+
name_to_schema = {s["name"]: s for s in (auth_schemes or [])} # noqa: F841
|
|
85
|
+
if (
|
|
86
|
+
options.credentials_provider is not None
|
|
87
|
+
and name_to_schema
|
|
88
|
+
and not name_to_schema.keys() & {"sigv4", "sigv4-s3express"}
|
|
89
|
+
):
|
|
90
|
+
raise RuntimeError(
|
|
91
|
+
"Endpoint requires an unsupported auth scheme: " + ", ".join(name_to_schema)
|
|
92
|
+
)
|
|
93
|
+
if options.credentials_provider is not None:
|
|
94
|
+
endpoint_scheme = name_to_schema.get("sigv4") or name_to_schema.get(
|
|
95
|
+
"sigv4-s3express"
|
|
96
|
+
)
|
|
97
|
+
if endpoint_scheme is not None or not name_to_schema:
|
|
98
|
+
sigv4_config = capo_codedeploy._auth._sigv4.build_sigv4_auth_scheme(
|
|
99
|
+
"codedeploy", options.region, endpoint_scheme
|
|
100
|
+
)
|
|
101
|
+
if sigv4_config is not None:
|
|
102
|
+
return capo_codedeploy._auth._signers.SigV4Signer(
|
|
103
|
+
options.credentials_provider, auth_scheme=sigv4_config
|
|
104
|
+
)
|
|
105
|
+
raise RuntimeError("Auth was not resolved")
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def build_request(
|
|
109
|
+
options: OperationOptions | AsyncOperationOptions,
|
|
110
|
+
input_: capo_codedeploy.types.batch_get_application_revisions_input.BatchGetApplicationRevisionsInput,
|
|
111
|
+
) -> zapros.Request:
|
|
112
|
+
endpoint = resolve(
|
|
113
|
+
EndpointParams(
|
|
114
|
+
Region=options.region,
|
|
115
|
+
UseDualStack=options.use_dual_stack,
|
|
116
|
+
UseFIPS=options.use_fips,
|
|
117
|
+
Endpoint=options.endpoint,
|
|
118
|
+
)
|
|
119
|
+
) # noqa: F841
|
|
120
|
+
url = endpoint.url.rstrip("/") + ""
|
|
121
|
+
params: list[tuple[str, str]] = []
|
|
122
|
+
headers: dict[str, str] = {k: ", ".join(v) for k, v in endpoint.headers.items()}
|
|
123
|
+
headers["X-Amz-Target"] = "CodeDeploy_20141006.BatchGetApplicationRevisions"
|
|
124
|
+
body: bytes | None = json.dumps(
|
|
125
|
+
capo_codedeploy.types.batch_get_application_revisions_input.serialize_aws_json_1_1(
|
|
126
|
+
input_
|
|
127
|
+
),
|
|
128
|
+
allow_nan=False,
|
|
129
|
+
).encode()
|
|
130
|
+
headers["content-type"] = "application/x-amz-json-1.1"
|
|
131
|
+
signer = get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
|
|
132
|
+
normalized_url = zapros.URL(url)
|
|
133
|
+
for k, v in params:
|
|
134
|
+
normalized_url.search_params.append(k, v)
|
|
135
|
+
return zapros.Request(
|
|
136
|
+
normalized_url, "POST", headers=headers, body=body, context={"signer": signer}
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def batch_get_application_revisions(
|
|
141
|
+
options: OperationOptions,
|
|
142
|
+
input_: capo_codedeploy.types.batch_get_application_revisions_input.BatchGetApplicationRevisionsInput,
|
|
143
|
+
) -> tuple[
|
|
144
|
+
capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput,
|
|
145
|
+
zapros.Response,
|
|
146
|
+
]:
|
|
147
|
+
response = options.client.handler.handle(build_request(options, input_))
|
|
148
|
+
try:
|
|
149
|
+
if response.status >= 300:
|
|
150
|
+
response.read()
|
|
151
|
+
handle_error(response)
|
|
152
|
+
return handle_response(response), response
|
|
153
|
+
except BaseException:
|
|
154
|
+
response.close()
|
|
155
|
+
raise
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
async def async_batch_get_application_revisions(
|
|
159
|
+
options: AsyncOperationOptions,
|
|
160
|
+
input_: capo_codedeploy.types.batch_get_application_revisions_input.BatchGetApplicationRevisionsInput,
|
|
161
|
+
) -> tuple[
|
|
162
|
+
capo_codedeploy.types.batch_get_application_revisions_output.BatchGetApplicationRevisionsOutput,
|
|
163
|
+
zapros.Response,
|
|
164
|
+
]:
|
|
165
|
+
response = await options.client.handler.ahandle(build_request(options, input_))
|
|
166
|
+
try:
|
|
167
|
+
if response.status >= 300:
|
|
168
|
+
await response.aread()
|
|
169
|
+
handle_error(response)
|
|
170
|
+
return await async_handle_response(response), response
|
|
171
|
+
except BaseException:
|
|
172
|
+
await response.aclose()
|
|
173
|
+
raise
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codedeploy#BatchGetApplications``."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
import zapros
|
|
9
|
+
from typing_extensions import Never
|
|
10
|
+
|
|
11
|
+
import capo_codedeploy._auth._signers
|
|
12
|
+
import capo_codedeploy._auth._sigv4
|
|
13
|
+
import capo_codedeploy._protocol.eventstream
|
|
14
|
+
import capo_codedeploy.errors.application_does_not_exist_exception
|
|
15
|
+
import capo_codedeploy.errors.application_name_required_exception
|
|
16
|
+
import capo_codedeploy.errors.batch_limit_exceeded_exception
|
|
17
|
+
import capo_codedeploy.errors.invalid_application_name_exception
|
|
18
|
+
import capo_codedeploy.types.applications_info_list
|
|
19
|
+
import capo_codedeploy.types.applications_list
|
|
20
|
+
import capo_codedeploy.types.batch_get_applications_input
|
|
21
|
+
import capo_codedeploy.types.batch_get_applications_output
|
|
22
|
+
from capo_codedeploy._protocol.errors import parse_error_metadata_json
|
|
23
|
+
from capo_codedeploy._rule_engine._endpoint_rule_set import EndpointParams, resolve
|
|
24
|
+
from capo_codedeploy._services._pipeline import AsyncOperationOptions, OperationOptions
|
|
25
|
+
from capo_codedeploy.errors import UnknownServiceError
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def handle_error(response: zapros.Response) -> Never:
|
|
29
|
+
data = json.loads(response.read())
|
|
30
|
+
code, message = parse_error_metadata_json(response, data)
|
|
31
|
+
match code:
|
|
32
|
+
case "ApplicationDoesNotExistException":
|
|
33
|
+
raise capo_codedeploy.errors.application_does_not_exist_exception.ApplicationDoesNotExistException.from_aws_json_1_1(
|
|
34
|
+
data, message
|
|
35
|
+
)
|
|
36
|
+
case "ApplicationNameRequiredException":
|
|
37
|
+
raise capo_codedeploy.errors.application_name_required_exception.ApplicationNameRequiredException.from_aws_json_1_1(
|
|
38
|
+
data, message
|
|
39
|
+
)
|
|
40
|
+
case "BatchLimitExceededException":
|
|
41
|
+
raise capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException.from_aws_json_1_1(
|
|
42
|
+
data, message
|
|
43
|
+
)
|
|
44
|
+
case "InvalidApplicationNameException":
|
|
45
|
+
raise capo_codedeploy.errors.invalid_application_name_exception.InvalidApplicationNameException.from_aws_json_1_1(
|
|
46
|
+
data, message
|
|
47
|
+
)
|
|
48
|
+
case _:
|
|
49
|
+
raise UnknownServiceError(code=code, message=message, response=response)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def handle_response(
|
|
53
|
+
response: zapros.Response,
|
|
54
|
+
) -> capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput:
|
|
55
|
+
out: capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput = capo_codedeploy.types.batch_get_applications_output.deserialize_aws_json_1_1(
|
|
56
|
+
json.loads(response.read())
|
|
57
|
+
)
|
|
58
|
+
return out
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
async def async_handle_response(
|
|
62
|
+
response: zapros.Response,
|
|
63
|
+
) -> capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput:
|
|
64
|
+
out: capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput = capo_codedeploy.types.batch_get_applications_output.deserialize_aws_json_1_1(
|
|
65
|
+
json.loads(await response.aread())
|
|
66
|
+
)
|
|
67
|
+
return out
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def get_signer(
|
|
71
|
+
options: AsyncOperationOptions | OperationOptions,
|
|
72
|
+
auth_schemes: list[dict[str, Any]] | None = None,
|
|
73
|
+
) -> capo_codedeploy._auth._signers.Signer | None:
|
|
74
|
+
name_to_schema = {s["name"]: s for s in (auth_schemes or [])} # noqa: F841
|
|
75
|
+
if (
|
|
76
|
+
options.credentials_provider is not None
|
|
77
|
+
and name_to_schema
|
|
78
|
+
and not name_to_schema.keys() & {"sigv4", "sigv4-s3express"}
|
|
79
|
+
):
|
|
80
|
+
raise RuntimeError(
|
|
81
|
+
"Endpoint requires an unsupported auth scheme: " + ", ".join(name_to_schema)
|
|
82
|
+
)
|
|
83
|
+
if options.credentials_provider is not None:
|
|
84
|
+
endpoint_scheme = name_to_schema.get("sigv4") or name_to_schema.get(
|
|
85
|
+
"sigv4-s3express"
|
|
86
|
+
)
|
|
87
|
+
if endpoint_scheme is not None or not name_to_schema:
|
|
88
|
+
sigv4_config = capo_codedeploy._auth._sigv4.build_sigv4_auth_scheme(
|
|
89
|
+
"codedeploy", options.region, endpoint_scheme
|
|
90
|
+
)
|
|
91
|
+
if sigv4_config is not None:
|
|
92
|
+
return capo_codedeploy._auth._signers.SigV4Signer(
|
|
93
|
+
options.credentials_provider, auth_scheme=sigv4_config
|
|
94
|
+
)
|
|
95
|
+
raise RuntimeError("Auth was not resolved")
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def build_request(
|
|
99
|
+
options: OperationOptions | AsyncOperationOptions,
|
|
100
|
+
input_: capo_codedeploy.types.batch_get_applications_input.BatchGetApplicationsInput,
|
|
101
|
+
) -> zapros.Request:
|
|
102
|
+
endpoint = resolve(
|
|
103
|
+
EndpointParams(
|
|
104
|
+
Region=options.region,
|
|
105
|
+
UseDualStack=options.use_dual_stack,
|
|
106
|
+
UseFIPS=options.use_fips,
|
|
107
|
+
Endpoint=options.endpoint,
|
|
108
|
+
)
|
|
109
|
+
) # noqa: F841
|
|
110
|
+
url = endpoint.url.rstrip("/") + ""
|
|
111
|
+
params: list[tuple[str, str]] = []
|
|
112
|
+
headers: dict[str, str] = {k: ", ".join(v) for k, v in endpoint.headers.items()}
|
|
113
|
+
headers["X-Amz-Target"] = "CodeDeploy_20141006.BatchGetApplications"
|
|
114
|
+
body: bytes | None = json.dumps(
|
|
115
|
+
capo_codedeploy.types.batch_get_applications_input.serialize_aws_json_1_1(
|
|
116
|
+
input_
|
|
117
|
+
),
|
|
118
|
+
allow_nan=False,
|
|
119
|
+
).encode()
|
|
120
|
+
headers["content-type"] = "application/x-amz-json-1.1"
|
|
121
|
+
signer = get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
|
|
122
|
+
normalized_url = zapros.URL(url)
|
|
123
|
+
for k, v in params:
|
|
124
|
+
normalized_url.search_params.append(k, v)
|
|
125
|
+
return zapros.Request(
|
|
126
|
+
normalized_url, "POST", headers=headers, body=body, context={"signer": signer}
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def batch_get_applications(
|
|
131
|
+
options: OperationOptions,
|
|
132
|
+
input_: capo_codedeploy.types.batch_get_applications_input.BatchGetApplicationsInput,
|
|
133
|
+
) -> tuple[
|
|
134
|
+
capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput,
|
|
135
|
+
zapros.Response,
|
|
136
|
+
]:
|
|
137
|
+
response = options.client.handler.handle(build_request(options, input_))
|
|
138
|
+
try:
|
|
139
|
+
if response.status >= 300:
|
|
140
|
+
response.read()
|
|
141
|
+
handle_error(response)
|
|
142
|
+
return handle_response(response), response
|
|
143
|
+
except BaseException:
|
|
144
|
+
response.close()
|
|
145
|
+
raise
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
async def async_batch_get_applications(
|
|
149
|
+
options: AsyncOperationOptions,
|
|
150
|
+
input_: capo_codedeploy.types.batch_get_applications_input.BatchGetApplicationsInput,
|
|
151
|
+
) -> tuple[
|
|
152
|
+
capo_codedeploy.types.batch_get_applications_output.BatchGetApplicationsOutput,
|
|
153
|
+
zapros.Response,
|
|
154
|
+
]:
|
|
155
|
+
response = await options.client.handler.ahandle(build_request(options, input_))
|
|
156
|
+
try:
|
|
157
|
+
if response.status >= 300:
|
|
158
|
+
await response.aread()
|
|
159
|
+
handle_error(response)
|
|
160
|
+
return await async_handle_response(response), response
|
|
161
|
+
except BaseException:
|
|
162
|
+
await response.aclose()
|
|
163
|
+
raise
|