amazonka-xray-2.0: Amazon X-Ray 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.XRay.PutResourcePolicy

Description

Sets the resource policy to grant one or more Amazon Web Services services and accounts permissions to access X-Ray. Each resource policy will be associated with a specific Amazon Web Services account. Each Amazon Web Services account can have a maximum of 5 resource policies, and each policy name must be unique within that account. The maximum size of each resource policy is 5KB.

Synopsis

Creating a Request

data PutResourcePolicy Source #

See: newPutResourcePolicy smart constructor.

Constructors

PutResourcePolicy' 

Fields

  • bypassPolicyLockoutCheck :: Maybe Bool

    A flag to indicate whether to bypass the resource policy lockout safety check.

    Setting this value to true increases the risk that the policy becomes unmanageable. Do not set this value to true indiscriminately.

    Use this parameter only when you include a policy in the request and you intend to prevent the principal that is making the request from making a subsequent PutResourcePolicy request.

    The default value is false.

  • policyRevisionId :: Maybe Text

    Specifies a specific policy revision, to ensure an atomic create operation. By default the resource policy is created if it does not exist, or updated with an incremented revision id. The revision id is unique to each policy in the account.

    If the policy revision id does not match the latest revision id, the operation will fail with an InvalidPolicyRevisionIdException exception. You can also provide a PolicyRevisionId of 0. In this case, the operation will fail with an InvalidPolicyRevisionIdException exception if a resource policy with the same name already exists.

  • policyName :: Text

    The name of the resource policy. Must be unique within a specific Amazon Web Services account.

  • policyDocument :: Text

    The resource policy document, which can be up to 5kb in size.

Instances

Instances details
ToJSON PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

ToHeaders PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

ToPath PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

ToQuery PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

AWSRequest PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Associated Types

type AWSResponse PutResourcePolicy #

Generic PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Associated Types

type Rep PutResourcePolicy :: Type -> Type #

Read PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Show PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

NFData PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Methods

rnf :: PutResourcePolicy -> () #

Eq PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Hashable PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

type AWSResponse PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

type Rep PutResourcePolicy Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

type Rep PutResourcePolicy = D1 ('MetaData "PutResourcePolicy" "Amazonka.XRay.PutResourcePolicy" "amazonka-xray-2.0-EVMSPoflqtHB9ZqvEIOE4Q" 'False) (C1 ('MetaCons "PutResourcePolicy'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "bypassPolicyLockoutCheck") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "policyRevisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "policyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "policyDocument") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newPutResourcePolicy Source #

Create a value of PutResourcePolicy 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:bypassPolicyLockoutCheck:PutResourcePolicy', putResourcePolicy_bypassPolicyLockoutCheck - A flag to indicate whether to bypass the resource policy lockout safety check.

Setting this value to true increases the risk that the policy becomes unmanageable. Do not set this value to true indiscriminately.

Use this parameter only when you include a policy in the request and you intend to prevent the principal that is making the request from making a subsequent PutResourcePolicy request.

The default value is false.

PutResourcePolicy, putResourcePolicy_policyRevisionId - Specifies a specific policy revision, to ensure an atomic create operation. By default the resource policy is created if it does not exist, or updated with an incremented revision id. The revision id is unique to each policy in the account.

If the policy revision id does not match the latest revision id, the operation will fail with an InvalidPolicyRevisionIdException exception. You can also provide a PolicyRevisionId of 0. In this case, the operation will fail with an InvalidPolicyRevisionIdException exception if a resource policy with the same name already exists.

PutResourcePolicy, putResourcePolicy_policyName - The name of the resource policy. Must be unique within a specific Amazon Web Services account.

PutResourcePolicy, putResourcePolicy_policyDocument - The resource policy document, which can be up to 5kb in size.

Request Lenses

putResourcePolicy_bypassPolicyLockoutCheck :: Lens' PutResourcePolicy (Maybe Bool) Source #

A flag to indicate whether to bypass the resource policy lockout safety check.

Setting this value to true increases the risk that the policy becomes unmanageable. Do not set this value to true indiscriminately.

Use this parameter only when you include a policy in the request and you intend to prevent the principal that is making the request from making a subsequent PutResourcePolicy request.

The default value is false.

putResourcePolicy_policyRevisionId :: Lens' PutResourcePolicy (Maybe Text) Source #

Specifies a specific policy revision, to ensure an atomic create operation. By default the resource policy is created if it does not exist, or updated with an incremented revision id. The revision id is unique to each policy in the account.

If the policy revision id does not match the latest revision id, the operation will fail with an InvalidPolicyRevisionIdException exception. You can also provide a PolicyRevisionId of 0. In this case, the operation will fail with an InvalidPolicyRevisionIdException exception if a resource policy with the same name already exists.

putResourcePolicy_policyName :: Lens' PutResourcePolicy Text Source #

The name of the resource policy. Must be unique within a specific Amazon Web Services account.

putResourcePolicy_policyDocument :: Lens' PutResourcePolicy Text Source #

The resource policy document, which can be up to 5kb in size.

Destructuring the Response

data PutResourcePolicyResponse Source #

See: newPutResourcePolicyResponse smart constructor.

Constructors

PutResourcePolicyResponse' 

Fields

Instances

Instances details
Generic PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Associated Types

type Rep PutResourcePolicyResponse :: Type -> Type #

Read PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Show PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

NFData PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

Eq PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

type Rep PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.XRay.PutResourcePolicy

type Rep PutResourcePolicyResponse = D1 ('MetaData "PutResourcePolicyResponse" "Amazonka.XRay.PutResourcePolicy" "amazonka-xray-2.0-EVMSPoflqtHB9ZqvEIOE4Q" 'False) (C1 ('MetaCons "PutResourcePolicyResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "resourcePolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResourcePolicy)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newPutResourcePolicyResponse Source #

Create a value of PutResourcePolicyResponse 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:PutResourcePolicyResponse', putResourcePolicyResponse_resourcePolicy - The resource policy document, as provided in the PutResourcePolicyRequest.

PutResourcePolicyResponse, putResourcePolicyResponse_httpStatus - The response's http status code.

Response Lenses

putResourcePolicyResponse_resourcePolicy :: Lens' PutResourcePolicyResponse (Maybe ResourcePolicy) Source #

The resource policy document, as provided in the PutResourcePolicyRequest.