Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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.
Synopsis
- data AddLayerVersionPermission = AddLayerVersionPermission' {
- revisionId :: Maybe Text
- organizationId :: Maybe Text
- layerName :: Text
- versionNumber :: Integer
- statementId :: Text
- action :: Text
- principal :: Text
- newAddLayerVersionPermission :: Text -> Integer -> Text -> Text -> Text -> AddLayerVersionPermission
- addLayerVersionPermission_revisionId :: Lens' AddLayerVersionPermission (Maybe Text)
- addLayerVersionPermission_organizationId :: Lens' AddLayerVersionPermission (Maybe Text)
- addLayerVersionPermission_layerName :: Lens' AddLayerVersionPermission Text
- addLayerVersionPermission_versionNumber :: Lens' AddLayerVersionPermission Integer
- addLayerVersionPermission_statementId :: Lens' AddLayerVersionPermission Text
- addLayerVersionPermission_action :: Lens' AddLayerVersionPermission Text
- addLayerVersionPermission_principal :: Lens' AddLayerVersionPermission Text
- data AddLayerVersionPermissionResponse = AddLayerVersionPermissionResponse' {
- statement :: Maybe Text
- revisionId :: Maybe Text
- httpStatus :: Int
- newAddLayerVersionPermissionResponse :: Int -> AddLayerVersionPermissionResponse
- addLayerVersionPermissionResponse_statement :: Lens' AddLayerVersionPermissionResponse (Maybe Text)
- addLayerVersionPermissionResponse_revisionId :: Lens' AddLayerVersionPermissionResponse (Maybe Text)
- addLayerVersionPermissionResponse_httpStatus :: Lens' AddLayerVersionPermissionResponse Int
Creating a Request
data AddLayerVersionPermission Source #
See: newAddLayerVersionPermission
smart constructor.
AddLayerVersionPermission' | |
|
Instances
newAddLayerVersionPermission Source #
Create a value of AddLayerVersionPermission
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:revisionId:AddLayerVersionPermission'
, addLayerVersionPermission_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.
$sel:organizationId:AddLayerVersionPermission'
, addLayerVersionPermission_organizationId
- With the principal set to *
, grant permission to all accounts in the
specified organization.
$sel:layerName:AddLayerVersionPermission'
, addLayerVersionPermission_layerName
- The name or Amazon Resource Name (ARN) of the layer.
$sel:versionNumber:AddLayerVersionPermission'
, addLayerVersionPermission_versionNumber
- The version number.
$sel:statementId:AddLayerVersionPermission'
, addLayerVersionPermission_statementId
- An identifier that distinguishes the policy from others on the same
layer version.
$sel:action:AddLayerVersionPermission'
, addLayerVersionPermission_action
- The API action that grants access to the layer. For example,
lambda:GetLayerVersion
.
$sel:principal:AddLayerVersionPermission'
, addLayerVersionPermission_principal
- 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.
Request Lenses
addLayerVersionPermission_revisionId :: Lens' AddLayerVersionPermission (Maybe Text) Source #
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.
addLayerVersionPermission_organizationId :: Lens' AddLayerVersionPermission (Maybe Text) Source #
With the principal set to *
, grant permission to all accounts in the
specified organization.
addLayerVersionPermission_layerName :: Lens' AddLayerVersionPermission Text Source #
The name or Amazon Resource Name (ARN) of the layer.
addLayerVersionPermission_versionNumber :: Lens' AddLayerVersionPermission Integer Source #
The version number.
addLayerVersionPermission_statementId :: Lens' AddLayerVersionPermission Text Source #
An identifier that distinguishes the policy from others on the same layer version.
addLayerVersionPermission_action :: Lens' AddLayerVersionPermission Text Source #
The API action that grants access to the layer. For example,
lambda:GetLayerVersion
.
addLayerVersionPermission_principal :: Lens' AddLayerVersionPermission Text Source #
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.
Destructuring the Response
data AddLayerVersionPermissionResponse Source #
See: newAddLayerVersionPermissionResponse
smart constructor.
AddLayerVersionPermissionResponse' | |
|
Instances
newAddLayerVersionPermissionResponse Source #
Create a value of AddLayerVersionPermissionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:statement:AddLayerVersionPermissionResponse'
, addLayerVersionPermissionResponse_statement
- The permission statement.
$sel:revisionId:AddLayerVersionPermission'
, addLayerVersionPermissionResponse_revisionId
- A unique identifier for the current revision of the policy.
$sel:httpStatus:AddLayerVersionPermissionResponse'
, addLayerVersionPermissionResponse_httpStatus
- The response's http status code.
Response Lenses
addLayerVersionPermissionResponse_statement :: Lens' AddLayerVersionPermissionResponse (Maybe Text) Source #
The permission statement.
addLayerVersionPermissionResponse_revisionId :: Lens' AddLayerVersionPermissionResponse (Maybe Text) Source #
A unique identifier for the current revision of the policy.
addLayerVersionPermissionResponse_httpStatus :: Lens' AddLayerVersionPermissionResponse Int Source #
The response's http status code.