Skip to main content

layer_version_permissions

Creates, updates, deletes or gets a layer_version_permission resource or lists layer_version_permissions in a region

Overview

Namelayer_version_permissions
TypeResource
DescriptionSchema for Lambda LayerVersionPermission
Idawscc.lambda.layer_version_permissions

Fields

NameDatatypeDescription
idstringID generated by service
actionstringThe API action that grants access to the layer.
layer_version_arnstringThe name or Amazon Resource Name (ARN) of the layer.
organization_idstringWith the principal set to *, grant permission to all accounts in the specified organization.
principalstringAn account ID, or * to grant layer usage permission to all accounts in an organization, or all AWS accounts (if organizationId is not specified).
regionstringAWS region.

For more information, see AWS::Lambda::LayerVersionPermission.

Methods

NameResourceAccessible byRequired Params
create_resourcelayer_version_permissionsINSERTLayerVersionArn, Action, Principal, region
delete_resourcelayer_version_permissionsDELETEIdentifier, region
list_resourceslayer_version_permissions_list_onlySELECTregion
get_resourcelayer_version_permissionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual layer_version_permission.

SELECT
region,
id,
action,
layer_version_arn,
organization_id,
principal
FROM awscc.lambda.layer_version_permissions
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new layer_version_permission resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.lambda.layer_version_permissions (
Action,
LayerVersionArn,
Principal,
region
)
SELECT
'{{ action }}',
'{{ layer_version_arn }}',
'{{ principal }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.lambda.layer_version_permissions
WHERE
Identifier = '{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the layer_version_permissions resource, the following permissions are required:

lambda:AddLayerVersionPermission