Skip to content

AccountClient#

Index > Account > AccountClient

Auto-generated documentation for Account type annotations stubs module mypy-boto3-account.

AccountClient#

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

# AccountClient usage example

from boto3.session import Session
from mypy_boto3_account.client import AccountClient

def get_account_client() -> AccountClient:
    return Session().client("account")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("account")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_account.client import Exceptions

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

Methods#

accept_primary_email_update#

Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.

Type annotations and code completion for boto3.client("account").accept_primary_email_update method. boto3 documentation

# accept_primary_email_update method definition

def accept_primary_email_update(
    self,
    *,
    AccountId: str,
    Otp: str,
    PrimaryEmail: str,
) -> AcceptPrimaryEmailUpdateResponseTypeDef:  # (1)
    ...
  1. See AcceptPrimaryEmailUpdateResponseTypeDef
# accept_primary_email_update method usage example with argument unpacking

kwargs: AcceptPrimaryEmailUpdateRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "Otp": ...,
    "PrimaryEmail": ...,
}

parent.accept_primary_email_update(**kwargs)
  1. See AcceptPrimaryEmailUpdateRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("account").can_paginate method. boto3 documentation

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

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

# close method definition

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

delete_alternate_contact#

Deletes the specified alternate contact from an Amazon Web Services account.

Type annotations and code completion for boto3.client("account").delete_alternate_contact method. boto3 documentation

# delete_alternate_contact method definition

