SSOClient#
Auto-generated documentation for SSO type annotations stubs module types-boto3-sso.
SSOClient#
Type annotations and code completion for boto3.client("sso").
 boto3 documentation
# SSOClient usage example
from boto3.session import Session
from types_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.
# Exceptions.exceptions usage example
client = boto3.client("sso")
try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InvalidRequestException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.UnauthorizedException,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_sso.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("sso").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("sso").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
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
# get_role_credentials method definition
def get_role_credentials(
    self,
    *,
    roleName: str,
    accountId: str,
    accessToken: str,
) -> GetRoleCredentialsResponseTypeDef:  # (1)
    ...# get_role_credentials method usage example with argument unpacking
kwargs: GetRoleCredentialsRequestTypeDef = {  # (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
# list_account_roles method definition
def list_account_roles(
    self,
    *,
    accessToken: str,
    accountId: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListAccountRolesResponseTypeDef:  # (1)
    ...# list_account_roles method usage example with argument unpacking
kwargs: ListAccountRolesRequestTypeDef = {  # (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
# list_accounts method definition
def list_accounts(
    self,
    *,
    accessToken: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListAccountsResponseTypeDef:  # (1)
    ...# list_accounts method usage example with argument unpacking
kwargs: ListAccountsRequestTypeDef = {  # (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
# logout method definition
def logout(
    self,
    *,
    accessToken: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# logout method usage example with argument unpacking
kwargs: LogoutRequestTypeDef = {  # (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")-> ListAccountRolesPaginator
- client.get_paginator("list_accounts")-> ListAccountsPaginator