Skip to content

put_console_authorization_configuration async

put_console_authorization_configuration(
    *,
    config_overrides: Optional[AsyncSigninClientConfig] = None,
    target_id: Optional[TargetId] = None,
) -> PutConsoleAuthorizationConfigurationOutput

Enable console authorization configuration with automatic scope detection

Parameters:

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    Error thrown when request conflicts with current state HTTP Status Code: 409 Conflict Used when the request conflicts with the current state of the resource

  • InternalServerException –

    The request failed because of an internal server error.

  • ResourceNotFoundException –

    Error thrown when requested resource is not found HTTP Status Code: 404 Not Found Used when the specified resource does not exist

  • TooManyRequestsError –

    The request failed because you exceeded the request rate limit for this operation.

  • ValidationException –

    The request failed because it contains a malformed, missing, or invalid parameter.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_signin/_services/async_signin.py
async def put_console_authorization_configuration(
    self,
    *,
    config_overrides: Optional[AsyncSigninClientConfig] = None,
    target_id: Optional["capo_signin.types.target_id.TargetId"] = None,
) -> "capo_signin.types.put_console_authorization_configuration_output.PutConsoleAuthorizationConfigurationOutput":
    """Enable console authorization configuration with automatic scope detection

    Args:
        target_id: Target account identifier

    Raises:
        capo_signin.errors.access_denied_exception.AccessDeniedException: You do not have sufficient access to perform this action.
        capo_signin.errors.conflict_exception.ConflictException: Error thrown when request conflicts with current state HTTP Status Code: 409 Conflict Used when the request conflicts with the current state of the resource
        capo_signin.errors.internal_server_exception.InternalServerException: The request failed because of an internal server error.
        capo_signin.errors.resource_not_found_exception.ResourceNotFoundException: Error thrown when requested resource is not found HTTP Status Code: 404 Not Found Used when the specified resource does not exist
        capo_signin.errors.too_many_requests_error.TooManyRequestsError: The request failed because you exceeded the request rate limit for this operation.
        capo_signin.errors.validation_exception.ValidationException: The request failed because it contains a malformed, missing, or invalid parameter.
        capo_signin.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_signin.types.put_console_authorization_configuration_input.PutConsoleAuthorizationConfigurationInput]",
    ) -> AsyncOperationResponse[
        "capo_signin.types.put_console_authorization_configuration_output.PutConsoleAuthorizationConfigurationOutput"
    ]:
        import capo_signin._operations.signin.put_console_authorization_configuration

        (
            output,
            http_response,
        ) = await capo_signin._operations.signin.put_console_authorization_configuration.async_put_console_authorization_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutConsoleAuthorizationConfiguration")
    )
    input_: capo_signin.types.put_console_authorization_configuration_input.PutConsoleAuthorizationConfigurationInput = {}
    if target_id is not None:
        input_["target_id"] = target_id

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