Skip to content

OpsWorksClient#

Index > OpsWorks > OpsWorksClient

Auto-generated documentation for OpsWorks type annotations stubs module mypy-boto3-opsworks.

OpsWorksClient#

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

# OpsWorksClient usage example

from boto3.session import Session
from mypy_boto3_opsworks.client import OpsWorksClient

def get_opsworks_client() -> OpsWorksClient:
    return Session().client("opsworks")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("opsworks")

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

from mypy_boto3_opsworks.client import Exceptions

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

Methods#

assign_instance#

Assign a registered instance to a layer.

Type annotations and code completion for boto3.client("opsworks").assign_instance method. boto3 documentation

# assign_instance method definition

def assign_instance(
    self,
    *,
    InstanceId: str,
    LayerIds: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# assign_instance method usage example with argument unpacking

kwargs: AssignInstanceRequestRequestTypeDef = {  # (1)
    "InstanceId": ...,
    "LayerIds": ...,
}

parent.assign_instance(**kwargs)
  1. See AssignInstanceRequestRequestTypeDef

assign_volume#

Assigns one of the stack's registered Amazon EBS volumes to a specified instance.

Type annotations and code completion for boto3.client("opsworks").assign_volume method. boto3 documentation

# assign_volume method definition

def assign_volume(
    self,
    *,
    VolumeId: str,
    InstanceId: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# assign_volume method usage example with argument unpacking

kwargs: AssignVolumeRequestRequestTypeDef = {  # (1)
    "VolumeId": ...,
}

parent.assign_volume(**kwargs)
  1. See AssignVolumeRequestRequestTypeDef

associate_elastic_ip#

Associates one of the stack's registered Elastic IP addresses with a specified instance.

Type annotations and code completion for boto3.client("opsworks").associate_elastic_ip method. boto3 documentation

# associate_elastic_ip method definition

def associate_elastic_ip(
    self,
    *,
    ElasticIp: str,
    InstanceId: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# associate_elastic_ip method usage example with argument unpacking

kwargs: AssociateElasticIpRequestRequestTypeDef = {  # (1)
    "ElasticIp": ...,
}

parent.associate_elastic_ip(**kwargs)
  1. See AssociateElasticIpRequestRequestTypeDef

attach_elastic_load_balancer#

Attaches an Elastic Load Balancing load balancer to a specified layer.

Type annotations and code completion for boto3.client("opsworks").attach_elastic_load_balancer method. boto3 documentation

# attach_elastic_load_balancer method definition

def attach_elastic_load_balancer(
    self,
    *,
    ElasticLoadBalancerName: str,
    LayerId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# attach_elastic_load_balancer method usage example with argument unpacking

kwargs: AttachElasticLoadBalancerRequestRequestTypeDef = {  # (1)
    "ElasticLoadBalancerName": ...,
    "LayerId": ...,
}

parent.attach_elastic_load_balancer(**kwargs)
  1. See AttachElasticLoadBalancerRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

clone_stack#

Creates a clone of a specified stack.

Type annotations and code completion for boto3.client("opsworks").clone_stack method. boto3 documentation

# clone_stack method definition

def clone_stack(
    self,
    *,
    SourceStackId: str,
    ServiceRoleArn: str,
    Name: str = ...,
    Region: str = ...,
    VpcId: str = ...,
    Attributes: Mapping[StackAttributesKeysType, str] = ...,  # (1)
    DefaultInstanceProfileArn: str = ...,
    DefaultOs: str = ...,
    HostnameTheme: str = ...,
    DefaultAvailabilityZone: str = ...,
    DefaultSubnetId: str = ...,
    CustomJson: str = ...,
    ConfigurationManager: StackConfigurationManagerTypeDef = ...,  # (2)
    ChefConfiguration: ChefConfigurationTypeDef = ...,  # (3)
    UseCustomCookbooks: bool = ...,
    UseOpsworksSecurityGroups: bool = ...,
    CustomCookbooksSource: SourceTypeDef = ...,  # (4)
    DefaultSshKeyName: str = ...,
    ClonePermissions: bool = ...,
    CloneAppIds: Sequence[str] = ...,
    DefaultRootDeviceType: RootDeviceTypeType = ...,  # (5)
    AgentVersion: str = ...,
) -> CloneStackResultTypeDef:  # (6)
    ...
  1. See StackAttributesKeysType
  2. See StackConfigurationManagerTypeDef
  3. See ChefConfigurationTypeDef
  4. See SourceTypeDef
  5. See RootDeviceTypeType
  6. See CloneStackResultTypeDef
# clone_stack method usage example with argument unpacking

kwargs: CloneStackRequestRequestTypeDef = {  # (1)
    "SourceStackId": ...,
    "ServiceRoleArn": ...,
}

parent.clone_stack(**kwargs)
  1. See CloneStackRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_app#

Creates an app for a specified stack.

Type annotations and code completion for boto3.client("opsworks").create_app method. boto3 documentation

# create_app method definition

def create_app(
    self,
    *,
    StackId: str,
    Name: str,
    Type: AppTypeType,  # (1)
    Shortname: str = ...,
    Description: str = ...,
    DataSources: Sequence[DataSourceTypeDef] = ...,  # (2)
    AppSource: SourceTypeDef = ...,  # (3)
    Domains: Sequence[str] = ...,
    EnableSsl: bool = ...,
    SslConfiguration: SslConfigurationTypeDef = ...,  # (4)
    Attributes: Mapping[AppAttributesKeysType, str] = ...,  # (5)
    Environment: Sequence[EnvironmentVariableTypeDef] = ...,  # (6)
) -> CreateAppResultTypeDef:  # (7)
    ...
  1. See