Skip to content

GreengrassV2Client#

Index > GreengrassV2 > GreengrassV2Client

Auto-generated documentation for GreengrassV2 type annotations stubs module mypy-boto3-greengrassv2.

GreengrassV2Client#

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

# GreengrassV2Client usage example

from boto3.session import Session
from mypy_boto3_greengrassv2.client import GreengrassV2Client

def get_greengrassv2_client() -> GreengrassV2Client:
    return Session().client("greengrassv2")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("greengrassv2")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.RequestAlreadyInProgressException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_greengrassv2.client import Exceptions

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

Methods#

associate_service_role_to_account#

Associates a Greengrass service role with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.

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

# associate_service_role_to_account method definition

def associate_service_role_to_account(
    self,
    *,
    roleArn: str,
) -> AssociateServiceRoleToAccountResponseTypeDef:  # (1)
    ...
  1. See AssociateServiceRoleToAccountResponseTypeDef
# associate_service_role_to_account method usage example with argument unpacking

kwargs: AssociateServiceRoleToAccountRequestRequestTypeDef = {  # (1)
    "roleArn": ...,
}

parent.associate_service_role_to_account(**kwargs)
  1. See AssociateServiceRoleToAccountRequestRequestTypeDef

batch_associate_client_device_with_core_device#

Associates a list of client devices with a core device.

Type annotations and code completion for boto3.client("greengrassv2").batch_associate_client_device_with_core_device method. boto3 documentation

# batch_associate_client_device_with_core_device method definition

def batch_associate_client_device_with_core_device(
    self,
    *,
    coreDeviceThingName: str,
    entries: Sequence[AssociateClientDeviceWithCoreDeviceEntryTypeDef] = ...,  # (1)
) -> BatchAssociateClientDeviceWithCoreDeviceResponseTypeDef:  # (2)
    ...
  1. See AssociateClientDeviceWithCoreDeviceEntryTypeDef
  2. See BatchAssociateClientDeviceWithCoreDeviceResponseTypeDef
# batch_associate_client_device_with_core_device method usage example with argument unpacking

kwargs: BatchAssociateClientDeviceWithCoreDeviceRequestRequestTypeDef = {  # (1)
    "coreDeviceThingName": ...,
}

parent.batch_associate_client_device_with_core_device(**kwargs)
  1. See BatchAssociateClientDeviceWithCoreDeviceRequestRequestTypeDef

batch_disassociate_client_device_from_core_device#

Disassociates a list of client devices from a core device.

Type annotations and code completion for boto3.client("greengrassv2").batch_disassociate_client_device_from_core_device method. boto3 documentation

# batch_disassociate_client_device_from_core_device method definition

def batch_disassociate_client_device_from_core_device(
    self,
    *,
    coreDeviceThingName: str,
    entries: Sequence[DisassociateClientDeviceFromCoreDeviceEntryTypeDef] = ...,  # (1)
) -> BatchDisassociateClientDeviceFromCoreDeviceResponseTypeDef:  # (2)
    ...
  1. See DisassociateClientDeviceFromCoreDeviceEntryTypeDef
  2. See BatchDisassociateClientDeviceFromCoreDeviceResponseTypeDef
# batch_disassociate_client_device_from_core_device method usage example with argument unpacking

kwargs: BatchDisassociateClientDeviceFromCoreDeviceRequestRequestTypeDef = {  # (1)
    "coreDeviceThingName": ...,
}

parent.batch_disassociate_client_device_from_core_device(**kwargs)
  1. See BatchDisassociateClientDeviceFromCoreDeviceRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

cancel_deployment#

Cancels a deployment.

Type annotations and code completion for boto3.client("greengrassv2").cancel_deployment method. boto3 documentation

# cancel_deployment method definition

def cancel_deployment(
    self,
    *,
    deploymentId: str,
) -> CancelDeploymentResponseTypeDef:  # (1)
    ...
  1. See CancelDeploymentResponseTypeDef
# cancel_deployment method usage example with argument unpacking

kwargs: CancelDeploymentRequestRequestTypeDef = {  # (1)
    "deploymentId": ...,
}

parent.cancel_deployment(**kwargs)
  1. See CancelDeploymentRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_component_version#

Creates a component.

Type annotations and code completion for boto3.client("greengrassv2").create_component_version method. boto3 documentation

# create_component_version method definition

def create_component_version(
    self,
    *,
    inlineRecipe: Union[str, bytes, IO[Any], StreamingBody] = ...,
    lambdaFunction: LambdaFunctionRecipeSourceTypeDef = ...,  # (1)
    tags: Mapping[str, str] = ...,
    clientToken: str = ...,
) -> CreateComponentVersionResponseTypeDef:  # (2)
    ...
  1. See LambdaFunctionRecipeSourceTypeDef
  2. See CreateComponentVersionResponseTypeDef
# create_component_version method usage example with argument unpacking

kwargs: CreateComponentVersionRequestRequestTypeDef = {  # (1)
    "inlineRecipe": ...,
}

