amazonka-organizations-1.6.1: Amazon Organizations SDK.

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

Network.AWS.Organizations.UpdatePolicy

Contents

Description

Updates an existing policy with a new name, description, or content. If any parameter is not supplied, that value remains unchanged. Note that you cannot change a policy's type.

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

Synopsis

Creating a Request

updatePolicy Source #

Creates a value of UpdatePolicy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • upContent - 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 .
  • upName - 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.
  • upDescription - If provided, the new description for the policy.
  • upPolicyId - 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 lower-case letters or digits.

data UpdatePolicy Source #

See: updatePolicy smart constructor.

Instances
Eq UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Data UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdatePolicy -> c UpdatePolicy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdatePolicy #

toConstr :: UpdatePolicy -> Constr #

dataTypeOf :: UpdatePolicy -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UpdatePolicy) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdatePolicy) #

gmapT :: (forall b. Data b => b -> b) -> UpdatePolicy -> UpdatePolicy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdatePolicy -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdatePolicy -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdatePolicy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdatePolicy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdatePolicy -> m UpdatePolicy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdatePolicy -> m UpdatePolicy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdatePolicy -> m UpdatePolicy #

Read UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Show UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Generic UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Associated Types

type Rep UpdatePolicy :: Type -> Type #

Hashable UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

ToJSON UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

AWSRequest UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Associated Types

type Rs UpdatePolicy :: Type #

ToHeaders UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

ToPath UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

ToQuery UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

NFData UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Methods

rnf :: UpdatePolicy -> () #

type Rep UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

type Rep UpdatePolicy = D1 (MetaData "UpdatePolicy" "Network.AWS.Organizations.UpdatePolicy" "amazonka-organizations-1.6.1-AXMOvAV6jebLVZPNUpIjqF" False) (C1 (MetaCons "UpdatePolicy'" PrefixI True) ((S1 (MetaSel (Just "_upContent") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_upName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_upDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_upPolicyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs UpdatePolicy Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Request Lenses

upContent :: 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 .

upName :: 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.

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

If provided, the new description for the policy.

upPolicyId :: 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 lower-case letters or digits.

Destructuring the Response

updatePolicyResponse Source #

Creates a value of UpdatePolicyResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • uprsPolicy - A structure that contains details about the updated policy, showing the requested changes.
  • uprsResponseStatus - -- | The response status code.

data UpdatePolicyResponse Source #

See: updatePolicyResponse smart constructor.

Instances
Eq UpdatePolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Data UpdatePolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdatePolicyResponse -> c UpdatePolicyResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdatePolicyResponse #

toConstr :: UpdatePolicyResponse -> Constr #

dataTypeOf :: UpdatePolicyResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UpdatePolicyResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdatePolicyResponse) #

gmapT :: (forall b. Data b => b -> b) -> UpdatePolicyResponse -> UpdatePolicyResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdatePolicyResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdatePolicyResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdatePolicyResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdatePolicyResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdatePolicyResponse -> m UpdatePolicyResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdatePolicyResponse -> m UpdatePolicyResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdatePolicyResponse -> m UpdatePolicyResponse #

Read UpdatePolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Show UpdatePolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Generic UpdatePolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Associated Types

type Rep UpdatePolicyResponse :: Type -> Type #

NFData UpdatePolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

Methods

rnf :: UpdatePolicyResponse -> () #

type Rep UpdatePolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.UpdatePolicy

type Rep UpdatePolicyResponse = D1 (MetaData "UpdatePolicyResponse" "Network.AWS.Organizations.UpdatePolicy" "amazonka-organizations-1.6.1-AXMOvAV6jebLVZPNUpIjqF" False) (C1 (MetaCons "UpdatePolicyResponse'" PrefixI True) (S1 (MetaSel (Just "_uprsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Policy)) :*: S1 (MetaSel (Just "_uprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

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

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

uprsResponseStatus :: Lens' UpdatePolicyResponse Int Source #

  • - | The response status code.