Skip to content

update_configuration_bundle async

update_configuration_bundle(
    bundle_id: ConfigurationBundleId,
    parent_version_ids: ConfigurationBundleVersionList,
    commit_message: str,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    bundle_name: Optional[ConfigurationBundleName] = None,
    description: Optional[ConfigurationBundleDescription] = None,
    components: Optional[ComponentConfigurationMap] = None,
    branch_name: Optional[BranchName] = None,
    created_by: Optional[VersionCreatedBySource] = None,
    kms_key_arn: Optional[KmsKeyArn] = None,
) -> UpdateConfigurationBundleResponse

Updates a configuration bundle by creating a new version with the specified changes. Each update creates a new version in the version history.

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_id (ConfigurationBundleId) –

    The unique identifier of the configuration bundle to update.

  • bundle_name (Optional[ConfigurationBundleName], default: None ) –

    The updated name for the configuration bundle.

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

    The updated description for the configuration bundle.

  • components (Optional[ComponentConfigurationMap], default: None ) –

    The updated component configurations. Creates a new version of the bundle.

  • parent_version_ids (ConfigurationBundleVersionList) –

    A list of parent version identifiers for lineage tracking. Regular commits have a single parent. Merge commits have two parents: the target branch parent and the source branch parent. If the branch already exists, the first parent must be the latest version on that branch.

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

    The branch name for this version. If not specified, inherits the parent's branch or defaults to mainline.

  • commit_message (str) –

    A commit message describing the changes in this version.

  • 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. If provided, components will be encrypted with this key. If the bundle already has a KMS key, this rotates to the new key.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def update_configuration_bundle(
    self,
    bundle_id: "capo_bedrock_agentcore_control.types.configuration_bundle_id.ConfigurationBundleId",
    parent_version_ids: "capo_bedrock_agentcore_control.types.configuration_bundle_version_list.ConfigurationBundleVersionList",
    commit_message: str,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
    bundle_name: Optional[
        "capo_bedrock_agentcore_control.types.configuration_bundle_name.ConfigurationBundleName"
    ] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.configuration_bundle_description.ConfigurationBundleDescription"
    ] = None,
    components: Optional[
        "capo_bedrock_agentcore_control.types.component_configuration_map.ComponentConfigurationMap"
    ] = None,
    branch_name: Optional[
        "capo_bedrock_agentcore_control.types.branch_name.BranchName"
    ] = 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,
) -> "capo_bedrock_agentcore_control.types.update_configuration_bundle_response.UpdateConfigurationBundleResponse":
    """<p>Updates a configuration bundle by creating a new version with the specified changes. Each update creates a new version in the version history.</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_id: <p>The unique identifier of the configuration bundle to update.</p>
        bundle_name: <p>The updated name for the configuration bundle.</p>
        description: <p>The updated description for the configuration bundle.</p>
        components: <p>The updated component configurations. Creates a new version of the bundle.</p>
        parent_version_ids: <p>A list of parent version identifiers for lineage tracking. Regular commits have a single parent. Merge commits have two parents: the target branch parent and the source branch parent. If the branch already exists, the first parent must be the latest version on that branch.</p>
        branch_name: <p>The branch name for this version. If not specified, inherits the parent's branch or defaults to <code>mainline</code>.</p>
        commit_message: <p>A commit message describing the changes in this version.</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. If provided, components will be encrypted with this key. If the bundle already has a KMS key, this rotates to the new key.</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.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource referenced by the operation does not exist</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.update_configuration_bundle_request.UpdateConfigurationBundleRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.update_configuration_bundle_response.UpdateConfigurationBundleResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.update_configuration_bundle

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

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

        return capo_bedrock_agentcore_control.types.update_configuration_bundle_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateConfigurationBundle", redact_input=_redact_input),
    )
    input_: capo_bedrock_agentcore_control.types.update_configuration_bundle_request.UpdateConfigurationBundleRequest = {
        "bundle_id": bundle_id,
        "parent_version_ids": parent_version_ids,
        "commit_message": commit_message,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if bundle_name is not None:
        input_["bundle_name"] = bundle_name
    if description is not None:
        input_["description"] = description
    if components is not None:
        input_["components"] = components
    if branch_name is not None:
        input_["branch_name"] = branch_name
    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

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