Skip to content

SSOClient

Index > SSO > SSOClient

Auto-generated documentation for SSO type annotations stubs module types-aiobotocore-sso.

SSOClient

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

Usage example
from aioboto3.session import Session
from types_aiobotocore_sso.client import SSOClient

session = Session()
async with session.client("sso") as client:
    client: SSOClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("sso").exceptions structure.

Usage example
async with session.client("sso") as client:
    try:
        do_something(client)
    except (
            client.ClientError,
        client.InvalidRequestException,
        client.ResourceNotFoundException,
        client.TooManyRequestsException,
        client.UnauthorizedException,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_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 session.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 session.client("sso").close method. boto3 documentation

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

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

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

Method definition
await 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 session.client("sso").get_role_credentials method. boto3 documentation

Method definition
await 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 Amazon Web Services account.

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

Method definition
await 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 Amazon Web Services accounts assigned to the user.

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

Method definition
await 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 Amazon Web Services SSO service to invalidate the corresponding server-side Amazon Web Services SSO sign in session.

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

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

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

__aenter__

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

Method definition
await def __aenter__(
    self,
) -> SSOClient:
    ...

__aexit__

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

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator

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