amazonka-organizations-1.5.0: Amazon Organizations SDK.

Copyright(c) 2013-2017 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 # 
Data UpdatePolicy Source # 

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 # 
Show UpdatePolicy Source # 
Generic UpdatePolicy Source # 

Associated Types

type Rep UpdatePolicy :: * -> * #

Hashable UpdatePolicy Source # 
ToJSON UpdatePolicy Source # 
NFData UpdatePolicy Source # 

Methods

rnf :: UpdatePolicy -> () #

AWSRequest UpdatePolicy Source # 
ToQuery UpdatePolicy Source # 
ToPath UpdatePolicy Source # 
ToHeaders UpdatePolicy Source # 
type Rep UpdatePolicy Source # 
type Rep UpdatePolicy = D1 (MetaData "UpdatePolicy" "Network.AWS.Organizations.UpdatePolicy" "amazonka-organizations-1.5.0-9d9i18lsT75IlwObP60hiK" False) (C1 (MetaCons "UpdatePolicy'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_upContent") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_upName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_upDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_upPolicyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs UpdatePolicy Source # 

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 # 
Data UpdatePolicyResponse Source # 

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 # 
Show UpdatePolicyResponse Source # 
Generic UpdatePolicyResponse Source # 
NFData UpdatePolicyResponse Source # 

Methods

rnf :: UpdatePolicyResponse -> () #

type Rep UpdatePolicyResponse Source # 
type Rep UpdatePolicyResponse = D1 (MetaData "UpdatePolicyResponse" "Network.AWS.Organizations.UpdatePolicy" "amazonka-organizations-1.5.0-9d9i18lsT75IlwObP60hiK" False) (C1 (MetaCons "UpdatePolicyResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_uprsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Policy))) (S1 (MetaSel (Just Symbol "_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.