Skip to content

OpsWorks module#

Index > OpsWorks

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

How to install#

You can generate type annotations for boto3 package locally with mypy_boto3_builder. Use uv for build isolation.

  1. Run mypy-boto3-builder in your package root directory: uvx --with 'boto3==1.35.86' mypy_boto3_builder
  2. Select boto3-stubs AWS SDK.
  3. Add OpsWorks service.
  4. Use provided commands to install generated packages.

VSCode extension#

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and OpsWorks.

From PyPI with pip#

Install boto3-stubs for OpsWorks service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[opsworks]'

# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[opsworks]'

# standalone installation
python -m pip install mypy-boto3-opsworks

How to uninstall#

python -m pip uninstall -y mypy-boto3-opsworks

Usage#

Code samples can be found in Examples.

OpsWorksClient#

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

# OpsWorksClient usage example

from boto3.session import Session

from mypy_boto3_opsworks.client import OpsWorksClient

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

Paginators#

Type annotations and code completion for paginators from boto3.client("opsworks").get_paginator("...").

# DescribeEcsClustersPaginator usage example

from boto3.session import Session

from mypy_boto3_opsworks.paginator import DescribeEcsClustersPaginator

def get_describe_ecs_clusters_paginator() -> DescribeEcsClustersPaginator:
    return Session().client("opsworks").get_paginator("describe_ecs_clusters"))

Waiters#

Type annotations and code completion for waiters from boto3.client("opsworks").get_waiter("...").

# AppExistsWaiter usage example

from boto3.session import Session

from mypy_boto3_opsworks.waiter import AppExistsWaiter

def get_app_exists_waiter() -> AppExistsWaiter:
    return Session().client("opsworks").get_waiter("app_exists")

OpsWorksServiceResource#

Type annotations and code completion for boto3.resource("opsworks") as OpsWorksServiceResource boto3 documentation

# OpsWorksServiceResource usage example

from boto3.session import Session

from mypy_boto3_opsworks.service_resource import OpsWorksServiceResource

def get_opsworks_resource() -> OpsWorksServiceResource:
    return Session().resource("opsworks")

Collections#

Type annotations and code completion for collections from boto3.resource("opsworks").*.

# ServiceResourceStacksCollection usage example

from boto3.session import Session

from mypy_boto3_opsworks.service_resource import ServiceResourceStacksCollection

def get_collection() -> ServiceResourceStacksCollection:
    return Session().resource("opsworks").stacks

Resources#

Type annotations and code completion for additional resources from session.resource("opsworks").*.

# Layer usage example

from mypy_boto3_opsworks.service_resource import Layer

def get_resource() -> Layer:
    return resource.Layer(...)

Literals#

Type annotations for literals used in methods and schema.

# AppAttributesKeysType usage example

from mypy_boto3_opsworks.literals import AppAttributesKeysType

def get_value() -> AppAttributesKeysType:
    return "AutoBundleOnDeploy"

Type definitions#

Type annotations for type definitions used in methods and schema.