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: BlobTypeDef = ...,
    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, ComponentDeploymentSpecificationUnionTypeDef] = ...,  # (1)
    iotJobConfiguration: DeploymentIoTJobConfigurationTypeDef = ...,  # (2)
    deploymentPolicies: DeploymentPoliciesTypeDef = ...,  # (3)
    parentTargetArn: str = ...,
    tags: Mapping[str, str] = ...,
    clientToken: str = ...,
) -> CreateDeploymentResponseTypeDef:  # (4)
    ...
  1. See ComponentDeploymentSpecificationTypeDef ComponentDeploymentSpecificationOutputTypeDef
  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,
    s3EndpointType: S3EndpointTypeType = ...,  # (1)
    iotEndpointType: IotEndpointTypeType = ...,  # (2)
) -> GetComponentVersionArtifactResponseTypeDef:  # (3)
    ...
  1. See S3EndpointTypeType
  2. See IotEndpointTypeType
  3. 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. boto3 documentation

# get_connectivity_info method definition

def get_connectivity_info(
    self,
    *,
    thingName: str,
) -> GetConnectivityInfoResponseTypeDef:  # (1)
    ...
  1. See GetConnectivityInfoResponseTypeDef
# get_connectivity_info method usage example with argument unpacking

kwargs: GetConnectivityInfoRequestRequestTypeDef = {  # (1)
    "thingName": ...,
}

parent.get_connectivity_info(**kwargs)
  1. See GetConnectivityInfoRequestRequestTypeDef

get_core_device#

Retrieves metadata for a Greengrass core device.

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

# get_core_device method definition

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

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

parent.get_core_device(**kwargs)
  1. See GetCoreDeviceRequestRequestTypeDef

get_deployment#

Gets a deployment.

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

# get_deployment method definition

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

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

parent.get_deployment(**kwargs)
  1. See GetDeploymentRequestRequestTypeDef

get_service_role_for_account#

Gets the service role associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.

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

# get_service_role_for_account method definition

def get_service_role_for_account(
    self,
) -> GetServiceRoleForAccountResponseTypeDef:  # (1)
    ...
  1. See GetServiceRoleForAccountResponseTypeDef

list_client_devices_associated_with_core_device#

Retrieves a paginated list of client devices that are associated with a core device.

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

# list_client_devices_associated_with_core_device method definition

