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

Description

Updates an existing policy with a new name, description, or content. If you don't supply any parameter, that value remains unchanged. You can't change a policy's type.

This operation can be called only from the organization's management account.

Synopsis

Creating a Request

data UpdatePolicy Source #

See: newUpdatePolicy smart constructor.

Constructors

UpdatePolicy' 

Fields

  • content :: Maybe Text

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

  • description :: Maybe Text

    If provided, the new description for the policy.

  • name :: Maybe Text

    If provided, the new name for the policy.

    The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

  • policyId :: Text

    The unique identifier (ID) of the policy that you want to update.

    The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).

Instances

Instances details
ToJSON UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

ToHeaders UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

ToPath UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

ToQuery UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

AWSRequest UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Associated Types

type AWSResponse UpdatePolicy #

Generic UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Associated Types

type Rep UpdatePolicy :: Type -> Type #

Read UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Show UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

NFData UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Methods

rnf :: UpdatePolicy -> () #

Eq UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Hashable UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

type AWSResponse UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

type Rep UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

type Rep UpdatePolicy = D1 ('MetaData "UpdatePolicy" "Amazonka.Organizations.UpdatePolicy" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "UpdatePolicy'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "policyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newUpdatePolicy Source #

Create a value of UpdatePolicy 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:

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

UpdatePolicy, updatePolicy_description - If provided, the new description for the policy.

UpdatePolicy, updatePolicy_name - If provided, the new name for the policy.

The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

$sel:policyId:UpdatePolicy', updatePolicy_policyId - The unique identifier (ID) of the policy that you want to update.

The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).

Request Lenses

updatePolicy_content :: Lens' UpdatePolicy (Maybe Text) Source #

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

updatePolicy_description :: Lens' UpdatePolicy (Maybe Text) Source #

If provided, the new description for the policy.

updatePolicy_name :: Lens' UpdatePolicy (Maybe Text) Source #

If provided, the new name for the policy.

The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

updatePolicy_policyId :: Lens' UpdatePolicy Text Source #

The unique identifier (ID) of the policy that you want to update.

The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).

Destructuring the Response

data UpdatePolicyResponse Source #

See: newUpdatePolicyResponse smart constructor.

Constructors

UpdatePolicyResponse' 

Fields

  • policy :: Maybe Policy

    A structure that contains details about the updated policy, showing the requested changes.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Associated Types

type Rep UpdatePolicyResponse :: Type -> Type #

Read UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Show UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

NFData UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Methods

rnf :: UpdatePolicyResponse -> () #

Eq UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

type Rep UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

type Rep UpdatePolicyResponse = D1 ('MetaData "UpdatePolicyResponse" "Amazonka.Organizations.UpdatePolicy" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "UpdatePolicyResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Policy)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newUpdatePolicyResponse Source #

Create a value of UpdatePolicyResponse 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:UpdatePolicyResponse', updatePolicyResponse_policy - A structure that contains details about the updated policy, showing the requested changes.

$sel:httpStatus:UpdatePolicyResponse', updatePolicyResponse_httpStatus - The response's http status code.

Response Lenses

updatePolicyResponse_policy :: Lens' UpdatePolicyResponse (Maybe Policy) Source #

A structure that contains details about the updated policy, showing the requested changes.