Skip to content

MgnClient#

Index > Mgn > MgnClient

Auto-generated documentation for Mgn type annotations stubs module mypy-boto3-mgn.

MgnClient#

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

# MgnClient usage example

from boto3.session import Session
from mypy_boto3_mgn.client import MgnClient

def get_mgn_client() -> MgnClient:
    return Session().client("mgn")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("mgn")

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

from mypy_boto3_mgn.client import Exceptions

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

Methods#

archive_application#

Archive application.

Type annotations and code completion for boto3.client("mgn").archive_application method. boto3 documentation

# archive_application method definition

def archive_application(
    self,
    *,
    applicationID: str,
    accountID: str = ...,
) -> ApplicationResponseTypeDef:  # (1)
    ...
  1. See ApplicationResponseTypeDef
# archive_application method usage example with argument unpacking

kwargs: ArchiveApplicationRequestRequestTypeDef = {  # (1)
    "applicationID": ...,
}

parent.archive_application(**kwargs)
  1. See ArchiveApplicationRequestRequestTypeDef

archive_wave#

Archive wave.

Type annotations and code completion for boto3.client("mgn").archive_wave method. boto3 documentation

# archive_wave method definition

def archive_wave(
    self,
    *,
    waveID: str,
    accountID: str = ...,
) -> WaveResponseTypeDef:  # (1)
    ...
  1. See WaveResponseTypeDef
# archive_wave method usage example with argument unpacking

kwargs: ArchiveWaveRequestRequestTypeDef = {  # (1)
    "waveID": ...,
}

parent.archive_wave(**kwargs)
  1. See ArchiveWaveRequestRequestTypeDef

associate_applications#

Associate applications to wave.

Type annotations and code completion for boto3.client("mgn").associate_applications method. boto3 documentation

# associate_applications method definition

def associate_applications(
    self,
    *,
    applicationIDs: Sequence[str],
    waveID: str,
    accountID: str = ...,
) -> Dict[str, Any]:
    ...
# associate_applications method usage example with argument unpacking

kwargs: AssociateApplicationsRequestRequestTypeDef = {  # (1)
    "applicationIDs": ...,
    "waveID": ...,
}

parent.associate_applications(**kwargs)
  1. See AssociateApplicationsRequestRequestTypeDef

associate_source_servers#

Associate source servers to application.

Type annotations and code completion for boto3.client("mgn").associate_source_servers method. boto3 documentation

# associate_source_servers method definition

def associate_source_servers(
    self,
    *,
    applicationID: str,
    sourceServerIDs: Sequence[str],
    accountID: str = ...,
) -> Dict[str, Any]:
    ...
# associate_source_servers method usage example with argument unpacking

kwargs: AssociateSourceServersRequestRequestTypeDef = {  # (1)
    "applicationID": ...,
    "sourceServerIDs": ...,
}

parent.associate_source_servers(**kwargs)
  1. See AssociateSourceServersRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

change_server_life_cycle_state#

Allows the user to set the SourceServer.LifeCycle.state property for specific Source Server IDs to one of the following: READY_FOR_TEST or READY_FOR_CUTOVER.

Type annotations and code completion for boto3.client("mgn").change_server_life_cycle_state method. boto3 documentation

# change_server_life_cycle_state method definition

def change_server_life_cycle_state(
    self,
    *,
    lifeCycle: ChangeServerLifeCycleStateSourceServerLifecycleTypeDef,  # (1)
    sourceServerID: str,
    accountID: str = ...,
) -> SourceServerResponseTypeDef:  # (2)
    ...
  1. See ChangeServerLifeCycleStateSourceServerLifecycleTypeDef
  2. See SourceServerResponseTypeDef
# change_server_life_cycle_state method usage example with argument unpacking

kwargs: ChangeServerLifeCycleStateRequestRequestTypeDef = {  # (1)
    "lifeCycle": ...,
    "sourceServerID": ...,
}

parent.change_server_life_cycle_state(**kwargs)
  1. See ChangeServerLifeCycleStateRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_application#

Create application.

Type annotations and code completion for boto3.client("mgn").create_application method. boto3 documentation

# create_application method definition

def create_application(
    self,
    *,
    name: str,
    accountID: str = ...,
    description: str = ...,
    tags: Mapping[str, str] = ...,
) -> ApplicationResponseTypeDef:  # (1)
    ...
  1. See ApplicationResponseTypeDef
# create_application method usage example with argument unpacking

kwargs: CreateApplicationRequestRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_application(**kwargs)
  1. See CreateApplicationRequestRequestTypeDef

create_connector#

Create Connector.

Type annotations and code completion for boto3.client("mgn").create_connector method.