Skip to content

GreengrassClient#

Index > Greengrass > GreengrassClient

Auto-generated documentation for Greengrass type annotations stubs module mypy-boto3-greengrass.

GreengrassClient#

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

# GreengrassClient usage example

from boto3.session import Session
from mypy_boto3_greengrass.client import GreengrassClient

def get_greengrass_client() -> GreengrassClient:
    return Session().client("greengrass")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("greengrass")

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

from mypy_boto3_greengrass.client import Exceptions

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

Methods#

associate_role_to_group#

Associates a role with a group.

Type annotations and code completion for boto3.client("greengrass").associate_role_to_group method. boto3 documentation

# associate_role_to_group method definition

def associate_role_to_group(
    self,
    *,
    GroupId: str,
    RoleArn: str,
) -> AssociateRoleToGroupResponseTypeDef:  # (1)
    ...
  1. See AssociateRoleToGroupResponseTypeDef
# associate_role_to_group method usage example with argument unpacking

kwargs: AssociateRoleToGroupRequestRequestTypeDef = {  # (1)
    "GroupId": ...,
    "RoleArn": ...,
}

parent.associate_role_to_group(**kwargs)
  1. See AssociateRoleToGroupRequestRequestTypeDef

associate_service_role_to_account#

Associates a role with your account.

Type annotations and code completion for boto3.client("greengrass").associate_service_role_to_account method.