layer_version_permissions
Creates, updates, deletes or gets a layer_version_permission
resource or lists layer_version_permissions
in a region
Overview
Name | layer_version_permissions |
Type | Resource |
Description | Schema for Lambda LayerVersionPermission |
Id | aws.lambda.layer_version_permissions |
Fields
Name | Datatype | Description |
---|---|---|
id | string | ID generated by service |
action | string | The API action that grants access to the layer. |
layer_version_arn | string | The name or Amazon Resource Name (ARN) of the layer. |
organization_id | string | With the principal set to *, grant permission to all accounts in the specified organization. |
principal | string | An account ID, or * to grant layer usage permission to all accounts in an organization, or all AWS accounts (if organizationId is not specified). |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | LayerVersionArn, Action, Principal, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all layer_version_permissions
in a region.
SELECT
region,
id,
action,
layer_version_arn,
organization_id,
principal
FROM aws.lambda.layer_version_permissions
WHERE region = 'us-east-1';
Gets all properties from an individual layer_version_permission
.
SELECT
region,
id,
action,
layer_version_arn,
organization_id,
principal
FROM aws.lambda.layer_version_permissions
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new layer_version_permission
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lambda.layer_version_permissions (
Action,
LayerVersionArn,
Principal,
region
)
SELECT
'{{ Action }}',
'{{ LayerVersionArn }}',
'{{ Principal }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lambda.layer_version_permissions (
Action,
LayerVersionArn,
OrganizationId,
Principal,
region
)
SELECT
'{{ Action }}',
'{{ LayerVersionArn }}',
'{{ OrganizationId }}',
'{{ Principal }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: layer_version_permission
props:
- name: Action
value: '{{ Action }}'
- name: LayerVersionArn
value: '{{ LayerVersionArn }}'
- name: OrganizationId
value: '{{ OrganizationId }}'
- name: Principal
value: '{{ Principal }}'
DELETE
example
/*+ delete */
DELETE FROM aws.lambda.layer_version_permissions
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the layer_version_permissions
resource, the following permissions are required:
Create
lambda:AddLayerVersionPermission
Read
lambda:GetLayerVersionPolicy
Delete
lambda:GetLayerVersionPolicy,
lambda:RemoveLayerVersionPermission
List
lambda:GetLayerVersionPolicy