Skip to content

update_registry async

update_registry(
    registry_name: __string,
    *,
    config_overrides: Optional[AsyncschemasClientConfig] = None,
    description: Optional[__stringMin0Max256] = None,
) -> UpdateRegistryResponse

Updates a registry.

Parameters:

Raises:

Source code in docs_src/capo_schemas/_services/async_schemas.py
async def update_registry(
    self,
    registry_name: "capo_schemas.types.__string.__string",
    *,
    config_overrides: Optional[AsyncschemasClientConfig] = None,
    description: Optional[
        "capo_schemas.types.__string_min0_max256.__stringMin0Max256"
    ] = None,
) -> "capo_schemas.types.update_registry_response.UpdateRegistryResponse":
    """<p>Updates a registry.</p>

    Args:
        description: <p>The description of the registry to update.</p>
        registry_name: <p>The name of the registry.</p>

    Raises:
        capo_schemas.errors.bad_request_exception.BadRequestException
        capo_schemas.errors.forbidden_exception.ForbiddenException
        capo_schemas.errors.internal_server_error_exception.InternalServerErrorException
        capo_schemas.errors.not_found_exception.NotFoundException
        capo_schemas.errors.service_unavailable_exception.ServiceUnavailableException
        capo_schemas.errors.unauthorized_exception.UnauthorizedException
        capo_schemas.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_schemas.types.update_registry_request.UpdateRegistryRequest]",
    ) -> AsyncOperationResponse[
        "capo_schemas.types.update_registry_response.UpdateRegistryResponse"
    ]:
        import capo_schemas._operations.schemas.update_registry

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRegistry")
    )
    input_: capo_schemas.types.update_registry_request.UpdateRegistryRequest = {
        "registry_name": registry_name
    }
    if description is not None:
        input_["description"] = description

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