SSOClient
Auto-generated documentation for SSO type annotations stubs module mypy-boto3-sso.
SSOClient
Type annotations and code completion for boto3.client("sso")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_sso.client import SSOClient
def get_sso_client() -> SSOClient:
return Session().client("sso")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("sso").exceptions
structure.
client = boto3.client("sso")
try:
do_something(client)
except (
client.ClientError,
client.InvalidRequestException,
client.ResourceNotFoundException,
client.TooManyRequestsException,
client.UnauthorizedException,
) as e:
print(e)
from mypy_boto3_sso.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("sso").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("sso").close
method.
boto3 documentation
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("sso").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_role_credentials
Returns the STS short-term credentials for a given role name that is assigned to the user.
Type annotations and code completion for boto3.client("sso").get_role_credentials
method.
boto3 documentation
def get_role_credentials(
self,
*,
roleName: str,
accountId: str,
accessToken: str,
) -> GetRoleCredentialsResponseTypeDef: # (1)
...
kwargs: GetRoleCredentialsRequestRequestTypeDef = { # (1)
"roleName": ...,
"accountId": ...,
"accessToken": ...,
}
parent.get_role_credentials(**kwargs)
list_account_roles
Lists all roles that are assigned to the user for a given AWS account.
Type annotations and code completion for boto3.client("sso").list_account_roles
method.
boto3 documentation
def list_account_roles(
self,
*,
accessToken: str,
accountId: str,
nextToken: str = ...,
maxResults: int = ...,
) -> ListAccountRolesResponseTypeDef: # (1)
...
kwargs: ListAccountRolesRequestRequestTypeDef = { # (1)
"accessToken": ...,
"accountId": ...,
}
parent.list_account_roles(**kwargs)
list_accounts
Lists all AWS accounts assigned to the user.
Type annotations and code completion for boto3.client("sso").list_accounts
method.
boto3 documentation
def list_accounts(
self,
*,
accessToken: str,
nextToken: str = ...,
maxResults: int = ...,
) -> ListAccountsResponseTypeDef: # (1)
...
kwargs: ListAccountsRequestRequestTypeDef = { # (1)
"accessToken": ...,
}
parent.list_accounts(**kwargs)
logout
Removes the locally stored SSO tokens from the client-side cache and sends an API call to the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in session.
Type annotations and code completion for boto3.client("sso").logout
method.
boto3 documentation
def logout(
self,
*,
accessToken: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: LogoutRequestRequestTypeDef = { # (1)
"accessToken": ...,
}
parent.logout(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("sso").get_paginator
method with overloads.
client.get_paginator("list_account_roles")
-> ListAccountRolesPaginatorclient.get_paginator("list_accounts")
-> ListAccountsPaginator