add_layer_version_permission¶
Operation¶
add_layer_version_permission
async
¶
add_layer_version_permission(input: AddLayerVersionPermissionInput, plugins: list[Plugin] | None = None) -> AddLayerVersionPermissionOutput
Adds permissions to the resource-based policy of a version of an Lambda layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all accounts in an organization, or all Amazon Web Services accounts.
To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you added it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
AddLayerVersionPermissionInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
AddLayerVersionPermissionOutput
|
An instance of |
Input¶
AddLayerVersionPermissionInput
dataclass
¶
Dataclass for AddLayerVersionPermissionInput structure.
Attributes¶
action
class-attribute
instance-attribute
¶
action: str | None = None
The API action that grants access to the layer. For example,
lambda:GetLayerVersion.
layer_name
class-attribute
instance-attribute
¶
layer_name: str | None = None
The name or Amazon Resource Name (ARN) of the layer.
organization_id
class-attribute
instance-attribute
¶
organization_id: str | None = None
With the principal set to *, grant permission to all accounts in the
specified organization.
principal
class-attribute
instance-attribute
¶
principal: str | None = None
An account ID, or * to grant layer usage permission to all accounts in
an organization, or all Amazon Web Services accounts (if
organizationId is not specified). For the last case, make sure that
you really do want all Amazon Web Services accounts to have usage
permission to this layer.
revision_id
class-attribute
instance-attribute
¶
revision_id: str | None = None
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.
statement_id
class-attribute
instance-attribute
¶
statement_id: str | None = None
An identifier that distinguishes the policy from others on the same layer version.
version_number
class-attribute
instance-attribute
¶
version_number: int | None = None
The version number.
Output¶
AddLayerVersionPermissionOutput
dataclass
¶
Dataclass for AddLayerVersionPermissionOutput structure.