amazonka-lambda-2.0: Amazon Lambda SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Lambda.AddLayerVersionPermission

Description

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

Creating a Request

data AddLayerVersionPermission Source #

See: newAddLayerVersionPermission smart constructor.

Constructors

AddLayerVersionPermission' 

Fields

  • organizationId :: Maybe Text

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

  • revisionId :: Maybe Text

    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.

  • layerName :: Text

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

  • versionNumber :: Integer

    The version number.

  • statementId :: Text

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

  • action :: Text

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

  • principal :: Text

    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.

Instances

Instances details
ToJSON AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

ToHeaders AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

ToPath AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

ToQuery AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

AWSRequest AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Generic AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Associated Types

type Rep AddLayerVersionPermission :: Type -> Type #

Read AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Show AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

NFData AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Eq AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Hashable AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

type AWSResponse AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

type Rep AddLayerVersionPermission Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

type Rep AddLayerVersionPermission = D1 ('MetaData "AddLayerVersionPermission" "Amazonka.Lambda.AddLayerVersionPermission" "amazonka-lambda-2.0-FcjxCCKaCGK94C2lDO9alC" 'False) (C1 ('MetaCons "AddLayerVersionPermission'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "organizationId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "revisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "layerName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "versionNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Just "statementId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "action") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "principal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

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:organizationId:AddLayerVersionPermission', addLayerVersionPermission_organizationId - With the principal set to *, grant permission to all accounts in the specified organization.

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.

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_organizationId :: Lens' AddLayerVersionPermission (Maybe Text) Source #

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

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_layerName :: Lens' AddLayerVersionPermission Text Source #

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

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.

Constructors

AddLayerVersionPermissionResponse' 

Fields

Instances

Instances details
Generic AddLayerVersionPermissionResponse Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Associated Types

type Rep AddLayerVersionPermissionResponse :: Type -> Type #

Read AddLayerVersionPermissionResponse Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Show AddLayerVersionPermissionResponse Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

NFData AddLayerVersionPermissionResponse Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

Eq AddLayerVersionPermissionResponse Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

type Rep AddLayerVersionPermissionResponse Source # 
Instance details

Defined in Amazonka.Lambda.AddLayerVersionPermission

type Rep AddLayerVersionPermissionResponse = D1 ('MetaData "AddLayerVersionPermissionResponse" "Amazonka.Lambda.AddLayerVersionPermission" "amazonka-lambda-2.0-FcjxCCKaCGK94C2lDO9alC" 'False) (C1 ('MetaCons "AddLayerVersionPermissionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "revisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "statement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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:

AddLayerVersionPermission, addLayerVersionPermissionResponse_revisionId - A unique identifier for the current revision of the policy.

$sel:statement:AddLayerVersionPermissionResponse', addLayerVersionPermissionResponse_statement - The permission statement.

$sel:httpStatus:AddLayerVersionPermissionResponse', addLayerVersionPermissionResponse_httpStatus - The response's http status code.

Response Lenses

addLayerVersionPermissionResponse_revisionId :: Lens' AddLayerVersionPermissionResponse (Maybe Text) Source #

A unique identifier for the current revision of the policy.