def copy_blueprint_stage(
self,
blueprint_arn: "capo_bedrock_data_automation.types.blueprint_arn.BlueprintArn",
source_stage: "capo_bedrock_data_automation.types.blueprint_stage.BlueprintStage",
target_stage: "capo_bedrock_data_automation.types.blueprint_stage.BlueprintStage",
*,
config_overrides: Optional[BedrockDataAutomationClientConfig] = None,
client_token: Optional[
"capo_bedrock_data_automation.types.client_token.ClientToken"
] = None,
) -> "capo_bedrock_data_automation.types.copy_blueprint_stage_response.CopyBlueprintStageResponse":
"""Copies a Blueprint from one stage to another
Args:
blueprint_arn: Blueprint to be copied
source_stage: Source stage to copy from
target_stage: Target stage to copy to
client_token: Client token for idempotency
Raises:
capo_bedrock_data_automation.errors.access_denied_exception.AccessDeniedException: This exception is thrown when a request is denied per access permissions
capo_bedrock_data_automation.errors.internal_server_exception.InternalServerException: This exception is thrown if there was an unexpected error during processing of request
capo_bedrock_data_automation.errors.resource_not_found_exception.ResourceNotFoundException: This exception is thrown when a resource referenced by the operation does not exist
capo_bedrock_data_automation.errors.throttling_exception.ThrottlingException: This exception is thrown when the number of requests exceeds the limit
capo_bedrock_data_automation.errors.validation_exception.ValidationException: This exception is thrown when the request's input validation fails
capo_bedrock_data_automation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_bedrock_data_automation.types.copy_blueprint_stage_request.CopyBlueprintStageRequest]",
) -> OperationResponse[
"capo_bedrock_data_automation.types.copy_blueprint_stage_response.CopyBlueprintStageResponse"
]:
import capo_bedrock_data_automation._operations.amazon_bedrock_keystone_build_time_service.copy_blueprint_stage
output, http_response = (
capo_bedrock_data_automation._operations.amazon_bedrock_keystone_build_time_service.copy_blueprint_stage.copy_blueprint_stage(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CopyBlueprintStage")
)
input_: capo_bedrock_data_automation.types.copy_blueprint_stage_request.CopyBlueprintStageRequest = {
"blueprint_arn": blueprint_arn,
"source_stage": source_stage,
"target_stage": target_stage,
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output