amazonka-organizations-2.0: Amazon Organizations 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.Organizations.PutResourcePolicy

Description

Creates or updates a resource policy.

You can only call this operation from the organization's management account.

Synopsis

Creating a Request

data PutResourcePolicy Source #

See: newPutResourcePolicy smart constructor.

Constructors

PutResourcePolicy' 

Fields

  • tags :: Maybe [Tag]

    Updates the list of tags that you want to attach to the newly-created resource policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide.

    Calls with tags apply to the initial creation of the resource policy, otherwise an exception is thrown. If any one of the tags is invalid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created.

  • content :: Text

    If provided, the new content for the resource policy. The text must be correctly formatted JSON that complies with the syntax for the resource policy's type. For more information, see Service Control Policy Syntax in the Organizations User Guide.

Instances

Instances details
ToJSON PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

ToHeaders PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

ToPath PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

ToQuery PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

AWSRequest PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Associated Types

type AWSResponse PutResourcePolicy #

Generic PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Associated Types

type Rep PutResourcePolicy :: Type -> Type #

Read PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Show PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

NFData PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Methods

rnf :: PutResourcePolicy -> () #

Eq PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Hashable PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

type AWSResponse PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

type Rep PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

type Rep PutResourcePolicy = D1 ('MetaData "PutResourcePolicy" "Amazonka.Organizations.PutResourcePolicy" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "PutResourcePolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "content") '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:tags:PutResourcePolicy', putResourcePolicy_tags - Updates the list of tags that you want to attach to the newly-created resource policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide.

Calls with tags apply to the initial creation of the resource policy, otherwise an exception is thrown. If any one of the tags is invalid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created.

PutResourcePolicy, putResourcePolicy_content - If provided, the new content for the resource policy. The text must be correctly formatted JSON that complies with the syntax for the resource policy's type. For more information, see Service Control Policy Syntax in the Organizations User Guide.

Request Lenses

putResourcePolicy_tags :: Lens' PutResourcePolicy (Maybe [Tag]) Source #

Updates the list of tags that you want to attach to the newly-created resource policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide.

Calls with tags apply to the initial creation of the resource policy, otherwise an exception is thrown. If any one of the tags is invalid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created.

putResourcePolicy_content :: Lens' PutResourcePolicy Text Source #

If provided, the new content for the resource policy. The text must be correctly formatted JSON that complies with the syntax for the resource policy's type. For more information, see Service Control Policy Syntax in the Organizations User Guide.

Destructuring the Response

data PutResourcePolicyResponse Source #

See: newPutResourcePolicyResponse smart constructor.

Constructors

PutResourcePolicyResponse' 

Fields

Instances

Instances details
Generic PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Associated Types

type Rep PutResourcePolicyResponse :: Type -> Type #

Read PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Show PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

NFData PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

Eq PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

type Rep PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.PutResourcePolicy

type Rep PutResourcePolicyResponse = D1 ('MetaData "PutResourcePolicyResponse" "Amazonka.Organizations.PutResourcePolicy" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" '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 - A structure that contains details about the resource policy.

$sel:httpStatus:PutResourcePolicyResponse', putResourcePolicyResponse_httpStatus - The response's http status code.

Response Lenses

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

A structure that contains details about the resource policy.