lambda_add_layer_version_permission: Adds permissions to the resource-based policy of a version of...

Description Usage Arguments Value Request syntax Examples

View source: R/lambda_operations.R

Description

Adds permissions to the resource-based policy of a version of an AWS Lambda layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.

To revoke permission, call remove_layer_version_permission with the statement ID that you specified when you added it.

Usage

1
2
lambda_add_layer_version_permission(LayerName, VersionNumber,
  StatementId, Action, Principal, OrganizationId, RevisionId)

Arguments

LayerName

[required] The name or Amazon Resource Name (ARN) of the layer.

VersionNumber

[required] The version number.

StatementId

[required] An identifier that distinguishes the policy from others on the same layer version.

Action

[required] The API action that grants access to the layer. For example, lambda:GetLayerVersion.

Principal

[required] An account ID, or * to grant permission to all AWS accounts.

OrganizationId

With the principal set to *, grant permission to all accounts in the specified organization.

RevisionId

Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.

Value

A list with the following syntax:

1
2
3
4
list(
  Statement = "string",
  RevisionId = "string"
)

Request syntax

1
2
3
4
5
6
7
8
9
svc$add_layer_version_permission(
  LayerName = "string",
  VersionNumber = 123,
  StatementId = "string",
  Action = "string",
  Principal = "string",
  OrganizationId = "string",
  RevisionId = "string"
)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# The following example grants permission for the account 223456789012 to
# use version 1 of a layer named my-layer.
svc$add_layer_version_permission(
  Action = "lambda:GetLayerVersion",
  LayerName = "my-layer",
  Principal = "223456789012",
  StatementId = "xaccount",
  VersionNumber = 1L
)

## End(Not run)

paws.compute documentation built on March 7, 2021, 5:10 p.m.