libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SecretsManager.GetResourcePolicy

Description

Retrieves the JSON text of the resource-based policy document attached to the specified secret. The JSON request string input and response output displays formatted code with white space and line breaks for better readability. Submit your input as a single line JSON string.

Minimum permissions

To run this command, you must have the following permissions:

  • secretsmanager:GetResourcePolicy

Related operations

  • To attach a resource policy to a secret, use PutResourcePolicy.
  • To delete the resource-based policy attached to a secret, use DeleteResourcePolicy.
  • To list all of the currently available secrets, use ListSecrets.
Synopsis

Creating a Request

data GetResourcePolicy Source #

See: newGetResourcePolicy smart constructor.

Constructors

GetResourcePolicy' 

Fields

  • secretId :: Text

    Specifies the secret that you want to retrieve the attached resource-based policy for. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

    For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Instances

Instances details
Eq GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Read GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Show GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Generic GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Associated Types

type Rep GetResourcePolicy :: Type -> Type #

NFData GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Methods

rnf :: GetResourcePolicy -> () #

Hashable GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

ToJSON GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

AWSRequest GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Associated Types

type AWSResponse GetResourcePolicy #

ToHeaders GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

ToPath GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

ToQuery GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

type Rep GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

type Rep GetResourcePolicy = D1 ('MetaData "GetResourcePolicy" "Amazonka.SecretsManager.GetResourcePolicy" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "GetResourcePolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "secretId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse GetResourcePolicy Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

newGetResourcePolicy Source #

Create a value of GetResourcePolicy 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:secretId:GetResourcePolicy', getResourcePolicy_secretId - Specifies the secret that you want to retrieve the attached resource-based policy for. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Request Lenses

getResourcePolicy_secretId :: Lens' GetResourcePolicy Text Source #

Specifies the secret that you want to retrieve the attached resource-based policy for. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Destructuring the Response

data GetResourcePolicyResponse Source #

See: newGetResourcePolicyResponse smart constructor.

Constructors

GetResourcePolicyResponse' 

Fields

  • resourcePolicy :: Maybe Text

    A JSON-formatted string that describes the permissions that are associated with the attached secret. These permissions are combined with any permissions that are associated with the user or role that attempts to access this secret. The combined permissions specify who can access the secret and what actions they can perform. For more information, see Authentication and Access Control for Amazon Web Services Secrets Manager in the Amazon Web Services Secrets Manager User Guide.

  • arn :: Maybe Text

    The ARN of the secret that the resource-based policy was retrieved for.

  • name :: Maybe Text

    The friendly name of the secret that the resource-based policy was retrieved for.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Read GetResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Show GetResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Generic GetResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

Associated Types

type Rep GetResourcePolicyResponse :: Type -> Type #

NFData GetResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

type Rep GetResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetResourcePolicy

type Rep GetResourcePolicyResponse = D1 ('MetaData "GetResourcePolicyResponse" "Amazonka.SecretsManager.GetResourcePolicy" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "GetResourcePolicyResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resourcePolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "arn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetResourcePolicyResponse Source #

Create a value of GetResourcePolicyResponse 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:resourcePolicy:GetResourcePolicyResponse', getResourcePolicyResponse_resourcePolicy - A JSON-formatted string that describes the permissions that are associated with the attached secret. These permissions are combined with any permissions that are associated with the user or role that attempts to access this secret. The combined permissions specify who can access the secret and what actions they can perform. For more information, see Authentication and Access Control for Amazon Web Services Secrets Manager in the Amazon Web Services Secrets Manager User Guide.

$sel:arn:GetResourcePolicyResponse', getResourcePolicyResponse_arn - The ARN of the secret that the resource-based policy was retrieved for.

$sel:name:GetResourcePolicyResponse', getResourcePolicyResponse_name - The friendly name of the secret that the resource-based policy was retrieved for.

$sel:httpStatus:GetResourcePolicyResponse', getResourcePolicyResponse_httpStatus - The response's http status code.

Response Lenses

getResourcePolicyResponse_resourcePolicy :: Lens' GetResourcePolicyResponse (Maybe Text) Source #

A JSON-formatted string that describes the permissions that are associated with the attached secret. These permissions are combined with any permissions that are associated with the user or role that attempts to access this secret. The combined permissions specify who can access the secret and what actions they can perform. For more information, see Authentication and Access Control for Amazon Web Services Secrets Manager in the Amazon Web Services Secrets Manager User Guide.

getResourcePolicyResponse_arn :: Lens' GetResourcePolicyResponse (Maybe Text) Source #

The ARN of the secret that the resource-based policy was retrieved for.

getResourcePolicyResponse_name :: Lens' GetResourcePolicyResponse (Maybe Text) Source #

The friendly name of the secret that the resource-based policy was retrieved for.