parent.create_component_version(**kwargs)
  1. See CreateComponentVersionRequestRequestTypeDef

create_deployment#

Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices.

Type annotations and code completion for boto3.client("greengrassv2").create_deployment method. boto3 documentation

# create_deployment method definition

def create_deployment(
    self,
    *,
    targetArn: str,
    deploymentName: str = ...,
    components: Mapping[str, ComponentDeploymentSpecificationTypeDef] = ...,  # (1)
    iotJobConfiguration: DeploymentIoTJobConfigurationTypeDef = ...,  # (2)
    deploymentPolicies: DeploymentPoliciesTypeDef = ...,  # (3)
    parentTargetArn: str = ...,
    tags: Mapping[str, str] = ...,
    clientToken: str = ...,
) -> CreateDeploymentResponseTypeDef:  # (4)
    ...
  1. See ComponentDeploymentSpecificationTypeDef
  2. See DeploymentIoTJobConfigurationTypeDef
  3. See DeploymentPoliciesTypeDef
  4. See CreateDeploymentResponseTypeDef
# create_deployment method usage example with argument unpacking

kwargs: CreateDeploymentRequestRequestTypeDef = {  # (1)
    "targetArn": ...,
}

parent.create_deployment(**kwargs)
  1. See CreateDeploymentRequestRequestTypeDef

delete_component#

Deletes a version of a component from IoT Greengrass.

Type annotations and code completion for boto3.client("greengrassv2").delete_component method. boto3 documentation

# delete_component method definition

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

kwargs: DeleteComponentRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.delete_component(**kwargs)
  1. See DeleteComponentRequestRequestTypeDef

delete_core_device#

Deletes a Greengrass core device, which is an IoT thing.

Type annotations and code completion for boto3.client("greengrassv2").delete_core_device method. boto3 documentation

# delete_core_device method definition

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

kwargs: DeleteCoreDeviceRequestRequestTypeDef = {  # (1)
    "coreDeviceThingName": ...,
}

parent.delete_core_device(**kwargs)
  1. See DeleteCoreDeviceRequestRequestTypeDef

delete_deployment#

Deletes a deployment.

Type annotations and code completion for boto3.client("greengrassv2").delete_deployment method. boto3 documentation

# delete_deployment method definition

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

kwargs: DeleteDeploymentRequestRequestTypeDef = {  # (1)
    "deploymentId": ...,
}

parent.delete_deployment(**kwargs)
  1. See DeleteDeploymentRequestRequestTypeDef

describe_component#

Retrieves metadata for a version of a component.

Type annotations and code completion for boto3.client("greengrassv2").describe_component method. boto3 documentation

# describe_component method definition

def describe_component(
    self,
    *,
    arn: str,
) -> DescribeComponentResponseTypeDef:  # (1)
    ...
  1. See DescribeComponentResponseTypeDef
# describe_component method usage example with argument unpacking

kwargs: DescribeComponentRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.describe_component(**kwargs)
  1. See DescribeComponentRequestRequestTypeDef

disassociate_service_role_from_account#

Disassociates the Greengrass service role from IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.

Type annotations and code completion for boto3.client("greengrassv2").disassociate_service_role_from_account method. boto3 documentation

# disassociate_service_role_from_account method definition

def disassociate_service_role_from_account(
    self,
) -> DisassociateServiceRoleFromAccountResponseTypeDef:  # (1)
    ...
  1. See DisassociateServiceRoleFromAccountResponseTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("greengrassv2").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_component#

Gets the recipe for a version of a component.

Type annotations and code completion for boto3.client("greengrassv2").get_component method. boto3 documentation

# get_component method definition

def get_component(
    self,
    *,
    arn: str,
    recipeOutputFormat: RecipeOutputFormatType = ...,  # (1)
) -> GetComponentResponseTypeDef:  # (2)
    ...
  1. See RecipeOutputFormatType
  2. See GetComponentResponseTypeDef
# get_component method usage example with argument unpacking

kwargs: GetComponentRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.get_component(**kwargs)
  1. See GetComponentRequestRequestTypeDef

get_component_version_artifact#

Gets the pre-signed URL to download a public or a Lambda component artifact.

Type annotations and code completion for boto3.client("greengrassv2").get_component_version_artifact method. boto3 documentation

# get_component_version_artifact method definition

def get_component_version_artifact(
    self,
    *,
    arn: str,
    artifactName: str,
) -> GetComponentVersionArtifactResponseTypeDef:  # (1)
    ...
  1. See GetComponentVersionArtifactResponseTypeDef
# get_component_version_artifact method usage example with argument unpacking

kwargs: GetComponentVersionArtifactRequestRequestTypeDef = {  # (1)
    "arn": ...,
    "artifactName": ...,
}

parent.get_component_version_artifact(**kwargs)
  1. See GetComponentVersionArtifactRequestRequestTypeDef

get_connectivity_info#

Retrieves connectivity information for a Greengrass core device.

Type annotations and code completion for boto3.client("greengrassv2").get_connectivity_info method.