Skip to content

create_configuration_bundle async

create_configuration_bundle(
    bundle_name: ConfigurationBundleName,
    components: ComponentConfigurationMap,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    description: Optional[ConfigurationBundleDescription] = None,
    branch_name: Optional[BranchName] = None,
    commit_message: Optional[str] = None,
    created_by: Optional[VersionCreatedBySource] = None,
    kms_key_arn: Optional[KmsKeyArn] = None,
    tags: Optional[TagsMap] = None,
) -> CreateConfigurationBundleResponse

Creates a new configuration bundle resource. A configuration bundle stores versioned component configurations for agent evaluation workflows.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.

  • bundle_name (ConfigurationBundleName) –

    The name for the configuration bundle. Names must be unique within your account.

  • description (Optional[ConfigurationBundleDescription], default: None ) –

    The description for the configuration bundle.

  • components (ComponentConfigurationMap) –

    A map of component identifiers to their configurations. Each component represents a configurable element within the bundle.

  • branch_name (Optional[BranchName], default: None ) –

    The branch name for version tracking. Defaults to mainline if not specified.

  • commit_message (Optional[str], default: None ) –

    A commit message describing the initial version of the configuration bundle.

  • created_by (Optional[VersionCreatedBySource], default: None ) –

    The source that created this version, including the source name and optional ARN.

  • kms_key_arn (Optional[KmsKeyArn], default: None ) –

    Optional KMS key ARN for encrypting component configurations.

  • tags (Optional[TagsMap], default: None ) –

    A map of tag keys and values to assign to the configuration bundle. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def create_configuration_bundle(
    self,
    bundle_name: "capo_bedrock_agentcore_control.types.configuration_bundle_name.ConfigurationBundleName",
    components: "capo_bedrock_agentcore_control.types.component_configuration_map.ComponentConfigurationMap",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.configuration_bundle_description.ConfigurationBundleDescription"
    ] = None,
    branch_name: Optional[
        "capo_bedrock_agentcore_control.types.branch_name.BranchName"
    ] = None,
    commit_message: Optional[str] = None,
    created_by: Optional[
        "capo_bedrock_agentcore_control.types.version_created_by_source.VersionCreatedBySource"
    ] = None,
    kms_key_arn: Optional[
        "capo_bedrock_agentcore_control.types.kms_key_arn.KmsKeyArn"
    ] = None,
    tags: Optional["capo_bedrock_agentcore_control.types.tags_map.TagsMap"] = None,
) -> "capo_bedrock_agentcore_control.types.create_configuration_bundle_response.CreateConfigurationBundleResponse":
    """<p>Creates a new configuration bundle resource. A configuration bundle stores versioned component configurations for agent evaluation workflows.</p>

    Args:
        client_token: <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
        bundle_name: <p>The name for the configuration bundle. Names must be unique within your account.</p>
        description: <p>The description for the configuration bundle.</p>
        components: <p>A map of component identifiers to their configurations. Each component represents a configurable element within the bundle.</p>
        branch_name: <p>The branch name for version tracking. Defaults to <code>mainline</code> if not specified.</p>
        commit_message: <p>A commit message describing the initial version of the configuration bundle.</p>
        created_by: <p>The source that created this version, including the source name and optional ARN.</p>
        kms_key_arn: <p>Optional KMS key ARN for encrypting component configurations.</p>
        tags: <p>A map of tag keys and values to assign to the configuration bundle. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.</p>

    Raises:
        capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
        capo_bedrock_agentcore_control.errors.conflict_exception.ConflictException: <p>This exception is thrown when there is a conflict performing an operation</p>
        capo_bedrock_agentcore_control.errors.internal_server_exception.InternalServerException: <p>This exception is thrown if there was an unexpected error during processing of request</p>
        capo_bedrock_agentcore_control.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This exception is thrown when a request is made beyond the service quota</p>
        capo_bedrock_agentcore_control.errors.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</p>
        capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_agentcore_control.types.create_configuration_bundle_request.CreateConfigurationBundleRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.create_configuration_bundle_response.CreateConfigurationBundleResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_configuration_bundle

        (
            output,
            http_response,
        ) = await capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_configuration_bundle.async_create_configuration_bundle(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_bedrock_agentcore_control.types.create_configuration_bundle_request.CreateConfigurationBundleRequest",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.create_configuration_bundle_request

        return capo_bedrock_agentcore_control.types.create_configuration_bundle_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateConfigurationBundle", redact_input=_redact_input),
    )
    input_: capo_bedrock_agentcore_control.types.create_configuration_bundle_request.CreateConfigurationBundleRequest = {
        "bundle_name": bundle_name,
        "components": components,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if description is not None:
        input_["description"] = description
    if branch_name is not None:
        input_["branch_name"] = branch_name
    if commit_message is not None:
        input_["commit_message"] = commit_message
    if created_by is not None:
        input_["created_by"] = created_by
    if kms_key_arn is not None:
        input_["kms_key_arn"] = kms_key_arn
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output