Skip to content

IAMClient#

Index > IAM > IAMClient

Auto-generated documentation for IAM type annotations stubs module mypy-boto3-iam.

IAMClient#

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

# IAMClient usage example

from boto3.session import Session
from mypy_boto3_iam.client import IAMClient

def get_iam_client() -> IAMClient:
    return Session().client("iam")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("iam").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("iam")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.ConcurrentModificationException,
    client.exceptions.CredentialReportExpiredException,
    client.exceptions.CredentialReportNotPresentException,
    client.exceptions.CredentialReportNotReadyException,
    client.exceptions.DeleteConflictException,
    client.exceptions.DuplicateCertificateException,
    client.exceptions.DuplicateSSHPublicKeyException,
    client.exceptions.EntityAlreadyExistsException,
    client.exceptions.EntityTemporarilyUnmodifiableException,
    client.exceptions.InvalidAuthenticationCodeException,
    client.exceptions.InvalidCertificateException,
    client.exceptions.InvalidInputException,
    client.exceptions.InvalidPublicKeyException,
    client.exceptions.InvalidUserTypeException,
    client.exceptions.KeyPairMismatchException,
    client.exceptions.LimitExceededException,
    client.exceptions.MalformedCertificateException,
    client.exceptions.MalformedPolicyDocumentException,
    client.exceptions.NoSuchEntityException,
    client.exceptions.OpenIdIdpCommunicationErrorException,
    client.exceptions.PasswordPolicyViolationException,
    client.exceptions.PolicyEvaluationException,
    client.exceptions.PolicyNotAttachableException,
    client.exceptions.ReportGenerationLimitExceededException,
    client.exceptions.ServiceFailureException,
    client.exceptions.ServiceNotSupportedException,
    client.exceptions.UnmodifiableEntityException,
    client.exceptions.UnrecognizedPublicKeyEncodingException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_iam.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

add_client_id_to_open_id_connect_provider#

Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM OpenID Connect (OIDC) provider resource.

Type annotations and code completion for boto3.client("iam").add_client_id_to_open_id_connect_provider method. boto3 documentation

# add_client_id_to_open_id_connect_provider method definition

def add_client_id_to_open_id_connect_p