404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.188.190.28: ~ $
**Example 1: To create a component version from a recipe**

The following ``create-component-version`` example creates a version of a Hello World component from a recipe file. ::

    aws greengrassv2 create-component-version \
        --inline-recipe fileb://com.example.HelloWorld-1.0.0.json

Contents of ``com.example.HelloWorld-1.0.0.json``::

    {
        "RecipeFormatVersion": "2020-01-25",
        "ComponentName": "com.example.HelloWorld",
        "ComponentVersion": "1.0.0",
        "ComponentDescription": "My first AWS IoT Greengrass component.",
        "ComponentPublisher": "Amazon",
        "ComponentConfiguration": {
            "DefaultConfiguration": {
                "Message": "world"
            }
        },
        "Manifests": [
            {
                "Platform": {
                    "os": "linux"
                },
                "Lifecycle": {
                    "Run": "echo 'Hello {configuration:/Message}'"
                }
            }
        ]
    }

Output::

    {
        "arn": "arn:aws:greengrass:us-west-2:123456789012:components:com.example.HelloWorld:versions:1.0.0",
        "componentName": "com.example.HelloWorld",
        "componentVersion": "1.0.0",
        "creationTimestamp": "2021-01-07T16:24:33.650000-08:00",
        "status": {
            "componentState": "REQUESTED",
            "message": "NONE",
            "errors": {}
        }
    }

For more information, see `Create custom components <https://docs.aws.amazon.com/greengrass/v2/developerguide/create-components.html>`__ and `Upload components to deploy <https://docs.aws.amazon.com/greengrass/v2/developerguide/upload-components.html>`__ in the *AWS IoT Greengrass V2 Developer Guide*.

**Example 2: To create a component version from an AWS Lambda function**

The following ``create-component-version`` example creates a version of a Hello World component from an AWS Lambda function. ::

    aws greengrassv2 create-component-version \
        --cli-input-json file://lambda-function-component.json

Contents of ``lambda-function-component.json``::

    {
        "lambdaFunction": {
            "lambdaArn": "arn:aws:lambda:us-west-2:123456789012:function:HelloWorldPythonLambda:1",
            "componentName": "com.example.HelloWorld",
            "componentVersion": "1.0.0",
            "componentLambdaParameters": {
                "eventSources": [
                    {
                        "topic": "hello/world/+",
                        "type": "IOT_CORE"
                    }
                ]
            }
        }
    }

Output::

    {
        "arn": "arn:aws:greengrass:us-west-2:123456789012:components:com.example.HelloWorld:versions:1.0.0",
        "componentName": "com.example.HelloWorld",
        "componentVersion": "1.0.0",
        "creationTimestamp": "2021-01-07T17:05:27.347000-08:00",
        "status": {
            "componentState": "REQUESTED",
            "message": "NONE",
            "errors": {}
        }
    }

For more information, see `Run AWS Lambda functions <https://docs.aws.amazon.com/greengrass/v2/developerguide/run-lambda-functions.html>`__ in the *AWS IoT Greengrass V2 Developer Guide*.

Filemanager

Name Type Size Permission Actions
associate-service-role-to-account.rst File 618 B 0644
batch-associate-client-device-with-core-device.rst File 637 B 0644
batch-disassociate-client-device-from-core-device.rst File 649 B 0644
cancel-deployment.rst File 471 B 0644
create-component-version.rst File 3.19 KB 0644
create-deployment.rst File 3.39 KB 0644
delete-component.rst File 481 B 0644
delete-core-device.rst File 503 B 0644
describe-component.rst File 1.11 KB 0644
disassociate-service-role-from-account.rst File 563 B 0644
get-component-version-artifact.rst File 1.04 KB 0644
get-component.rst File 2.98 KB 0644
get-connectivity-info.rst File 798 B 0644
get-core-device.rst File 708 B 0644
get-deployment.rst File 1.84 KB 0644
get-service-role-for-account.rst File 618 B 0644
list-client-devices-associated-with-core-device.rst File 920 B 0644
list-component-versions.rst File 1.02 KB 0644
list-components.rst File 1.28 KB 0644
list-core-devices.rst File 659 B 0644
list-deployments.rst File 1.38 KB 0644
list-effective-deployments.rst File 1.76 KB 0644
list-installed-components.rst File 971 B 0644
list-tags-for-resource.rst File 556 B 0644
tag-resource.rst File 595 B 0644
untag-resource.rst File 520 B 0644
update-connectivity-info.rst File 1006 B 0644