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.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 # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Data ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

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 # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Show ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Generic ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Associated Types

type Rep ListTargetsForPolicy :: Type -> Type #

Hashable ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

ToJSON ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

AWSPager ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

AWSRequest ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Associated Types

type Rs ListTargetsForPolicy :: Type #

ToHeaders ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

ToPath ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

ToQuery ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

NFData ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Methods

rnf :: ListTargetsForPolicy -> () #

type Rep ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

type Rep ListTargetsForPolicy = D1 (MetaData "ListTargetsForPolicy" "Network.AWS.Organizations.ListTargetsForPolicy" "amazonka-organizations-1.6.1-AXMOvAV6jebLVZPNUpIjqF" False) (C1 (MetaCons "ListTargetsForPolicy'" PrefixI True) (S1 (MetaSel (Just "_ltfpNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_ltfpMaxResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat)) :*: S1 (MetaSel (Just "_ltfpPolicyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs ListTargetsForPolicy Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

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 # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Data ListTargetsForPolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

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 # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Show ListTargetsForPolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Generic ListTargetsForPolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

Associated Types

type Rep ListTargetsForPolicyResponse :: Type -> Type #

NFData ListTargetsForPolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

type Rep ListTargetsForPolicyResponse Source # 
Instance details

Defined in Network.AWS.Organizations.ListTargetsForPolicy

type Rep ListTargetsForPolicyResponse = D1 (MetaData "ListTargetsForPolicyResponse" "Network.AWS.Organizations.ListTargetsForPolicy" "amazonka-organizations-1.6.1-AXMOvAV6jebLVZPNUpIjqF" False) (C1 (MetaCons "ListTargetsForPolicyResponse'" PrefixI True) (S1 (MetaSel (Just "_ltfprsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_ltfprsTargets") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [PolicyTargetSummary])) :*: S1 (MetaSel (Just "_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.