Skip to content

OpsWorksCMClient#

Index > OpsWorksCM > OpsWorksCMClient

Auto-generated documentation for OpsWorksCM type annotations stubs module mypy-boto3-opsworkscm.

OpsWorksCMClient#

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

# OpsWorksCMClient usage example

from boto3.session import Session
from mypy_boto3_opsworkscm.client import OpsWorksCMClient

def get_opsworkscm_client() -> OpsWorksCMClient:
    return Session().client("opsworkscm")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("opsworkscm")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.InvalidStateException,
    client.exceptions.LimitExceededException,
    client.exceptions.ResourceAlreadyExistsException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_opsworkscm.client import Exceptions

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

Methods#

associate_node#

Associates a new node with the server.

Type annotations and code completion for boto3.client("opsworkscm").associate_node method. boto3 documentation

# associate_node method definition

def associate_node(
    self,
    *,
    ServerName: str,
    NodeName: str,
    EngineAttributes: Sequence[EngineAttributeTypeDef],  # (1)
) -> AssociateNodeResponseTypeDef:  # (2)
    ...
  1. See EngineAttributeTypeDef
  2. See AssociateNodeResponseTypeDef
# associate_node method usage example with argument unpacking

kwargs: AssociateNodeRequestRequestTypeDef = {  # (1)
    "ServerName": ...,
    "NodeName": ...,
    "EngineAttributes": ...,
}

parent.associate_node(**kwargs)
  1. See AssociateNodeRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("opsworkscm").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("opsworkscm").close method. boto3 documentation

# close method definition

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

create_backup#

Creates an application-level backup of a server.

Type annotations and code completion for boto3.client("opsworkscm").create_backup method. boto3 documentation

# create_backup method definition

def create_backup(
    self,
    *,
    ServerName: str,
    Description: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateBackupResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateBackupResponseTypeDef
# create_backup method usage example with argument unpacking

kwargs: CreateBackupRequestRequestTypeDef = {  # (1)
    "ServerName": ...,
}

parent.create_backup(**kwargs)
  1. See CreateBackupRequestRequestTypeDef

create_server#

Creates and immedately starts a new server.

Type annotations and code completion for boto3.client("opsworkscm").create_server method. boto3 documentation

# create_server method definition

def create_server(
    self,
    *,
    Engine: str,
    ServerName: str,
    InstanceProfileArn: str,
    InstanceType: str,
    ServiceRoleArn: str,
    AssociatePublicIpAddress: bool = ...,
    CustomDomain: str = ...,
    CustomCertificate: str = ...,
    CustomPrivateKey: str = ...,
    DisableAutomatedBackup: bool = ...,
    EngineModel: str = ...,
    EngineVersion: str = ...,
    EngineAttributes: Sequence[EngineAttributeTypeDef] = ...,  # (1)
    BackupRetentionCount: int = ...,
    KeyPair: str = ...,
    PreferredMaintenanceWindow: str = ...,
    PreferredBackupWindow: str = ...,
    SecurityGroupIds: Sequence[str] = ...,
    SubnetIds: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
    BackupId: str = ...,
) -> CreateServerResponseTypeDef:  # (3)
    ...
  1. See EngineAttributeTypeDef
  2. See TagTypeDef
  3. See CreateServerResponseTypeDef
# create_server method usage example with argument unpacking

kwargs: CreateServerRequestRequestTypeDef = {  # (1)
    "Engine": ...,
    "ServerName": ...,
    "InstanceProfileArn": ...,
    "InstanceType": ...,
    "ServiceRoleArn": ...,
}

parent.create_server(**kwargs)
  1. See CreateServerRequestRequestTypeDef

delete_backup#

Deletes a backup.

Type annotations and code completion for boto3.client("opsworkscm").delete_backup method. boto3 documentation

# delete_backup method definition

def delete_backup(
    self,
    *,
    BackupId: str,
) -> Dict[str, Any]:
    ...
# delete_backup method usage example with argument unpacking

kwargs: DeleteBackupRequestRequestTypeDef = {  # (1)
    "BackupId": ...,
}

parent.delete_backup(**kwargs)
  1. See DeleteBackupRequestRequestTypeDef

delete_server#

Deletes the server and the underlying AWS CloudFormation stacks (including the server's EC2 instance).

Type annotations and code completion for boto3.client("opsworkscm").delete_server method. boto3 documentation

# delete_server method definition

def delete_server(
    self,
    *,
    ServerName: str,
) -> Dict[str, Any]:
    ...
# delete_server method usage example with argument unpacking

kwargs: DeleteServerRequestRequestTypeDef = {  # (1)
    "ServerName": ...,
}

parent.delete_server(**kwargs)
  1. See DeleteServerRequestRequestTypeDef

describe_account_attributes#

Describes your OpsWorks-CM account attributes.

Type annotations and code completion for boto3.client("opsworkscm").describe_account_attributes method. boto3 documentation

# describe_account_attributes method definition

def describe_account_attributes(
    self,
) -> DescribeAccountAttributesResponseTypeDef:  # (1)
    ...
  1. See DescribeAccountAttributesResponseTypeDef

describe_backups#

Describes backups.

Type annotations and code completion for boto3.client("opsworkscm").describe_backups method.