libZSservicesZSamazonka-organizationsZSamazonka-organizations
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.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 AWS Organizations User Guide.

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

  • description :: Maybe Text

    If provided, the new description for the policy.

  • 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
Eq UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Read UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Show UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Generic UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Associated Types

type Rep UpdatePolicy :: Type -> Type #

NFData UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Methods

rnf :: UpdatePolicy -> () #

Hashable UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

ToJSON UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

AWSRequest UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Associated Types

type AWSResponse 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

type Rep UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

type Rep UpdatePolicy = D1 ('MetaData "UpdatePolicy" "Amazonka.Organizations.UpdatePolicy" "libZSservicesZSamazonka-organizationsZSamazonka-organizations" 'False) (C1 ('MetaCons "UpdatePolicy'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "policyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse UpdatePolicy Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

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:

$sel:content: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 AWS Organizations User Guide.

$sel:name: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:description:UpdatePolicy', updatePolicy_description - If provided, the new description for the policy.

$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 AWS Organizations User Guide.

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_description :: Lens' UpdatePolicy (Maybe Text) Source #

If provided, the new description for the policy.

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
Eq UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Read UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Show UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Generic UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Associated Types

type Rep UpdatePolicyResponse :: Type -> Type #

NFData UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

Methods

rnf :: UpdatePolicyResponse -> () #

type Rep UpdatePolicyResponse Source # 
Instance details

Defined in Amazonka.Organizations.UpdatePolicy

type Rep UpdatePolicyResponse = D1 ('MetaData "UpdatePolicyResponse" "Amazonka.Organizations.UpdatePolicy" "libZSservicesZSamazonka-organizationsZSamazonka-organizations" '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.