Skip to content

create_blueprint

create_blueprint(
    blueprint_name: BlueprintName,
    type: Type,
    schema: BlueprintSchema,
    *,
    config_overrides: Optional[BedrockDataAutomationClientConfig] = None,
    blueprint_stage: Optional[BlueprintStage] = None,
    client_token: Optional[ClientToken] = None,
    encryption_configuration: Optional[EncryptionConfiguration] = None,
    tags: Optional[TagList] = None,
) -> CreateBlueprintResponse

Creates an Amazon Bedrock Data Automation Blueprint

Raises:

Source code in docs_src/capo_bedrock_data_automation/_services/bedrock_data_automation.py
def create_blueprint(
    self,
    blueprint_name: "capo_bedrock_data_automation.types.blueprint_name.BlueprintName",
    type: "capo_bedrock_data_automation.types.type.Type",
    schema: "capo_bedrock_data_automation.types.blueprint_schema.BlueprintSchema",
    *,
    config_overrides: Optional[BedrockDataAutomationClientConfig] = None,
    blueprint_stage: Optional[
        "capo_bedrock_data_automation.types.blueprint_stage.BlueprintStage"
    ] = None,
    client_token: Optional[
        "capo_bedrock_data_automation.types.client_token.ClientToken"
    ] = None,
    encryption_configuration: Optional[
        "capo_bedrock_data_automation.types.encryption_configuration.EncryptionConfiguration"
    ] = None,
    tags: Optional["capo_bedrock_data_automation.types.tag_list.TagList"] = None,
) -> "capo_bedrock_data_automation.types.create_blueprint_response.CreateBlueprintResponse":
    """Creates an Amazon Bedrock Data Automation Blueprint

    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.conflict_exception.ConflictException: This exception is thrown when there is a conflict performing an operation
        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.service_quota_exceeded_exception.ServiceQuotaExceededException: This exception is thrown when a request is made beyond the service quota
        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.create_blueprint_request.CreateBlueprintRequest]",
    ) -> OperationResponse[
        "capo_bedrock_data_automation.types.create_blueprint_response.CreateBlueprintResponse"
    ]:
        import capo_bedrock_data_automation._operations.amazon_bedrock_keystone_build_time_service.create_blueprint

        output, http_response = (
            capo_bedrock_data_automation._operations.amazon_bedrock_keystone_build_time_service.create_blueprint.create_blueprint(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_bedrock_data_automation.types.create_blueprint_request.CreateBlueprintRequest",
    ) -> dict[str, Any]:
        import capo_bedrock_data_automation.types.create_blueprint_request

        return capo_bedrock_data_automation.types.create_blueprint_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_bedrock_data_automation.types.create_blueprint_response.CreateBlueprintResponse",
    ) -> dict[str, Any]:
        import capo_bedrock_data_automation.types.create_blueprint_response

        return capo_bedrock_data_automation.types.create_blueprint_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateBlueprint",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_bedrock_data_automation.types.create_blueprint_request.CreateBlueprintRequest = {
        "blueprint_name": blueprint_name,
        "type": type,
        "schema": schema,
    }
    if blueprint_stage is not None:
        input_["blueprint_stage"] = blueprint_stage
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if encryption_configuration is not None:
        input_["encryption_configuration"] = encryption_configuration
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output