Skip to content

update_registry async

update_registry(
    registry_id: RegistryIdentifier,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    name: Optional[RegistryName] = None,
    description: Optional[UpdatedDescription] = None,
    authorizer_configuration: Optional[UpdatedAuthorizerConfiguration] = None,
    approval_configuration: Optional[UpdatedApprovalConfiguration] = None,
) -> UpdateRegistryResponse

Updates an existing registry. This operation uses PATCH semantics, so you only need to specify the fields you want to change.

Parameters:

  • registry_id (RegistryIdentifier) –

    The identifier of the registry to update. You can specify either the Amazon Resource Name (ARN) or the ID of the registry.

  • name (Optional[RegistryName], default: None ) –

    The updated name of the registry.

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

    The updated description of the registry. To clear the description, include the UpdatedDescription wrapper with optionalValue not specified.

  • authorizer_configuration (Optional[UpdatedAuthorizerConfiguration], default: None ) –

    The updated authorizer configuration for the registry. Changing the authorizer configuration can break existing consumers of the registry who are using the authorization type prior to the update.

  • approval_configuration (Optional[UpdatedApprovalConfiguration], default: None ) –

    The updated approval configuration for registry records. The updated configuration only affects new records that move to PENDING_APPROVAL status after the change. Existing records already in PENDING_APPROVAL status are not affected.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def update_registry(
    self,
    registry_id: "capo_bedrock_agentcore_control.types.registry_identifier.RegistryIdentifier",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    name: Optional[
        "capo_bedrock_agentcore_control.types.registry_name.RegistryName"
    ] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.updated_description.UpdatedDescription"
    ] = None,
    authorizer_configuration: Optional[
        "capo_bedrock_agentcore_control.types.updated_authorizer_configuration.UpdatedAuthorizerConfiguration"
    ] = None,
    approval_configuration: Optional[
        "capo_bedrock_agentcore_control.types.updated_approval_configuration.UpdatedApprovalConfiguration"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.update_registry_response.UpdateRegistryResponse":
    """<p>Updates an existing registry. This operation uses PATCH semantics, so you only need to specify the fields you want to change.</p>

    Args:
        registry_id: <p>The identifier of the registry to update. You can specify either the Amazon Resource Name (ARN) or the ID of the registry.</p>
        name: <p>The updated name of the registry.</p>
        description: <p>The updated description of the registry. To clear the description, include the <code>UpdatedDescription</code> wrapper with <code>optionalValue</code> not specified.</p>
        authorizer_configuration: <p>The updated authorizer configuration for the registry. Changing the authorizer configuration can break existing consumers of the registry who are using the authorization type prior to the update.</p>
        approval_configuration: <p>The updated approval configuration for registry records. The updated configuration only affects new records that move to <code>PENDING_APPROVAL</code> status after the change. Existing records already in <code>PENDING_APPROVAL</code> status are not affected.</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.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.update_registry_request.UpdateRegistryRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.update_registry_response.UpdateRegistryResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.update_registry

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

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

        return capo_bedrock_agentcore_control.types.update_registry_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_bedrock_agentcore_control.types.update_registry_response.UpdateRegistryResponse",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.update_registry_response

        return capo_bedrock_agentcore_control.types.update_registry_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateRegistry",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_bedrock_agentcore_control.types.update_registry_request.UpdateRegistryRequest = {
        "registry_id": registry_id
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if authorizer_configuration is not None:
        input_["authorizer_configuration"] = authorizer_configuration
    if approval_configuration is not None:
        input_["approval_configuration"] = approval_configuration

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