add_layer_version_permission¶
Operation¶
add_layer_version_permission
¶
add_layer_version_permission(request: AddLayerVersionPermissionInput | AddLayerVersionPermissionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AddLayerVersionPermissionInputDict]) -> 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 |
|---|---|---|---|
request
|
AddLayerVersionPermissionInput | AddLayerVersionPermissionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[AddLayerVersionPermissionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AddLayerVersionPermissionOutput
|
An instance of |
add_layer_version_permission
async
¶
add_layer_version_permission(request: AddLayerVersionPermissionInput | AddLayerVersionPermissionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AddLayerVersionPermissionInputDict]) -> 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 |
|---|---|---|---|
request
|
AddLayerVersionPermissionInput | AddLayerVersionPermissionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[AddLayerVersionPermissionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AddLayerVersionPermissionOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
AddLayerVersionPermissionInputDict
¶
Bases: TypedDict
Dictionary form of AddLayerVersionPermissionInput.
Attributes¶
action
instance-attribute
¶
The API action that grants access to the layer. For example,
lambda:GetLayerVersion.
layer_name
instance-attribute
¶
The name or Amazon Resource Name (ARN) of the layer.
organization_id
instance-attribute
¶
organization_id: str | None
With the principal set to *, grant permission to all accounts in the
specified organization.
principal
instance-attribute
¶
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
instance-attribute
¶
revision_id: str | 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
instance-attribute
¶
An identifier that distinguishes the policy from others on the same layer version.
AddLayerVersionPermissionInput
dataclass
¶
Bases: _SerdeShape
Dataclass for AddLayerVersionPermissionInput structure.
Attributes¶
action
class-attribute
instance-attribute
¶
action: str | None = ...
The API action that grants access to the layer. For example,
lambda:GetLayerVersion.
layer_name
class-attribute
instance-attribute
¶
layer_name: str | None = ...
The name or Amazon Resource Name (ARN) of the layer.
organization_id
class-attribute
instance-attribute
¶
organization_id: str | None = ...
With the principal set to *, grant permission to all accounts in the
specified organization.
principal
class-attribute
instance-attribute
¶
principal: str | 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 = ...
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.
Output¶
AddLayerVersionPermissionOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for AddLayerVersionPermissionOutput structure.
Attributes¶
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.