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.GetPolicy

Description

Returns the resource-based IAM policy for a function, version, or alias.

Synopsis

Creating a Request

data GetPolicy Source #

See: newGetPolicy smart constructor.

Constructors

GetPolicy' 

Fields

  • qualifier :: Maybe Text

    Specify a version or alias to get the policy for that resource.

  • functionName :: Text

    The name of the Lambda function, version, or alias.

    Name formats

    • Function namemy-function (name-only), my-function:v1 (with alias).
    • Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function.
    • Partial ARN123456789012:function:my-function.

    You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

Instances

Instances details
ToHeaders GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Methods

toHeaders :: GetPolicy -> [Header] #

ToPath GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

ToQuery GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

AWSRequest GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Associated Types

type AWSResponse GetPolicy #

Generic GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Associated Types

type Rep GetPolicy :: Type -> Type #

Read GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Show GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

NFData GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Methods

rnf :: GetPolicy -> () #

Eq GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Hashable GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

type AWSResponse GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

type Rep GetPolicy Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

type Rep GetPolicy = D1 ('MetaData "GetPolicy" "Amazonka.Lambda.GetPolicy" "amazonka-lambda-2.0-FcjxCCKaCGK94C2lDO9alC" 'False) (C1 ('MetaCons "GetPolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "qualifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "functionName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newGetPolicy Source #

Arguments

:: Text

GetPolicy

-> GetPolicy 

Create a value of GetPolicy 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:qualifier:GetPolicy', getPolicy_qualifier - Specify a version or alias to get the policy for that resource.

GetPolicy, getPolicy_functionName - The name of the Lambda function, version, or alias.

Name formats

  • Function namemy-function (name-only), my-function:v1 (with alias).
  • Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function.
  • Partial ARN123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

Request Lenses

getPolicy_qualifier :: Lens' GetPolicy (Maybe Text) Source #

Specify a version or alias to get the policy for that resource.

getPolicy_functionName :: Lens' GetPolicy Text Source #

The name of the Lambda function, version, or alias.

Name formats

  • Function namemy-function (name-only), my-function:v1 (with alias).
  • Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function.
  • Partial ARN123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

Destructuring the Response

data GetPolicyResponse Source #

See: newGetPolicyResponse smart constructor.

Constructors

GetPolicyResponse' 

Fields

Instances

Instances details
Generic GetPolicyResponse Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Associated Types

type Rep GetPolicyResponse :: Type -> Type #

Read GetPolicyResponse Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Show GetPolicyResponse Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

NFData GetPolicyResponse Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

Methods

rnf :: GetPolicyResponse -> () #

Eq GetPolicyResponse Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

type Rep GetPolicyResponse Source # 
Instance details

Defined in Amazonka.Lambda.GetPolicy

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

newGetPolicyResponse Source #

Create a value of GetPolicyResponse 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:policy:GetPolicyResponse', getPolicyResponse_policy - The resource-based policy.

GetPolicyResponse, getPolicyResponse_revisionId - A unique identifier for the current revision of the policy.

$sel:httpStatus:GetPolicyResponse', getPolicyResponse_httpStatus - The response's http status code.

Response Lenses

getPolicyResponse_revisionId :: Lens' GetPolicyResponse (Maybe Text) Source #

A unique identifier for the current revision of the policy.

getPolicyResponse_httpStatus :: Lens' GetPolicyResponse Int Source #

The response's http status code.