libZSservicesZSamazonka-greengrassv2ZSamazonka-greengrassv2
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.GreengrassV2.CreateComponentVersion

Description

Creates a component. Components are software that run on Greengrass core devices. After you develop and test a component on your core device, you can use this operation to upload your component to IoT Greengrass. Then, you can deploy the component to other core devices.

You can use this operation to do the following:

  • Create components from recipes

    Create a component from a recipe, which is a file that defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For more information, see IoT Greengrass component recipe reference in the IoT Greengrass V2 Developer Guide.

    To create a component from a recipe, specify inlineRecipe when you call this operation.

  • Create components from Lambda functions

    Create a component from an Lambda function that runs on IoT Greengrass. This creates a recipe and artifacts from the Lambda function's deployment package. You can use this operation to migrate Lambda functions from IoT Greengrass V1 to IoT Greengrass V2.

    This function only accepts Lambda functions that use the following runtimes:

    • Python 2.7 – python2.7
    • Python 3.7 – python3.7
    • Python 3.8 – python3.8
    • Java 8 – java8
    • Node.js 10 – nodejs10.x
    • Node.js 12 – nodejs12.x

    To create a component from a Lambda function, specify lambdaFunction when you call this operation.

Synopsis

Creating a Request

data CreateComponentVersion Source #

See: newCreateComponentVersion smart constructor.

Constructors

CreateComponentVersion' 

Fields

  • clientToken :: Maybe Text

    A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent. Idempotency means that the request is successfully processed only once, even if you send the request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.

  • inlineRecipe :: Maybe Base64

    The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.

    You must specify either inlineRecipe or lambdaFunction.

  • lambdaFunction :: Maybe LambdaFunctionRecipeSource

    The parameters to create a component from a Lambda function.

    You must specify either inlineRecipe or lambdaFunction.

  • tags :: Maybe (HashMap Text Text)

    A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.

Instances

Instances details
Eq CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Read CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Show CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Generic CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Associated Types

type Rep CreateComponentVersion :: Type -> Type #

NFData CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Methods

rnf :: CreateComponentVersion -> () #

Hashable CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

ToJSON CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

AWSRequest CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Associated Types

type AWSResponse CreateComponentVersion #

ToHeaders CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

ToPath CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

ToQuery CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

type Rep CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

type Rep CreateComponentVersion = D1 ('MetaData "CreateComponentVersion" "Amazonka.GreengrassV2.CreateComponentVersion" "libZSservicesZSamazonka-greengrassv2ZSamazonka-greengrassv2" 'False) (C1 ('MetaCons "CreateComponentVersion'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "inlineRecipe") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Base64))) :*: (S1 ('MetaSel ('Just "lambdaFunction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LambdaFunctionRecipeSource)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))))))
type AWSResponse CreateComponentVersion Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

newCreateComponentVersion :: CreateComponentVersion Source #

Create a value of CreateComponentVersion with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:clientToken:CreateComponentVersion', createComponentVersion_clientToken - A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent. Idempotency means that the request is successfully processed only once, even if you send the request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.

$sel:inlineRecipe:CreateComponentVersion', createComponentVersion_inlineRecipe - The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.

You must specify either inlineRecipe or lambdaFunction.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

$sel:lambdaFunction:CreateComponentVersion', createComponentVersion_lambdaFunction - The parameters to create a component from a Lambda function.

You must specify either inlineRecipe or lambdaFunction.

$sel:tags:CreateComponentVersion', createComponentVersion_tags - A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.

Request Lenses

createComponentVersion_clientToken :: Lens' CreateComponentVersion (Maybe Text) Source #

A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent. Idempotency means that the request is successfully processed only once, even if you send the request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.

createComponentVersion_inlineRecipe :: Lens' CreateComponentVersion (Maybe ByteString) Source #

The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.

You must specify either inlineRecipe or lambdaFunction.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

createComponentVersion_lambdaFunction :: Lens' CreateComponentVersion (Maybe LambdaFunctionRecipeSource) Source #

The parameters to create a component from a Lambda function.

You must specify either inlineRecipe or lambdaFunction.

createComponentVersion_tags :: Lens' CreateComponentVersion (Maybe (HashMap Text Text)) Source #

A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.

Destructuring the Response

data CreateComponentVersionResponse Source #

See: newCreateComponentVersionResponse smart constructor.

Constructors

CreateComponentVersionResponse' 

Fields

Instances

Instances details
Eq CreateComponentVersionResponse Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Read CreateComponentVersionResponse Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Show CreateComponentVersionResponse Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Generic CreateComponentVersionResponse Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

Associated Types

type Rep CreateComponentVersionResponse :: Type -> Type #

NFData CreateComponentVersionResponse Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

type Rep CreateComponentVersionResponse Source # 
Instance details

Defined in Amazonka.GreengrassV2.CreateComponentVersion

type Rep CreateComponentVersionResponse = D1 ('MetaData "CreateComponentVersionResponse" "Amazonka.GreengrassV2.CreateComponentVersion" "libZSservicesZSamazonka-greengrassv2ZSamazonka-greengrassv2" 'False) (C1 ('MetaCons "CreateComponentVersionResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "arn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "componentName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "componentVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "creationTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 POSIX) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CloudComponentStatus)))))

newCreateComponentVersionResponse Source #

Create a value of CreateComponentVersionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:arn:CreateComponentVersionResponse', createComponentVersionResponse_arn - The ARN of the component version.

$sel:httpStatus:CreateComponentVersionResponse', createComponentVersionResponse_httpStatus - The response's http status code.

$sel:componentName:CreateComponentVersionResponse', createComponentVersionResponse_componentName - The name of the component.

$sel:componentVersion:CreateComponentVersionResponse', createComponentVersionResponse_componentVersion - The version of the component.

$sel:creationTimestamp:CreateComponentVersionResponse', createComponentVersionResponse_creationTimestamp - The time at which the component was created, expressed in ISO 8601 format.

$sel:status:CreateComponentVersionResponse', createComponentVersionResponse_status - The status of the component version in IoT Greengrass V2. This status is different from the status of the component on a core device.

Response Lenses

createComponentVersionResponse_creationTimestamp :: Lens' CreateComponentVersionResponse UTCTime Source #

The time at which the component was created, expressed in ISO 8601 format.

createComponentVersionResponse_status :: Lens' CreateComponentVersionResponse CloudComponentStatus Source #

The status of the component version in IoT Greengrass V2. This status is different from the status of the component on a core device.