Starts connecting a GitHub or GitLab account to your AWS account. The returned URL opens the Git provider page where you sign in and grant access. The AWS Management Console uses this operation when you connect a Git provider account.
Parameters:
-
provider
(GitProvider)
–
-
redirect_url
(str)
–
The AWS Management Console page to return to after authorization completes.
Raises:
Source code in docs_src/capo_amplifygen3/_services/amplify_gen3.py
| def start_authorization_flow(
self,
provider: "capo_amplifygen3.types.git_provider.GitProvider",
redirect_url: str,
*,
config_overrides: Optional[AmplifyGen3ClientConfig] = None,
) -> "capo_amplifygen3.types.start_authorization_flow_response.StartAuthorizationFlowResponse":
"""<p>Starts connecting a GitHub or GitLab account to your AWS account. The returned URL opens the Git provider page where you sign in and grant access. The AWS Management Console uses this operation when you connect a Git provider account.</p>
Args:
provider: <p>The Git provider.</p>
redirect_url: <p>The AWS Management Console page to return to after authorization completes.</p>
Raises:
capo_amplifygen3.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
capo_amplifygen3.errors.internal_server_exception.InternalServerException: <p>An internal error occurred. Retry the request.</p>
capo_amplifygen3.errors.throttling_exception.ThrottlingException: <p>The request was denied because the request rate exceeds the allowed limit.</p>
capo_amplifygen3.errors.validation_exception.ValidationException: <p>The request contains invalid parameters or is otherwise malformed.</p>
capo_amplifygen3.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_amplifygen3.types.start_authorization_flow_request.StartAuthorizationFlowRequest]",
) -> OperationResponse[
"capo_amplifygen3.types.start_authorization_flow_response.StartAuthorizationFlowResponse"
]:
import capo_amplifygen3._operations.omega.start_authorization_flow
output, http_response = (
capo_amplifygen3._operations.omega.start_authorization_flow.start_authorization_flow(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartAuthorizationFlow")
)
input_: capo_amplifygen3.types.start_authorization_flow_request.StartAuthorizationFlowRequest = {
"provider": provider,
"redirect_url": redirect_url,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|