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)
...
# assign_instance method usage example with argument unpacking
kwargs: AssignInstanceRequestRequestTypeDef = { # (1)
"InstanceId": ...,
"LayerIds": ...,
}
parent.assign_instance(**kwargs)
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)
...
# assign_volume method usage example with argument unpacking
kwargs: AssignVolumeRequestRequestTypeDef = { # (1)
"VolumeId": ...,
}
parent.assign_volume(**kwargs)
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)
...
# associate_elastic_ip method usage example with argument unpacking
kwargs: AssociateElasticIpRequestRequestTypeDef = { # (1)
"ElasticIp": ...,
}
parent.associate_elastic_ip(**kwargs)
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.