GetComponentVersionArtifactCommand

Gets the pre-signed URL to download a public or a Lambda component artifact. Core devices call this operation to identify the URL that they can use to download an artifact to install.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { GreengrassV2Client, GetComponentVersionArtifactCommand } from "@aws-sdk/client-greengrassv2"; // ES Modules import
// const { GreengrassV2Client, GetComponentVersionArtifactCommand } = require("@aws-sdk/client-greengrassv2"); // CommonJS import
const client = new GreengrassV2Client(config);
const input = { // GetComponentVersionArtifactRequest
  arn: "STRING_VALUE", // required
  artifactName: "STRING_VALUE", // required
  s3EndpointType: "REGIONAL" || "GLOBAL",
  iotEndpointType: "fips" || "standard",
};
const command = new GetComponentVersionArtifactCommand(input);
const response = await client.send(command);
// { // GetComponentVersionArtifactResponse
//   preSignedUrl: "STRING_VALUE", // required
// };

GetComponentVersionArtifactCommand Input

Parameter
Type
Description
arn
Required
string | undefined

The ARN  of the component version. Specify the ARN of a public or a Lambda component version.

artifactName
Required
string | undefined

The name of the artifact.

You can use the GetComponent  operation to download the component recipe, which includes the URI of the artifact. The artifact name is the section of the URI after the scheme. For example, in the artifact URI greengrass:SomeArtifact.zip, the artifact name is SomeArtifact.zip.

iotEndpointType
IotEndpointType | undefined

Determines if the Amazon S3 URL returned is a FIPS pre-signed URL endpoint. Specify fips if you want the returned Amazon S3 pre-signed URL to point to an Amazon S3 FIPS endpoint. If you don't specify a value, the default is standard.

s3EndpointType
S3EndpointType | undefined

Specifies the endpoint to use when getting Amazon S3 pre-signed URLs.

All Amazon Web Services Regions except US East (N. Virginia) use REGIONAL in all cases. In the US East (N. Virginia) Region the default is GLOBAL, but you can change it to REGIONAL with this parameter.

GetComponentVersionArtifactCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
preSignedUrl
Required
string | undefined

The URL of the artifact.

Throws

Name
Fault
Details
AccessDeniedException
client

You don't have permission to perform the action.

InternalServerException
server

IoT Greengrass can't process your request right now. Try again later.

ResourceNotFoundException
client

The requested resource can't be found.

ThrottlingException
client

Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.

ValidationException
client

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.

GreengrassV2ServiceException
Base exception class for all service exceptions from GreengrassV2 service.