Get console authorization configuration with automatic scope detection
Parameters:
Raises:
-
AccessDeniedException
–
Error thrown for access denied scenarios with flexible HTTP status mapping Runtime HTTP Status Code Mapping: - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS The specific HTTP status code is determined at runtime based on the error enum value. Consumers should use the error field to determine the specific access denial reason.
-
InternalServerException
–
Error thrown when an internal server error occurs HTTP Status Code: 500 Internal Server Error Used for unexpected server-side errors that prevent request processing.
-
ResourceNotFoundException
–
Error thrown when requested resource is not found HTTP Status Code: 404 Not Found Used when the specified resource does not exist
-
TooManyRequestsError
–
Error thrown when rate limit is exceeded HTTP Status Code: 429 Too Many Requests Possible OAuth2ErrorCode values: - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention Possible causes: - Too many token requests from the same client - Rate limiting based on client_id or IP address - Abuse prevention mechanisms triggered - Service protection against excessive token generation
-
ValidationException
–
Error thrown when request validation fails HTTP Status Code: 400 Bad Request Used for request validation errors such as malformed parameters, missing required fields, or invalid parameter values.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_signin/_services/signin.py
| def get_console_authorization_configuration(
self,
*,
config_overrides: Optional[SigninClientConfig] = None,
target_id: Optional["capo_signin.types.target_id.TargetId"] = None,
) -> "capo_signin.types.get_console_authorization_configuration_output.GetConsoleAuthorizationConfigurationOutput":
"""Get console authorization configuration with automatic scope detection
Args:
target_id: Target account identifier
Raises:
capo_signin.errors.access_denied_exception.AccessDeniedException: Error thrown for access denied scenarios with flexible HTTP status mapping Runtime HTTP Status Code Mapping: - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS The specific HTTP status code is determined at runtime based on the error enum value. Consumers should use the error field to determine the specific access denial reason.
capo_signin.errors.internal_server_exception.InternalServerException: Error thrown when an internal server error occurs HTTP Status Code: 500 Internal Server Error Used for unexpected server-side errors that prevent request processing.
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: Error thrown when rate limit is exceeded HTTP Status Code: 429 Too Many Requests Possible OAuth2ErrorCode values: - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention Possible causes: - Too many token requests from the same client - Rate limiting based on client_id or IP address - Abuse prevention mechanisms triggered - Service protection against excessive token generation
capo_signin.errors.validation_exception.ValidationException: Error thrown when request validation fails HTTP Status Code: 400 Bad Request Used for request validation errors such as malformed parameters, missing required fields, or invalid parameter values.
capo_signin.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_signin.types.get_console_authorization_configuration_input.GetConsoleAuthorizationConfigurationInput]",
) -> OperationResponse[
"capo_signin.types.get_console_authorization_configuration_output.GetConsoleAuthorizationConfigurationOutput"
]:
import capo_signin._operations.signin.get_console_authorization_configuration
output, http_response = (
capo_signin._operations.signin.get_console_authorization_configuration.get_console_authorization_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetConsoleAuthorizationConfiguration")
)
input_: capo_signin.types.get_console_authorization_configuration_input.GetConsoleAuthorizationConfigurationInput = {}
if target_id is not None:
input_["target_id"] = target_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|