def list_client_devices_associated_with_core_device(
    self,
    *,
    coreDeviceThingName: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListClientDevicesAssociatedWithCoreDeviceResponseTypeDef:  # (1)
    ...
  1. See ListClientDevicesAssociatedWithCoreDeviceResponseTypeDef
# list_client_devices_associated_with_core_device method usage example with argument unpacking

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

parent.list_client_devices_associated_with_core_device(**kwargs)
  1. See ListClientDevicesAssociatedWithCoreDeviceRequestRequestTypeDef

list_component_versions#

Retrieves a paginated list of all versions for a component.

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

# list_component_versions method definition

def list_component_versions(
    self,
    *,
    arn: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListComponentVersionsResponseTypeDef:  # (1)
    ...
  1. See ListComponentVersionsResponseTypeDef
# list_component_versions method usage example with argument unpacking

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

parent.list_component_versions(**kwargs)
  1. See ListComponentVersionsRequestRequestTypeDef

list_components#

Retrieves a paginated list of component summaries.

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

# list_components method definition

def list_components(
    self,
    *,
    scope: ComponentVisibilityScopeType = ...,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListComponentsResponseTypeDef:  # (2)
    ...
  1. See ComponentVisibilityScopeType
  2. See ListComponentsResponseTypeDef
# list_components method usage example with argument unpacking

kwargs: ListComponentsRequestRequestTypeDef = {  # (1)
    "scope": ...,
}

parent.list_components(**kwargs)
  1. See ListComponentsRequestRequestTypeDef

list_core_devices#

Retrieves a paginated list of Greengrass core devices.

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

# list_core_devices method definition

def list_core_devices(
    self,
    *,
    thingGroupArn: str = ...,
    status: CoreDeviceStatusType = ...,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListCoreDevicesResponseTypeDef:  # (2)
    ...
  1. See CoreDeviceStatusType
  2. See ListCoreDevicesResponseTypeDef
# list_core_devices method usage example with argument unpacking

kwargs: ListCoreDevicesRequestRequestTypeDef = {  # (1)
    "thingGroupArn": ...,
}

parent.list_core_devices(**kwargs)
  1. See ListCoreDevicesRequestRequestTypeDef

list_deployments#

Retrieves a paginated list of deployments.

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

# list_deployments method definition

def list_deployments(
    self,
    *,
    targetArn: str = ...,
    historyFilter: DeploymentHistoryFilterType = ...,  # (1)
    parentTargetArn: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListDeploymentsResponseTypeDef:  # (2)
    ...
  1. See DeploymentHistoryFilterType
  2. See ListDeploymentsResponseTypeDef
# list_deployments method usage example with argument unpacking

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

parent.list_deployments(**kwargs)
  1. See ListDeploymentsRequestRequestTypeDef

list_effective_deployments#

Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.

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

# list_effective_deployments method definition

def list_effective_deployments(
    self,
    *,
    coreDeviceThingName: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListEffectiveDeploymentsResponseTypeDef:  # (1)
    ...
  1. See ListEffectiveDeploymentsResponseTypeDef
# list_effective_deployments method usage example with argument unpacking

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

parent.list_effective_deployments(**kwargs)
  1. See ListEffectiveDeploymentsRequestRequestTypeDef

list_installed_components#

Retrieves a paginated list of the components that a Greengrass core device runs.

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

# list_installed_components method definition

def list_installed_components(
    self,
    *,
    coreDeviceThingName: str,
    maxResults: int = ...,
    nextToken: str = ...,
    topologyFilter: InstalledComponentTopologyFilterType = ...,  # (1)
) -> ListInstalledComponentsResponseTypeDef:  # (2)
    ...
  1. See InstalledComponentTopologyFilterType
  2. See ListInstalledComponentsResponseTypeDef
# list_installed_components method usage example with argument unpacking

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

parent.list_installed_components(**kwargs)
  1. See ListInstalledComponentsRequestRequestTypeDef

list_tags_for_resource#

Retrieves the list of tags for an IoT Greengrass resource.

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

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

resolve_component_candidates#

Retrieves a list of components that meet the component, version, and platform requirements of a deployment.

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

# resolve_component_candidates method definition

def resolve_component_candidates(
    self,
    *,
    platform: ComponentPlatformTypeDef = ...,  # (1)
    componentCandidates: Sequence[ComponentCandidateTypeDef] = ...,  # (2)
) -> ResolveComponentCandidatesResponseTypeDef:  # (3)
    ...
  1. See ComponentPlatformTypeDef
  2. See ComponentCandidateTypeDef
  3. See ResolveComponentCandidatesResponseTypeDef
# resolve_component_candidates method usage example with argument unpacking

kwargs: ResolveComponentCandidatesRequestRequestTypeDef = {  # (1)
    "platform": ...,
}

parent.resolve_component_candidates(**kwargs)
  1. See ResolveComponentCandidatesRequestRequestTypeDef

tag_resource#

Adds tags to an IoT Greengrass resource.

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

# tag_resource method definition

def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes a tag from an IoT Greengrass resource.

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

# untag_resource method definition

def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_connectivity_info#

Updates connectivity information for a Greengrass core device.

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

# update_connectivity_info method definition

def update_connectivity_info(
    self,
    *,
    thingName: str,
    connectivityInfo: Sequence[ConnectivityInfoTypeDef],  # (1)
) -> UpdateConnectivityInfoResponseTypeDef:  # (2)
    ...
  1. See ConnectivityInfoTypeDef
  2. See UpdateConnectivityInfoResponseTypeDef
# update_connectivity_info method usage example with argument unpacking

kwargs: UpdateConnectivityInfoRequestRequestTypeDef = {  # (1)
    "thingName": ...,
    "connectivityInfo": ...,
}

parent.update_connectivity_info(**kwargs)
  1. See UpdateConnectivityInfoRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("greengrassv2").get_paginator method with overloads.