Skip to content

SSOClient

Index > SSO > 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

Usage example
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.

Usage example
client = boto3.client("sso")

try:
    do_something(client)
except (
    client.ClientError,
    client.InvalidRequestException,
    client.ResourceNotFoundException,
    client.TooManyRequestsException,
    client.UnauthorizedException,
) as e:
    print(e)
Type checking example
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

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("sso").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

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

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

Method definition
def get_role_credentials(
    self,
    *,
    roleName: str,
    accountId: str,
    accessToken: str,
) -> GetRoleCredentialsResponseTypeDef:  # (1)
    ...
  1. See GetRoleCredentialsResponseTypeDef
Usage example with kwargs
kwargs: GetRoleCredentialsRequestRequestTypeDef = {  # (1)
    "roleName": ...,
    "accountId": ...,
    "accessToken": ...,
}

parent.get_role_credentials(**kwargs)
  1. See GetRoleCredentialsRequestRequestTypeDef

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

Method definition
def list_account_roles(
    self,
    *,
    accessToken: str,
    accountId: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListAccountRolesResponseTypeDef:  # (1)
    ...
  1. See ListAccountRolesResponseTypeDef
Usage example with kwargs
kwargs: ListAccountRolesRequestRequestTypeDef = {  # (1)
    "accessToken": ...,
    "accountId": ...,
}

parent.list_account_roles(**kwargs)
  1. See ListAccountRolesRequestRequestTypeDef

list_accounts

Lists all AWS accounts assigned to the user.

Type annotations and code completion for boto3.client("sso").list_accounts method. boto3 documentation

Method definition
def list_accounts(
    self,
    *,
    accessToken: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListAccountsResponseTypeDef:  # (1)
    ...
  1. See ListAccountsResponseTypeDef
Usage example with kwargs
kwargs: ListAccountsRequestRequestTypeDef = {  # (1)
    "accessToken": ...,
}

parent.list_accounts(**kwargs)
  1. See ListAccountsRequestRequestTypeDef

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

Method definition
def logout(
    self,
    *,
    accessToken: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: LogoutRequestRequestTypeDef = {  # (1)
    "accessToken": ...,
}

parent.logout(**kwargs)
  1. See LogoutRequestRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("sso").get_paginator method with overloads.