def delete_alternate_contact(
    self,
    *,
    AlternateContactType: AlternateContactTypeType,  # (1)
    AccountId: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See AlternateContactTypeType
  2. See EmptyResponseMetadataTypeDef
# delete_alternate_contact method usage example with argument unpacking

kwargs: DeleteAlternateContactRequestRequestTypeDef = {  # (1)
    "AlternateContactType": ...,
}

parent.delete_alternate_contact(**kwargs)
  1. See DeleteAlternateContactRequestRequestTypeDef

disable_region#

Disables (opts-out) a particular Region for an account.

Type annotations and code completion for boto3.client("account").disable_region method. boto3 documentation

# disable_region method definition

def disable_region(
    self,
    *,
    RegionName: str,
    AccountId: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# disable_region method usage example with argument unpacking

kwargs: DisableRegionRequestRequestTypeDef = {  # (1)
    "RegionName": ...,
}

parent.disable_region(**kwargs)
  1. See DisableRegionRequestRequestTypeDef

enable_region#

Enables (opts-in) a particular Region for an account.

Type annotations and code completion for boto3.client("account").enable_region method. boto3 documentation

# enable_region method definition

def enable_region(
    self,
    *,
    RegionName: str,
    AccountId: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# enable_region method usage example with argument unpacking

kwargs: EnableRegionRequestRequestTypeDef = {  # (1)
    "RegionName": ...,
}

parent.enable_region(**kwargs)
  1. See EnableRegionRequestRequestTypeDef

generate_presigned_url#

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

Type annotations and code completion for boto3.client("account").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_alternate_contact#

Retrieves the specified alternate contact attached to an Amazon Web Services account.

Type annotations and code completion for boto3.client("account").get_alternate_contact method. boto3 documentation

# get_alternate_contact method definition

def get_alternate_contact(
    self,
    *,
    AlternateContactType: AlternateContactTypeType,  # (1)
    AccountId: str = ...,
) -> GetAlternateContactResponseTypeDef:  # (2)
    ...
  1. See AlternateContactTypeType
  2. See GetAlternateContactResponseTypeDef
# get_alternate_contact method usage example with argument unpacking

kwargs: GetAlternateContactRequestRequestTypeDef = {  # (1)
    "AlternateContactType": ...,
}

parent.get_alternate_contact(**kwargs)
  1. See GetAlternateContactRequestRequestTypeDef

get_contact_information#

Retrieves the primary contact information of an Amazon Web Services account.

Type annotations and code completion for boto3.client("account").get_contact_information method. boto3 documentation

# get_contact_information method definition

def get_contact_information(
    self,
    *,
    AccountId: str = ...,
) -> GetContactInformationResponseTypeDef:  # (1)
    ...
  1. See GetContactInformationResponseTypeDef
# get_contact_information method usage example with argument unpacking

kwargs: GetContactInformationRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.get_contact_information(**kwargs)
  1. See GetContactInformationRequestRequestTypeDef

get_primary_email#

Retrieves the primary email address for the specified account.

Type annotations and code completion for boto3.client("account").get_primary_email method. boto3 documentation

# get_primary_email method definition

def get_primary_email(
    self,
    *,
    AccountId: str,
) -> GetPrimaryEmailResponseTypeDef:  # (1)
    ...
  1. See GetPrimaryEmailResponseTypeDef
# get_primary_email method usage example with argument unpacking

kwargs: GetPrimaryEmailRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.get_primary_email(**kwargs)
  1. See GetPrimaryEmailRequestRequestTypeDef

get_region_opt_status#

Retrieves the opt-in status of a particular Region.

Type annotations and code completion for boto3.client("account").get_region_opt_status method. boto3 documentation

# get_region_opt_status method definition

def get_region_opt_status(
    self,
    *,
    RegionName: str,
    AccountId: str = ...,
) -> GetRegionOptStatusResponseTypeDef:  # (1)
    ...
  1. See GetRegionOptStatusResponseTypeDef
# get_region_opt_status method usage example with argument unpacking

kwargs: GetRegionOptStatusRequestRequestTypeDef = {  # (1)
    "RegionName": ...,
}

parent.get_region_opt_status(**kwargs)
  1. See GetRegionOptStatusRequestRequestTypeDef

list_regions#

Lists all the Regions for a given account and their respective opt-in statuses.

Type annotations and code completion for boto3.client("account").list_regions method. boto3 documentation

# list_regions method definition

def list_regions(
    self,
    *,
    AccountId: str = ...,
    MaxResults: int = ...,
    NextToken: str = ...,
    RegionOptStatusContains: Sequence[RegionOptStatusType] = ...,  # (1)
) -> ListRegionsResponseTypeDef:  # (2)
    ...
  1. See RegionOptStatusType
  2. See ListRegionsResponseTypeDef
# list_regions method usage example with argument unpacking

kwargs: ListRegionsRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.list_regions(**kwargs)
  1. See ListRegionsRequestRequestTypeDef

put_alternate_contact#

Modifies the specified alternate contact attached to an Amazon Web Services account.

Type annotations and code completion for boto3.client("account").put_alternate_contact method. boto3 documentation

# put_alternate_contact method definition

def put_alternate_contact(
    self,
    *,
    AlternateContactType: AlternateContactTypeType,  # (1)
    EmailAddress: str,
    Name: str,
    PhoneNumber: str,
    Title: str,
    AccountId: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See AlternateContactTypeType
  2. See EmptyResponseMetadataTypeDef
# put_alternate_contact method usage example with argument unpacking

kwargs: PutAlternateContactRequestRequestTypeDef = {  # (1)
    "AlternateContactType": ...,
    "EmailAddress": ...,
    "Name": ...,
    "PhoneNumber": ...,
    "Title": ...,
}

parent.put_alternate_contact(**kwargs)
  1. See PutAlternateContactRequestRequestTypeDef

put_contact_information#

Updates the primary contact information of an Amazon Web Services account.

Type annotations and code completion for boto3.client("account").put_contact_information method. boto3 documentation

# put_contact_information method definition

def put_contact_information(
    self,
    *,
    ContactInformation: ContactInformationTypeDef,  # (1)
    AccountId: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See ContactInformationTypeDef
  2. See EmptyResponseMetadataTypeDef
# put_contact_information method usage example with argument unpacking

kwargs: PutContactInformationRequestRequestTypeDef = {  # (1)
    "ContactInformation": ...,
}

parent.put_contact_information(**kwargs)
  1. See PutContactInformationRequestRequestTypeDef

start_primary_email_update#

Starts the process to update the primary email address for the specified account.

Type annotations and code completion for boto3.client("account").start_primary_email_update method. boto3 documentation

# start_primary_email_update method definition

def start_primary_email_update(
    self,
    *,
    AccountId: str,
    PrimaryEmail: str,
) -> StartPrimaryEmailUpdateResponseTypeDef:  # (1)
    ...
  1. See StartPrimaryEmailUpdateResponseTypeDef
# start_primary_email_update method usage example with argument unpacking

kwargs: StartPrimaryEmailUpdateRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "PrimaryEmail": ...,
}

parent.start_primary_email_update(**kwargs)
  1. See StartPrimaryEmailUpdateRequestRequestTypeDef

get_paginator#

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