amazonka-organizations-1.6.0: 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.ListTargetsForPolicy

Contents

Description

Lists all the roots, OUs, and accounts to which the specified policy is attached.

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

This operation returns paginated results.

Synopsis

Creating a Request

listTargetsForPolicy Source #

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

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

  • ltfpNextToken - Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.
  • ltfpMaxResults - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
  • ltfpPolicyId - The unique identifier (ID) of the policy for which you want to know its attachments. The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.

data ListTargetsForPolicy Source #

See: listTargetsForPolicy smart constructor.

Instances

Eq ListTargetsForPolicy Source # 
Data ListTargetsForPolicy Source # 

Methods

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

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

toConstr :: ListTargetsForPolicy -> Constr #

dataTypeOf :: ListTargetsForPolicy -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ListTargetsForPolicy Source # 
Show ListTargetsForPolicy Source # 
Generic ListTargetsForPolicy Source # 
Hashable ListTargetsForPolicy Source # 
ToJSON ListTargetsForPolicy Source # 
NFData ListTargetsForPolicy Source # 

Methods

rnf :: ListTargetsForPolicy -> () #

AWSPager ListTargetsForPolicy Source # 
AWSRequest ListTargetsForPolicy Source # 
ToHeaders ListTargetsForPolicy Source # 
ToPath ListTargetsForPolicy Source # 
ToQuery ListTargetsForPolicy Source # 
type Rep ListTargetsForPolicy Source # 
type Rep ListTargetsForPolicy = D1 * (MetaData "ListTargetsForPolicy" "Network.AWS.Organizations.ListTargetsForPolicy" "amazonka-organizations-1.6.0-rHxjcIb8Bn6XT7VgZWDi9" False) (C1 * (MetaCons "ListTargetsForPolicy'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_ltfpNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_ltfpMaxResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Nat))) (S1 * (MetaSel (Just Symbol "_ltfpPolicyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))
type Rs ListTargetsForPolicy Source # 

Request Lenses

ltfpNextToken :: Lens' ListTargetsForPolicy (Maybe Text) Source #

Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.

ltfpMaxResults :: Lens' ListTargetsForPolicy (Maybe Natural) Source #

(Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

ltfpPolicyId :: Lens' ListTargetsForPolicy Text Source #

The unique identifier (ID) of the policy for which you want to know its attachments. The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.

Destructuring the Response

listTargetsForPolicyResponse Source #

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

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

  • ltfprsNextToken - If present, this value indicates that there is more output available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .
  • ltfprsTargets - A list of structures, each of which contains details about one of the entities to which the specified policy is attached.
  • ltfprsResponseStatus - -- | The response status code.

data ListTargetsForPolicyResponse Source #

See: listTargetsForPolicyResponse smart constructor.

Instances

Eq ListTargetsForPolicyResponse Source # 
Data ListTargetsForPolicyResponse Source # 

Methods

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

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

toConstr :: ListTargetsForPolicyResponse -> Constr #

dataTypeOf :: ListTargetsForPolicyResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ListTargetsForPolicyResponse Source # 
Show ListTargetsForPolicyResponse Source # 
Generic ListTargetsForPolicyResponse Source # 
NFData ListTargetsForPolicyResponse Source # 
type Rep ListTargetsForPolicyResponse Source # 
type Rep ListTargetsForPolicyResponse = D1 * (MetaData "ListTargetsForPolicyResponse" "Network.AWS.Organizations.ListTargetsForPolicy" "amazonka-organizations-1.6.0-rHxjcIb8Bn6XT7VgZWDi9" False) (C1 * (MetaCons "ListTargetsForPolicyResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_ltfprsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_ltfprsTargets") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [PolicyTargetSummary]))) (S1 * (MetaSel (Just Symbol "_ltfprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

Response Lenses

ltfprsNextToken :: Lens' ListTargetsForPolicyResponse (Maybe Text) Source #

If present, this value indicates that there is more output available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .

ltfprsTargets :: Lens' ListTargetsForPolicyResponse [PolicyTargetSummary] Source #

A list of structures, each of which contains details about one of the entities to which the specified policy is attached.